Using a single short push on the Shelly Button1 (SB1) I wanted to trigger 3 Shelly 1 relays, which in turn switches on a number lights within a room. However, as it quite clearly states on the SB1 webpage "Мore than 2 actions can affect the normal operation of the device and significantly increase consumption depending on the network infrastructure and the controlled devices.". Not only does it increase battery power consumption, it also takes quite a bit of time to trigger the relays and, from my experience, is not always, particularly reliable.
So the following is a work around that allows you to trigger multiple relays quickly and reliably. I use Domoticz as my home automation software, but the same principle may be useful for use in other home automation packages.
You will need to set up your Domoticz package to work with Shelly devices which is outlined here. Once you can see your Shelly Button1 under the "Switches" tab of the website. Go to Setup->More Options->Events. Add a new event and add the following dzVents code:
return {
on = {
devices = {'Name of your SB1'} -- Go to Switches Tab and use the name you have assigned the SB1
},
execute = function(domoticz, device)
local BtnState = domoticz.devices('Name of your SB1').state
--domoticz.log('Button state:' .. BtnState)
if (BtnState == 'Single') then
-- Single button push
if domoticz.devices('Pool Side Light Left').state == 'Off' then
domoticz.devices('Light Left').switchOn().checkFirst()
domoticz.devices('Light Right').switchOn().checkFirst()
domoticz.devices('Light Centre').switchOn().checkFirst()
else
domoticz.devices('Light Left').switchOff().checkFirst()
domoticz.devices('Light Right').switchOff().checkFirst()
domoticz.devices('Light Centre').switchOff().checkFirst()
end
end
end
}
Alles anzeigen
Good luck