Hello all,
I have a weird problem with my mqtt things that are being discovered via homeassistant protocol. I usually configure channel binding to items via UI. So when I discover a new thing and start to bind some items and press save, the channels seem to disappear or being renamed. E.g. I get the same channel with a new id, e.g. with “_sensor” or “_switch” appended to the former id. I can bind an item to the “new” channel and everything seems fine. After a restart of openhab the former channel id appear once again and I get lots of orphaned links on the settings page. I have to open all things, press “save” and all channel bindings come back.
I tried to delete all things, deleted all retained mqtt messages and setup most mqtt things from scratch.
With OP4.2.3 everything was fine. What I’m doing wrong?
I can post some screenshots or a short video if it might help to understand.
Hi all,
I managed to help myself. The solution is quite simple although I don’t understand what is the difference now. I deleted the questioning things and let them be discovered again. With the exception of one all other things now show complete other channel names. But these channel names remain after oh restart or saving changes to channel bindings.
What I don’t understand is that I have done this at least once or twice before. Maybe there have been changes in discovery which I don’t see in version history. But anyway this can be seen as solved.
I experience the same issue on one of my things that has been ‘discovered’ through the homeautomation discovery setup in Zigbee2MQTT. Saving of the thing does relink the items again and these items are removed from the ‘orphan issues’ page. But when I restart the Openhab service these same items are orphaned again.
I really have no idea where to start debugging. Does anybody have a clue?
unfortunately in some situations I can’t explain any further the new created channels (*_sensor) don’t survive restart of OH. So I tried the same with no success or as workaround on my side. I made a new discovery for every thing that is discoverd via mqtt. All my things have completely new channel names with only one exception. On that thing I made the same as you. But remains weird.
I’m having similar issues where for example on one restart the channel will be named ‘:light’, ‘:dimmer’, or ‘:battery’ but on another restart they get changed to ‘:light_light’, ‘dimmer_light’, or ‘battery_sensor’ acccordingly. Strangely not all seem to change at any given restart, it seems kind of random which ones do. I noticed a mention to set zigbee2mqtt to retain the discovery messages but that doesn’t seem to help. Kinda tempted to just leave the broken links and ignore the health warning so at least there will be at least one of two working links for each item at any given time but I’m not sure if there’s other implications to that.
Edit: Just noticed one of my zwavejs2mqtt items has the same issue this time around, so it’s not a zigbee2mqtt exclusive thing it seems
I haven’t seen any but since it seems to flip flop between two permutations of the channel name, I’ve had success just leaving both the “invalid” link and the working one on each item and ignoring the health check warning. That way one link will always be valid and I’ve not noticed any negative side effects to having the invalid one hanging around. It’s not the best solution but for now it seems to be a workable one.
Thanks. Link updated. I created the link when I first created the release–before the link existed–by copying from another release’s link. I missed that I named the tag differently on this one :).