[RELEASE] Hub Information Driver

Drivers can’t subscribe to events so unless I drive those from a helper app (which isn’t out of the question) the only option is at poll. Otherwise I like where we’re heading on this….

1 Like

Ah that makes sense.

Like a Built-In App...? :wink:

Not sure I’d be able to swing that (might end up on the no fly list if I did :rofl:), but it would be extremely light weight, only subscribing to the events that are necessary and forwarding the event to the driver for action.

1 Like

I just noticed today the securityInUse attribute was showing "false" and after some investigation I found h2Data.baseModel.userLoggedIn is false no matter if security is on at the hub level or not.
If I remove my user/pass and then turn off the Security option on the driver, it can no longer get the update status, shows "Not Available". So the security is working. Thinking maybe this is a firmware bug where it is not setting that flag to true?

Side Note; If you want to test if your security settings are working the "Update CHeck" is the best bet. I thought it would not be working at one time and tested Reboot... welp of course it worked.

1 Like

I’ll take a look at that. Know at one time it seemed to be a good indicator.

Still testing but if you want to play with V3.0.0 temporarily its at:

https://raw.githubusercontent.com/thebearmay/hubitat/main/development/hunInfoV3.groovy

Driver now has 4 polling queues (1-4, 0 is for do not poll) and rates and asks which one to use for the option selected. Hovering over the option will show which attributes are updated by assigning a poll rate.

3 Likes

With v3:

Should have warned you that I haven’t tested migrating from v2 to v3 yet - just the new install, but since we’re looking at what happens when you do… Well there isn’t a getPollValues() in v3 so that means poll from v2 fired and couldn’t find it, same for updateCheck(). The other errors may be due to the change in underlying configuration, hitting Configure should setup the correct structures, but all of the optional polls will need to be assigned and the poll rates set to restart the polling of data.

I set all the settings and pressed Configure and Initialize. Kept getting the ClassCastException: null every time I would push any command buttons or save prefs.

Found out what breaks it. Decimals
image


Pressing refresh gets an error now

UpdateCheck button also


I also dont think the settings I enabled which were off before are updating when I press Configure or Initialize. I would expect Initialize to grab everything? Or is there a way to force EVERYTHING to refresh? Maybe the broken refresh button will do it once fixed.

Pushed up a few changes, haven’t coded the check for decimals yet, but should have fixed the Refresh and Update Check.

You’ll need to do an Update Preferences or a Configure to get one of the updates to take.

1 Like

Looks to be at least functional now. Will let it run and check my charts in the AM.

1 Like

Changed most of the structure and flow, so let me know what you find. I do have a few more changes to make and also need to start testing the migration options.

I got it setup on my dev hub for both drivers and just initiated a reboot. I will look at performance difference over the next few days and let you know what I find.

1 Like

Gave version 3.0.0 its own thread.

This version will still be available for those do not meet the minimum HE version requirement (2.2.8.141) to run version 3.

6 Likes

Great! :+1:

Maybe a little hint in Post #1 of this thread would be helpful for newbies? :thinking:

3 Likes

Now that I've been graphing some stats from this driver.. At what point do most of you decide to reboot your hub due to memory getting low?

I'm seeing after a reboot there is 400some k free but after a few days that's down to 200 some. Sometimes as low as 180k. At what point is performance affected?

The actual lowest viable point varies depending on firmware version and the hub's app/driver mix, but in general I believe the hub is responsive down to about 120 - with that in mind, I start considering a reboot at around the 180-150 mark

  • hubAlerts : []

Will hubAlerts populate text/data if there's an active alert? For example, my zwave crashed the other day and I had no idea until I went to go use a zwave device.

Is there a way I can monitor zwave crashes with this driver via RM rule? I'd like to be proactive and notify me then reboot my hub when this happens to resolve the issue ASAP.

You don't need this driver, you can just use a Location event in RM.

Screen Shot 2023-07-12 at 1.00.34 PM

2 Likes