Announcement

Collapse
No announcement yet.

Testing and Setting Flags

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

    Testing and Setting Flags

    I have an HAI Flag with a room name of Flag and a Device Name of AutoFlag.

    Could you give me the CAPi command to set the Flag to a specified value?


    I can test the flag's value by using
    hs.DeviceValueByName(RoomName & " " & DeviceName), but I cannot find a way to set the flag's value.

    #2
    Let me see if I can find/test the CAPI syntax and I'll post back in this thread.
    HS4Pro on a Raspberry Pi4
    54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
    Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

    HSTouch Clients: 1 Android

    Comment


      #3
      @wmcmath
      Here is a script that will set a flag's value to 130. Note to change the device reference number with your own:

      Code:
      Sub Main(parm as object)
      
      Dim cc as HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(1528, True, "Flag Value (value) Set", False, False)
      cc.ControlValue = 130
      Dim cr as HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
      
      End Sub
      I tested it here and it updated the panel with the flag value.

      Let me know if you need anything else!
      HS4Pro on a Raspberry Pi4
      54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
      Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

      HSTouch Clients: 1 Android

      Comment


        #4
        Testing and Setting Flags

        Thanks much, I am going to give it a try.

        Comment


          #5
          Testing and Setting Flags

          the CAPI script works great, thanks for providing the example

          Comment

          Working...
          X