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

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

No, sorry I don’t know what…

But it is possible, see here from the API Playground:

And I See I also have two:
image

2 Likes

My Homey was affected by CVE-2020-28952.

I had added my first and only ZigBee (Aqara vibration) sensor with firmware v4, but am currently on 5.0.4.

A ZigBee reset indeed changed the network key to a much more random one (it also changed the channel from 11 to 19).

The scripts complains that I should add ZigBee routers, but I only have a single end-device that is directly coupled to my Homey (and about 5 meters away from it, on the same floor):

Please add more zigBee Routers to create a better mesh network

You only have 0 routers for 1 end-devices 

Can I safely ignore this warning with my setup?

(I actually have a lot more ZigBee devices; Hue bulbs and IKEA wall outlets, but those are connected to their bridges, not to the Homey directly)

1 Like

Homey only knows of one ZigBee Network,
if it works for you,
it just test you have one router for every five end-device as advised by Athom.

So you have EndDevice , which are battery powered, yet they have receiveWhenIdle flag ? I don’t know if that is alright or not but after I have removed and added again that particular device, now NONE of my battery operated ZigBee device has this flag… at least based on Homey Developer

I have 4 aqara sensors @ Homey zigbee and works perfect without router/hop. Upstairs, down the hallway, the “back kitchen” 6 metres away from Homey with walls in between. Homey has free sight in the living room and sits 1.80m high.
Not that I recommend an other setup as Athom advices, but just to show what Homey’s capable of.
I will add a router though, when more end-devices appear :wink:

1 Like

Hmm, why would Athom do that, anyone knows the reason? Is it is just random, a new default or can they scan how crowded a frequency is. My zigbee is very stable on Channel 11. I am however doubting to reset the zigbee network for this CVE-2020-28952 issue.

Did more people see the channel # change and if so, did you leave it like that or switched back to channel 11? According to this post it’s also the most popular (or default) channel:

My wifi is on Channel 11, so it won’t interfere with zigbee channel 11 or 19 anyway. But I do prefer as much separation as possible + my neighbor is on wifi channel 6.

20210306_221451

Yes, the channel of mine Homey changed automatically from 11 to 20 after Zigbee reset.
Because the channel 20 is not optimal in mine environment (WLAN, other Zigbee gateways) I wanted to change it back to channel 11.
I asked Athom if this would be possible without any problems, but they advised me not to do it. It could be that after changing the channel, the Zigbee devices no longer work properly and may have to be added again.
So I did not make any change at Homey, but I changed the WiFi channel of my WLAN .router

reporting : 0,“00124b001b445366”,3,false,“Homey (Early 2019)”,“5.0.4”,0,13,0,2,“2.6.3”,30,8,22,2,8,8,false,"#",0,4,17,9 , $

1 Like

Some time ago I changed my router setup to use WiFi channel 1.

I was not aware of the WiFi/ZigBee overlap… (thanks for the picture!)

WiFi channel 6 is the next least crowded here (after channel 1), so ZigBee channel 19 might be better than 11 in my new setup?

1 Like

For someone with a username like yours, you sure ask lot’s of questions. You already mentioned you have looked at the picture. If you now run your Zigbee on 11, there is a (small) overlap with Channel 1 of wifi. If there are lot’s of other wifi networks and they are mostly on Channel 6 and 11 maybe you should use channel 20 for Zigbee?
I’m aware of this being off topic, so maybe if you have more question regarding the best channel choice for Zigbee versus Wifi you should search the forum and if you really cannot find your answers (you aren’t the first with these challenges) you could open your own thread.

reporting : 9,“00124b001f1f9b27”,3,false,“Homey (Early 2019)”,“5.0.4”,0,11,0,2,“2.6.3”,29,18,11,6,14,15,true,“#”,0,9,10,8,2 , $

1 Like

Off-topic, although it’s good to have the answer here, cause this zigbee health script will mention that you have a well-known key and the only solution to change it, is a zigbee reset. Which could result in a change of used zigbee channel (frequency). That could have effect on the zigbee health. :loop:

My solution would be:

  1. zigbee reset
  2. change zigbee channel back to 11 (if desired/needed)
  3. add router devices
  4. add end-devices
2 Likes

:slight_smile:

It was more of a rhetorical question, a possible answer to why the channel changed after the ZigBee reset.

(and I like to learn by asking questions)

Apologies for being off-topic.

reporting : 6,“00124b00199f16fb”,3,false,“Homey (Early 2019)”,“5.0.4”,0,11,0,2,“2.6.3”,23,14,9,5,13,10,true,“#”,2,6,11,4,0,1 , $

1 Like

@Eternity How is it possible you mentioned you haven’t resetted your Zigbee network or started fresh with homey V5. Cause I thought you did do the reset, to see if it fixed your high cpu load + you do not have the well-known key according to the report, this means a reset is done?

@Wesley_Witjes Same counts for this one:

It’s not possible right to have a false for ‘zigbee reset or started with v5’ and another false for ’ well-known key’ as a health script output report. Cause those two are related to each other?

1 Like