Blocky Toggle Switch. Doorbell Button triggers On or Off (Set or Reset)

Moderator: leecollings

Post Reply
irab
Posts: 6
Joined: Tuesday 15 August 2017 11:12
Target OS: OS X
Domoticz version:
Contact:

Blocky Toggle Switch. Doorbell Button triggers On or Off (Set or Reset)

Post by irab »

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!

Screenshot 2017-08-15 10.30.20.png
Screenshot 2017-08-15 10.30.20.png (321.17 KiB) Viewed 2399 times

domoticzscenes.jpg
domoticzscenes.jpg (212.51 KiB) Viewed 2399 times
domoticzevents.jpg
domoticzevents.jpg (92.43 KiB) Viewed 2399 times
f12004
Posts: 12
Joined: Thursday 05 December 2019 23:06
Target OS: -
Domoticz version:
Contact:

Re: Blocky Toggle Switch. Doorbell Button triggers On or Off (Set or Reset)

Post by f12004 »

few lines of code, a more elegant solution (dzEvents)

return {
on = {
devices = { 'Pulsante01_hold' }
},
execute = function(domoticz, device)
domoticz.devices('Luce_Piazzale').toggleSwitch()
end
}
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests