# A way (a script ?) to automically test & heal devices?

**URL:** <https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883>\
**Category:** Devices\
**Tags:** homey-pro\
**Created:** [February 1, 2024, 9:28am UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883 "2024-02-01T09:28:30Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Papy\_Bohington](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/papy_bohington/32/34126_2.png) [@Papy\_Bohington](https://community.homey.app/u/Papy_Bohington)\
**Post date:** [February 1, 2024, 9:28am UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883/1 "2024-02-01T09:28:30Z")

</div>

team,

I have an Homey pro 2016-2019 with approx 60 fibaro walli devices (roller, dimmer & switches) paired.  
For some reason, randomly, without sudden power supply issue, some devices are losing their route and appear unreachable in the developper tool.  
so I need to unplug them from the wall, the “remove” fuction doesn’t work so I need to force it, then re-pair and modify all flows usingthis device. painful.

on a regular basis, in the devolopper tool, I see some device unreachable, but I can test them and re-heal them. but sometimes, it’s too late.

I dont’ think there is way, from the device, to force to searh for neighbours. does anyone knows if Fibaro walli devices have a heal function from their own menu ?

So the solution is probably in homey.  
I didn’t see any “test” or “heal” function from the scripting capabilities of Homey but I must say that I’m totally unskilled in scripting.

Does anyone of you have developed a solution, or a script to regularly test & heal the Z-Wave devices ?  
Ideally, since almost all my scripts have an error management which notify me when a step of a flow didn’t suceed, I could call the “heal” script to make sure that the flow didn’t fail because the device is lost in action.

Thanks for your help.  
best regards

---

<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:** [February 1, 2024, 9:59am UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883/2 "2024-02-01T09:59:37Z")

</div>

“test” is just sending a `basic get` command, it has been said on the forum a (long) while ago what this command is: `[NodeID] 0x20, 0x02`.

Heal isn’t possible, as that is done in a layer below what apps or the raw possibilities are allowed/able to do.

---

<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:** [February 1, 2024, 10:47am UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883/3 "2024-02-01T10:47:31Z")

</div>

> [@Papy\_Bohington](#):
>
> some devices are losing their route and appear unreachable in the developper tool.

Hello Papy,

Wouldn’t it be a better idea to look for the cause of these issues? Zwave should run without regular ‘unreachable’ issues.

It’s not clear to me what the real issue is

1. Does that mean the problem is only “unreachable” in the developer tool, or are they also unreachable irl?

2. Is it possible you have several devices operating at the zwave range limits?

3. How certain are you about the stability of the supplied power?  
How do you record the power peaks, dips and cuts?

4. Do these issues occur since you started using zwave? Or did it start to occur from a certain point in time?

---

<div class="post-metadata">

**Author:** ![Papy\_Bohington](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/papy_bohington/32/34126_2.png) [@Papy\_Bohington](https://community.homey.app/u/Papy_Bohington)\
**Post date:** [February 1, 2024, 1:18pm UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883/4 "2024-02-01T13:18:07Z")

</div>

Thanks for answering.  
Noted for the “Get” command, is this doable in a script with a feedback of success or not ?

---

<div class="post-metadata">

**Author:** ![Valentin\_Ciopei](https://avatars.discourse-cdn.com/v4/letter/v/6bbea6/32.png) [@Valentin\_Ciopei](https://community.homey.app/u/Valentin_Ciopei)\
**Post date:** [February 1, 2024, 1:24pm UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883/5 "2024-02-01T13:24:37Z")

</div>

I think there was an overview.js. script somewhere. you can run that, parse the output and trigger the commands you need.

---

<div class="post-metadata">

**Author:** ![Papy\_Bohington](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/papy_bohington/32/34126_2.png) [@Papy\_Bohington](https://community.homey.app/u/Papy_Bohington)\
**Post date:** [February 1, 2024, 1:24pm UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883/6 "2024-02-01T13:24:56Z")

</div>

Hi Peter,  
Thanks for answering.

1/ When devices appear unreachable in the developper tool. then :  
sometimes I can test a heal them from the devoloper tool, then it returns to a normal state.  
sometimes, I would say it’s too late, the device is also unreachable IRL nor thru scripts.

2/All my devices are within 15/20 meters and none are more than 2m from the closest powered one  
the walls of my house are made of wood with wood isolation inside. no concrete with iron.  
I don’t think it’s a problem of range or radio.  
the instance of the problem I had this week, the walli roller shutter was 1m from the homey itself.

3/ cannot be certain but it was the power supply, I would lose more device, no ?

4/ I would say since the begining randomly

---

<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:** [February 1, 2024, 10:50pm UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883/7 "2024-02-01T22:50:17Z")

</div>

No problem, Papy.

1 - check  
2 - I see no problems there  
3 - there can be a bad connection in a junction box for instance, but as you say at ‘4/’, about these issues occurring from the start, with random devices, it almost can’t be a power issue.  
4 - see 3.

Oh, I just found this post about a ´brutal’ way to heal the complete mesh in one go:

> [@Report unreachable Z-wave devices](https://community.homey.app/t/report-unreachable-z-wave-devices/22493/32):
>
> you can do a [PTP](https://community.homey.app/t/how-to-ptp/17304). After that the complete Z-Wave mesh will be rebuild, but it takes some time.

.

One of the possible causes I’ve read about, can be one or more ‘chatty’ devices, which can ruin (parts of) your zwave mesh.  
For every device, try to set the update time of sensors as long as you find reasonable, keep away from ‘check this or that every second’ stuff.  
Probably interesting topic about chatty devices:

> [@Homey pro 2023 - zwave too much traffic error?](https://community.homey.app/t/homey-pro-2023-zwave-too-much-traffic-error/84036/):
>
> I had a perfectly working homey pro 2023 with about 45 zwave devices. Since today, the zwave is not really working anymore as I get an error: "Could not send command. Too much Z-wave traffic. (TRANSMIT\_COMPLETE\_FAIL). This goes for all zwave devices now, and might be related to the latest firmware update. I have tried to reboot, reset (with back) but nothing helps. My old homey pro works perfectly, so its not the devices themselves. anyone else experienced the same?

---

<div class="post-metadata">

**Author:** ![Papy\_Bohington](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/papy_bohington/32/34126_2.png) [@Papy\_Bohington](https://community.homey.app/u/Papy_Bohington)\
**Post date:** [February 2, 2024, 2:37pm UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883/8 "2024-02-02T14:37:54Z")

</div>

Hi Peter,  
I didn’t know that the whole Z-Wave network was rebuilt after such hard reboot.  
I was thinking that by default each devices will try to recontact the path it had in memory.

This means that after the 10 mn of disconnection, all the devices will refresh their closest neighbors ?  
So I guess this starts from the X devices in direct connection with the hub, then the ones connected to devices in the 1st range, and so on ?  
I must say that I’m sometimes surprised how somes devices are reaching the hub. knowing the tipology of the house, it’s clearly not the closest/ fastest path.

homey support already warned me about devices sending to many refresh parameters command. I have 5 aerotec sensor 6 and I hope I’ve tune them to not bother the network.

---

<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:** [February 2, 2024, 4:06pm UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883/9 "2024-02-02T16:06:00Z")

</div>

Yeah, that’s why it’s not recommended to PTP Homey to often, if needed at all  
It _can_ take hours for the mesh to rebuild.

No clue on _how_ the mesh is getting built.

Yup, just as with zigbee mesh networks, it’s often not about the shortest possible routes. I’ve had one zigbee unit 2 meters away from Homey, and it connected through a light upstairs.

---

<div class="post-metadata">

**Author:** ![Papy\_Bohington](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/papy_bohington/32/34126_2.png) [@Papy\_Bohington](https://community.homey.app/u/Papy_Bohington)\
**Post date:** [February 4, 2024, 8:08am UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883/10 "2024-02-04T08:08:04Z")

</div>

one last question : Many of my scripts are batch modification of configuration : open all stores of the house, close them all together, switch on/off all lights of a level or outside,…

Do you think that those scripts sending many commands at a time are saturating the Zwave network leading to devices losing their path ?

---

<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:** [February 4, 2024, 1:03pm UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883/11 "2024-02-04T13:03:54Z")

</div>

Yeah, somehow it’s pretty hard for Homey Pro 201x to control more than 2 or 3 devices, which use the same antenna like zwave, at once.  
This flaw doesn’t seem to be very improved with the 2023 model, but I might be wrong here.

Workarounds / alternatives

1. Add, say, 50 millisecs Wait in your array. Then test a bit with less or more millisecs to get the optimal wait time before each command to the related devices
2. When you add the lights to a group, by using an advanced virtual device, or by using a \< group \> device, the commands for every group member, are executed in sequence; you can start these devices’ flowcards from Homeyscript (check the example scripts in HS)
3. Not HS related, but anyways: In advanced flow, one can daisy-chain the action cards, allowing for the lights to turn on/off in sequence with slight delays, instead of all at once.

---

<div class="post-metadata">

**Author:** ![Papy\_Bohington](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/papy_bohington/32/34126_2.png) [@Papy\_Bohington](https://community.homey.app/u/Papy_Bohington)\
**Post date:** [February 5, 2024, 8:21am UTC](https://community.homey.app/t/a-way-a-script-to-automically-test-heal-devices/102883/12 "2024-02-05T08:21:24Z")

</div>

Thanks for all your time & advices;
