MQTT subscription not updating items OH3.1

Hey Guys, ran into an issue i’m hopping someone can assist with, i have OH3.1 installed on my Pi4 (Raspbian os) with Mosquitto 1.5.7 and zigbee2mqtt, have a usb zzh CC2652R adapter from electrolama flashed with zigbee2mqtt and all is working well communication side of things, i have JS and JSONPATH installed on my OH3.1 and also have the MQTT Binding 3.10. using MQTT Fx 1.7.1 to observe the MQTT Messages

Java version on pi:
openjdk version “11.0.12” 2021-07-20
OpenJDK Runtime Environment (build 11.0.12+7-post-Raspbian-2deb10u1)
OpenJDK Server VM (build 11.0.12+7-post-Raspbian-2deb10u1, mixed mode)

So i have a smart plug device that i’ve set up on OH3.1 that is working well turns on and off when requested

I Recently managed to bring my central heating (HIVE) system onto the network paired up and configured correctly through zigbee2mqtt all ok

I’ve created a General MQTT Thing through OH3.1 (Already got the broker thing in my list of things) and added chanels related to the published json data in the MQTT system for my central heating:

{
“linkquality” : 63,
“local_temperature” : 22.74,
“occupied_heating_setpoint” : 19.5,
“running_state” : “idle”,
“system_mode” : “heat”,
“temperature_setpoint_hold” : true,
“temperature_setpoint_hold_duration” : 26
}

Firstly i added the local temperature making sure the JSONPATH:$.local_temperature was set as the Transformation Pattern and the topic set to the correct location.

so everything was great it pulled the temperature into OH3.1 and i linked it to an item and all was reading correctly and updating as intended.

i started to notice an issue when i started adding more chanels to the thing, i added a switch for the heating to be on or off, added a dimmer bar to the set temp, added a contact to tell me if my boiler was currently fired up etc. with all these items and chanels i’ve noticed that even though the broker thing and all the chanels are set to QoS: 1 it stops updating and pulling data from the Mosquitto Server, For instance the current temperature value doesn’t update on the item even though it says its online, checking on MQTT.FX i can see that zigbee2mqtt is publishing the changes to Mosquitto but for somereason the MQTT binding in OH3.1 wont update, i even changed the zigbee2mqtt config so it retains the messages on the MQTT server which it is untill it changes then it will retain the changed values but still OH3.1 and the MQTT binding wont update.

I’m not sure why this is and i’m starting to scratch my head to why it’s going out of sync, the messages from zigbee2mqtt updates the mqtt server every minute or so but my items on OH3.1 will still say like the reading from 10 minutes ago, sometimes one of the items will update but it’s totally out of sync to whats on the MQTT server. the only way i can get it to update is if i go into things click on the mqqt broker and hit save through the web gui interface, this seems to refresh all the items values to whats on the mqtt server but it doesn’t update itself as i would expect

hope someone can shed some light on this, its starting to bug me lol.

Many thanks in advance
Joconnell :slight_smile:

heres some logs, this is from mosquitto -v, 530ca1b222e145729021a44b4ce0f40b is the MQTT.FX client

b8fb763b-f51a-4f59-8638-43f926739037 is the OpenHab

