Need help with dimming Philips Hue

Moderator: leecollings

Post Reply
Chrisiesmit93
Posts: 4
Joined: Wednesday 30 March 2016 23:41
Target OS: Windows
Domoticz version:
Contact:

Need help with dimming Philips Hue

Post by Chrisiesmit93 »

Hello,
I want to put my Philips Hue lights gradually brighter (from 0% to 100% with steps of 1% per minute) when the sun goes down (trigger).
I tested a small blocky script with multiple "set X = X after X seconds", but that didn't work. Only the last one does work...

Now I am testing with LUA, but that's not that easy for me because I'm not a programmer.
I searched some forum's and Google already, and have this at the moment:

Code: Select all

commandArray = {}

function wait(waitTime)
    timer = os.time()
    repeat until os.time() > timer + waitTime
end

if (devicechanged['TEST'] == 'On') then
    commandArray['Hue']='Set Level 10'
    wait(10)
    commandArray['Hue']='Set Level 100'
end

return commandArray
The lights are going ON to 10% brightness, but the lights are not going to 100% brightness after 10 seconds...

Does anyone know a better solution for me or push me in the right direction?
(already found the "Easiest way to make lua script wait/pause/sleep/block for a few seconds" forum page, but I can't get it working :()
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest