[RELEASE] Hub Information Driver

Sorry for the confusion re my last few posts....

Here's what I was referring to, which is now resolved itself :slight_smile:

I can see the dbSize attribute on the Hub Info device for my C-4 (and C-7) hub:

I have those devices included in an instance of the Maker API App:

C-4 Hub Info in Maker API

I have details from these devices being captured in InfluxDB on my Raspberry Pi using one of the Community developed integrations.

When I go to adjust or create a new query in Grafana, which makes use of my InfluxDB setup, I can now see the dbSize as a measurement to select in the query editor (this is the part I couldn't do previously):

Just need to wait and see some values come through...

Simon

On a different note, and I may have already asked about this, but every now and again the schedule for updating the hub info stats seems to stop for me. Like I showed in my last post, I have my data output to InfluxDB / Grafana, but occassionally I need to press the configure command on the device to get the data flowing again. Strangely it is only on my C-4, not on my C-7...

Any thoughts?

Simon

Haven’t played with Grafana yet, but with Node-Red it seems to me that I have to restart/reinitialize the webhook when I add a new attribute to an existing device.

1 Like

Yeah I think I just needed to wait re grafana. The issue with it stopping to update the stats on he appears to be unrelated to grafana or any external system, from what I can tell.

  • added option to get public ip address and add it to info table.
  • also combined both cpu values into one table slot

ie

https://raw.githubusercontent.com/lgkahn/hubitat/master/hubstats.groovy

also did same to jvm .. combine into one row and rounded to whole %, dont think we need jvm percent free as a decimal.

Wow, is your db really 97 MB? That’s the highest I’ve seen so far. Are seeing any issues?

I've had mine up around 120mb before I limited my event history. Now down around 40 - 60

At 120 did you see any issues?

I was also at 100mb for a while. I had no issues.

Would be hard to pin any issues on the db size. I have been taking more of an interest in the general admin of the hub lately, looking at reducing the load and temperature, particularly on my older C-4. Like I said, I don't know that I could pin anything on the db size...

I wonder why they have a warning triggered at 50MB? I guess I’ll just ignore it unless I see other issues.

There are drivers that have a lot of attributes... this Hub Info driver is one. 30+ attributes and the html one is pushing the 1k limit. That would be 100K in just one attribute with Event History Size set to 100. Is there any history required for this?? If you want history, you want far more than 100 samples, since that might just be 4 hours or so. You'd want to export the data into a DB and get the pretty graphs, not scroll backwards through Hubitat's Event log :smiley: Mine is set to 3.

Weather is another. 60 attributes for some drivers. I remember opening Event History for a weather device years ago and it took 2 mins to open the page with 26000 events to read out of the DB.

I think there's 50mb of DB and then there's 50mb of DB. 50mb of DB where 25mb of it is events that ONLY get read out during event log pages and thus are quite rare, is a lot different than inserts to the DB of 1.2 MB per poll by weather. Static storage vs dynamic 'churn'. 50 MB therefore becomes the line where you need to at least sanity check your DB use. If the result of the check is "It's ok." then go ahead and ignore it. But if your DB has been sitting at 20mb or so for 3 weeks and suddenly jumps to 56mb, then I'd say it warrants an investigation. :slight_smile:

Screen Shot 2021-04-11 at 2.05.24 PM

3 Likes

Why not do this as a PR against the original repo?

1 Like

I was reworking and streamlining some of the code, so this actually worked out better.

v1.9.0 is out.

The HPM manifest is bad. HPM doesn’t think an update is available, and an HPM Repair shows:

Try it now...

1 Like

HPM updated it for me about 15 minutes ago

I reorganized my github a while back and started putting all manifests in a separate folder, but it meant that I have to keep duplicate copies on a couple of the driver manifests for people who had pulled them prior. Every once in a while I fat finger one while updating...

1 Like

any idea what this error is, ive just migrated to c7


and * cpu5Min : 0.0 * cpuPct : 0.0 are sticking at 0

CPU numbers won't be available until a little over 5 minutes after rebooting the hub. Socket time out is interesting, haven't seen it before but is saying that the request timed out without a response IIRC. It's coming from the public IP request (may also show up as a status 408 error) so I wondering if we're overloading the site we're using to get the IP.