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

**URL:** <https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231>\
**Category:** Questions & Help\
**Tags:** zigbee\
**Created:** [March 7, 2021, 3:22pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231 "2021-03-07T15:22:23Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [March 26, 2021, 10:11am UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/64 "2021-03-26T10:11:31Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Henk\_Renting](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henk_renting/32/87634_2.png) [@Henk\_Renting](https://community.homey.app/u/Henk_Renting)\
**Post date:** [March 26, 2021, 10:52am UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/65 "2021-03-26T10:52:30Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [March 26, 2021, 11:27am UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/66 "2021-03-26T11:27:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sjalabert](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sjalabert/32/11432_2.png) [@Sjalabert](https://community.homey.app/u/Sjalabert)\
**Post date:** [March 27, 2021, 10:24am UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/67 "2021-03-27T10:24:20Z")

</div>

> 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 , $

---

<div class="post-metadata">

**Author:** ![Glenn\_Seegers](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/glenn_seegers/32/8353_2.png) [@Glenn\_Seegers](https://community.homey.app/u/Glenn_Seegers)\
**Post date:** [March 27, 2021, 12:15pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/68 "2021-03-27T12:15:39Z")

</div>

> 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 , $

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [March 27, 2021, 1:44pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/69 "2021-03-27T13:44:21Z")

</div>

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 , $`

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [March 27, 2021, 1:52pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/70 "2021-03-27T13:52:16Z")

</div>

> [@Peter\_Kawa](#):
>
> 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!)

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")

```

> [@Peter\_Kawa](#):
>
> ,false,“#”,

yours is unique 😉

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [March 27, 2021, 2:15pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/71 "2021-03-27T14:15:02Z")

</div>

> [@Dijker](#):
>
> yours is unique

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

---

<div class="post-metadata">

**Author:** ![Henk\_Renting](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henk_renting/32/87634_2.png) [@Henk\_Renting](https://community.homey.app/u/Henk_Renting)\
**Post date:** [March 27, 2021, 3:29pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/72 "2021-03-27T15:29:51Z")

</div>

> [@Henk\_Renting](#):
>
> And would (about) the same script be possible to check Z-Wave health, @Dijker ?

Any idea, @Dijker?

---

<div class="post-metadata">

**Author:** ![Eric\_Vrugt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eric_vrugt/32/15592_2.png) [@Eric\_Vrugt](https://community.homey.app/u/Eric_Vrugt)\
**Post date:** [March 27, 2021, 4:48pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/73 "2021-03-27T16:48:54Z")

</div>

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 , $

---

<div class="post-metadata">

**Author:** ![rvdeijk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rvdeijk/32/22542_2.png) [@rvdeijk](https://community.homey.app/u/rvdeijk)\
**Post date:** [March 27, 2021, 10:28pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/74 "2021-03-27T22:28:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [March 27, 2021, 10:41pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/75 "2021-03-27T22:41:43Z")

</div>

> [@Henk\_Renting](#):
>
> 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 ?

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.

---

<div class="post-metadata">

**Author:** ![Henk\_Renting](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henk_renting/32/87634_2.png) [@Henk\_Renting](https://community.homey.app/u/Henk_Renting)\
**Post date:** [March 27, 2021, 10:58pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/76 "2021-03-27T22:58:27Z")

</div>

> [@Dijker](#):
>
> If you replace the card with a card that sends a notification it could be possible

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

> [@Dijker](#):
>
> The ? in the routing is also not 100% bullet proof,

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

> [@Dijker](#):
>
> I think it would be possible for Zigbee, but this isn’t as much of an issue.

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… 🙂

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [March 28, 2021, 10:23am UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/77 "2021-03-28T10:23:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![M\_a\_r\_c\_o](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/m_a_r_c_o/32/146_2.png) [@M\_a\_r\_c\_o](https://community.homey.app/u/M_a_r_c_o)\
**Post date:** [March 28, 2021, 12:28pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/78 "2021-03-28T12:28:38Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [March 28, 2021, 12:34pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/79 "2021-03-28T12:34:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![M\_a\_r\_c\_o](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/m_a_r_c_o/32/146_2.png) [@M\_a\_r\_c\_o](https://community.homey.app/u/M_a_r_c_o)\
**Post date:** [March 28, 2021, 12:39pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/80 "2021-03-28T12:39:43Z")

</div>

Thanks for the effort.

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

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [March 28, 2021, 3:15pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/81 "2021-03-28T15:15:28Z")

</div>

> [@Henk\_Renting](#):
>
> > [@Dijker](#):
> >
> > If you replace the card with a card that sends a notification it could be possible
> 
> You mean a Homey flowcard here? Or a card in your script? Do not see a possibility to do this by flowcards…

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](https://github.com/Dijker/nu.Dijker.UnseenHomeyScripts/blob/master/zigbeeHealthNotificatonReport.js) 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 ’

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [March 28, 2021, 5:48pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/82 "2021-03-28T17:48:29Z")

</div>

@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).

 ![obrazek](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/f/0f88f259849993d5bea512c545212a2f305ba467.png)

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…

---

<div class="post-metadata">

**Author:** ![Wout\_van\_den\_Dool](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wout_van_den_dool/32/391_2.png) [@Wout\_van\_den\_Dool](https://community.homey.app/u/Wout_van_den_Dool)\
**Post date:** [March 28, 2021, 6:24pm UTC](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231/83 "2021-03-28T18:24:42Z")

</div>

> 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 , $

[Previous page](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231.md?page=3)

[Next page](https://community.homey.app/t/community-survey-homey-v5-zigbee-health-check-and-statistics-collection-homeyscript/44231.md?page=5)
