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.
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.
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 I am very interested to see your take on this!
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'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.
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.
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).
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.
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:
Download this clock.html file to your computer, then upload it into Settings/File Manager (where the "watchtower.html" and "watchtower.js" files are).
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.
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
Edit: pushed a possible fix, use the "Repair" function in HPM to re-download the updated file(s) from GitHub.
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!
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