[RELEASE] Hub Information Driver

Is there documentation on using this Hub Information Driver? The top posting in this topic has no link to documentation. What do the commands "Configure", "Hia Update", and "Initialize" do, and when would one use each? (I think "Reboot" and "Shutdown" are self-documenting.)

I figured out how to allow my Dashboard to include this device, but there is no Template for it. I can choose the "Temperature" template and it picks out the internal temperature; how do I access the other 40-odd variables in my Dashboard? (I imagine I have to use templates "Variable String" or "Generic" or something, but I can't find documentation on using those either. Someone mentioned creating a 2x2 dashboard tile and selecting the html variable, but I can't find documentation on how to do that.)

Add a tile to a Dashboard. Pick the device in "column A" -- which will be whatever name you gave to the Hub Info device. Then in column B, pick Attribute.

A large list of Attributes will become available... pick one. The Html one piles a bunch of info into one tile. All the rest are single attributes for a single dashboard tile.

You can go wild, with an entire dashboard dedicated to the attributes from Hub Info Driver:
Screen Shot 2022-08-18 at 8.49.33 AM

2 Likes

As @csteele noted above, you'll want to use the Attribute Template on the dashboard and select the attribute you want displayed. The only command really meant for the user is Configure, and you should only need it right after creating the device (although it can be used to force an update outside of the normal polling.) Initialize is used by the hub at start up/reboot to restart things, HIA Update is used by another app (Hub Information Aggregation) to override the normal html attribute to allow information from multiple hubs to be combined, and as you said Reboot and Shutdown are self explanatory.

1 Like

Aha! It's "Attribute" I should use, not "Variable String". Thank you for that. Where is this documented?

Of course I'd like to put more than one Attribute into a Dashboard tile, rather than have a separate tile for each. I presume this isn't possible using the GUI? (Can I write some layout code to do it? Documentation?) At least the "html" attribute has a nice selection of other attributes.

In the absence of separate documentation, your helpful replies might find a useful place edited into the top posting in this topic, so that people such as me can read the documentation instead of bothering everyone here.

Adding font-size:70%; to the <style>td at the start of attrStr in the driver makes the html attribute fit nicely into one 1x1 Dashboard tile (and still be readable).

My hub didn't have the NTP server set. I used the /hub/advanced/ntpServer URL to set it to the domain name of the local NTP server, but is it even used anywhere?

I do need to revisit the first post as the driver has evolved a wee bit since its inception. If you want to customize the html attribute, the Hub Information Aggregation app can be used with just one hub also.

Believe the hub defaults to Google for NTP, and IIRC it will attempt to resync the clock every night around the scheduled back up time, as well as at hub start up.

@csteele ... much thanks for the screenshots to get the attributes shown on the Dashboard. I'm able to get the values to display but not the attribute name at the top of the tile like in your screenshot. Any idea how to display this name?

Upper right corner, gear... Options in the top row, then:

Screen Shot 2022-08-18 at 11.08.38 AM

Stop hiding them :smiley:

@csteele ... that did it, much thanks!

1 Like

Massive understatement.

6 Likes

And what a journey it has been! I think it was back in early 2021 that I was looking for a way to get the Hub Name for one of my Node-RED flows and @thebearmay said he might have a "little piece of code" that may work.. and look at it today.

Thanks for all that you do for the community :pray:t3:

6 Likes

Rather than doing that, I just edited your Hub Information Driver code directly so that the html attribute displays what I want in it.

v2.6.39 adds the capability for custom configuration of the html attribute using a template text file stored in the hub's File Manager. The template file is normal HTML but allows attributes to be inserted by delimiting them with <% %>, i.e. <%cpuPct%>. Activation of this feature requires that Enable HTML Attribute Creation? be turned on, and that a valid file name be entered into Template file for alternate HTML attribute.

Sample Template File:

<style>td{text-align:left;}</style><table id='hubInfoTable'>
<tr><td colspan='2'><%@date%></td></tr>
<tr><td>CPU %</td><td><%cpuPct%></td></tr>
<tr><td>Temperature</td><td><%temperature%></td></tr>
<tr><td>ZW Radio/SDK</td><td><%zwaveVersion%>/<%zwaveSDKVersion%></td></tr>
</table>

would yield an output similar to:

Fri Aug 19 16:05:09 EDT 2022
CPU %	      1.0 %
Temperature	  104.0 °F
ZW Radio/SDK  7.17/7.15

(Remember that you are limited to 1024 characters after substitution)

9 Likes

Woo hoo! This is great! An educational sample template you could post (adding it to the documentation in the first post in this topic) would be the template that gives the same output as the default (no template) output. (Or at least as close as you can get to the default output.)

Nice idea ! for a good while I've been taking a couple of community apps and 'modding' them so they layout correctly in my dashboard (I'm a huge fan of Android Dashboard which I run on a Portrait monitor in my dev workstation - I use Bluestacks as an emulator under win10/11). Each time the app or driver gets an update, I need to go back and repeat the work...

The concept of pushing through a template could alleviate many things - I hope others take your idea and run with it too! Off the top of my head notification tile, gametime and open weathermaps might gain big benefits!

1 Like

Hi all,
Would you be so kind to suggest me under what number should not drop down the freeMemory please? I'd like to create a webcore piston to notify me when freeMemory is on critical number.
Thanks in Advance

Free memory lower limit varies by device and app load, but most should be good to at least 250K if running 2.3.2.141

Thanks for the info

1 Like

There are many, many threads on this (I had the same question myself a while back, answered many, many different ways). Enter “free memory” in the search function to see a variety of suggestions and rationale for each. However, this is an answer I once got directly from the Hubitat staff:

gopher.nyStaff

May 20

The free memory metric in 2.3.1.142 better reflects the state of affairs, but it is different from pre-2.3.1 and even different from early 2.3.1 public releases.

This also means that the "reboot hub when free memory goes below 250" approach is no longer applicable. You can let it run all the way until the "low memory" alert pops up at 80m.”

That having been said, I used to have mine set up at 250K per @thebearmay (he has been a virtual firehose of great information and help to me), but lowered it to 175K since 2.3.1.142. I am on 2.3.2.141 (the latest firmware) and 175K gives me about 30 days between automatic reboots via RM5.1 without any noticeable slow downs in my specific use case. Of course, YMMV depending upon your set up.

Edit: link to quote:

4 Likes