Breathing lightbulb like a candle  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
Cndiann

Breathing lightbulb like a candle

Post 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!
User avatar
waltervl
Posts: 6691
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Breathing lightbulb like a candle

Post 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
}
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Breathing lightbulb like a candle  [Solved]

Post by EddyG »

On a lot (if not all) zigbee light bulbs there is a breath effect which you might use.
Cndiann

Re: Breathing lightbulb like a candle

Post by Cndiann »

Thank you, I will try it tomorrow.

I know about the breathe effect but it does only 15 times and then stops.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest