Announcement

Collapse
No announcement yet.

Control Arduino From HS script

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

    Control Arduino From HS script

    How can I control the Arduino from a HS script?
    I would like to set a Digital output on and off.
    Do in need to use "CAPI"?
    Thanks, Drew

    #2
    Originally posted by pfloyd View Post
    How can I control the Arduino from a HS script?
    I would like to set a Digital output on and off.
    Do in need to use "CAPI"?
    Thanks, Drew
    You should just need to set the device value like you would any device. I guess you could use hs.SetDeviceValueByRef(1234, 1, True) where 1234 is the device and 1 is on.

    Greig.
    Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
    X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
    Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
    Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
    Scripts =
    Various

    Comment


      #3
      Yes I have tried "hs.SetDeviceValueByRef(1234, 1, True)" it turns on the device in Homeseer Web Control, but does not set the Arduino pin. If I use the Homeseer Web Control "On" button it will set the Arduino pin.

      Comment


        #4
        Maybe try the CAPI version:

        Code:
        		hs.CAPIControlHandler(hs.CAPIGetSingleControl(1234,true ,"on",false,true))
        Cheers
        Al
        HS 3.0.0.548: 1990 Devices 1172 Events
        Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

        Comment


          #5
          hs.CAPIControlHandler(hs.CAPIGetSingleControl(1234,true ,"on",false,true))
          That Works!
          Thanks for your help.

          Comment


            #6
            You're welcome. Glad it worked.

            Cheers
            Al
            HS 3.0.0.548: 1990 Devices 1172 Events
            Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

            Comment

            Working...
            X