Announcement

Collapse
No announcement yet.

How to set a device status

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

    How to set a device status

    I'm googling but I can not seem to find an answer, how do I set a device status based on the reference id of the device? I found devicebytring, by device but not by status.

    Thanks,
    Aldo

    #2
    Originally posted by aldo View Post
    I'm googling but I can not seem to find an answer, how do I set a device status based on the reference id of the device? I found devicebytring, by device but not by status.

    Thanks,
    Aldo
    You cannot set the Status, it is determined by the value associated with it in the device setup. You SetDeviceValueByRef. Once the Value is set the VS pair will find the Status that applies.
    Randy Prade
    Aurora, CO
    Prades.net

    PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

    Comment


      #3
      Thank you, I guess it was a feature of HS2 and they moved it to value in HS3?


      Originally posted by rprade View Post
      You cannot set the Status, it is determined by the value associated with it in the device setup. You SetDeviceValueByRef. Once the Value is set the VS pair will find the Status that applies.

      Comment


        #4
        Originally posted by aldo View Post
        Thank you, I guess it was a feature of HS2 and they moved it to value in HS3?
        In HS2 a the value and status of a device were distinct and independent properties. In HS3 a device can have only one, its value.
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment


          #5
          While what has been stated is all factual, it still may be valuable to understand your options based upon why you asked for DeviceStatus. HS3 does provide replacement variables that will give you the same thing that HS3 shows for Device Status on its browser page. Understanding Device Value Status Pairs and Device Graphic Value Pairs (VSP & VGP) that are editable on the DeviceManagement browser page will define how DeviceStatus displays based upon DeviceValue.

          In mcsSprinklers the properties of Value, Status and String all had specific functions so when HST depreciated Status to a display-only feature I had to transform these properties usage. I used Plugin Extra Data (PED) to hold information so I could maintain the same logic in mcsSprinklers and only transform from the HS1/HS2-properties to the HS3-properties at the time of the calls to the HS API.

          Comment


            #6
            Thanks for the explanation. I was trying to set a virtual device on and off in a script. Since I'm a hacker when we talk about scripts, I did not know about it, thanks for the clarifications.

            Aldo

            Comment

            Working...
            X