Announcement

Collapse
No announcement yet.

Using Replacement Values in HSBuddy

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

    Using Replacement Values in HSBuddy

    I am a fairly new user of HSBuddy, and I am starting to use push notifications as actions in HS4 events. I see that the notification text messages I send can include replacement variables, as documented on http://hsbuddy.avglabs.net/pages/push.html. But I find this documentation to be very cryptic.

    Can anyone tell me how to (for example), include the current value of a device in the notification message from within a HS4 event that was triggered by a device value change?

    #2
    Hi there. You need to know the device ref number for which you want to include the value in the notification. You can find this information in the device details page in HomeSeer. Then in the notification text use that number to build the replacement token. For example, if the device ref number is 123 the following token will be replaced with its value: $$DVR:123:

    ​​

    Comment


      #3
      OK, I got it to work somewhat. I used the $DVR:nnn: syntax, where nnn was the reference ID of the Current Activity value from my Harmony Hub device. The only problem was that the value was formatted as a number, but Current Activity is a string. So "PowerOff" gave a -1 (easy enough), but other states like "Watch DVD" gave cryptic numbers like 35221321.

      I worked around this by creating entirely different events for each possible Current Activity value, which then let me avoid using replacement values in the message since I could also hard code the text of the message.

      Comment


        #4
        Thanks for the update. I didn't catch in the first post that you were looking for text status instead of numeric value of the device. Since you've gotten it to work you don't need to make any changes but for future reference you can try the following syntax to get the status string of a device: $$DSR:nnn:

        Comment

        Working...
        X