On OH 2.5.x and mqtt binding 2.6 (with my own broker), I have my MQTT topics in a Things file and when I add new topics the binding does not seem to pick them up right away until I restart openhab.
For example if I add this as a new block:
Thing topic gmc600 "GMC600" {
Channels:
Type number : CPM [ stateTopic="sensors/radCPM" ]
Type number : uSv [ stateTopic="sensors/raduSv" ]
}
I won’t see any item updating that is using the channel until I restart openhab. Restarting the binding itself with openhab-cli didn’t seem to help, but I’m not sure I restarted the right one and in the right sequence.
It’s probably pilot error on my part since it’s been going on for a long time and I just restart, but I can’t seem to figure out what the problem is.
But the OP said that didn’t work (with caveats), and I think that’s because it was an openHAB problem, not a binding problem.
For me, though, it’s always faster to remove and re-add something to a file which I’m already working on, than it is to restart a bundle from the console. YMMV
Sorry, I missed that one.
However, stating bundle(s) was on purpose, because the MQTT binding does install more then one, so the OP might have missed the correct one (as he stated as well).
Note that you are talking Items, and this complaint is as likely on the face of it to be about not properly forming the link as the channel/Thing.
PaperUI should give a view of “what the system thinks” about the shape of a Thing etc.
“What the binding thinks” could be different - if you edit a topic for example, the binding has to spot that, unsubscribe the old topic, subscribe a new one.
It would be interesting to pin down where the remaining issues lie.
Thanks for the comments. Yes I mean the linkage between the thing and the item such that the item does not receive any update. Often I re-arrange and rename things, and I believe sometimes depending on what I do it can cause it to break the link.
I’ll do a bit more testing and try to narrow down the actual ways it can require a restart. It certainly doesn’t require it in all cases.
I’ve been restarting org.openhab.binding.mqtt and org.openhab.binding.mqtt.generic. There are six of them so maybe I’ll try more or a different order …