[SOLVED] Openhab2 stable debian 10 MQTT Broker configuration

I was trying to figure out why you don’t get this option. So if you didn’t install the embedded broker my guess was wrong.
I am running out of ideas!

If you have mosquitto broker running, and you have the mqtt binding running…
Look at PaperUI β†’ Configuration β†’ Services

I am using the mosquitto broker with mqtt 2.4. My setup required ONLY a MQTT Broker Thing (which the OP can’t create) and Generic MQTT Things.
I didn’t even touch the Services MQTT!

I honestly dont really understand why its there either… Maybe its a left over from the embedded version I tried using first.
Anyhow… I have my devices up running, so it doesnt seem to do any harm :smiley:

@mbunal
So far you have tried yo setup the MQTT things via PaperUI. That failed because you don’t get the option to create the needed MQTT Broker Thing.
Why don’t you try the setup via files? An example is shown on the ottom of the documentation page I have linked earlier in this thread.

@David_Graeff
The OP is using the 2.4 version and doesn’t get the option on PaperUI to create a MQTT Broker Thing. See the screenshot in post #17. Do you have an idea why such can happen?

@ubi: there is only Embedded MQTT Broker misc-mqttbroker - 2.4.0
no MQTT Broker moquette.

i will try via files. but no one suggest via file configuration with paperui. if u use config files, auto discovery didint work.

That’s easy why the option is not visible in Paper UI.

According to the screenshot the OP is in the β€œMQTT Thing Binding” section.
The Broker Things belong to the MQTT Binding NOT the MQTT Thing binding.

The mqtt binding actually consists of four bindings:

  • The MQTT (Broker) binding, the core basically
  • The Generic MQTT Thing binding,
  • The Homeassistant binding
  • The Homie binding

The last two share the namespace with Generic MQTT Thing, so do not appear as different bindings in PaperUI.

Cheers, David

1 Like

Thanks for this explanation.
However, I am also on the 2.4 version, where I can only get the MQTT Binding. Which enables to create Generic MQTT Thing, HomeAssistant MQTT Component, Homie MQTT device, MQTT Broker and System MQTT Broker. I can’t even get to the point the OP reached.
What am I missing.

Thats what I thought as well after struggling with mqtt the last few days.
Not only did I have to learn mqtt, but I also ran into some problems with the binding… @rlkoshak mentioned in another thread, that you dont support text configuration (thing) files, (I dont understand why though)… Well, this is what IΒ΄m using. And I seem to have discovered an issue or at least something which makes it really difficult to work with.
Issue appear whenever I change something in the thing file, (change a channel) and save the file. IΒ΄ll have to disable the thing (from PaperUI) and enable it again for it to work again. If I comment out a few channels, and save the file, the channels will be removed fine. But if I removed the comment, the channels will not come back, until I disable/enable the thing from PaperUI. If I change a channel name or something else, IΒ΄ll have to do the same disable/enable for the changes to appear.
If I remove a whole thing from the thing file, save the file. The thing will be gone allright. But adding it to the file again, will not bring it back. And since the whole thing has been removed, there is only one option to get it back, thats to restart openhab.

This has been a bit painfullly few days untill I discovered this issue today, trying to figure out how mqtt works, and then struggle with something like this, every time thinking I had done something wrong or misunderstood something.

Btw… IΒ΄m on openhab 2.5M1.

@mbunal
Do you have more then one MQTT related option selectable when selecting the Plus-Sign in the Inbox?
Please confirm the mqtt version you have ( from karaf console with command bundle:list)
Mine are 0.10.0.oh240 for Eclipse SmartHome MQTT Binding and 0.10.0.oh240 for Eclipse SmartHome MQTT Thing Binding

i purged my installation.i reinstall. this is what u asked:

 ID β”‚ State    β”‚ Lvl β”‚ Version                β”‚ Name
