Page 1 of 1

Get uptime

Posted: Sat Apr 11, 2015 1:16 pm
by jvandenbroek
Hi,

Is there somehow a way to get the gateway uptime? If not, consider this as a feature request :) It would convenient to see when the gateway has been reset.
Thanks.

Re: Get uptime

Posted: Sun Apr 12, 2015 5:19 pm
by hvxl
The gateway doesn't have a very good sense of time for longer time frames. It can accurately time events in the order of a millisecond. For seconds it's normally off by about 0.1%, and for a minute the deviation is already more than 5%.

Fortunately these longer timings don't have to be too accurate for the current needs. They are used for flashing a LED, sending the next OT message, or discarding outdated SC data. However, for keeping track of uptime, a deviation of 5% (an hour a day) is a bit much.

It would also require at least 4 bytes of memory to hold an uptime of more than a few days. The PIC only has a very limited amount of RAM, so 4 spare bytes are not that easy to come by.

In other words, this feature is unlikely to be implemented. If you want to keep track of the uptime, watch for unsolicited "OpenTherm Gateway X.Y" reports on the serial interface to know when the gateway has reset.