1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import ShellyPy device = ShellyPy.api.Device.connect("192.0.0.20") # turn all relays off device.relays.off() # turn all relays on device.relays.on() # toggle all relays device.relays.toggle() # return relay 0 on device.relays[0].on()