Support z2m devices with / in 'friendly name' #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All my zigbee2mqtt devices use the namespace convention described here:
https://www.zigbee2mqtt.io/guide/usage/mqtt_topics_and_messages.html#zigbee2mqtt-friendly-name
This doesn't work in Bifrost as it ignores all device messages with a
/
. I've therefore been using a forked version where I just removed that check until I could investigate how this could be properly fixed.Initially I thought this would require handling the weird edge cases with
device1/set/attribute
described here:https://www.zigbee2mqtt.io/guide/usage/mqtt_topics_and_messages.html#zigbee2mqtt-friendly-name-set
But that's not relevant as all those messages are only sent to the websocket server and it seems like the only case we really need to handle is availability messages.
At least it looks like that's what the z2m frontend does:
https://github.com/nurikk/zigbee2mqtt-frontend/blob/25d88e716e4313e0643a48f32575974c0f4d1a98/src/ws-client.ts#L298-L304