View Full Version : Quick Question

January 27th, 2011, 09:09 AM
I'm working on my lighting page in Netremote,.

I'm trying to get a sliding image visual indicator to display the current light level for each individual switch but I can't get it to work.

Is there a sliding image visual indicator example for Device Manager light control.

I was trying to use the DM.Lighting.Devices.<LoopIndex>\Level variable but i can't get it to work

Also how can you retrive the Level in LUA?

Help please

January 27th, 2011, 09:30 PM
Not sure I follow you.

Do you mean like this?

January 28th, 2011, 04:59 PM
Hi John

What i mean is that you have a background image and a foreground image,

the foreground image slides to reveal the background image depending on the light level of the current light.

Its a cool effect I use it for my progress bar for my music page.

but for some reason I can't get it to work for the light level

January 28th, 2011, 06:27 PM
Sorry not done that.

January 28th, 2011, 07:31 PM
How the heck can I access the DM.Lighting.Devices.x\Level variable from lua

I know if I place the above in {} brackets in a frame it will display the current level but how can you get this level into LUA?

January 28th, 2011, 07:43 PM
I use this for my light bulb display

local range = tonumber(NetRemote.GetVariable([[<<^^^>.1>\Level]]))

if range > 0 then
if range > 10 then
return false
return true
return false

January 28th, 2011, 07:57 PM
I keep getting Nil for the response How does it know what variable to get with the <<^^^>.1>\lLevel

January 28th, 2011, 08:05 PM
I assume that the first ^ is DM the second ^ is Lighting and the 3rd ^ is Devices

I'm still not an expert at lua but I guess the square brackets are delimiters?

January 28th, 2011, 08:36 PM
The frame is named

Fordrat8\ElkM1EZ8\Light 7 and the number of ^^^ is how many levels above that the named frame is at (frames within frames)?

I am not an expert at this either but that is what I found by playing around.

Try this example I created. It uses a LUA script to hide and unhide a frame

January 31st, 2011, 06:55 PM
Got It working John

What I was doing wrong was trying to get the level from the wrong variable.

NetRemote.GetVariable(DM.Lighting.Devices.1 ..'\\Level)

instead of NetRemote.GetVariable(Homecontrol\X10\A5.. '\\Level')