[RELEASE] Watchtower long-term metrics app

Storing the data files should not be problem, since we have 1GB of space in File Manager, and the max size needed for a device is fixed to around 70KB (with the default settings).

The problem might come from processing these data files. Every 5 minutes, for every configured device, the app loads the contents of the wt_${device_id}_5m.csv file into RAM as as string, then splits the string by the newline character (to identify lines), adds a new line at the end, removes the first line, and finally stored the data back to the file. To be honest, I have no idea if the hub considers this as a light or heavy task. Folks can play with the settings and report if the app puts a strain on their hubs.

The default "max" values are chosen somewhat random: I thought what would be good enough for my usage and went with that :slight_smile: I am willing to change the defaults, if more people find them not good enough.

As a side node, I don't find the 1-week averages particularly useful, so I am thinking to remove them altogether.

The Watchtower dashboard URLs are stable, if you don't rename the dashboards. You can bookmark them on your phone and it will work if the phone is on the local Wi-Fi/LAN.

I was able to make the dashboards also work through the Hubitat cloud, so it is technically possible; but all data files, although small is size, must go through the Hubitat servers and the staff might not like it, so I did not enable this feature.

You can include Watchtower dashboards as iframes in the standard Hubitat dashboard using a virtual Tile iFrame Device. See this great comment here for more details:

We already touched this topic in a post above; I cannot add all custom attributes for all custom drivers since there is no standardization in place. Weather drivers use dew_point, dewpoint, dewPoint, etc. I can add "dewPoint", since it follows the same naming convention as some other attributes I already added, but I think this will not help you very much. Sorry.

You can either edit the app source code (top of the file) and apply your patch on every app update; or you can create a Virtual Temperature Device and sync it's "temperature" attribute with the "dewpoint" attribute from your driver (using an automation rule).

This is still in the "feature request" state, so not implemented yet. It's on my to do list, though.

You can fetch the data from the hub (http://${hub_ip})/local/wt_${device_id}_5m.csv) from your external storage system. If you schedule this fetch process to run once every 3 days, you can just append the newly fetched data to the old data and create a really big csv file on the external storage that will contain all data points.

If you want to monitor external IPs/URLs using the hub as the monitoring device (e.g. to monitor Wi-FI/LAN devices) and chart their "uptime", I believe it's pretty straightforward to create a custom driver that pings the configured target every 5 minutes and updates the value of an attribute accordingly (I would use the "networkStatus" attribute of the Telnet capability for this).

Once you have this in place, it's really easy to add this device to Watchtower and visualize its uptime status (hourly, daily, weekly uptime %).

Sorry about that. There was a bug in the app that calculated negative values for % attributes and I added that warn line for debugging purposes. I will remove it in the next release; thanks for reporting!

1 Like