itavero / homebridge-z2m

Expose your Zigbee devices to HomeKit with ease, by integrating 🐝 Zigbee2MQTT with 🏠 Homebridge.
https://z2m.dev
Apache License 2.0
325 stars 50 forks source link

[Feature] Possible to retain a device that left the network? #957

Open ThisIsQasim opened 2 days ago

ThisIsQasim commented 2 days ago

Problem description

Sometimes someone (kids) would accidentally reset a device and it would leave the zigbee network. Adding it back is easy but the accessories in HomeKit get reset and have to be customized and added to automations/scenes again.

Suggested solution

Would it be possible to provide a list of devices in the plugin config to retain even if they leave the network?

Would be even better if they can marked as unavailable when they leave.

Alternative solutions

No response

Additional context / information

No response

itavero commented 2 days ago

Would it be possible to provide a list of devices in the plugin config to retain even if they leave the network?

Not so difficult to do in theory, but if I would have time left to spend on homebridge-z2m this definitely would be at the bottom of the list. If you'd make a PR, I'll try to find some time to review it.. but unfortunately I really didn't have much spare time to spend on this project for the past year or so.

I myself use Controller for HomeKit to frequently make backups. I feel something like that would be a better approach. Especially since it also allows you to replace a device if it gets broken/lost.

On devicea I don't want to be reset by others, I just tried to make it very hard to do so. 😅

Would be even better if they can marked as unavailable when they leave.

This is quite hard to do in the sense that there's not just a single variable you can change on an accessory to indicate it's unavailable. You have to actively return an error on commands to get/set attributes.