Announcement

Collapse
No announcement yet.

Device String / Value

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

    Device String / Value

    Firstly, I love the plugin, very professional, very slick.

    I'm trying to compose a message when the UPS goes on battery including the time remaining. The device value (if I use replacement variable $$DVA: seems to return the number of seconds remaining, while the device on the web page shows minutes. While this may be a bug with the HS3 replacement variables code, would it be possible to set the device string to the device value too so I can grab the formatted string?
    Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

    #2
    Thank you. Let me look at it over the weekend.

    Comment


      #3
      As you say the device value is seconds. You can grab the device status (as visible in the device page) using for example $$DSA:UPS1_007:

      If you use a script, you can use the UPS time left device value to configure a .Net TimeSpan and then format it as text in anyway you would like.

      Below is an example using $$DSA that generated
      PHP Code:
      5/2/2014 9:12:44 PM:SpeakTime left 15.5 Minutes
      5
      /2/2014 9:20:49 PM:SpeakTime left 16.7 Minutes 
      Attached Files

      Comment


        #4
        Just what I was looking for, thanks very much.

        I'm also getting this in my log on startup, doesn't seem to be causing an issue, but just wondered if it was cause for concern:


        May-07 13:58:07 Info Plugin APCUPSD with instance UPS1 has connected. IP:127.0.0.1:63838
        May-07 13:58:07 Error Starting plugin: Item has already been added. Key in dictionary: 'APCUPSD:UPS1' Key being added: 'APCUPSD:UPS1'
        May-07 13:58:07 Info Plugin APCUPSD with instance UPS1 has connected. IP:127.0.0.1:63828
        Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

        Comment

        Working...
        X