[RELEASE] Watchtower long-term metrics app

Does anyone know if it's possible to pull values from virtual device? For example, I use sun calc virtual device to track azimuth and altitude of the sun which I use for various automations.

I would love to be able to show the values from this virtual device on the dashboard, but it doest seem to see them as valid values

1 Like

The app can pull data values from virtual devices, but only from the supported attributes.

Possible workarounds for non-supported attributes are:

  1. Edit the Watchtower app code and add your desired attributes to the SUPPORTED_ATTRIBUTES map at the very top of the file. You will have to re-apply your patch after every new release of the app.
  2. Add a virtual device that has a supported attribute, and create an app (in Rule Machine) that copies the value of the non-supported attribute from your original device to the supported attribute of the virtual device. The data will have the wrong label in the graph, but it will be visible.
3 Likes

Released version 2.5.0 with the following small addition:

Added

  • Sync zoom/reset zoom between all dashboard charts (if CTRL key is pressed) - @tj4293

Note: the synced zoom functionality is not available on touchscreen devices.

Have fun!

4 Likes

That would be awesome!

THIS APP IS AWESOME!! I can't believe I did not see this when released. Truly appreciated!!!

3 Likes

Hey Thanks TJ, I was able to add these two lines to capture Altitude and Azimuth from the SunCalc App.

I'll drop them here in case we want to add them to the next update. I think they could turn out useful for others :slight_smile:

altitude: [min:-90, max:90, unit:'°', minMax:true, probe:{ device, state, events, begin, end -> calc5minAverage(device, 'altitude', events, begin, true) }],
azimuth: [min:0, max:360, unit:'°', minMax:true, probe:{ device, state, events, begin, end -> calc5minAverage(device, 'azimuth', events, begin, true) }],

1 Like

So for those of us unfamiliar with this:

  1. iFrame Tile
    a. Do I add the iFrame Tile device as a driver or an app? I think an app since it states "open the app" but maybe that is a reference to the Watchtower app? Then again a device has a driver, so really I have no idea.
    b. Is it possible to make the iFrame thing part of this app?

  2. Regarding the comment that this could go through the Hubitat server and be accessible when not on the local network, would this be accessible when not local if I paid for Remote Hub Access?? If so, that may make it worth it.

  3. Can we nominate this app as app of the year for 2024?? This is absolutely tremendous and a total game changer for Hubitat.

4 Likes

I Agree 100% :slight_smile:

3 Likes

I’m just trying this now, so here is what I have been doing:

You add it as a new driver. Go to the Driver Code, add a new one and chose import - past the link above in the prompt box. Once the code is on the screen, save it.

Then, add a device - Virtual and select or search for « Tile iPhrame Device ».

Open the new device, and under « Set Source », past the URL of the dashboard you want to display.

2 Likes

Thank you. Will try this tonight

2 Likes

One thing I’m finding with the iFrame tile though is that it doesn’t seem to keep the formatting… It’s the first time I try this, so I might just not understand how it works…? And I’m not able to find a post for it - @thebearmay, is there a topic where I can ask questions related to your great iFrame tile?

The issue I am facing is that these are the dashboards:

And they are being displayed in an iFrame like this:

1 Like

Here is a line for rainRate if anyone else out there finds it useful:

rainRate: [min:0, unit:'mm/h', minMax:true, probe:{ device, state, events, begin, end -> calc5minAverage(device, 'rainRate', events, begin, true) }],

great app. I agree with the previous post. this is a game changer

1 Like

I have the CSS on mine set to:

width:100%;height:100%;border:none;

3 Likes

Thanks! Mine are the same - the 2nd one seems to have fixed itself though…

So now the only issue is that they’re not keeping the formatting (black background + offset)

1 Like

You can try to make the Hubitat Dashboard iFrame tile wider to fix the alignment issue. Dark mode not being applied is weird, did you save the WT dashboard (from the left menu)?

Also play with the Cell height setting in the WT dashboard so that the tiles are not cut at the bottom when loaded inside Hubitat Dashboard.

1 Like

Thank you. I think I sucessfully completed the above. Then I found the below post that I think gives the balance of the directions on how to get the iFrame device (with the Watchtower dashboard link) into a standard Hubitat Dashboard.

Mine had significant formatting issues when I added it, but after I closed and reopened it, it looks exactly right.

THIS IS AWESOME!!!

3 Likes

I initially thought that I likely hadn’t, but did confirm that they were both saved.

Cell height setting I hadn’t played with yet - wow! Makes a great difference!

This is the final dashboard in its curent state.

Any chance we might eventually be able to set the min and max values? That would allow me to make the two graphs consistent…

2 Likes

That would be great.

Also, how are the colors selected? I think it might be based on the order of how the devices appear in the dropdown? I'm graphing multiple humidity sensors in the attic vs outdoor humidity, multiple humidity sensors in the crawl vs outdoor humidity, etc. Creating a set of graphs, with the top graph having only the outdoor humidity, and the next two showing attic & crawl, but each including outdoor. Setting the min and max values would make the outdoor humidity the same in all three, and thus more recognizable in the lower two, but setting it a consistent color would be best.

1 Like

For some attributes like humidity (that have a logical min/max), you can align the vertical values if you set the Y-axis scale to "fixed", and it will use the attribute-specific predefined min/max.

{6232CFD3-277E-4549-AE6D-0C8C7F6435A6}

For the "device" graph type, colors are fixed: green and blue. For the "status map" graph type, color is always green. For the "attribute" graph type, colors are indeed selected in the order shown during configure (alphabetical order):

{61A4D8D1-C4BF-4AEC-AEB1-1275BDA83945}

Hack: if you want the outside device to have the same color, make that device be the first in the list by prefixing its name with an emoji for instance :slight_smile:

Currently the app is pretty opinionated, and I'm hesitant to add more options as it might complicate the user experience for some (feature creep). However, it seems I haven't quite struck the right balance between functionality and ease of use.

2 Likes

That's always been a continual struggle...

3 Likes

That works! Thanks.

I'm good with renaming the OpenWeather device to make it show first on the list (since this is a device that is not mine - I pull from the internet). However, I'm trying to avoid special characters and emoji's on all devices because it prevents bringing them into HomeKit. So I tried renaming alphabetically. The first device on my list is Abode. I can rename the open weather device so it appears first on the Hubitat list of devices, but no matter what I do in WT/add dashboard tile/Attribute/Humidity, when I get the list of devices, Abode is first. I even tried renaming the Open Weather device Aaopen Weather. What am I doing wrong? Do I need to delete all the tiles and start over?