[Community Survey] Homey v5 ZigBee Health check and statistics collection (HomeyScript)

Hm, is there please some easy way to get notified in case of wrong route identified ? I mean not just timeline… eg. would be great to have some variables in output, not sure it’s possible…

A notification send to a smartphone (i.e.) would be great indeed!
Very pleased with this Zigbee one. It check every night, so I can check every morning if my Zigbee network is still ok. But have to open the Homey app first now.

And would (about) the same script be possible to check Z-Wave health, @Dijker ?

I was immediately thinking about the same on ZWave :wink: Unfortunately have had some strange issues with those as well ;-( Would be fantastic to have something similar.

2 Likes

reporting : 8,“00124b0014d7074b”,3,true,“Homey (Early 2016)”,“5.0.4”,0,18,0,2,“2.6.3”,22,6,16,3,8,5,false,“#”,0,6,10,3,1,0,0,0,1 , $

1 Like

reporting : 7,“00124b0014d70901”,3,false,“Homey (Early 2016)”,“5.0.4”,0,11,0,2,“2.6.3”,60,16,44,4,19,14,true,“#”,0,8,28,15,8 , $

1 Like

Just found a link to this. Well done, Geurt!
FYI: I did a zigbee reset after v5.0.1 was pushed, to make sure it selected a proper channel, before adding devices. It’s not on ch.11 anylonger.
I found out about the zigbee network key issue, and as you can see I don’t have the generic key (but a unique one I may hope!).

reporting : 10,"00124b001eeb2704",3,true,"Homey (Early 2019)","5.0.2",0,16,0,2,"2.6.3",4,0,4,1,1,0,false,"#",0,0,0 , $

1 Like

Correct, since yesterday I check the key:

* 20210326 Check for WELL-KNOWN KEYS (CVE-2020-28952)

let wellKnownKey = (zigBeeState.controllerState.networkKey === "01:03:05:07:09:0b:0d:0f:00:02:04:06:08:0a:0c:0d")

yours is unique :wink:

2 Likes

Yes it should be, I checked it earlier today, after reading about the 1 3 5 7 9 2 4 6 8 key issue

Any idea, @Dijker?

reporting : 4,“00124b0004f6f4e7”,3,false,“Homey (Early 2016)”,“5.0.4”,0,11,0,2,“2.6.3”,41,8,33,3,11,0,true,"#",0,0,0 , $

1 Like

And if you do have the well known key, like probably 90% of all homey users? Only solution is to manually reset the zigbee network, add all zigbee devices again (routers first then end devices) and rebuild all flows?

If you replace the card with a card that sends a notification it could be possible, but you need more specific information (Like the GUID of the user)
The ? in the routing is also not 100% bullet proof,
I have seen both device that can’t communicate with a good last route as devices that can communicate with still a ? in the routing table.

I think it would be possible for Zigbee, but this isn’t as much of an issue.

You mean a Homey flowcard here? Or a card in your script? Do not see a possibility to do this by flowcards…

What does this “?” mean then? Then it might work for Homey, but that Homey simply has no idea of the routing?

I suppose you mean Z-wave here. Why shouldn’t there be an issue? I have some smoke sensors of which it is important to know if it has a bad route or not.
(Or is in sleep, but that shouldn’t differ fromZigbee’s principle I suppose)
Pls correct me if I a m wrong… :slight_smile:

reporting : 0,“00124b0004f8a48c”,3,false,“Homey (Early 2016)”,“5.0.4”,0,18,0,2,“2.6.3”,19,4,15,2,8,4,false,"#",0,2,6,6 , $

In order to extend routing I will migrate Hue bulbs from the bridge Hue App to the no-bridge Hue App.

1 Like

My report:

reporting : 6,“00124b0014d6ff85”,3,true,“Homey Pro (Early 2019)”,“5.0.4”,0,16,0,2,“2.6.3”,14,2,12,3,5,1,false,“#”,0,2,4 , $

Euhh, the advices is:

Please add more zigBee Routers to create a better mesh network
You only have 2 routers for 12 end-devices

Butt! Only one router is actually used, the other one is ignored by Homey (or devices).

1 Like

Because the count should be more the other way around, 12 routers vs 2 end devices, 2 routers is very little if you talk about a mesh protocol like zigbee, even if 1 isn’t used (might not be needed, direct connection is always prefered).

Edit: just because the zigbee page doesn’t show it, doesn’t mean it isn’t used at all, the route shown is usually the last used route and can change every command

1 Like

Thanks for the effort.

Would be nice if someone rewrites this script for z-wave, would give also good info :wink:

2 Likes

In the script I guess:
This is what developer playground returns for a push message to my phone (adjusted for privacy thingies)
Edit: Fixed myself → (If one can convert it to usable code I would like to hear!)
{
"uri":string"homey:manager:mobile"
"id":string"push_text"
"group":string"then"
"args":{2 items
"user":{4 items
"name":string"My Phone Name"
"id":string"AstringIdoNotWantPublished"
"image":string"https://api.athom.com/user/MyAthomID/avatar"
"athomId":string"MyAthomID"
}
"text":string"Zigbee test found issues mate"
}

I came up with this, and works now when running in Homey Script:
You can replace the notification part, but choose to I add it to the HealthCheck script of @Dijker:

// ___Anonymous script: Enter your ID's below
//
Homey.flow.runFlowCardAction({
uri: 'homey:manager:mobile',
id: 'push_text',
args: {
user: {
name: 'Your Phone Name',
id: 'Your DeviceID',
image: 'https://api.athom.com/user/YourAthomID/avatar',
athomId: 'YourAthomID',
},
text: 'myZigBeeHealth Device + devName + has BadRoute info'
//
//When inserted in Geurt's script, put ' ' around devName !
//
} // .... and put a , behind the bracket here
});

Your PhoneName, deviceID, and AthomID can be found by running this in Web API Playground (if you have a “push to your mobile” action card in a flow):
Homey.flow.getFlows();
… Takes a while having 280 flows …
Then use search and search for ’ mobile ’

3 Likes

@Dijker one idea for improvement - are you able to detect, which device is marked as router while it’s battery powered ? Recently when I was trying to change channel of my Zigbee Network (…last attempt prior to ZigBee reset), I got this “funny” error…after I removed that device, I lost 4 devices mesh indications and some other devices starts to loose connections… so it could be it was somehow “damaged”.

Error :
Not all router devices are online: Window vibration sensor, Signal Repeater TV, Signal Repeater WC

…while Window Vibration Sensor indeed is NOT a router ! (Aqara Vibration Sensor).

However, as you can see, it was marked as “Enddevice” with “Receive when idle” checked - so maybe "IF DeviceType=EndDevice AND ReceiveWhenIdle=1 THEN " … you know what I mean…

reporting : 10,“00124b0005f0db14”,3,false,“Homey Pro (Early 2019)”,“5.0.4”,0,11,0,2,“2.6.3”,45,13,32,2,10,9,true,“#”,0,1,8,11,13,1 , $

1 Like