Announcement

Collapse
No announcement yet.

Quick writelog question

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

    Quick writelog question

    I want to write the status of a device to the log whenever a particular event runs. In the event actions I can use replacement variables to send myself an email e.g. with subject: UPS Battery Status $$DS:u50, but I can't seem to do the same using writelog in a one-line script, e.g. &hs.writelog "Device Update", $$DS:u50, but that doesn't work.

    I'm probably missing something obvious, but is there a quick answer please? Thanks.
    All Z-Wave, #101 devices, HomeTroller Series2, HomeSeer2 v.2.5.0.81, & 1x Z-Troller

    #2
    You could use a Script command in the event instead. You could write somehing like:

    &hs.writelog("Device Update","UPS Battery Status " & hs.devicestatus(u50))
    Nicolai L

    Comment


      #3
      Wow, that was quick reply! Perfect, that got me where I needed to be and with a couple of tweaks it does exactly what I need, thank you so much NicolaiL!

      I ended up with:
      &hs.writelog("Device Update","UPS Battery Status " & hs.devicestring("u50"))

      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      All Z-Wave 90+, HT S2, HS 2.5.052 & SmartStick
      Any interest in a Mid-Atlantic meet? Voice your opinion in forum - US Regional MAHUG!
      Last edited by Olbrit; September 28, 2012, 08:12 AM.
      All Z-Wave, #101 devices, HomeTroller Series2, HomeSeer2 v.2.5.0.81, & 1x Z-Troller

      Comment

      Working...
      X