eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
862 stars 783 forks source link

[MQTT] - Homie doesn't support hyphens in topics. #6784

Open boc-tothefuture opened 5 years ago

boc-tothefuture commented 5 years ago

Issue exists with openhab 2.4 and MQTT2 binding.

I am noticing that some of the channels for a homie device continue to remain in the dummy state while others are properly processed.

Here is what I show in the paper UI: image

Display Line 1 and Display Line 2 appear to properly processed and have type string. Display line 3 and display line 4 are of type "dummy".

If I check the retained topics with mosquitto_sub for "source-1", I have the following:

homie/nuvo/source-1/$properties displayline-1,displayline-2,displayline-3,displayline-4,duration,position,status
homie/nuvo/source-1/displayline-1/$name Display Line 1
homie/nuvo/source-1/displayline-1/$settable true
homie/nuvo/source-1/displayline-1/$retained true
homie/nuvo/source-1/displayline-1/$datatype string
homie/nuvo/source-1/displayline-2/$name Display Line 2
homie/nuvo/source-1/displayline-2/$settable true
homie/nuvo/source-1/displayline-2/$retained true
homie/nuvo/source-1/displayline-2/$datatype string
homie/nuvo/source-1/displayline-3/$name Display Line 3
homie/nuvo/source-1/displayline-3/$settable true
homie/nuvo/source-1/displayline-3/$retained true
homie/nuvo/source-1/displayline-3/$datatype string
homie/nuvo/source-1/displayline-4/$name Display Line 4
homie/nuvo/source-1/displayline-4/$settable true
homie/nuvo/source-1/displayline-4/$retained true
homie/nuvo/source-1/displayline-4/$datatype string

I don't see any difference between the messages for display line 1 & 2 vs 3 & 4 that would result in one set of being properly processed and the other remaining in the "dummy" state.

@davidgraeff requested I open an issue.

manswiss commented 5 years ago

When I add a Homie MQTT device with dashes '-' in the id and this thing has a switch item, it not receives updates or send commands. When I add the same device without dashes in the id, it work correct.

https://community.openhab.org/t/mqtt-homie-switch-wont-work/62104/4