Announcement

Collapse
No announcement yet.

SmartThings "Switch" Status Values

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

    SmartThings "Switch" Status Values

    spud

    I seem to recall running into this problem when I was controlling SmartThings devices using the ST API and JSON calls to/from Homeseer... Best I remember the SmartThings API wants switch commands sent either textually as "On" and "Off", or numerically as "0" for On and "1" for off. Looks like the Plugin is currently using the binary "0/1" option.

    Problem with that is those device values don't follow the HS convention of "0" for Off and "255" for On. Therefore if a switch controlled by ST is added to an Easy Trigger group that includes Homeseer controlled switches, commands are not going to work for the ST devices. A command of "0" would turn OFF the Homeseer native devices and turn ON the ST devices.

    I'm wondering: Could you change the plugin to use "ON/OFF" strings and parse to conventional values of "0/255" without it being a breaking change?

    Thanks,

    --Barry

    #2
    ZWave uses 0/255, but there are plenty of other plugins that uses 0/1, 0/100 or other values for Off/On, so I don't think this is really a "HS convention"
    So I'm not going to change those values for the SmartThings plugin, but a nice solution would be to have the EasyTrigger group action to be able to use a ControlUse label (On/Off/etc...) instead of a numerical value.

    Comment


      #3
      That is true. However what makes this situation more difficult to work around is 0 is ON, not off. This is the only plugin I've ran into that uses 0 for ON.

      The ControlUse labels would take care of simple On/Off commands. However such group conditions as "If ANY device in this group is "Greater Than" or "Less Than" would still be confusing to use.


      --Barry

      Comment


        #4
        spud , Any comment and/or suggestions on my post above concerning the 0=ON device status value? Using 0 for ON is difficult to work around when using groups that contain other devices.

        --Barry

        Comment


          #5
          Originally posted by spud View Post
          ZWave uses 0/255, but there are plenty of other plugins that uses 0/1, 0/100 or other values for Off/On, so I don't think this is really a "HS convention"
          So I'm not going to change those values for the SmartThings plugin, but a nice solution would be to have the EasyTrigger group action to be able to use a ControlUse label (On/Off/etc...) instead of a numerical value.
          I'm using a rfxcom remote control to turn on/off some Zigbee plugs, which are using 0= off and 255=on.
          The remote control device uses 0=off and 100=on

          I think that is the reason that the EasyTrigger event option 'EasyTrigger Set device to another Device' doesn't work for turning on, but does work for turning off.
          (due to values difference 100 and 255 for turning on)

          What is the best way to solve this?
          Adding 100 = on to the zigbee plug device gives a json error.

          How can I use the ControlUse label with EasyTrigger, instead of passing the value with the 'EasyTrigger Set device to another Device' event function?

          Of course I can create two events, one for turning on and one for turning off, but I was pleased to find out about the EasyTrigger set device to another device, so I can consolidate the event in one event to keep it neat and tidy.

          Comment

          Working...
          X