[Bug]: Including a device twice makes it inaccessible until excluded and included again
Checklist
- [X] I am not using Home Assistant. Or: a developer has told me to come here.
- [X] I have checked the troubleshooting section and my problem is not described there.
- [X] I have read the changelog and my problem is not mentioned there.
Deploy method
Manually built (git clone - yarn build - yarn install
Zwavejs2Mqtt version
6.13.0
ZwaveJS version
9.5.0
Describe the bug
Including a device that's already included will make it become inaccessible even if the given name and/or location matches the already included one.
To Reproduce
Include a zwave device, then, include it once again.
Expected behavior
Either the inclusion gets declined or the device gets a new name/location, and it still accessible, even if under a new path/id/mqtt topic.
Additional context
Excluding then Including the device fixes this
Why are you including your device twice?
Playing around, testing edge cases and weird scenarios to see what breaks
Define inaccessible.
Inclusion is handled by the Z-Wave protocol, so we don't have any influence on it.
Inaccessible as in it doesn't get messages I'd try to send it. Be it just a ping or a value change. This includes sending the message to it's ID and if the location/name changed on the new inclusion, neither the old or the new pairing of name/location mqtt topic works, ex.: zwave/office/dimmer/38/1/targetValue/set
when a device is paired for a second time, the UI shows that device with ID shows the ID of the device that was already paired successfully included, but then it can't be controlled from APIs, MQTT, or the UI itself until it gets excluded and re-included under a new ID
I'll try to reproduce next week, but I'm afraid this is either device or controller specific behavior.
Can confirm that weird stuff happens when doing this. Restarting and/or re-interviewing gets things back to normal, but we should probably just not react when a node is "added" with an ID that is already part of the network.