sudo mosquitto -v
1630770473: mosquitto version 1.5.7 starting
1630770473: Using default config.
1630770473: Opening ipv4 listen socket on port 1883.
1630770473: Opening ipv6 listen socket on port 1883.
1630770473: New connection from 127.0.0.1 on port 1883.
1630770473: New client connected from 127.0.0.1 as mqttjs_eafff369 (c1, k60, u’Openmin’).
1630770473: Will message specified (7 bytes) (r1, q0).
1630770473: zigbee2mqtt/bridge/state
1630770473: Sending CONNACK to mqttjs_eafff369 (0, 0)
1630770473: Received SUBSCRIBE from mqttjs_eafff369
1630770473: zigbee2mqtt/# (QoS 0)
1630770473: mqttjs_eafff369 0 zigbee2mqtt/#
1630770473: Sending SUBACK to mqttjs_eafff369
1630770473: Received PUBLISH from mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (53 bytes))
1630770473: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (53 bytes))
1630770473: Received PUBLISH from mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (93 bytes))
1630770473: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (93 bytes))
1630770473: Received PUBLISH from mqttjs_eafff369 (d0, q0, r1, m0, ‘zigbee2mqtt/bridge/state’, … (6 bytes))
1630770473: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/state’, … (6 bytes))
1630770498: New connection from 192.168.8.222 on port 1883.
1630770498: New client connected from 192.168.8.222 as 530ca1b222e145729021a44b4ce0f40b (c1, k60, u’Openmin’).
1630770498: No will message specified.
1630770498: Sending CONNACK to 530ca1b222e145729021a44b4ce0f40b (0, 0)
1630770504: Received SUBSCRIBE from 530ca1b222e145729021a44b4ce0f40b
1630770504: zigbee2mqtt/boiler (QoS 0)
1630770504: 530ca1b222e145729021a44b4ce0f40b 0 zigbee2mqtt/boiler
1630770504: Sending SUBACK to 530ca1b222e145729021a44b4ce0f40b
1630770512: Received PUBLISH from mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (177 bytes))
1630770512: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (177 bytes))
1630770512: Received PUBLISH from mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (291 bytes))
1630770512: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (291 bytes))
1630770512: Received PUBLISH from mqttjs_eafff369 (d0, q1, r1, m45997, ‘zigbee2mqtt/boiler’, … (192 bytes))
1630770512: Sending PUBACK to mqttjs_eafff369 (Mid: 45997)
1630770512: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/boiler’, … (192 bytes))
1630770512: Sending PUBLISH to 530ca1b222e145729021a44b4ce0f40b (d0, q0, r0, m0, ‘zigbee2mqtt/boiler’, … (192 bytes))
1630770530: Received PUBLISH from mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (83 bytes))
1630770530: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (83 bytes))
1630770564: Received PINGREQ from 530ca1b222e145729021a44b4ce0f40b
1630770564: Sending PINGRESP to 530ca1b222e145729021a44b4ce0f40b
1630770581: New connection from 127.0.0.1 on port 1883.
1630770581: New client connected from 127.0.0.1 as b8fb763b-f51a-4f59-8638-43f926739037 (c1, k60, u’Openmin’).
1630770581: No will message specified.
1630770581: Sending CONNACK to b8fb763b-f51a-4f59-8638-43f926739037 (0, 0)
1630770582: Received SUBSCRIBE from b8fb763b-f51a-4f59-8638-43f926739037
1630770582: milight/states/# (QoS 1)
1630770582: b8fb763b-f51a-4f59-8638-43f926739037 1 milight/states/#
1630770582: Sending SUBACK to b8fb763b-f51a-4f59-8638-43f926739037
1630770583: Received SUBSCRIBE from b8fb763b-f51a-4f59-8638-43f926739037
1630770583: homeassistant/# (QoS 1)
1630770583: b8fb763b-f51a-4f59-8638-43f926739037 1 homeassistant/#
1630770583: Sending SUBACK to b8fb763b-f51a-4f59-8638-43f926739037
1630770583: Received SUBSCRIBE from b8fb763b-f51a-4f59-8638-43f926739037
1630770583: +/+/$homie (QoS 1)
1630770583: b8fb763b-f51a-4f59-8638-43f926739037 1 +/+/$homie
1630770583: Sending SUBACK to b8fb763b-f51a-4f59-8638-43f926739037
1630770583: Received SUBSCRIBE from b8fb763b-f51a-4f59-8638-43f926739037
1630770583: zigbee2mqtt/boiler (QoS 1)
1630770583: b8fb763b-f51a-4f59-8638-43f926739037 1 zigbee2mqtt/boiler
1630770583: Sending SUBACK to b8fb763b-f51a-4f59-8638-43f926739037
1630770583: Sending PUBLISH to b8fb763b-f51a-4f59-8638-43f926739037 (d0, q1, r1, m1, ‘zigbee2mqtt/boiler’, … (192 bytes))
1630770583: Received PUBACK from b8fb763b-f51a-4f59-8638-43f926739037 (Mid: 1)
1630770583: Received SUBSCRIBE from b8fb763b-f51a-4f59-8638-43f926739037
1630770583: zigbee2mqtt/plug (QoS 1)
1630770583: b8fb763b-f51a-4f59-8638-43f926739037 1 zigbee2mqtt/plug
1630770583: Sending SUBACK to b8fb763b-f51a-4f59-8638-43f926739037
1630770590: Received PINGREQ from mqttjs_eafff369
1630770590: Sending PINGRESP to mqttjs_eafff369
1630770624: Received PINGREQ from 530ca1b222e145729021a44b4ce0f40b
1630770624: Sending PINGRESP to 530ca1b222e145729021a44b4ce0f40b
1630770632: Received PUBLISH from mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (177 bytes))
1630770632: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (177 bytes))
1630770632: Received PUBLISH from mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (291 bytes))
1630770632: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (291 bytes))
1630770632: Received PUBLISH from mqttjs_eafff369 (d0, q1, r1, m46001, ‘zigbee2mqtt/boiler’, … (192 bytes))
1630770632: Sending PUBACK to mqttjs_eafff369 (Mid: 46001)
1630770632: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/boiler’, … (192 bytes))
1630770632: Sending PUBLISH to 530ca1b222e145729021a44b4ce0f40b (d0, q0, r0, m0, ‘zigbee2mqtt/boiler’, … (192 bytes))
1630770632: Sending PUBLISH to b8fb763b-f51a-4f59-8638-43f926739037 (d0, q1, r0, m2, ‘zigbee2mqtt/boiler’, … (192 bytes))
1630770632: Received PUBACK from b8fb763b-f51a-4f59-8638-43f926739037 (Mid: 2)
1630770684: Received PINGREQ from 530ca1b222e145729021a44b4ce0f40b
1630770684: Sending PINGRESP to 530ca1b222e145729021a44b4ce0f40b
1630770692: Received PINGREQ from b8fb763b-f51a-4f59-8638-43f926739037
1630770692: Sending PINGRESP to b8fb763b-f51a-4f59-8638-43f926739037
1630770692: Received PINGREQ from mqttjs_eafff369
1630770692: Sending PINGRESP to mqttjs_eafff369
1630770744: Received PINGREQ from 530ca1b222e145729021a44b4ce0f40b
1630770744: Sending PINGRESP to 530ca1b222e145729021a44b4ce0f40b
1630770752: Received PINGREQ from b8fb763b-f51a-4f59-8638-43f926739037
1630770752: Sending PINGRESP to b8fb763b-f51a-4f59-8638-43f926739037
1630770752: Received PINGREQ from mqttjs_eafff369
1630770752: Sending PINGRESP to mqttjs_eafff369
1630770753: Received PUBLISH from mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (177 bytes))
1630770753: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (177 bytes))
1630770753: Received PUBLISH from mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (291 bytes))
1630770753: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/bridge/logging’, … (291 bytes))
1630770753: Received PUBLISH from mqttjs_eafff369 (d0, q1, r1, m46004, ‘zigbee2mqtt/boiler’, … (192 bytes))
1630770753: Sending PUBACK to mqttjs_eafff369 (Mid: 46004)
1630770753: Sending PUBLISH to mqttjs_eafff369 (d0, q0, r0, m0, ‘zigbee2mqtt/boiler’, … (192 bytes))
1630770753: Sending PUBLISH to 530ca1b222e145729021a44b4ce0f40b (d0, q0, r0, m0, ‘zigbee2mqtt/boiler’, … (192 bytes))
1630770753: Sending PUBLISH to b8fb763b-f51a-4f59-8638-43f926739037 (d0, q1, r0, m3, ‘zigbee2mqtt/boiler’, … (192 bytes))
1630770753: Received PUBACK from b8fb763b-f51a-4f59-8638-43f926739037 (Mid: 3)

