[SOLVED] Openhab2 stable debian 10 MQTT Broker configuration

Tags: #<Tag:0x00007f2fbb61f1b0>

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

folks, i solved the problem. my environment language is the problem. i added at the top of file

/usr/share/openhab2/runtime/bin/karaf

LANG=en_US.UTF-8

then i see all option in the mqtt option.

thanks for everything…

Thats weird…
How is this related to the thing not showing?

this is from openhab2.log:

2019-09-18 03:47:19.581 [WARN ] [ig.xml.osgi.XmlDocumentBundleTracker] - The XML document ‘/ESH-INF/thing/thing-types.xml’ in module ‘org.eclipse.smarthome.binding.mqtt’ could not be parsed: No enum constant org.eclipse.smarthome.config.core.ConfigDescriptionParameter.Type.İNTEGER : No enum constant org.eclipse.smarthome.config.core.ConfigDescriptionParameter.Type.İNTEGER

if dont see İNTEGER i cant find this solution. İNTEGER must be false, INTEGER is true.

İ is not equal to I.