────┼──────────┼─────┼────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 20 β”‚ Active   β”‚  80 β”‚ 5.3.1.201602281253     β”‚ OSGi JAX-RS Connector
 21 β”‚ Active   β”‚  80 β”‚ 2.7.0.v20170129-0911   β”‚ Gson: Google Json Library for Java
 22 β”‚ Active   β”‚  80 β”‚ 18.0.0                 β”‚ Guava: Google Core Libraries for Java
 23 β”‚ Active   β”‚  80 β”‚ 3.0.0.v201312141243    β”‚ Google Guice (No AOP)
 24 β”‚ Active   β”‚  80 β”‚ 3.18.1.GA              β”‚ Javassist
 26 β”‚ Active   β”‚  80 β”‚ 3.5.5                  β”‚ JmDNS
 28 β”‚ Active   β”‚  80 β”‚ 1.0.0                  β”‚ Units of Measurement API
 30 β”‚ Active   β”‚  80 β”‚ 1.1.0.Final            β”‚ Bean Validation API
 31 β”‚ Active   β”‚  80 β”‚ 2.0.1                  β”‚ javax.ws.rs-api
 32 β”‚ Active   β”‚  80 β”‚ 3.2.0.v201101311130    β”‚ ANTLR Runtime
 35 β”‚ Active   β”‚  80 β”‚ 3.2.1                  β”‚ Commons Collections
 36 β”‚ Active   β”‚  80 β”‚ 1.1                    β”‚ Commons Exec
 37 β”‚ Active   β”‚  80 β”‚ 2.2.0                  β”‚ Commons IO
 38 β”‚ Active   β”‚  80 β”‚ 2.6                    β”‚ Commons Lang
 47 β”‚ Active   β”‚  80 β”‚ 4.2.1                  β”‚ Apache Karaf :: OSGi Services :: Event
 63 β”‚ Active   β”‚  80 β”‚ 4.6.0                  β”‚ Apache XBean OSGI Bundle Utilities
 64 β”‚ Active   β”‚  80 β”‚ 4.6.0                  β”‚ Apache XBean :: Classpath Resource Finder
 65 β”‚ Active   β”‚  80 β”‚ 2.12.0.v20160420-0247  β”‚ EMF Common
 66 β”‚ Active   β”‚  80 β”‚ 2.12.0.v20160420-0247  β”‚ EMF Ecore
 67 β”‚ Active   β”‚  80 β”‚ 2.11.0.v20160420-0247  β”‚ EMF Change Model
 68 β”‚ Active   β”‚  80 β”‚ 2.12.0.v20160420-0247  β”‚ EMF XML/XMI Persistence
 69 β”‚ Active   β”‚  80 β”‚ 3.8.0.v20160509-1230   β”‚ Common Eclipse Runtime
 70 β”‚ Active   β”‚  80 β”‚ 3.6.100.v20160223-2218 β”‚ Extension Registry Support
 80 β”‚ Active   β”‚  80 β”‚ 9.4.11.v20180605       β”‚ Jetty :: Proxy
 94 β”‚ Active   β”‚  80 β”‚ 0.4.1.v20180515-1321   β”‚ org.eclipse.lsp4j
 95 β”‚ Active   β”‚  80 β”‚ 0.4.1.v20180515-1321   β”‚ org.eclipse.lsp4j.jsonrpc
 96 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome OAuth2Client
 97 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Config Core
 98 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Configuration Discovery
 99 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Configuration mDNS Discovery
100 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Config Dispatcher
101 β”‚ Active   β”‚  75 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Config XML
102 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Core
103 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Core Audio
104 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Core Binding XML
105 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Core ID
106 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Core Persistence
107 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Scheduler Service
108 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Core Semantics
109 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Core Thing
110 β”‚ Active   β”‚  75 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Core Thing XML
111 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Transformation Service
112 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Core Voice
113 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Console
114 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Console for OSGi runtime Karaf
115 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome HTTP Interface Bundle
116 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome JavaSound I/O, Fragments: 183
117 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Monitor
118 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Net I/O Bundle
119 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome REST Interface Bundle
120 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Core REST API
121 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome REST mDNS Announcer
122 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome REST Interface JAX-RS optimization Bundle
123 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Sitemap REST API
124 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome SSE REST API
125 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Voice REST API
126 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Bonjour/MDS Service Discovery Bundle
127 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Web Audio Support
128 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Model Core
129 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Item Model
130 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Item Model IDE
131 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Item Model Runtime
132 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Language Server
133 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Persistence Model
134 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Persistence Model IDE
135 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Persistence Runtime
136 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Rule Model
137 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Rule Model IDE
138 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Rule Runtime
139 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Script
140 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Script Model IDE
141 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Script Runtime
142 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Sitemap Model
143 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Sitemap Model IDE
144 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Sitemap Runtime
145 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Thing Model
146 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Thing Model IDE
147 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Thing Model Runtime
148 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Json Storage Service
149 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome UI
150 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome UI Icons
151 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Classic IconSet
152 β”‚ Active   β”‚  80 β”‚ 2.14.0.v20180522-1629  β”‚ Xtend Runtime Library
153 β”‚ Active   β”‚  80 β”‚ 2.14.0.v20180522-1629  β”‚ Xtend Macro Interfaces
154 β”‚ Active   β”‚  80 β”‚ 2.14.0.v20180522-1821  β”‚ Xtext
155 β”‚ Active   β”‚  80 β”‚ 2.14.0.v20180522-1833  β”‚ Xtext Common Types
156 β”‚ Active   β”‚  80 β”‚ 2.14.0.v20180522-1821  β”‚ Xtext IDE Core
157 β”‚ Active   β”‚  80 β”‚ 2.14.0.v20180522-1821  β”‚ Xtext Utility
158 β”‚ Active   β”‚  80 β”‚ 2.14.0.v20180522-1833  β”‚ Xbase Model
159 β”‚ Active   β”‚  80 β”‚ 2.14.0.v20180522-1833  β”‚ Xbase Generic IDE Services
160 β”‚ Active   β”‚  80 β”‚ 2.14.0.v20180522-1629  β”‚ Xbase Runtime Library
175 β”‚ Active   β”‚  80 β”‚ 1.9.6                  β”‚ MIME streaming extension
177 β”‚ Active   β”‚  80 β”‚ 6.2.0                  β”‚ org.objectweb.asm
178 β”‚ Active   β”‚  80 β”‚ 6.2.0                  β”‚ org.objectweb.asm.commons
179 β”‚ Active   β”‚  80 β”‚ 6.2.0                  β”‚ org.objectweb.asm.tree
180 β”‚ Active   β”‚  90 β”‚ 2.4.0                  β”‚ openHAB Core
181 β”‚ Active   β”‚  80 β”‚ 2.4.0                  β”‚ openHAB Karaf Integration
183 β”‚ Resolved β”‚  80 β”‚ 2.4.0                  β”‚ openHAB Sound Support, Hosts: 116
184 β”‚ Active   β”‚  80 β”‚ 2.4.0                  β”‚ openHAB Dashboard UI
189 β”‚ Active   β”‚  80 β”‚ 1.0.2                  β”‚ Units of Measurement Common Library
190 β”‚ Active   β”‚  80 β”‚ 1.0.8                  β”‚ Units of Measurement Implementation for Java SE
191 β”‚ Active   β”‚  80 β”‚ 3.3.0                  β”‚ Commons Net
192 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Basic UI, Fragments: 194
193 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Paper UI, Fragments: 197
194 β”‚ Resolved β”‚  75 β”‚ 2.4.0                  β”‚ openHAB Basic UI Fragment, Hosts: 192
195 β”‚ Active   β”‚  80 β”‚ 2.4.0                  β”‚ HABPanel User Interface
196 β”‚ Active   β”‚  80 β”‚ 2.4.0                  β”‚ HomeBuilder User Interface
197 β”‚ Resolved β”‚  75 β”‚ 2.4.0                  β”‚ openHAB Paper UI Theme Fragment, Hosts: 193
198 β”‚ Active   β”‚  80 β”‚ 1.2.0                  β”‚ Paho MQTT Client
199 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome Automation API
200 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome MQTT Binding
201 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome MQTT Thing Binding
202 β”‚ Active   β”‚  80 β”‚ 0.10.0.oh240           β”‚ Eclipse SmartHome MQTT Transport Bundle

i have a debian 10 buster box already. i want to use it for openhab also. my broker is:

ii  libmosquitto1:amd64                   1.5.7-1                              amd64        MQTT version 3.1/3.1.1 client library
ii  mosquitto                             1.5.7-1                              amd64        MQTT version 3.1/3.1.1 compatible message broker
ii  mosquitto-clients                     1.5.7-1                              amd64        Mosquitto command line MQTT clients

i install openhab from repository via apt command.

those images are:
inbox clicked plus sign:

after that click mqtt binding:

after that click add manually (both β€œadd manually” or β€œmanually add thing” buttons does same thing)

please guide me…

Frankly, I have no clue! I’m sorry.
As far as I understand we are both on the same version. Earlier you posted a screenshot which showed the MQTT Thing Binding, no the screenshot says MQTT Binding (like on my system).
ATM I would try the file-setup, however I not sure actual problem will be solved that way.

please how can i add mqtt broker? i cant find anywhere in paper ui…

i tried all options. i installed all openhab versions via repo or zip file. but i cant find any mqtt broker thing in paperui. i watched some videos them got mqtt broker opiton bu i dont. i didint understand why i havent mqtt broker option?

Could you please have a look at β€œAddons -> Mqtt Binding -> Things”?
That page lists all available Things of the mqtt binding and the broker Thing should be listed there.
Try to create an mqtt broker thing via the β€œConfiguration -> Things” page. Because the inbox is actually only for things that can be discovered. And an mqtt broker cannot be discovered.

Cheers

You cannot not support those. I just don’t use them and therefore do not list examples of them in the main documentation. But there is a separate doc page with tons of examples in the addons repo within the mqtt addon directory. It is not yet listed on the webpage because of shortcomings.

Edit: xtend examples: https://github.com/openhab/openhab2-addons/blob/master/bundles/org.openhab.binding.mqtt/xtend_examples.md

here is short screen record video… there is no mqtt broker.
delimavi.com/v.html

Your situation is understood, however it can not be reproduced on a (normally working) system nor can it be explained looking at code (for the author of the binding as well). Hence the only assumption is something went wrong during your installation (without being able to say what).
Looking at the video you already did uninstall and install the binding without any effect.
In such a case I would try to restart from scratch with newly downloaded version.
I’m sorry, but this is only advice I can give. I’m keeping my fingers crossed. You did ask in another thread as well, my guess you won’t get another advice.

thanks for your help. i tried to install zip version too. but neither zip nor repo installation did not show any mqtt broker option. now i a will try a newly installed system.

thank you very much all.

1 Like