[RELEASE] Hub Information Driver

When I first installed this I had a temp of 38 degrees so fine.
But, I decided for fun to put a small piece (1.5 * 10 * 20 cm) sheet of AL under the box and now it's a cool 28-30 all the time.

2 Likes

What am I missing here? I have html attribute selected.

Also: Temperature 174.2 °F :flushed: I got @csteele beat on my C4.

1 Like

post the device panel.. have you hit configure and refresh to make sure it is populated.

1 Like

i believe c4 doesnt have those urls maybe so it is failing?

Yes I confirmed html value was there and populated. It is working this morning, though.

Pushed out a minor update (v1.6.0):

Changes:

  • http calls are now asynchronous (thank you @csteele)
  • Only allow/show polling interval when polling is active
  • Only allow/show security inputs when security is active
  • Added id element to html table to allow CSS for table (id="hubInfoTable")
  • Added class element to html table temperature element to allow CSS by temperature (class = "temp-temperatureAsInteger")
4 Likes

How do you clear the memory my has gradually reduced

It's only 16% drop.. that doesn't seem like much to me... given that there are memory 'returns'

The native GC will periodically reclaim memory, but it never seems to get 100% so overtime the free memory does drop. Only way I've seen to get temporary relief is to reboot the hub.

Hi - I had a quick question. I'm using this driver (v 1.6.0) with Node-red and the values don't appear to be changing (I'm reading the info hourly). I do have the schedule turned on. I was running it every 1/2 hour but changed it to 15 minutes recently.

I have the same device on 2 different instances of MakerAPI (same hub) connected to 2 instances of Node-red. The schedules aren't exactly the same (using the inject node, so it kicks of at different times), but I think the values change when I hit configure or something else (haven't been able to nail it down). Is there something that I should be doing differently from Node-red. Or is this expected?

NR Instance 1 (Live) data:

NR Instance 2 (Test) data:

@mark.cockcroft - can I ask what you are using to grab the data? It looks like you are not seeing the same thing that i am..

Well, I’ve seen dramatically more free memory through:

  1. Backup database, download to your computer. This seems to prune out extra stuff, only save good records. Then,
  2. Soft Reset; then,
  3. Restore the downloaded backup.

Perhaps there are some orphaned database records that this process eliminates. :man_shrugging:

This may be of interest to @gopher.ny

1 Like

At the bottom of the device driver do you see a pending scheduled job for getTemp?

Edit: Nevermind, thought rakeshg was talking about only seeing change when hit the config button on the driver; re-reading I see he was talking about Node-Red.

1 Like

Yep.

That makes some sense. The database would be compressed and contiguous, and so should theoretically be smaller and without the space taken up by deleted records.

I'm using hubigraph

1 Like

Yes - I wonder if I am getting "cached" values from the HE node and those are not updated? Is there something that I need to do in NR to refresh (or something the driver needs to do)?

UPDATE: It does appear that I'm getting cached values from the HE device node. The values in my "live" database have not changed and I changed my code in the "test" instance to grab the value from actual URLs. The actual URL values are different every hour, but the ones from the device node never change. Any thoughts on this?

I don't even think you need a soft reset any more, as restore cleans everything out of the database before restoring. The size of such "empty" database is something like 14k, tiny in the grand scheme of things.

I've tried implementing this process upon reboot, but failure rate, while very low, was enough to scuttle the idea. If I'm restoring a database and it doesn't work, I'll just go "huh" and try again, maybe with a different backup. If the hub fails for no particular reason, well, let's just say I'd be less accepting of that.

A large part of the stability quest I've been on has been about dealing with the quirks of the database engine. I've been thinking about moving to a different one, too, but the risk/reward ratio is just not there. A clean one time migration may be worth a shot, but start factoring in possibility of rolling versions back and forth, and things get messy, fast.

1 Like

Reboot, then a soft rest

I’ m running a couple of scenarios to see if I can pinpoint your issue. My current working theory is that MakerAPI may not be passing along an event on temperature change (I may need to add another capability for it, i.e. Sensor) as I can get the current temperature in Node-Red if I do a redeploy but Node-Red doesn’t seem to change otherwise (could also be that I’m not familar with Node-Red to debug that side properly too.)

1 Like

I am getting an "uptime" event in NR via MakerAPI - just nothing on temeprature/freeMemory. I have it set to update every 15 minutes.

UPDATE:

That's what I found as well. Neither temperature nor freeMemory values were changing when reading from the NR device node until a "deploy". I believe the NR/HE node refreshes values when deployed but otherwise caches them until something changes. At least that's what I remember from a previous thread (which, of course, I can't find now)