Hi chaps
This is my first LUUP entry and want someone to have a quick check to ensure i have everything in place (i stole the main LUUP) body from another topic)
The idea is to have the lights dimm 1% every 18 seconds.
This will ultimately power down the light after 30 minuets
[code]local dID = 8
luup.call_delay(“delayDim”,18,dID)
function delayDim(dev)
local devno = tonumber(dev)
local lls = tonumber((luup.variable_get(“urn:upnp-org:serviceId:Dimming1”, “LoadLevelStatus”, devno)))
local newlls = lls - 1
if newlls < 0 then newlls = 0 end
luup.call_action(“urn:upnp-org:serviceId:Dimming1”, “SetLoadLevelTarget”, {newLoadlevelTarget = newlls}, devno)
if newlls > 0 then luup.call_delay(“delayDim”,2,dev) end
end[/code]
Thanks
N