You could create a virtual device and run a one-line script through a recurring event:

Code:

&nhs.SetDeviceString(1234, "Uptime: " & hs.SystemUpTime, True)

Replace 1234 with the reference id of the virtual device that you create.

Cheers
Al

Back at this (per the other thread on variables). If i just want to email an uptime stat every day as part of a report, would this be the easiest way, or is there just a replacement variable i can use?

Hi Andrew, because of the way HS returns the value, there's no easy way to do it in a one line script and a full script would be needed. There's an example in the HS3 help file using a related command: https://homeseer.com/support/homeseer...emuptimets.htm. I haven't used it myself, but will try it out later today and post a complete script.

Here's a script that provides more format options. Of course, I made it more complex than it needed to be .

You can specify both a "long" format and a "short" format which are customizable and could be saved into different virtual devices. If no format is specified, then it will default to the "long" format. You can also specify a prefix and suffix to be used in the script.

Save the script as uptime.vb in the \Scripts folder and run from an event as shown, specifying the reference id of the virtual device to populate and optionally "long" or "short". The device string of the virtual device will be updated with this value and the device value will be set to the up time in minutes. The value can be used to trigger an event (one example would be to send a reminder to restart HS, if it hits a certain number of minutes).