I installed the RaspberryPi Plugin and when I go to the HS3 Menu tab, I can control physical relays connected to a Rasbberrypi Device by Clicking on the On and Off buttons for one of the devices.
I also setup a event that, when manually executed, toggles one of the Raspberry devices whose output is connected to a relay's coil input and this also works great with the relay turning on or off.
The issue is, that when I try to toggle the device using a script, the relay does not change(if its Off, it stays Off and if On, stays On)
The test script is listed below:
Public Sub Main(parms As String())
if hs.devicevaluebyname("RaspberryIO Zone1ControlRelay") = 1 then
hs.setdevicevaluebyname("RaspberryIO Zone1ControlRelay",0)
else
hs.setdevicevaluebyname("RaspberryIO Zone1ControlRelay",1)
endif
End Sub
I also setup a event that, when manually executed, toggles one of the Raspberry devices whose output is connected to a relay's coil input and this also works great with the relay turning on or off.
The issue is, that when I try to toggle the device using a script, the relay does not change(if its Off, it stays Off and if On, stays On)
The test script is listed below:
Public Sub Main(parms As String())
if hs.devicevaluebyname("RaspberryIO Zone1ControlRelay") = 1 then
hs.setdevicevaluebyname("RaspberryIO Zone1ControlRelay",0)
else
hs.setdevicevaluebyname("RaspberryIO Zone1ControlRelay",1)
endif
End Sub
Comment