To control my garden lights with a KlikaanKlikuit (KaKu) doorbell button I wanted to use Blocky.
After some experimenting I ended up with 4 Switches, 3 scenes and 2 events to realise this function. My solution is not very elegant, but Blocky's restrictions forced me to choose this way.
Please note that the 1 second Off delays are required!
Blocky Toggle Switch. Doorbell Button triggers On or Off (Set or Reset)
Moderator: leecollings
Re: Blocky Toggle Switch. Doorbell Button triggers On or Off (Set or Reset)
few lines of code, a more elegant solution (dzEvents)
return {
on = {
devices = { 'Pulsante01_hold' }
},
execute = function(domoticz, device)
domoticz.devices('Luce_Piazzale').toggleSwitch()
end
}
return {
on = {
devices = { 'Pulsante01_hold' }
},
execute = function(domoticz, device)
domoticz.devices('Luce_Piazzale').toggleSwitch()
end
}
Who is online
Users browsing this forum: No registered users and 0 guests