Page 1 of 1
Breathing lightbulb like a candle
Posted: Tuesday 14 December 2021 16:34
by Cndiann
Hello,
I don't know if it possible but can I achieve with dzvents that a lightbulb will breath like a candle? For example, switching between 100% and 80% light.
I want to recreate a lantern with a zigbee e14 dimmable light bulb. Kinda idea what you see in theme parks.
Thanks in advance!
Re: Breathing lightbulb like a candle
Posted: Tuesday 14 December 2021 19:24
by waltervl
You could do something like this. Change the pattern as desired.
In my case the steps from 80 to 90 were still be seen as hard steps. Perhaps your zigbee setup (zigbee2mqtt?) can have a parameter smooth change periods, eg 10 seconds for 90 to 80 percent?
Code: Select all
return {
on = {
timer = {
'every minute'
}
},
logging = {
level = domoticz.LOG_INFO,
marker = 'template',
},
execute = function(domoticz, device)
local timer = 1
domoticz.devices('mylamp').dimTo(99)
repeat
domoticz.devices('mylamp').dimTo(90).afterSec(timer)
timer = timer + 1
domoticz.devices('mylamp').dimTo(80).afterSec(timer)
timer = timer + 1
domoticz.devices('mylamp').dimTo(90).afterSec(timer)
timer = timer + 1
domoticz.devices('mylamp').dimTo(99).afterSec(timer)
timer = timer + 1
until( timer > 58 )
end
}
Re: Breathing lightbulb like a candle
Posted: Tuesday 14 December 2021 19:54
by EddyG
On a lot (if not all) zigbee light bulbs there is a breath effect which you might use.
Re: Breathing lightbulb like a candle
Posted: Tuesday 14 December 2021 21:13
by Cndiann
Thank you, I will try it tomorrow.
I know about the breathe effect but it does only 15 times and then stops.