node-zwave-js icon indicating copy to clipboard operation
node-zwave-js copied to clipboard

[Bug]: Including a device twice makes it inaccessible until excluded and included again

Open Lovasz-Akos opened this issue 3 years ago • 7 comments

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

Lovasz-Akos avatar Jul 13 '22 12:07 Lovasz-Akos

Why are you including your device twice?

robertsLando avatar Jul 14 '22 06:07 robertsLando

Playing around, testing edge cases and weird scenarios to see what breaks

Lovasz-Akos avatar Jul 14 '22 06:07 Lovasz-Akos

Define inaccessible.

Inclusion is handled by the Z-Wave protocol, so we don't have any influence on it.

AlCalzone avatar Jul 14 '22 13:07 AlCalzone

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

Lovasz-Akos avatar Jul 15 '22 10:07 Lovasz-Akos

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

Lovasz-Akos avatar Jul 15 '22 10:07 Lovasz-Akos

I'll try to reproduce next week, but I'm afraid this is either device or controller specific behavior.

AlCalzone avatar Jul 15 '22 12:07 AlCalzone

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.

AlCalzone avatar Jul 26 '22 11:07 AlCalzone