Announcement

Collapse
No announcement yet.

How Do I Clear a Device's Status

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

    How Do I Clear a Device's Status

    I'm feeling kind of dumb here since I can't do something that seems simple. I have a virtual device with a feature that shows the value (0/1) of a Pi GPIO pin. It's set using Node-RED. I have 2x Status Graphics set, one fo '0' and another for '1'. The graphics are On and Off and the Status is 'Low' and 'High'. I accidentally set the device value and device status to '0' and now the Web UI always shows '0' and not Low nor High.

    How do I clear the device status so it's works as it did previously?
    "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

    #2
    It would still be nice to know how to do this either with the Web UI or with a script but I was able to do it from Node-RED by forcing a status update with the status set to a blank string.
    "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

    Comment


      #3
      That sounds like you made a change on the status graphics page.
      You can set a feature to use a status string or an image in place of a value.
      Wade

      "I know nothing... nothing!"

      Comment


        #4
        Originally posted by kenm View Post
        It would still be nice to know how to do this either with the Web UI or with a script but I was able to do it from Node-RED by forcing a status update with the status set to a blank string.
        Run this from tools/script commands:

        &hs.SetDeviceString(1234, " ", False)

        1234 is the deviceID


        ---
        John

        Comment


          #5
          Sgt. Shultz I did it from Node-RED. Thanks John245 There used to be hs.SetDeviceStatus and hs.SetDeviceString and they did different things. Now, it appears the device string is the status? Is that the case?
          "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

          Comment


            #6
            I don't remember offhand.
            That would be something to look at in the docs (maybe for plugins?)
            Wade

            "I know nothing... nothing!"

            Comment


              #7
              Create an Event, then Enable "Advance Options", then in the Status of the Device Event, enter in: CLEAR

              Then run the event, this will "Clear" any hard coded Status you have

              Comment


                #8
                Originally posted by OmegaQuest View Post
                Create an Event, then Enable "Advance Options", then in the Status of the Device Event, enter in: CLEAR

                Then run the event, this will "Clear" any hard coded Status you have
                Thanks. I'll give that a try.
                "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

                Comment


                  #9
                  Originally posted by kenm View Post
                  Sgt. Shultz I did it from Node-RED. Thanks John245 There used to be hs.SetDeviceStatus and hs.SetDeviceString and they did different things. Now, it appears the device string is the status? Is that the case?
                  The Device Status is the string associated with the device's current status value. The Device String is any random string you (or something) decided to put onto the device. The Device string is what will be displayed, until the device string is erased (and then the Device Value string will re-appear).

                  Which is why "&hs.SetDeviceString(1234, "", False)" will work to put back that device value string.

                  Comment


                    #10
                    David has it about correct above. There are three variables affiliated with a HomeSeer Device:
                    • Value = the numerical value assigned to a device. This is always a numerical value, usually an integer, but can have can have decimal precision. The Value is what HomeSeer looks at for Triggering and is what is set when a Device is controlled.
                    • Status = this is a text string that is assigned to a single value. A Status can only be assigned to a single value, it cannot be applied to a range. The Status is a means of providing a more user friendly interface for controlling Devices or using the value in a Trigger or Condition. For example a typical HS Virtual Device will have Off with a value of 0 and On with a value of 100. If you set the device to "On" in an event, it will display "On" as text and set the Value to 100. You can do the same thing by setting the Value to 100, which in turn will cause the "On" text to display as the status. Again, HomeSeer only looks to the Value, the Status is just a human friendly mechanism. For display of a value within a range of values, the status will be created by the settings in StatusGraphics. These settings can prepend or append the value, set the number of decimal places and whether to include the value or not.
                    • String = A means of displaying text as the Status of the device. If the String is set, it will replace the Status and the actual Status of the device will NOT be displayed. String is very useful in that it can be populated with almost anything including HTML and graphics. HomeSeer does not look at the String for triggering, but Spud's Easy Trigger can.
                    While I wrote this for HS3, the Device Structure is almost identical in HS4. This could give a broader understanding of how HomeSeer Devices are structured and how they function. As I find time I will update this thread for HS4, though HS4 has some limitations to setting a Device as compared to HS3. One big difference is that there is no way to clear a String within an Event and the String is not a separate item displayed within the device. If the String is set, it will show under Status in the Device's Advanced information.

                    Here are a couple of screenshots of the same HS4 device, the first is from the HS4 "Legacy" Device manager and the second is the new GUI version. In the Legacy HS3 version, you can see that all three (Value, Status and String) are displayed. As you can see I have loaded "Hello World" as the String. The Legacy display clearly shows the status of the device as Off.

                    Click image for larger version  Name:	HS3Advanced.png Views:	0 Size:	40.0 KB ID:	1549991
                    In the HS4 interface, the String is no longer called out. Instead "Hello World" is shown as the Status. The actual Status is Off. While there is a difference in how Devices are displayed, it is important to note that the three fields are separate and distinct and if there is something stored in the String, the Status will not display.

                    Click image for larger version  Name:	HS4Advanced.png Views:	0 Size:	74.6 KB ID:	1549992

                    When the Device is shown, since the String is set, "Hello World" will display as the Status. It doesn't matter whether the Device is On or Off, it will always display the String. The Status and Value of the device can still be controlled and the correct graphic will be displayed, but the Status will not.

                    Click image for larger version  Name:	capture.png Views:	0 Size:	15.7 KB ID:	1549993

                    In order for the device to return to displaying the Status, the string must be cleared. In HS3 you had he option to clear the String within an Event Action. HS4 no longer provides that option, so you must run an immediate script to clear it. For device 2361 above I ran this command from an immediate script &hs.SetDeviceString(2361, "", False). This results in the device returning to normal Status display.

                    Click image for larger version  Name:	capture1.png Views:	0 Size:	14.8 KB ID:	1549994
                    Here is an example of how the String can be used. Remember for all intents and purposes it is a display only value. This is from Jon00's Performance Monitor. Jon loads text and an image for display.

                    Click image for larger version  Name:	capture2.png Views:	0 Size:	11.6 KB ID:	1549995

                    As you can see, Jon uses a numerical value for CPU usage to plug into the Value field so that the Device can be used for Triggers and/or conditions, but the String display is for the User to look at.

                    Click image for larger version  Name:	capture3.png Views:	0 Size:	72.5 KB ID:	1549996
                    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                    Comment


                      #11
                      Randy,

                      In HS3, " " is considered a one character string, and will simply replace the device string with that one blank character. "" is considered a null string, and will properly erase the device string so that the device value string will reappear. Has this been changed in HS4?

                      Comment


                        #12
                        Originally posted by aa6vh View Post
                        Randy,

                        In HS3, " " is considered a one character string, and will simply replace the device string with that one blank character. "" is considered a null string, and will properly erase the device string so that the device value string will reappear. Has this been changed in HS4?
                        It was a typo on my part, should have been “”, but either will work in HS since leading spaces are trimmed. You could use a dozen space characters and the String would still be blank as far as HS is concerned. This is HS4 and I just tested to confirm. I believe HS3 was the same.

                        Fixed the earlier post.
                        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                        Comment


                          #13
                          Thanks, randy, that was an excellent explanation.
                          HomeSeer Version: HS4 Pro Edition 4.2.19.0 (Windows - Running as a Service)
                          Home Assistant 2024.3
                          Operating System: Microsoft Windows 11 Pro - Desktop
                          Z-Wave Devices via two Z-Net G3s
                          Zigbee Devices via RaspBee on RPi 3b+
                          WiFi Devices via Internal Router.

                          Enabled Plug-Ins
                          AK GoogleCalendar 4.0.4.16,AK HomeAssistant 4.0.1.23,AK SmartDevice 4.0.5.1,AK Weather 4.0.5.181,AmbientWeather 3.0.1.9,Big6 3.44.0.0,BLBackup 2.0.64.0,BLGData 3.0.55.0,BLLock 3.0.39.0,BLUPS 2.0.26.0,Device History 4.5.1.1,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,HSBuddy 4.51.303.0,JowiHue 4.1.4.0,LG ThinQ 4.0.26.0,ONVIF Events 1.0.0.5,SDJ-Health 3.1.1.9,TPLinkSmartHome4 2022.12.30.0,UltraCID3 3.0.6681.34300,Z-Wave 4.1.3.0

                          Comment

                          Working...
                          X