[RELEASE] Watchtower long-term metrics app

Watchtower is the all-in-one app for long-term smart home monitoring and data visualization.

Staying true to Hubitat's core value, the application works 100% locally, with no reliance on the cloud. Plus, there’s no need for extra hardware like Raspberry Pi or NAS. Check out the Readme link below for implementation details.

How to install

Install using Hubitat Package Manager

To install the Watchtower app using the Hubitat Package Manager (and receive automatic updates), follow these steps:

  1. Go to the Apps menu in the Hubitat interface.
  2. Select Hubitat Package Manager from the list of apps.
  3. In the top-right, make sure that you have at least version 1.9.2 installed; otherwise, first update HPM to its latest version.
  4. Click Install and then Search by Keywords.
  5. Type Watchtower in the search box and click Next.
  6. Choose Watchtower by Dan Danache and click Next.
  7. Read the license agreement and click Next.
  8. Wait for the installation to complete and click Next.
Manual install

If you don't want to use HPM, follow the manual install instructions in the Readme file (see below).

Links

Have fun!

34 Likes

Feature requests

  • Add option to set charts y-axis scale to "auto" or "fixed" - Done
  • Add option to disable data collection and/or aggregation - Done
  • Add option to initiate on-demand data collection - Done
  • Support for min/max values - Done
2 Likes

I haven't even installed it yet and I bought you a coffee. Thank you, this looks excellent.

4 Likes

Feel the same and did the same.
Thank you @dandanache

3 Likes

Looks very interesting Dan. Congratulations, I know it takes a lot of work to release a solid product.

From an architecture standpoint the data files are collected by the app and stored on the hub. The javascript app is loaded in an iFrame on the existing Hubitat dash. Graph gets regenerated whenever new data is added to the file?

Got my own project I'm working on right now but I will definitely try it out.

1 Like

You can load the "javascript app" in a Hubitat dash iFrame, but I did not focus on this scenario. Watchtower dashboards were designed as standalone web apps loaded in a separate browser tab (like the new EZ dashboards do).

Btw, you can also install Watchtower dashboards as Chrome/PWA apps and they will mimic the behavior of full-fledged Windows apps (with their own icon, without loading the browser UI, separate entries in the start menu and apps list, etc). Something similar is available for mobiles/tablets android/ios.

The javascript apps downloads the data files directly from the File Manager (/local/wt_xxx.csv) and builds the charts on the fly; no load on the hub, aside from the files download (which should consume very little resources).

If you load the dashboard on a wall-tablet, you can configure a fixed interval (5, 10, 30 and 60 min) that will instruct the javascript app to refresh all charts. This refresh is not synched to new data being added, so it's not optimal in the sense that it might re-download data files that did not change.

Looking forward to it :+1: I am very interested to see your take on this!

6 Likes

Thank you for the explanation

I did not realise that was how the EZ dashboards operated.

Totally different type of project that I'm working on, but I think you will find it quite interesting.

I won't be taking tile Builder into the graph space as I think this is pretty well represented by your solution among others.

I have thought about doing gauges and the project I'm working on may ultimately lend itself to this space. But one project at a time.

2 Likes

Great work again, @dandanache !

… maybe … some day … we will see it incorporated in Hubitat ?

3 Likes

I don't have any additional devices other than Hub that shows by default it seems. I created a Dashboard but when I click on it to open, I get this error:

I tried using my default Brave browser and Chrome. Any suggestions?

From logs:

I've seen this error happen when the app is installed with an older version of HPM (I put a warning about this in the OP). In the File Manager you should have 2 files: "watchtower.html" and "watchtower.js", older versions of HPM puts there files named something like "516aff72-a2b5-43a3-b40b-ca64a5e25bf7-watchtower.html".

If this is the case, you should first update HPM, then use the "Repair" functionality. Afterwards, remove the weird named files from File Manager.

2 Likes

That was it. I remember all of the posts about upgrading HPM to 1.9.X and swear I did it but guess I never mattered until now. Thank you sir.

1 Like

This is great, thanks!

Could you add an option to adjust y-axis minimum value and/or scale to the list of feature requests? As far as I can tell, it starts at zero for everything. Thanks for considering.

1 Like

Wow... Looks great!

I checked your documentation page, and wondered where the clock came from. I don't see anything in there that says how to add it (unless I missed it; been a long week).

1 Like

Wondered why my data was shown as bar charts instead of line chart like @dandanache does. Looked at documentation, and it said that the bar graphs turn into line graphs when there is enough data points. Curious as to the number? Currently at 17 data points and still got bars.

1 Like

Added to the list, should be fairly easy to implement. Thank you for the request.

As a temp hack, you can edit the app source code and, at the very top, remove the "min", "max" values for the attributes you want. I will add an option in the dashboard menu to ignore the min/max coming from the app so that all charts will auto-determine these values.

This is an example usage for the Iframe tile type.

To add that exact clock widget to the dashboard:

  1. Download this clock.html file to your computer, then upload it into Settings/File Manager (where the "watchtower.html" and "watchtower.js" files are).
  2. Add a new dashboard tile with type "Iframe" and provide the URL to the "clock.html" file (in your case: http://[enter your hub IP]/local/clock.html?theme=light). Note: you might need to use "https" instead of "http". You can also change the "?theme=light" with "?theme=dark" in the widget URL if you use the dark theme in your Watchtower dashboard.

The same technique can be used to add any type of widget to your dashboard, for instance one of those free weather widgets. Maybe I should add more custom tile types like clock, weather forecast, air quality, etc.

The chart switches to bars if the rendered distance between datapoints is greater than 30 pixels. So you can wait for more points to collect, or you can resize the chart to the smallest width to see the line chart.

5 Likes

@dandanache, thanks for another amazing app, great job!
Just wondering why I am getting the error below:

Summary

1 Like

From what I can gather from the code, looks like you added/configured a device with some attributes, and when Watchtower asks for the current value of one of the attributes, the driver returns null. I will add a guard for these misbehaving drivers. Nice catch, thanks!

Does the data collection moves past this error or no data is collected at all anymore?

Cool dashboard, btw :slight_smile:

Edit: pushed a possible fix, use the "Repair" function in HPM to re-download the updated file(s) from GitHub.

3 Likes

Where are you getting your temperature and air quality information?

1 Like

Wow, that was an amazingly fast fix, data is now populating for the two devices below!

I will need to also query why the bathroom sensor is also returning a "null" log although the readings are being updated and my automations are working.
EDIT: I had descriptive text logging turned off!

1 Like

I use IKEA STARKVIND and IKEA VINDSTYRKA for air quality, the latter also reports temperature, humidity and a "VOC index". The air quality index is automatically calculated by the driver based only on the PM 2.5 levels that both devices report.

Yea... always check for null values. I borked it, i fixed it :slight_smile:

3 Likes