[RELEASE] Hub Information Driver

Unless I'm doing something that impacts it heavy, many times my development hub will go from one HE update to the next update between reboots, so they really have tightened it up.

3 Likes

Thanks for your suggestion.

The actual data displayed is dependent on the options selected, but this should be close to what most people are using.

<style>td{align:left}</style><table>
<tr><td>Name</td><td><%name%></td></tr>
<tr><td>Version</td><td><%hubModel%> / <%firmwareVersionString%></td></tr>
<tr><td>IP Addr</td><td><%localIP%> / <%publicIP%></td></tr>
<tr><td>Free Mem</td><td><%freeMemory%></td></tr>
<tr><td>CPU Load/Load%</td><td><%cpu5Min%> / <%cpuPct%></td></tr>
<tr><td>DB Size</td><td><%dbSize%></td></tr>
<tr><td>Last Restart</td><td><%lastHubRestartFormatted%></td></tr>
<tr><td>Uptime</td><td><%formattedUptime%></td></tr>
<tr><td>Temperature</td><td><%temperature%></td></tr>
<tr><td>ZB Channel</td><td><%zigbeeChannel%></td></tr>
<tr><td>ZW Radio/SDK</td><td><%zwaveVersion%> / <%zwaveSDKVersion%></td></tr>
</table>
2 Likes

Yay! Thank you for that. That creates the possibility to rewrite formatAttrib() to construct that HTML template string to pass to altHtml() that does all the lookup and layout work. No need to duplicate the lookup and formatting code in both places.

That thought had occurred to me as well. To implement I'll need to install the template from the driver at first run or when the HTML attribute gets enabled. Very doable, and I have the code in a couple of other concept drivers, just need to move it over. That might be the impetus to move from 2.6.x to a 2.7.0 release.

1 Like

v2.7.0 is out. Some minor code cleanup, but the major change is that the html attribute is always done using a template file stored on the hub. By default this will be hubInfoTemplate.res, but you have the option of using another file (or modifying the default one). If you turn on the Enable HTML attribute preference and the template file information is empty or the template doesn't exist on the hub, the driver will download the default template to the hub.

The default template uses HTML table elements to format the output, but, keeping in mind that you are limited to 1024 characters, you may use whatever HTML you wish. Attributes are inserted by delimiting them with <% %> , i.e. <%cpuPct%>. In addition to the 51 driver attributes, <%@date%> and <%@version%> are also available (current date and current driver version respectively).

A small app to help you generate templates is also at

2 Likes

I updated to the latest version. Turned off html attribute creation. Turned it back on to get the file on the hub. I don't have the file on the hub. I don't have an html attribute and am seeing these errors in the log. Anyone have any ideas? Thanks

Fix is up now.... v2.7.1 Missed one of the hub security changes when moving my beta code to release

THANK YOU! This is a great driver. So much information.

1 Like

Still no go but seeing different log errors now. Thanks

typo ge instead of get... give me a sec.

Edit: Do a HPM Repair and you should be good.

3 Likes

I don't use HPM but will do an import. That's how I update most things.

Thanks!

1 Like

All fixed. Again, I really appreciate the work you (and the other devs) do for the community.

3 Likes

Not sure if this is the right place for this because I do not know if it is related, but I noticed that my CPU% used jumped from about 5% to a sustained 20%. The only thing that was changed at the time of this sudden jump in CPU usage was that I updated Hub Information Driver via HPM. The update seemed to go well with no error messaages. I did not make any changes to the settings on my Hub Information device itself, just updated the driver via HPM. Again, not sure if this is at all related or just a coincidence but the timing is suspect. @thebearmay , any help or insights/suggestions is appreciated.

My hub status graph is below:

Note: if this turns out to be in the wrong thread (i.e., completely not related to HID) then I will move it to another thread. Thanks again for any help.

I've been running the new version for about 48 hours now and haven't seen a jump like that, but it sounds like something is in loop. Did you check the Apps and Drivers sections of the logs to see if there are any new members on the "leader board"?

Just noticed that the currentmode parameter on all my hubs is incorrect. It's not something I use that much. Would not have noticed except I was looking at something else and it just happened to catch my eye. All of my hubs are currently in Home mode but the currentmode parameter in the hub information driver on all 4 show they are in Night mode.

I’m seeing something odd, too. Updated Hub Info yesterday to 2.7.1 at 3:27 PM CDT, then rebooted, seems almost like Hub Info is not polling. Specs are almost as they would be immediately after a reboot. Here is a current screenshot, almost 19 hours after the reboot.

I will poke around a bit more. I hadn’t looked at anything since the Hub Info update, everything running fine.

Edit: Hub Info does have an updateCheck scheduled a few minutes hence, so it does seem to be polling. I do not have the special html template selected.

Should also have a getPollValues scheduled. If not try hitting Configure and see if it reschedules.

May be the same issue as @672southmain, do you have a getPollValues job scheduled?

I hit Configure and everything straightened out. :man_shrugging:
Just for clarity, all I had done was backup, Hub Info update, backup again, reboot. No parameter changes. This was the first reboot since last firmware update. Generally, I only reboot on firmware updates.