MQTT Broker (newbie questions)

Hi Guys, I got problem.

  1. First of all, I cant find MQTT.cfg at all I checked 200 times.
    Nothing, I uninstall MQTT, but I can’t find that. I understand that it’s very important.
    UPDATE: I found that MQTT2 do not have MQTT.cfg even though I am not sure what version I have, if I got my MQTT Broker online do I need that file?

  2. MQTT Broker, if it’s online it’s means I configure my openhab with MQTT?

  3. Can I connect my CH Smart Bulb with Bluetooth bindings?

Thank you.

This is a question which shows that you did not read any of the official openHAB docs before asking in the forum.
Please start reading the basic docs and if something is not clear then ask your specific question here in this forum.

To answer part of your question:
the mqtt.cfg config file is for mqtt verison 1 binding which is outdated. You did not tell us which version of openHAB your are using, but I guess your are using a recent version and therefore assuming you are using mqtt binding version 2. You don’t need a mqtt.cfg for mqtt2.
BUT: setting up your broker has nothing to to with setting up your mqtt binding. Yes, they work together but technically the have nothing in common.
So again, please read all the docs and then come back and ask questions:

Yes sir :slight_smile:

After reading this. I understand that if I am using offical bluetooth bindings all the devices I found are only beacons, and I cant do anything with them? no light or changing colors (the light buld have abilty to do so) I undestand right?
(sorry for my bad english)

So it is hard to install 3rd party bindings?

“In order to function, this binding requires a Bluetooth adapter to be present, which handles the wireless communication.”
If I have do not have Adapter , only the Bluetooth bulb, and raspberry Pi 3, running openhab.
I cant do that. am I right?

My 1 + 2 Quetsion solved.

A RasspberryPi has no means to send or receive Bluetooth messages, without a Bluetooth adapter/dongle… (whatever you call it) you will not be able to use the Bluetooth binding ( a binding is the software package that enables openHAB to do something special).
In other words, although you have a device that “talks” Bluetooth, without a Bluetooth adapter on your RasPi your are stuck.

I see, can you help me up and link me one? or give me the name of a good bluetooth adapter that I need?

I don’t have such a device, sorry!

I got those errors, do you know why?
there is no such folder “/var/lib/openhab2” dose not exist.

2019-04-09 07:41:58.245 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to ‘’. Next attempt in 10000ms

2019-04-09 07:41:58.248 [WARN ] [r.internal.EmbeddedBrokerServiceImpl] - Embedded broker offline - Reason unknown

2019-04-09 07:41:58.261 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘’ with clientid embedded-mqtt-broker and file store ‘/var/lib/openhab2/mqtt/’

2019-04-09 07:41:58.319 [WARN ] [r.internal.EmbeddedBrokerServiceImpl] - Embedded broker offline

org.eclipse.paho.client.mqttv3.MqttException: MqttException

at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException( ~[232:org.eclipse.paho.client.mqttv3:1.2.0]

at org.eclipse.paho.client.mqttv3.internal.ClientComms$ [232:org.eclipse.paho.client.mqttv3:1.2.0]

at java.util.concurrent.Executors$ [?:?]

at [?:?]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201( [?:?]

at java.util.concurrent.ScheduledThreadPoolExecutor$ [?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]

at java.util.concurrent.ThreadPoolExecutor$ [?:?]

at [?:?]

Caused by: Connection reset

at ~[?:?]

at ~[?:?]

at ~[?:?]

at ~[?:?]

at ~[?:?]

at ~[?:?]

at ~[?:?]

at ~[?:?]

at org.eclipse.paho.client.mqttv3.internal.SSLNetworkModule.start( ~[?:?]

at org.eclipse.paho.client.mqttv3.internal.ClientComms$ ~[?:?]

… 7 more

What makes you think that the folder does not exist? How are you looking for that folder?

The error is coming from the embedded MQTT Broker, which openHAB and MQTT binding Version are you using?

I tried from SSH to locate that folder, I am almost sure she dont exist.

MQTT 2.4
Openhab 2.4

By the way, My broker configured , and I was able to talk from my PaperUi, to MQTT.fx

Meaning: MQTT worked but stopped working, or what?
Please confirm: you have ONLY the embedded MQTT Broker installed (and not additionally the mosquitto Broker).

I have " MQTT Thing Binding By David Graeff"
Version 2.4 installed.

You still did not

1 Like

So yes. I have only that installed.

First thing to do is to fix your broker installation. Try uninstalling and reinstalling.

The embedded broker in OH 2.4 will shutdown because of two reasons:

  • The port is already occupied (mosquitto is maybe running?)
  • You are using too long client-ids (a bug)
1 Like

Fixed thank you.

Please tell us the fix so other users can benefit from it.

1 Like

I uninstalled the MQTT bindings, reboot, and then install it again and it’s works.

** Please note: I’ve tried once to reinstall it and then re boot and it did not worked.
Uninstall, then reboot, then install it again.
That what solved my problem.

Thank you guys.