[SOLVED] Openhab don't send any information to mosquitto server

Hi I setup an openhab service and tried to create items. At first it works then i wanted to connect it with my mqtt server. Thats the mqtt.cfg
The Item looks like this:

Switch Bouncer "occupied" {mqtt=">[xively:office/2:command:ON:0], <[xively:office/2:command:OFF:1]"}

and the sitemap looks like this:

sitemap default label="My first sitemap"{
Switch item=Bouncer

In my head it should be working but I tried it so many times and didn’t get any results.

Can someone help me?

Best Regards


Have you installed the MQTT biding to openHAB? Important - which version?

Openhab version 2.4.0
I have installed the openhab-binding-mqtt through the paper UI.

Sounds like you probably have the “native” version 2.x of the MQTT binding then.

Your Item binding setup is for 1.x version and won’t work. You need to use things and channels with the 2 version.


Thanks for the information. I tried another approach:

The Item looks this now

Switch Bouncer "Office 2" {channel="mqtt:topic:office:office_2:occupied_office"}

and this is my things file:

Bridge mqtt:broker:office "MQTT Office" [ host="ip", port=1883] {
    Thing topic office_2 "Office 2" @ "OnOff" {
            Type switch : occupied_office [stateTopic="office/2", commandTopic="office/2/command", on="0", off="1"]

This doesn’t really work well. What did i overlooked?

I cannot help further with MQTT, someone else’s turn.
It may help if you expand on “doesn’t really work well” - what do you see in events.log and openhab.log, what does your MQTT broker think?

It is a MQTT/OH Bug, i have to update on 2.5 or restart the application.

Here the Thread: