Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

Cannot control RaspberryPi devices with a script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot control RaspberryPi devices with a script

    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


  • #2
    you can't control a HS device using setdevicevaluebyname, you have to use CAPI. There is hundreds of threads in the forum about that, here is one: https://forums.homeseer.com/forum/ho...07#post1293307

    Comment


    • #3
      I found the issue, I have to use CAPI controls to actually turn on and off the devices from a script. I changed the script to use CAPI controls to control the Raspberry devices and it now works great. I finally have my sprinkler controller working great.

      Comment

      Working...
      X