[RELEASE] Hub Information Driver

Driver will check the firmware version to determine whether or not to attempt to access the 2.2.6 features. I actually ran it on 2.2.5.131 for about a week before 2.2.6 came out.

2 Likes

Not all the device's attributes are updating in Node Red. Is there a way to fix this?

Remove the device from the Node-RED MakerAPI instance. Click on done. Add it back to the Node-RED MakerAPI instance.

That sequence fixed the issue for me.

1 Like

I'll give it a shot. Thanks!

1 Like

That didn't work. I also tried restarting node-red and that didn't help.

Node-Red Screenshot

You can do a manual maker query in your browser for that device and see what comes up.

Hmmm - I just did the upgrade and it looks like I can see all the attributes:

Are you seeing something different when you select the "attributes" in the device node?

EDIT: I'm on 2.2.5.131 if that makes a difference

I can see all the attributes but the values don’t update unless I restart the flow. I have an inject node setup with a 5 minute interval to match the update interval of the device.

I think I noticed that in an earlier version and I thought it had something to do with which attribute was updated. In my case, I use mostly static information (Hub name, restart etc.) so I didn't dig into this.

I’m on the latest version of everything.

Sorry - I should have been clearer. I meant that I noticed this a while ago but then did not follow up since I did not need the info.

I’m trying to create a Hubitat system dashboard in HA and this would work perfect if I could get it to update.

Which attributes are you not seeing update? Also shouldn't need an inject as the attributes (at least the ones I've looked at) update in node-red every time they change in the driver.

so what could be loading my hub? could be be the fact im on an external radio? chromecast helper (keeping them alive), google intergration?

It updates only if you have the "send event" in the device node checked, otherwise, you need to trigger it with an inject node and it gets you the current values. The visual clue to if you have "send event" checked, is the blue status box on the device node - it is filled if you have "send event" checked and only an outline if you do not.

3 Likes

None of the attributes are updating. I'm using an inject node so that I have a timestamp for the attribute.

Try this. It will update every time the Hub Information Device updates:

Importable Sample Flow

[{"id":"b37ce2b1.34e5c","type":"tab","label":"Hub Information","disabled":false,"info":""},{"id":"65a8aa85.adb964","type":"debug","z":"b37ce2b1.34e5c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.value","targetType":"msg","statusVal":"","statusType":"auto","x":550,"y":260,"wires":[]},{"id":"155bc7c9.c004b8","type":"hubitat device","z":"b37ce2b1.34e5c","deviceLabel":"!hubInfo","name":"Free Memory","server":"4690716e.b51858","deviceId":"863","attribute":"freeMemory","sendEvent":true,"x":90,"y":140,"wires":[["7207ddfc.43404c"]]},{"id":"360d914f.d3155e","type":"hubitat command","z":"b37ce2b1.34e5c","deviceLabel":"!hubInfo","name":"","server":"4690716e.b51858","deviceId":"863","command":"configure","commandArgs":"","x":680,"y":40,"wires":[[]]},{"id":"87c5b389.22166","type":"inject","z":"b37ce2b1.34e5c","name":"Force Hub Information Device to Update","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":400,"y":40,"wires":[["360d914f.d3155e"]]},{"id":"cde8d66d.8a1e38","type":"hubitat device","z":"b37ce2b1.34e5c","deviceLabel":"!hubInfo","name":"Up Time","server":"4690716e.b51858","deviceId":"863","attribute":"formattedUptime","sendEvent":true,"x":80,"y":200,"wires":[["7207ddfc.43404c"]]},{"id":"8845712d.225a9","type":"hubitat device","z":"b37ce2b1.34e5c","deviceLabel":"!hubInfo","name":"Load/Core %","server":"4690716e.b51858","deviceId":"863","attribute":"cpuPct","sendEvent":true,"x":90,"y":252,"wires":[["7207ddfc.43404c"]]},{"id":"a0fbf957.9069c8","type":"hubitat device","z":"b37ce2b1.34e5c","deviceLabel":"!hubInfo","name":"Temperature","server":"4690716e.b51858","deviceId":"863","attribute":"temperatureF","sendEvent":true,"x":90,"y":304,"wires":[["7207ddfc.43404c"]]},{"id":"931009c5.f08348","type":"hubitat device","z":"b37ce2b1.34e5c","deviceLabel":"!hubInfo","name":"DB Size (MB)","server":"4690716e.b51858","deviceId":"863","attribute":"dbSize","sendEvent":true,"x":100,"y":354,"wires":[["7207ddfc.43404c"]]},{"id":"f048b5ce.31a118","type":"hubitat device","z":"b37ce2b1.34e5c","deviceLabel":"!hubInfo","name":"JVM Free %","server":"4690716e.b51858","deviceId":"863","attribute":"jvmFreePct","sendEvent":true,"x":86,"y":401,"wires":[["7207ddfc.43404c"]]},{"id":"7207ddfc.43404c","type":"function","z":"b37ce2b1.34e5c","name":"","func":"now = new Date().toString();\nmsg.payload.timeStamp = now;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":360,"y":260,"wires":[["65a8aa85.adb964"]]},{"id":"4690716e.b51858","type":"hubitat config","name":"Hubitat Main","usetls":false,"host":"192.168.1.38","port":"80","appId":"913","nodeRedServer":"http://192.168.1.46:1880","webhookPath":"/hubitat/webhook","autoRefresh":true,"useWebsocket":false}]

You need to have the Send Events box checked to get the update event for the attribute

If you change the debug node to output msg.payload you’ll get:

Thanks for the suggestion, but for some reason this didn't work either. I imported your flow and configured it to my devices. In the screenshot below you can see that some of the attribute values for the device and the node-red flow are not the same.

Is the node-red ahead of the HTML? HTML is 1-2 seconds behind the attributes update (allows for a complete set update before building) so it’s probably better to look at the individual attributes on the device. Outside of that, if the values change on the nodes it becomes a MakerApi to Node-Red delay.

1 Like