# MQTT set up help

**URL:** <https://community.openhab.org/t/mqtt-set-up-help/48621>\
**Category:** Beginners\
**Tags:** beginners, mqtt-binding\
**Created:** [July 30, 2018, 6:58pm UTC](https://community.openhab.org/t/mqtt-set-up-help/48621 "2018-07-30T18:58:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsn](https://community.openhab.org/user_avatar/community.openhab.org/jsn/32/43211_2.png) [@jsn](https://community.openhab.org/u/jsn)\
**Post date:** [July 30, 2018, 6:58pm UTC](https://community.openhab.org/t/mqtt-set-up-help/48621/1 "2018-07-30T18:58:34Z")

</div>

I have just installed openhabian and downloaded the mqtt binding using the paper ui but cant get a openhab to read the mqtt. I have subscribed using mqttfx and can see the message when subscribed to my raspberry pis ip. Im hoping i have done something simple wrong.

mqtt.cfg

# URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883

broker.url=tcp://192.168.#.##:1883

# Optional. Client id (max 23 chars) to use when connecting to the broker.

# If not provided a random default is generated.

broker.clientId=openhab2

# Optional. True or false. If set to true, allows the use of clientId values

# up to 65535 characters long. Defaults to false.

# NOTE: clientId values longer than 23 characters may not be supported by all

# MQTT servers. Check the server documentation.

#.allowLongerClientIds=false

# Optional. User id to authenticate with the broker.

#.user=

# Optional. Password to authenticate with the broker.

#.pwd=

# Optional. Set the quality of service level for sending messages to this broker.

# Possible values are 0 (Deliver at most once),1 (Deliver at least once) or 2

# (Deliver exactly once). Defaults to 0.

#.qos=

# Optional. True or false. Defines if the broker should retain the messages sent to

# it. Defaults to false.

#.retain=

# Optional. True or false. Defines if messages are published asynchronously or

# synchronously. Defaults to true.

#.async=

# Optional. Defines the last will and testament that is sent when this client goes offline

# Format: topic:message:qos:retained

#.lwt=

item  
Number Temperature\_master\_bedroom “Master Bedroom Temp [%.1f]” (ff\_Master\_bedroom,Temp\_Chart) {mqtt=“\<{broker:home/master\_bedroom/temperature:state:default]”}

sitemap

sitemap home label=“Home” {  
Frame label=“Date” {  
Text item=Temperature\_master\_bedroom  
}  
}

Log

2018-07-30 13:46:35.438 [thome.event.ExtensionEvent] - Extension ‘binding-mqtt1’ has been installed.

==\> /var/log/openhab2/openhab.log \<==

2018-07-30 13:47:51.038 [WARN] [g.dispatch.internal.ConfigDispatcher] - Could not parse line ‘Define your MQTT broker connections here for use in the MQTT Binding or MQTT# Persistence bundles. Replace with an ID you choose.’

2018-07-30 13:47:51.051 [INFO] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.

2018-07-30 13:47:51.061 [INFO] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection ‘broker’

2018-07-30 13:54:12.867 [INFO] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘home.items’

2018-07-30 13:58:49.748 [INFO] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.

2018-07-30 13:58:49.753 [INFO] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'broker

Can anyone see what i have done wrong?

---

<div class="post-metadata">

**Author:** ![jsn](https://community.openhab.org/user_avatar/community.openhab.org/jsn/32/43211_2.png) [@jsn](https://community.openhab.org/u/jsn)\
**Post date:** [July 30, 2018, 7:02pm UTC](https://community.openhab.org/t/mqtt-set-up-help/48621/2 "2018-07-30T19:02:10Z")

</div>

i can subscribe to it through the terminal as i just checked that.

[20:00:27] openhabian@openHABianPi:/etc/openhab2/sitemaps$ mosquitto\_sub -t home/master\_bedroom/temperature  
31.1  
31.1

---

<div class="post-metadata">

**Author:** ![vzorglub](https://community.openhab.org/user_avatar/community.openhab.org/vzorglub/32/17166_2.png) [@vzorglub](https://community.openhab.org/u/vzorglub)\
**Post date:** [July 30, 2018, 7:17pm UTC](https://community.openhab.org/t/mqtt-set-up-help/48621/3 "2018-07-30T19:17:51Z")

</div>

```csv
item
Number Temperature_master_bedroom “Master Bedroom Temp [%.1f]” (ff_Master_bedroom,Temp_Chart) { mqtt="<[broker:home/master_bedroom/temperature:state:default]" }

```

---

<div class="post-metadata">

**Author:** ![jsn](https://community.openhab.org/user_avatar/community.openhab.org/jsn/32/43211_2.png) [@jsn](https://community.openhab.org/u/jsn)\
**Post date:** [July 30, 2018, 7:24pm UTC](https://community.openhab.org/t/mqtt-set-up-help/48621/4 "2018-07-30T19:24:31Z")

</div>

> [@vzorglub](#):
>
> Number Temperature\_master\_bedroom “Master Bedroom Temp [%.1f]” (ff\_Master\_bedroom,Temp\_Chart) { mqtt=“\<[broker:home/master\_bedroom/temperature:state:default]” }

thank you for your reply,it is giving me this error:

2018-07-30 20:22:43.871 [WARN] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘home.items’ has errors, therefore ignoring it: [3,35]: missing EOF at ‘“’

---

<div class="post-metadata">

**Author:** ![jsn](https://community.openhab.org/user_avatar/community.openhab.org/jsn/32/43211_2.png) [@jsn](https://community.openhab.org/u/jsn)\
**Post date:** [July 30, 2018, 7:26pm UTC](https://community.openhab.org/t/mqtt-set-up-help/48621/5 "2018-07-30T19:26:20Z")

</div>

i put the “” back in and that worted that, im now getting the tempertures sent in the log but not on my BasicUI

2018-07-30 20:24:56.133 [vent.ItemStateChangedEvent] - Temperature\_master\_bedroom changed from NULL to 30.9

---

<div class="post-metadata">

**Author:** ![jsn](https://community.openhab.org/user_avatar/community.openhab.org/jsn/32/43211_2.png) [@jsn](https://community.openhab.org/u/jsn)\
**Post date:** [July 30, 2018, 7:56pm UTC](https://community.openhab.org/t/mqtt-set-up-help/48621/6 "2018-07-30T19:56:42Z")

</div>

Would you belive it, i restarted it and it works. Thanks
