[RELEASE] Hub Information Driver

Would it be possible to add the Zigbee Network status to the hub information driver?

I'm having occasional Zigbee offline issues and it would help if I could monitor the Zigbee network status, then issue a notification when it's not ONLINE. AFAIK zigbee status is not available as a hub setting, nor is it available in the Hub Information Driver.

I wanted to do this in RM by loading hub_IP/hub/zigbeeInfo but could not figure it out. I already use Hub Information Driver, so this seems like the ideal place for it.

The /hub/zigbeeInfo page html should have string <h4>Zigbee Network State: ONLINE</h4>
Do a preg match for '$<h4>Zigbee Network State: *([^<]+)</h4>$' then set the status as captured result[1]

Sorry my regex skills are PHP oriented not Groovy
Logic and code In PHP

$bdy = (read the page and process any errors)
if (preg_match('$<h4>Zigbee Network State: *([^<]+)</h4>$',$bdy,$status))
zigbee_status = $status[1];

This technique could also be used to get the Zwave status requested by @alan564923

The driver already has a way of knowing if zigbee is online (the channel gets reset to null when it turned off or crashes) so an easy add, haven't found a similar tell tale for zwave, but you're right I could interrogate the details pages for the information.

1 Like

@alan564923 Does the zwave actually go offline or just fail to respond for a period. If the latter, SiLabs release 7.17.1 just recently and if it passes HE Beta you could see it sooner rather than later.

Disabled Zigbee, did a HIA update and configure, Hub Information Driver out of sync with Zigbee status page
image
image

Doesn't let me update an attribute to null so you're getting the last valid channel, but give me about 2 minutes and I'll get you a version that has a zigbeeStatus attirbute (enabled/disabled)

1 Like

You're the best! However, will this reflect Enabled and offline?

Should be in HPM now, values are enabled and disabled

Thank you, installed latest version, something's is wrong
image
image

Fat fingered the check in the Configure area, would have corrected on the next poll, but if you don't mind doing a Repair the updated code is out there now.

Repair done, still showing disabled.
Suppress data attribute if Zigbee is null is False
clicked configure, hia update, and initialize.

Can you check line 300, should read:

    if(location.hub.properties.data.zigbeeChannel != null)
        updateAttr("zigbeeStatus", "enabled")
    else
        updateAttr("zigbeeStatus", "disabled")

Sometimes GitHub will cache the code.

I have the if starting on 299 matching what I see in Github.
Checked Github again and it matches my code

I can replicate, let me do a little playing to see what is happening (it’s flipping back and forth when enabled).

Edit: Found it, was part of another issue. Will push up a fix in a minute or so.

can put in a value for an attribute that is not set to be

'not set'

or 'null'

as strings...

1 Like

v2.6.22 has the fix…

2 Likes

installed 2.6.22, hit configure, now shows as 'enabled'
Thank you for quick update.

3 Likes

@thebearmay This is so funny as my zigbee network was just offline this evening, thanks for the great app.

Adding some logic in node red to reboot in this event, along with the declining memory issue.

1 Like

@thebearmay, you are simply amazing! Thanks for all your contributions to the community.

3 Likes

Offline and sometimes the DB gets corrupted, and I have to do a soft reset, but the DB corruption is "occasional" and not every time.

Also, not a C-7 hub so I'm not sure the new firmware would help.

Alan

Firmware looks to be for the 700 chip so C-7 only. If you not seeing a zwave crashed event, the only thing I could do would be to “scrape” the Zwaves detail screen and give you some type of indication that it was no longer reading Enabled. I have some “test” code laying around that does something similar so may be able to get you a zwaveStatus (enabled/disabled) later today.