tried to change my bash script to a dzvents version but it seems dzvents is way slower.
because of that not al the Hue lights i want to toggle switch either on or off
do you also have this experience.
old setup
scene which fires a bash script which toggles hue lights
curl -s "http://192.168.1.xx:xxxx/json.htm?type=command¶m=switchlight&idx=xx&switchcmd=Toggle"
this line 5 times to toggle 5 lights
very fast execution
new setup
scene or pulse switch which triggers dzvents script
very slow, not all lights switch on/off (please note these are hue lights)
Code: Select all
return {
on = { devices = { "S2 1 click" }}, -- Name of your button
execute = function(dz, item )
--item.state == "Click" then
dz.devices("Dressoirlamp").toggleSwitch() -- Name of your light
dz.devices("Dressoirlamptoog").toggleSwitch() -- Name of your light
dz.devices("Bamboelampklok").toggleSwitch() -- Name of your light
dz.devices("Bamboelamphoek").toggleSwitch() -- Name of your light
dz.devices("LampachterTV").toggleSwitch() -- Name of your light
--end
end
}