i had the idea to create a wake up light using the lights in my room but now i am kinda stuck on the execution part.
what my idea is:
- i have dimmable lights in my bedroom and want to use them as a wake up light instead of the noisy annoying beeper
- i created a selector switch with the times i want to choose for my wake up light to be at a 100%
- the idea is that a script will dim the lights from 0 to 100% in around 15 to 20 minutes
a little caveat my domoticz installation restarts at 04:00 in the night, something i have still turned on because in the past domoticz had a habit of crashing somewhere in the night and nothing would work when i woke up, this "fixed" it back then and still to this date, so all the aftermin and such will be killed in the middle of the night...
a screenshot of my selector:

the start of a script i have so far(no idea if it is of any use):
Code: Select all
return
{
on =
{
devices =
{
'Wekker Jelle'
},
timer = { 'at 05:00'
'at 06:00',
'at 06:15',
'at 06:30',
'at 06:45',
'at 07:00',
'at 07:15',
'at 07:30',
'at 07:45',
'at 08:00',
'at 08:15',
'at 08:30',
'at 08:45',
'at 09:00',
},
},
execute = function(dz, device)
local knop = dz.devices("Wekker Jelle")
local lamp = dz.devices("Ledstrip bed Jelle")
if knop.state == 0 then
lamp.cancelQueuedCommands()
elseif knop.state == 10 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 06:00
lamp.dosomething()
knop.dimto(0).after the thing has finished
elseif knop.state == 20 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 06:15
elseif knop.state == 30 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 06:30
elseif knop.state == 40 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 06:45
elseif knop.state == 50 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 07:00
elseif knop.state == 60 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 07:15
elseif knop.state == 70 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 07:30
elseif knop.state == 80 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 07:45
elseif knop.state == 90 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 08:00
elseif knop.state == 100 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 08:15
elseif knop.state == 110 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 08:30
elseif knop.state == 120 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 08:45
elseif knop.state == 130 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 09:00
elseif knop.state == 140 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 09:15
elseif knop.state == 150 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 09:30
elseif knop.state == 160 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 09:45
elseif knop.state == 170 then -- dim lights during 15 minutes from 0 to 100% and let them be at 100 at 10:00
end
end
}