Announcement

Collapse
No announcement yet.

Problem using a script to update a Virtual Device

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

  • Problem using a script to update a Virtual Device

    I have a Virtual Device (Ref 134) which I want to store the outside temperature at a set time of day. I execute the following command at that time of day:
    &hs.SetDeviceValueByRef(134, hs.DeviceValueEx(127), True).
    The command executed at the right time of day in the log but no value for Virtual Device 134 is shown in the Device display. Does this display only show an On
    or Off value, instead of a number like 8.5 for the temperature? My outside temperature sensor is Ref 127.
    Thanks for your help guys!!!

  • #2
    Originally posted by Derek Prior View Post
    I have a Virtual Device (Ref 134) which I want to store the outside temperature at a set time of day. I execute the following command at that time of day:
    &hs.SetDeviceValueByRef(134, hs.DeviceValueEx(127), True).
    The command executed at the right time of day in the log but no value for Virtual Device 134 is shown in the Device display. Does this display only show an On
    or Off value, instead of a number like 8.5 for the temperature? My outside temperature sensor is Ref 127.
    Thanks for your help guys!!!
    Did you check the advanced tab of your virtual device? Does it show the correct value there? If so, you may need to make changes on the device’s Status Graphics tab to display it the way you want.
    HS 3.0.0.548: 1976 Devices 1156 Events
    Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

    Comment


    • #3
      Originally posted by sparkman View Post

      Did you check the advanced tab of your virtual device? Does it show the correct value there? If so, you may need to make changes on the device’s Status Graphics tab to display it the way you want.
      Good point. A snapshot of these (2) tabs would help.

      Comment


      • #4
        Thanks guys, but my browser settings wont currently let me paste a screen shot!. Can you please remind me which settings to change in IE or Chrome to do this?

        Comment


        • #5
          As above. The device value won't show on the Status page. You'd want to set the device string as well if you want to see various values there.
          Real courage is not securing your Wi-Fi network.

          Comment


          • #6
            As the others wrote above, it is likely the setup in your a Status Graphics tab. This will affect how values are displayed. You need to delete the single Off and On status, then create a single range that covers all possible values and the formatting of how you want the value displayed. You can also add range based graphics as well. Here is an example of how a temperature device can be formatted:

            Click image for larger version

Name:	68EBB6B5-F194-49DD-BB34-AA1AA1EA5A0E.jpeg
Views:	61
Size:	64.3 KB
ID:	1338962

            Resulting in this display:

            Click image for larger version

Name:	B8AA1E82-A76D-4448-9C0F-A392A8884AFE.jpeg
Views:	60
Size:	12.9 KB
ID:	1338963
            Randy Prade
            Aurora, CO
            Prades.net

            PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

            Comment


            • #7
              Originally posted by Wadenut View Post
              As above. The device value won't show on the Status page. You'd want to set the device string as well if you want to see various values there.
              Actually, you can set the value and then determine the formatting of the display of that value under the Status Graphics tab. Using the value makes it easier to use in Triggers and Conditions. Triggering or Conditioning on string values requires a 3rd party plug-in such as Easy Trigger. Setting it up under Status Graphics negates the need to set the string. In the example I posted above, the string is blank and the Status formatting trims the decimal places and adds a suffix. While my example is from a plug-in created device, it works the same on a device you create.

              Click image for larger version  Name:	27359C26-DE70-4C5B-8AB1-A7EA7A60AC0D.jpeg Views:	0 Size:	61.4 KB ID:	1338965
              Randy Prade
              Aurora, CO
              Prades.net

              PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

              Comment


              • #8
                Originally posted by rprade View Post
                Actually, you can set the value and then determine the formatting of the display of that value under the Status Graphics tab.
                Absolutely true, but where this is a temperature value he only wants to display, which could be virtually (no pun intended) anything, I was trying to give him a simple solution for what he's after. For use with triggers, yes by all means set up Status/Graphics. In cases like this where I generally only want to display these values in HSTouch and on the Status Page (for info) and have no need of triggers, setting the string is the easiest thing to do. In practice, I do set both.
                Real courage is not securing your Wi-Fi network.

                Comment


                • #9
                  No argument here. I just go for consistency, so I make all devices similar. To that end I have a handful of template devices that I just copy when I need a new one. One of them is a “standard” temperature display device, with different graphics across the range. That way I get standard graphics and value displays by setting just the value. Even if I am just displaying the value, which could only be the string, sometime in the future I might want to look at the value for an Event.

                  Click image for larger version

Name:	A43B6573-971B-46FD-8CB6-C4BCADC27F6B.jpeg
Views:	61
Size:	55.4 KB
ID:	1339007
                  Randy Prade
                  Aurora, CO
                  Prades.net

                  PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

                  Comment


                  • #10
                    Many thanks guys for your brilliant help. I now have 3 virtual devices which record outside temperature from a physical device at different times throughout the night.
                    The Status Graphics was the bit that was new to me. I did not need to set the string. Thanks again.

                    Comment

                    Working...
                    X