MQTT Binding - Openhab 3.0

Brand new install of Openhabian 3.0 on Pi 4 with 4gb mem.
Moved my mqtt.things file and mqtt.items file from working Openhab 2.5 that an apt-get borked the boot so started fresh.
I use a Mosquitto broker on a separate machine and it has no changes (no apt-get’s :wink:
Commands from Openhab do not show on Broker nor in Wireshark sniff (i.e. not authentication/malformed request)

Mqtt Things show up
Mqtt Items show up
broker shows in Things and in Other Services:
Other Services

Before I start the heated debate again on the update to MQTT binding - assumed that in 3.0 the Things and Channels version is the only binding option and the conflict with the non Things and Channels approach is resolved.

The behavior looks the same though and hoping this is a quick “you should have RTFM” or just change your Things file to eliminate the broker (prior had to have broker and cant get file to take without it)

Don’t use the MQTT System Broker Connection - get rid of it, and use a normal MQTT Broker Thing.

Though I think I’ve mis-read. What does this mean?

You should just be able to bring across your Things files from OH2.5, including the Bridge/Broker Thing definition, and it’ll all work fine assuming you a) have the MQTT Binding installed and b) haven’t also tried to configure something in the OH3 UI too?

Correct - any v1 configurations will no longer work, as v1 Bindings are not supported in OH3.

So the heart of the question is:

  1. No outbound MQTT messages are leaving the Openhab 3 server. Confirmed via Wireshark
  2. I have a Thing file based broker configured AND there is a broker in the “Other Services” under settings. The Other Services item doesnt appear UNTIL I install the MQTT Binding.
  3. If I disable the Thing based broker config - all the MQTT things go offline.

So the assumption is that you cannot have a Thing broker entry as it appears the “other Services” is where that will be configured BUT my MQTT.things file wont parse upon update to remove the broker from the file
after removing the Bridge and surrounding elipses:

so now I go about finding the format for using a file. I have to go to Github because to include examples for files is against the policy to discourage users using files (ill spare you my thoughts here)

Now on Github we have multiple choices for MQTT:

Seriously? Forking MQTT?
So the Things and Channel MQTT is actually the org.openhab.binding.mqttgeneric
The examples that used to exist for the things files formats are now gone (or i cant find them but why is it necessary to bury them)
Honestly 3 is a leap ahead and until the apt-get broke two of my debian boxes booting I was just cruising on 2.5 and think i will be heading back there.

New MQTT broker parsing of things file requires username and password even if they are blank. added those and parsed with connection to broker for the mqtt.things sourced broker started but still no outbound…

Yes, but this isn’t a broker connection unless you’ve configured it via the UI, so you can ignore it. I think I’ve seen one or two comments suggesting that people clicked on this, removed all the entries in the fields that they see, then save, and things magically started working.

I’m not sure why you’re looking at file formats and GitHub if you already having working Things and Items files from OH2.5 - I’ve literally just copied them over myself. One thing to note is that you can’t have two instances of openHAB with the same Things files running, because your MQTT broker will get confused with the same client ID.

One thing you haven’t mentioned: what is your MQTT Broker? Are you using Mosquitto? Just in case: OH3 doesn’t come with an MQTT broker itself, anymore - you must use a third party one.

This shouldn’t be true - where did you read that?

Mosquitto on a seperate server - no changes to it and its still getting all the updates just no commands from Openhab

i edited the things file to add a blank user name and password and prior no communication with the MQTT server and instantly post updating the file with those two fields it worked.

This after removing the broker in the things file altogether. removing the things file etc.

Yes I originally just installed openhabian, installed the bindings and moved the files over.

So why have a broker thing AND a “Other services” Broker.

What does one serve versus the other - considering the way Openhab used to work - do now have to go into the CLI and clear the Other Services Broker out since it was configured once. Removing it in the gui by blanking all the fields has no effect.

You’re talking about 'System broker’Thing? It’s a redundant leftover from OH2 and will disappear in later OH3 releases.

1 Like

Just curious why if it will be removed was it left in? It had to be coded for as it has triggers for the other services AND it comes with the binding.

And hey since you are knowledgeable- how about the actual problem:. Openhab is a client on the separate mosquitto server but no commands come from openhab which initiates items changes nor do MQTT client updates on topic trigger item updates.

So when I have a chance I will examine the bundle config and the rest in the CLI (assuming that hasn’t changed in 3) or I’ll see if a fresh install of 2.5 will work or I’ll just go to home assistant.

Honestly last time my instance broke from Openhab was because of the “things and channels” binding being the new standard. The answer of no examples in the docs because we don’t want people using files anymore by Graff really turned me off but I put in the effort to find the examples on GitHub, read the jar files and figure the problem out as my broker connection had the same issue then. I didn’t point out the code that caused the issue - I just figured out how to get back to good then. I didn’t post anything as the response to the examples ask made me think nothing positive would come of it.
Oh and on that topic- there’s a things file example in the thing topic on the main docs but the MQTT docs still point to the pre things and channels and then u have to click through to things and channels which do not contain that example, nor could I find the examples in the add-ons GitHub. I guess from my perspective time was spent coding for 3 to keep the appendix of an admin MQTT server connection but these tools to remove friction from adoption languish.

I screenshot the actual things FWIW in the top posts…

Oversights happen. The “embedded broker” feature that System broker Things relate to was removed from OH3, but the System broker part of the binding was overlooked because it is part of the MQTT binding and not part of the removed service.

This was the last we heard. Is there still a problem?

absolutely still a problem


didnt catch that its using v6 - turned that off but still on post openhab service restart and reboot.
the broker end is thinking its to talk v4 to the v6 openhab client:

turning off v6 entirely on openhabian instance

v4 stablished properly but no progress on commands but now these show up in the THINGS Inbox which were different “Other Services - MQTT Broker” configs i entered and saved in Settings…all Bundles start up ok and now assume there are bundle configs that are persistent that need to be deleted/edited out. back to the cli.


turning off v6 at OS level took care of it.

1 Like