[RELEASE] Hub Information Driver

Interesting. Thinking on it a couple of things that could impact including needing to wait for access to the file, compile time (the busier the hub the longer this will take), and possibly the number of other apps/devices already on the hub.

2022-06-30 thebearmay add shutdown command

:+1: I have been secretly wanting this ever since I got a UPS but figured there might be a reason you never included it. Now I can remove the "Hub Controller" device I installed just for that function. Thanks!

UPDATE:
My longest and most complex rule, that I spent the most time making and testing, which never runs because I only loose power maybe once a year.

4 Likes

It's a constant work in progress. Reboot was added to handle a loss of DHCP issue - just didn't consider the power loss scenario to add shutdown until yesterday when it came up again.

3 Likes

I know I liked @jtp10181 's compliment of the shutdown addition... And for the most part I do like the neat little package that the driver is (well not so little anymore :slight_smile: ).... but that did get me thinking.... Whether it is worth having a split between control and purely information about the hub.

I'm really only raising this as an interesting topic, rather than a concern... I expose my Hub Info devices through Maker API so I can send the info to InfluxDB / Grafana. Technically by doing that I then make the reboot and now more importantly the shutdown command available via Maker API. I do get to limit the scope of access between local and cloud, but still... Like I said, not something I'm worried about, was thinking more so it might be a useful request for Maker API to include a single setting to stop calls to run device commands, like control of modes or HSM, effectively making the Maker API instance an "info" instance vs an "info and control" instance. The alternative would be to revert these drivers to split between control and info, but that doesn't solve the situation in all cases / drivers.

2 Likes

The work around is to create two instances of the Driver - one without Polling that allows access to the commands, and one with the reboot/shutdown option turned off to allow information only.

2 Likes

Good that you have thought about it, considering the gravity of what the driver provides. The Maker API change, I expect could be something others would like.... I guess we might soon see....

1 Like

Is anyone using this driver alongside a home assistant dashboard? I've exposed this device to my home assistant via Maker API but I can only get the device to report hub temperature in home assistant. Any info would be greatly appreciated! Thanks!

I've setup Maker API to dump the device info into Node-Red. Once the data is in Node-Red you can setup a flow to transfer the data to an MQTT server in HA. You can then setup individual sensors using the MQTT platform in your configuration.yaml file.

Screen Shot 2022-07-03 at 5.40.41 PM

This should give you the ability to add the hub information driver into a HA dashboard.

3 Likes

Thanks for the reply! Might be too far above my pay grade at this point. I currently use this integration to get my devices in HASS, https://github.com/jason0x43/hacs-hubitat

I'm using Jason's integration as well. However, as you have found, it only exposes temperature and last update time.

Or piggybacking a second 8 K chip on the OEM 8K chip with one leg lifted and switched by a little assembly code from the keyboard. I thought I was a genius..

Totally did that!

Curious if anybody has any experience with the two radio offline attributes of this awesome device? Are they reliable? I ask because this morning I had my zigbee radio go offline on one of my hubs, but zigbeeStatus didn't pick that up.

As @thebearmay points out, I suppose my notification rule should be based on the hubAlert attribute, not just zigbeeStatus. Still, made me wonder why these two don't align.

Can't say I have, but I expect most people will have "other avenues" that they will be notified if these comm's are disrupted.... :wink: I don't have those alerting systems in my household, but I still soon find out when the lights don't turn on or other Zigbee-related activities don't work. No dis-respect to the efforts of @thebearmay.... but some hub issues reveal themselves in various ways....

I wonder if it's because zigbeeStatus is reporting that the service itself is enabled (allowed to run) while online/offline is the service's current state (running or not running)?

2 Likes

Ultimately both conditions should agree, but they are derived from different sources. The hub alerts come from the UI Alerts (generally crash/threshold conditions or update notices), while the status is querying the hub's zigbee data to see if the channel is still actively assigned.

High CPU or temperature warnings tend to generate a zigbeeOffline alert, and may eventually lead to the zigbee channel being disabled if the condition remains unchanged long enough; this would then trigger the zigbee status. Whereas the user can decide to turn off the zigbee radio setting the zigbee status to disabled, but will not generate a zigbeeOffline warning.

3 Likes

Note that the Zigbee radio actually does not turn off when 'Zigbee Status' is set to disabled. It stays up and running at the PHY and MAC layers.

When you set Zigbee status to disabled, even when the Zigbee Details page shows 'Zigbee Network State: OFFLINE' , a sniffer trace still shows the coordinator broadcasting to the 0xFFFC destination address on its assigned channel (this is the 'all routers' reserved address). However, until you set Zigbee Status back to 'enabled', the hub won't directly address any individual routers (at least for the duration of the traces I tried). Apparently the OFFLINE Zigbee state is an indicator of the application layer's status.

2 Likes

@thebearmay Maybe I missed something, but don't see any obvious options nor any comments in here about it. Is there any way to log certain attributes (or all of them)? I use Splunk for monitoring, but that relies on getting a feed from the hub logs.

I use MakerAPI to feed Node Red and my graphing, but there is probably another way out there.

2 Likes

I'm using the syslog driver to forward the logs over to Splunk. So if it doesn't show in the event logs, then I won't be able to pull it in.