here is from openhab:

openhab> log:display
16:48:58.988 [INFO ] [b.core.internal.i18n.I18nProviderImpl] - Time zone set to ‘Europe/London’.
16:48:59.066 [INFO ] [b.core.internal.i18n.I18nProviderImpl] - Locale set to ‘en_GB’.
16:49:12.520 [WARN ] [org.openhab.core.net.NetUtil ] - Found multiple local interfaces - ignoring 192.168.8.234
16:49:34.027 [INFO ] [b.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
16:49:38.608 [INFO ] [org.openhab.ui.internal.UIService ] - Started UI on port 8080
16:49:39.995 [INFO ] [re.automation.internal.RuleEngineImpl] - Rule engine started.
16:49:41.111 [INFO ] [o.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘localhost’ with clientid b8fb763b-f51a-4f59-8638-43f926739037
16:49:41.128 [WARN ] [l.MqttBrokerConnectionServiceInstance] - MqttBroker connection configuration faulty: host : You need to provide a hostname/IP!
16:49:41.331 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:broker:zigbee2mqtt’ changed from OFFLINE to ONLINE
16:49:41.394 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_SetTemp’ changed from NULL to 20
16:49:41.402 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_WhatSetTempIs’ changed from NULL to 19.5
16:49:41.478 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_CurrentTemp’ changed from NULL to 22.82 °C
16:49:41.480 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘OnOffSwitch’ changed from NULL to OFF
16:49:41.482 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_FiredUp’ changed from NULL to CLOSED
16:49:41.484 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_HeatingOffOn’ changed from NULL to ON
16:49:41.486 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_Timer’ changed from NULL to 46.0
16:49:42.742 [INFO ] [hab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel
16:49:43.142 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:topic:zigbee2mqtt:Boiler’ changed from UNINITIALIZED to INITIALIZING
16:49:43.242 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:topic:zigbee2mqtt:Boiler’ changed from INITIALIZING to ONLINE
16:49:43.249 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:topic:zigbee2mqtt:plug’ changed from UNINITIALIZED to INITIALIZING
16:49:43.299 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:topic:zigbee2mqtt:plug’ changed from INITIALIZING to ONLINE
16:49:43.437 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_CurrentTemp’ changed from 22.82 °C to 22.61 °C

Sounds to me like you are editing your MQTT Things, then it messes up.
Not all bindings accept all in-flight Thing edits. Make your edits to your best effort, then restart the MQTT package from karaf console, or just rebbot openHAB, and see what’s what afterwards.

1 Like

thanks for your reply, i tried rebooting, when it loads back up it initially updates all the items to what they are reading in the mqtt server then it doesn’t update again after that, all the items just stick at there current values, the items that i have set up to publish a message to the mqtt server like the dimmer item to set the target temperature on my central heating system works when you move the slider it publishes the new value to the mqtt server and the central heating recieves the update.

Have a look in your openhab.log for boot time, see how many MQTT broker connections are established. People sometimes configure two to the same broker, which messes up subscriptions. In particular, users may add a ‘System Broker’ which really is not wanted in OH3.

digging into it the now think you are on to something the current log shows 4 connections think i know what 2 of them are when i origanally set up my smart plug with OH3 i made a thing to connect to the broker for the smart plug and when i added the central heating i added another thing instead of just adding the chanels to the current thing for the smart plug, unsure what the other 2 are, i was running OH2 and updated to OH3 months ago maybe a bad configuration from OH2 laying dormant that OH3 is trying to interpatate ? i don’t recall setting up the system broker in OH3, i use the web gui to configure everything so there may be a configuration file somewhere messing stuff up, heres the openhab.log from /var/log/openhab/

2021-09-05 10:03:04.597 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to ‘Europe/London’.
2021-09-05 10:03:04.657 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to ‘en_GB’.
2021-09-05 10:03:17.341 [WARN ] [org.openhab.core.net.NetUtil ] - Found multiple local interfaces - ignoring 192.168.8.234
2021-09-05 10:03:23.346 [INFO ] [.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2021-09-05 10:03:27.948 [INFO ] [org.openhab.ui.internal.UIService ] - Started UI on port 8080
2021-09-05 10:03:30.237 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘localhost’ with clientid 6776c37a-81e5-40b2-9f62-0fcf7ad96693
2021-09-05 10:03:30.254 [WARN ] [.MqttBrokerConnectionServiceInstance] - MqttBroker connection configuration faulty: host : You need to provide a hostname/IP!
2021-09-05 10:03:30.743 [INFO ] [e.automation.internal.RuleEngineImpl] - Rule engine started.
2021-09-05 10:03:31.850 [INFO ] [ab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel
2021-09-05 10:08:25.727 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘localhost’ with clientid 4766e5ff-953b-4824-8344-7f502510b7ba
2021-09-05 10:08:27.925 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘localhost’ with clientid a45d3813-915c-4632-b50d-9cf18ab67b39
2021-09-05 10:08:28.590 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘localhost’ with clientid 7e80d26b-9003-4a6f-834a-0dc62cc2a0f7

do you know where the configuration files for OH3 or OH2 are located on linux that may be interfering ?, using my windows laptop at the moment with a ssh terminal into my raspberry pi.

If you’ve not deliberately made xxx.things files or inherited them from an upgrade, you will not have any such files.
Folder locations to check -

Typical MQTT Things structure -

broker Bridge Thing - one only

topic Thing - often several, each representing some device accessed through the same broker. Children of the one Bridge, if you will.

channels - each topic Thing usually has several, each representing some sensor or control feature. Children of a topic Thing.

broker
    topic
      channel
      channel
    topic
      channel
      channel

In theory, you could add all channels for all devices to one “master” topic Thing, and make yourself a maintenance nightmare.

Good, there is no sign of this in the log.

thanks for the info, i deleted the file mqttbroker.config under /var/lib/openhab/config/org/openhab which seems to have removed the broker warning from my logs now when i reboot OH3

2021-09-05 10:03:30.254 [WARN ] [.MqttBrokerConnectionServiceInstance] - MqttBroker connection configuration faulty: host : You need to provide a hostname/IP!

i did origanally have it set up as

broker
. topic (smart plug)
. . channel (on/off state - publish)
. topic (boiler)
… channel (current temp)
… channel (set temp - publish)
… channel (what set temp is at)
… channel (is boiler fired up)
… channel (time left at current set temp)
… channel (turn heating off/on - publish)

i’ve now got it set up so its

MQTT Broker
General MQTT Thing
… channel (current temp) - topic (boiler)
… channel (set temp - publish) - topic (boiler)
… channel (what set temp is at) - topic (boiler)
… channel (is boiler fired up) - topic (boiler)
… channel (time left at current set temp) - topic (boiler)
… channel (turn heating off/on - publish) - topic (boiler)
… channel (on/off state - publish) - topic (smart plug)

this is what the current log is now displaying only showing 1 broker conection now which is good and no warnings regarding a faulty configuration

openhab> log:tail
12:34:02.428 [INFO ] [b.core.internal.i18n.I18nProviderImpl] - Time zone set to ‘Europe/London’.
12:34:02.481 [INFO ] [b.core.internal.i18n.I18nProviderImpl] - Locale set to ‘en_GB’.
12:34:15.734 [WARN ] [org.openhab.core.net.NetUtil ] - Found multiple local interfaces - ignoring 192.168.8.234
12:34:21.924 [INFO ] [b.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
12:34:26.334 [INFO ] [org.openhab.ui.internal.UIService ] - Started UI on port 8080
12:34:28.407 [INFO ] [re.automation.internal.RuleEngineImpl] - Rule engine started.
12:34:28.642 [INFO ] [o.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘localhost’ with clientid 8ca76881-15c9-4729-95d5-ebad43cfad77
12:34:28.923 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:broker:zigbee2mqtt’ changed from OFFLINE to ONLINE
12:34:29.009 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_SetTemp’ changed from NULL to 20
12:34:29.026 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_WhatSetTempIs’ changed from NULL to 20.0
12:34:29.166 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_CurrentTemp’ changed from NULL to 22.3 °C
12:34:29.168 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘OnOffSwitch’ changed from NULL to OFF
12:34:29.169 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_FiredUp’ changed from NULL to CLOSED
12:34:29.171 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_HeatingOffOn’ changed from NULL to OFF
12:34:29.173 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_Timer’ changed from NULL to 3.0
12:34:30.551 [INFO ] [hab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel
12:34:30.843 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:topic:zigbee2mqtt:Boiler’ changed from UNINITIALIZED to INITIALIZING
12:34:30.940 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:topic:zigbee2mqtt:Boiler’ changed from INITIALIZING to ONLINE
12:34:31.071 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_Timer’ changed from 3.0 to 91
12:34:31.103 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_HeatingOffOn’ changed from OFF to ON
12:34:31.105 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_CurrentTemp’ changed from 22.3 °C to 22.38 °C

only problem is its still only updating the once and doesn’t update again unless i reboot or go into the broker thing and hit the save button which does this

12:57:39.458 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:broker:zigbee2mqtt’ changed from ONLINE to OFFLINE
12:57:39.486 [INFO ] [o.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘localhost’ with clientid f9dfbd9f-e547-47e0-a562-fc8dd66a01f4
12:57:39.489 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:topic:zigbee2mqtt:Boiler’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
12:57:39.493 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:topic:zigbee2mqtt:Boiler’ changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
12:57:39.501 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:broker:zigbee2mqtt’ changed from ONLINE to OFFLINE
12:57:39.505 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:topic:zigbee2mqtt:Boiler’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
12:57:39.536 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:broker:zigbee2mqtt’ changed from OFFLINE to ONLINE
12:57:39.552 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘mqtt:topic:zigbee2mqtt:Boiler’ changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
12:57:39.575 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_Timer’ changed from 91 to 71
12:57:39.582 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Boiler_CurrentTemp’ changed from 22.38 °C to 22.58 °C

thats the only quick thing i can do to get it to update is to go into the mqtt broker thing on the web gui and hit save which will update it once like a reboot does

Well that will work, but you have made it difficult to maintain for yourself.

the only thing i forgot to mention is that i require a user name and password to connect to mosquitto (secure connection is off but have password protection on), i’ll remove this the now to see if it makes a differnce

was to see if it made it work lol i can put it back to what it was, was just trying to see if it made any differnce which it hasn’t unfortunetly

Take a step back. Get just one thing (small t) to work, then grow from there.

Pick something like a temperature sensor, that you think sends regular updates. Check on your MQTT Fx that it really does do that. Show us.

Check your openHAB config - you need broker Bridge, topic Thing, channel with topic details, link to an Item of suitable type. Show your work.

so i removed the set temperature item and chanel and all the other values are updating instantly corrosponding to what mqtt.fx is reporting, the only thing that is differnt on that chanel is that i have a custom Outgoing Value Transformation as when you moved the dimmer to set it to say 18 degrees it would update the mqtt server with the value 0.18 instead of 18 so i wrote a js file to multiply it by 100, weird thing is when it reads the value it reads it normal its just when publishing it publishes the value incorrectly, i’m going out just now to fit a carpet so will post here all the details of that file when i get back

managed to fix the issue :grin:, so my set temp configuration somehow upset the subscription of the mqtt, but in fairness i had it configured wrong :see_no_evil: so the issue was i had the set temperature item as a dimmer then had a stepper card on my homepage to control this dimmers value, when i adjusted the value to say 18 degrees it published 0.18 to the mqtt server not 18 which would then set the dimmer to 1 as 1 is the closest to 0.18, even if you manually adjusted the dimmer on the item page to say 15 it would jump back to 1 as soon as it was set, this wasn’t working the way i wanted so wrote JS code to multiply the output to times it by 100 then put the js file in the transformation folder and linked Outgoing Value Transformation to this file by typing JS:multi100.js under this section

multi100.js

(function(i) {
return i * 100;
})(input);

so this little code solved my issue… or so i thought, when i set the temperature with the stepper card or the dimmer slider it would correctly publish the correct value to the mqtt.

i didn’t realise at the time that this broke the subscription to the mqtt and nothing would update.

as soon as i removed the js file link from that chanel the rest of my items started updating correctly

i have now managed to get it to publish the correct values to the mqtt without this js code as well and now everything is working how it should :grin: :grin: happy days

so i edited the item to be a number instead of a dimmer then linked this number item to a stepper card on my homepage to update the value and lo and behold it was updating the correct value to the mqtt without requiring js code, and now everything else is updating as it should as well.

thank you for your assistance rossko57 we got there in the end :slight_smile:

left my pi running all day whilst at work, it’s been updating throughout the day so happy as larry :slight_smile: