[RELEASE] Watchtower long-term metrics app

That's quite an achievement! Awesome job :+1:

You can change the graph type from "line" to "bar" with the following User Script:

$config.type = 'bar';

Bar charts look best when the graph has few datapoints though.

2 Likes

Ok thx. It's in the right way. But my device is updating only one a day and your app is still creating new points each 5 min and because of this, I can't see only one bar per day. I tried to create a second watchtower app to disable this updates but doesn't looks possible.

Maybe there's a magic script as well?

1 Like

You can set the chart to show the 1d time resolution and save the dashboard. It will remember to load that chart at the same time resolution.

1 Like

Ever since I updated HE to 2.4.3.151, I am getting this error from watchtower 4.0.0


and my cpu dashboard that logs cup load and db size has not changed and is static

In watchtower, I cannot delete the hubitat hub as there is no trashcan icon to click on

Vats goink on?

I don't mind deleting the cpu dashboard but I can't.

1 Like

That's a beta release BTW.

@dandanache looks like the /hub/advanced/freeOSMemoryLast endpoint finally is getting its header fixed (and a new "Direct Java" column added) making the code in collectHubMetrics() fail in this version. Now looks like below. :

Date/time,Free OS,5m CPU avg,Total Java,Free Java,Direct Java
11-06 06:07:14,1537268,1.86,331392,237557,295
2 Likes

Yes it is. Sorry should have said that before.
So I will just ignore the error for now then.
Thank you.

1 Like

Released version 4.1.0 with the following small changes:

Fixed

  • Fix /hub/advanced/freeOSMemoryLast breaking change in platform version 2.4.3.151 - @pomonabill220

Added

  • Add option to proxy dashboards via Hubitat cloud infrastructure - @antti202


Kudos to @hubitrep for providing the fix for the /hub/advanced/freeOSMemoryLast endpoint. :man_superhero:

Have fun!

3 Likes

Just tried watchtower out and YES it WORKS!!!!
Thank you SO much @dandanache !

1 Like

Hello,
Just updated to 4.1.0 hoping this was solved but no.
Each time I want to update the script, the app is asking me to select again every metrics. Can you check if you have the same behviour and if it's possible to solve this?

Thank youuuu :slight_smile:

image

Other point, I don't know why, but now my bars have a lot of space between each one. I'm trying to get rid of them but my script is not working properly. I had some electricity outtage that caused issues on my hub and maybe something happened with WT?
I have two series and each ones have only one measure each month.

$config.data.datasets[0].categoryPercentage = 1.0;
$config.data.datasets[0].barPercentage = 1.0;
$config.data.datasets[0].barThickness = 6;

image

1 Like

Immediately after the reboot after latest hub upgrade (2.4.3.164), I got this error message on all three of my hubs:

Screenshot 2025-11-29 at 10-14-12 Logs - WH9-2

That line, FYI:

fetchHubUrl('/hub/advanced/internalTempCelsius') { state.hubTemperature = convertTemperatureIfNeeded(new BigDecimal(it), 'C', 1) }

Regardless, the apps appear to be functioning normally.

2 Likes

I am now seeing this error since I updated to release 2.4.3.164. May have been there before but my logs only go back to the last reboot of the hub that was during the update to the new version.

It seems to be related to collecting Hub metrics.

app:18972025-12-01 12:14:08.787 PMinfoWatchtower 3.0.0 has been updated
app:18972025-12-01 12:14:00.095 PMerrorjava.lang.NumberFormatException: Character T is neither a decimal digit number, decimal point, nor "e" notation exponential mark. on line 849 (method collectHubMetrics)
app:18972025-12-01 12:14:00.024 PMdebugWatchtower ▸ Start saving hub metrics to state (to be collected in 1 minute) ...
app:18972025-12-01 12:12:48.493 PMdebugWatchtower ▸ Returning Hub information

I had missed the need to un-match, and then match to get beyond version 3.0 of Watchtower, sorry.

Note: I moved the code from GitHub to a nicer location, I hope this won't cause any problems with HPM updates. In case of problems, first backup your hub to make sure you don't lose any WT csv files, then mess away with HPM (un-match, match-up, etc.).

1 Like

What I think I have figured out is the new release has added some additional headers in the hub/advanced/freeOSMemoryLast call, and this is causing the error.

Here is mine now:

Date/time,Free OS,5m CPU avg,Total Java,Free Java,Direct Java
12-02 10:03:50,1154672,0.7,331392,168281,4906

I have modified my app for now until @dandanache gets a chance to fixing this.

I am running Watchtower on a C8-Pro

See prior post
1 Like

Yeah, mine is returning similar - every 5 minutes...

I'm running a C-7 on 2.4.3.155. I'm not sure how to check which version of Watchtower I have installed, but when I go to HPM updates, Watchtower does not show up as needing updating.

ETA: The version of Watchtower updates in the App title as the app updates. I was running 3.0.0. Now updated to 4.1.0 and the error seems to be gone. See post below and @dandanache 's original post to which it responds, on updating when HPM does not auto update Watchtower

2 Likes

For those whose Watchtower was stuck on 3.0.0 trying to follow these directions: In HPM, you get to "un-match" from the "Package Manager Settings on the main HPM menu.
(I got stuck on the un-match step, and googling it did not yield an answer, so I clicked around until I found it...). The balance of @dandanache 's instructions are easy to follow, and result in getting updated past 3.0.0!

2 Likes

I sometime get these errors too immediately after restart, some endpoints (like /hub/advanced/internalTempCelsius) are not yet ready at hub startup. You can safely ignore these errors.

In order to keep the source code smaller (initial target was max 1000 lines of code, but went past that a while ago) I skipped some error checks where I believed it was not important.

3 Likes