MQTT: generic Thing loses somehow connection for specific devices

running OH.5.0.1 on docker

Since switching to OH5 I guess, I’m experiencing sudden loss of connection for MQTT Things. But not ALL Things, only specific things whereas other MQTT Things work just as fine.
the really, really bad thing is, that there’s absolutely NO indication in the logs whatsoever. OH just stops recognizing specific things at all. restarting the MQTT-Thing or the MQTT-Broker doesn’t do anything to resolve this issue.

I just set the binding to TRACE (everything org.openhab.binding.mqtt and org.openhab.binding.mqtt.*). I even get the “subscribed to LWT” for the specific device failing to update (Tasmota Wifi socket):

TRACE logs
2025-09-11 10:56:20.117 [DEBUG] [ing.mqtt.internal.action.MQTTActions] - bundle org.openhab.binding.mqtt:5.0.1 (324)[org.openhab.binding.mqtt.internal.action.MQTTActions(402)] : ServiceFactory.ungetService()
2025-09-11 10:56:20.118 [DEBUG] [ing.mqtt.internal.action.MQTTActions] - bundle org.openhab.binding.mqtt:5.0.1 (324)[org.openhab.binding.mqtt.internal.action.MQTTActions(402)] : DependencyManager: osgi.ds.satisfying.condition close component unbinding from org.apache.felix.scr.impl.manager.ComponentContextImpl@579e628d at tracking count 1 refpairs: [[RefPair: ref: [{org.osgi.service.condition.Condition}={service.id=6, service.bundleid=0, service.scope=singleton, service.pid=0.org.osgi.service.condition.ConditionImpl, osgi.condition.id=true}] service: [null]]]
2025-09-11 10:56:20.119 [DEBUG] [ing.mqtt.internal.action.MQTTActions] - bundle org.openhab.binding.mqtt:5.0.1 (324)[org.openhab.binding.mqtt.internal.action.MQTTActions(402)] : Querying state active
2025-09-11 10:56:20.120 [DEBUG] [ing.mqtt.internal.action.MQTTActions] - bundle org.openhab.binding.mqtt:5.0.1 (324)[org.openhab.binding.mqtt.internal.action.MQTTActions(402)] : Changed state from active to satisfied
2025-09-11 10:56:21.448 [TRACE] [g.mqtt.handler.AbstractBrokerHandler] - Subscribed org.openhab.binding.mqtt.awtrixlight.internal.discovery.AwtrixLightDiscoveryService@118345a5 to discovery topic awtrix/+/stats on broker mqtt:broker:synology
2025-09-11 10:56:21.449 [TRACE] [g.mqtt.handler.AbstractBrokerHandler] - Subscribed org.openhab.binding.mqtt.homeassistant.internal.discovery.HomeAssistantDiscovery@3bc544f2 to discovery topic homeassistant/# on broker mqtt:broker:synology
2025-09-11 10:56:21.449 [TRACE] [g.mqtt.handler.AbstractBrokerHandler] - Subscribed org.openhab.binding.mqtt.ruuvigateway.internal.discovery.RuuviGatewayDiscoveryService@546ed0cb to discovery topic ruuvi/# on broker mqtt:broker:synology
2025-09-11 10:56:21.449 [TRACE] [g.mqtt.handler.AbstractBrokerHandler] - Subscribed org.openhab.binding.mqtt.espmilighthub.internal.discovery.EspMilightHubDiscoveryService@232ca58d to discovery topic milight/states/# on broker mqtt:broker:synology
2025-09-11 10:56:21.450 [TRACE] [g.mqtt.handler.AbstractBrokerHandler] - Subscribed org.openhab.binding.mqtt.homie.internal.discovery.Homie300Discovery@7eb67ec3 to discovery topic +/+/$homie on broker mqtt:broker:synology
2025-09-11 10:56:21.450 [DEBUG] [ing.mqtt.internal.action.MQTTActions] - bundle org.openhab.binding.mqtt:5.0.1 (324)[org.openhab.binding.mqtt.internal.action.MQTTActions(402)] : ServiceFactory.getService()
2025-09-11 10:56:21.450 [DEBUG] [ing.mqtt.internal.action.MQTTActions] - bundle org.openhab.binding.mqtt:5.0.1 (324)[org.openhab.binding.mqtt.internal.action.MQTTActions(402)] : This thread collected dependencies
2025-09-11 10:56:21.451 [DEBUG] [ing.mqtt.internal.action.MQTTActions] - bundle org.openhab.binding.mqtt:5.0.1 (324)[org.openhab.binding.mqtt.internal.action.MQTTActions(402)] : getService (ServiceFactory) dependencies collected.
2025-09-11 10:56:21.451 [DEBUG] [ing.mqtt.internal.action.MQTTActions] - bundle org.openhab.binding.mqtt:5.0.1 (324)[org.openhab.binding.mqtt.internal.action.MQTTActions(402)] : Querying state satisfied
2025-09-11 10:56:21.451 [DEBUG] [ing.mqtt.internal.action.MQTTActions] - bundle org.openhab.binding.mqtt:5.0.1 (324)[org.openhab.binding.mqtt.internal.action.MQTTActions(402)] : For dependency osgi.ds.satisfying.condition, optional: false; to bind: [[RefPair: ref: [{org.osgi.service.condition.Condition}={service.id=6, service.bundleid=0, service.scope=singleton, service.pid=0.org.osgi.service.condition.ConditionImpl, osgi.condition.id=true}] service: [null]]]
2025-09-11 10:56:21.451 [DEBUG] [ing.mqtt.internal.action.MQTTActions] - bundle org.openhab.binding.mqtt:5.0.1 (324)[org.openhab.binding.mqtt.internal.action.MQTTActions(402)] : Changed state from satisfied to active
2025-09-11 10:56:21.461 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.78.20' with clientid OH3Main23
2025-09-11 10:56:21.461 [TRACE] [g.mqtt.handler.AbstractBrokerHandler] - Subscribed org.openhab.binding.mqtt.awtrixlight.internal.discovery.AwtrixLightDiscoveryService@118345a5 to discovery topic awtrix/+/stats on broker mqtt:broker:synology
2025-09-11 10:56:21.461 [TRACE] [g.mqtt.handler.AbstractBrokerHandler] - Subscribed org.openhab.binding.mqtt.homeassistant.internal.discovery.HomeAssistantDiscovery@3bc544f2 to discovery topic homeassistant/# on broker mqtt:broker:synology
2025-09-11 10:56:21.461 [TRACE] [g.mqtt.handler.AbstractBrokerHandler] - Subscribed org.openhab.binding.mqtt.ruuvigateway.internal.discovery.RuuviGatewayDiscoveryService@546ed0cb to discovery topic ruuvi/# on broker mqtt:broker:synology
2025-09-11 10:56:21.462 [TRACE] [g.mqtt.handler.AbstractBrokerHandler] - Subscribed org.openhab.binding.mqtt.homie.internal.discovery.Homie300Discovery@7eb67ec3 to discovery topic +/+/$homie on broker mqtt:broker:synology
2025-09-11 10:56:21.462 [TRACE] [g.mqtt.handler.AbstractBrokerHandler] - Subscribed org.openhab.binding.mqtt.espmilighthub.internal.discovery.EspMilightHubDiscoveryService@232ca58d to discovery topic milight/states/# on broker mqtt:broker:synology
2025-09-11 10:56:21.464 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:onwire:lastupdate
2025-09-11 10:56:21.465 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:tibberPreiseJSON:PreiseHeute
2025-09-11 10:56:21.467 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:tibberPreiseJSON:PreiseMorgen
2025-09-11 10:56:21.468 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:tibberPreiseJSON:PreisAktuell
2025-09-11 10:56:21.468 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:warp2:warp2IEC61851
2025-09-11 10:56:21.468 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:warp2:warp2vehicle
2025-09-11 10:56:21.468 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:warp2:warp2contactor
...
2025-09-11 10:56:21.910 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:spuelmaschine:state
2025-09-11 10:56:21.923 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:spuelmaschine:Power
2025-09-11 10:56:21.926 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:spuelmaschine:EnergyToday
2025-09-11 10:56:21.927 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:spuelmaschine:EnergyTotal
2025-09-11 10:56:21.928 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:spuelmaschine:StarteSpuelmaschine
2025-09-11 10:56:21.930 [DEBUG] [.MqttChannelStateDescriptionProvider] - Adding state description for channel mqtt:topic:synology:spuelmaschine:Betriebsart
2025-09-11 10:56:21.931 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Unsubscribed channel mqtt:topic:synology:spuelmaschine:availability#devices_2FNousSpMa_2Ftele_2FLWT from topic: devices/NousSpMa/tele/LWT
2025-09-11 10:56:21.932 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Subscribed channel mqtt:topic:synology:spuelmaschine:Power to topic: devices/NousSpMa/tele/SENSOR
2025-09-11 10:56:21.939 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Subscribed channel mqtt:topic:synology:spuelmaschine:EnergyTotal to topic: devices/NousSpMa/tele/SENSOR
2025-09-11 10:56:21.940 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Subscribed channel mqtt:topic:synology:spuelmaschine:EnergyToday to topic: devices/NousSpMa/tele/SENSOR
2025-09-11 10:56:21.941 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Subscribed channel mqtt:topic:synology:spuelmaschine:StarteSpuelmaschine to topic: devices/NousSpMa/starteSpuelmaschine
2025-09-11 10:56:21.939 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Subscribed channel mqtt:topic:synology:spuelmaschine:EnergyTotal to topic: devices/NousSpMa/tele/SENSOR
2025-09-11 10:56:21.940 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Subscribed channel mqtt:topic:synology:spuelmaschine:EnergyToday to topic: devices/NousSpMa/tele/SENSOR
2025-09-11 10:56:21.941 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Subscribed channel mqtt:topic:synology:spuelmaschine:StarteSpuelmaschine to topic: devices/NousSpMa/starteSpuelmaschine
2025-09-11 10:56:21.949 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Subscribed channel mqtt:topic:synology:spuelmaschine:availability#devices_2FNousSpMa_2Ftele_2FLWT to topic: devices/NousSpMa/tele/LWT
2025-09-11 10:56:21.950 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Subscribed channel mqtt:topic:synology:spuelmaschine:Betriebsart to topic: devices/NousSpMa/betriebsart
2025-09-11 10:56:21.959 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Subscribed channel mqtt:topic:synology:spuelmaschine:state to topic: devices/NousSpMa/stat/POWER

There’s also the entry for e.g. POWER:
2025-09-11 10:56:21.932 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Subscribed channel mqtt:topic:synology:spuelmaschine:Power to topic: devices/NousSpMa/tele/SENSOR

Thing configuration

which means, it should work, because the thing is configured:

UID: mqtt:topic:synology:spuelmaschine
label: MQTT Tasmota Spülmaschine
thingTypeUID: mqtt:topic
configuration:
  payloadNotAvailable: Offline
  availabilityTopic: devices/NousSpMa/tele/LWT
  payloadAvailable: Online
bridgeUID: mqtt:broker:synology
channels:
  - id: state
    channelTypeUID: mqtt:switch
    label: State
    description: Status Spülmaschine
    configuration:
      commandTopic: devices/NousSpMa/cmnd/POWER
      postCommand: true
      stateTopic: devices/NousSpMa/stat/POWER
      off: OFF
      on: ON
  - id: Power
    channelTypeUID: mqtt:string
    label: Power
    description: Verbrauch Spülmaschine
    configuration:
      stateTopic: devices/NousSpMa/tele/SENSOR
      transformationPattern:
        - JSONPATH:$.ENERGY.Power
  - id: EnergyToday
    channelTypeUID: mqtt:string
    label: EnergyToday
    description: Verbrauch heute Spülmaschine
    configuration:
      stateTopic: devices/NousSpMa/tele/SENSOR
      transformationPattern:
        - JSONPATH:$.ENERGY.Today
  - id: EnergyTotal
    channelTypeUID: mqtt:string
    label: EnergyTotal
    description: Verbrauch gesamt Spülmaschine
    configuration:
      stateTopic: devices/NousSpMa/tele/SENSOR
      transformationPattern:
        - JSONPATH:$.ENERGY.Total
  - id: StarteSpuelmaschine
    channelTypeUID: mqtt:switch
    label: Starte Spülmaschine
    description: Starte Spülmaschine im EMS sofort
    configuration:
      commandTopic: devices/NousSpMa/starteSpuelmaschine
      stateTopic: devices/NousSpMa/starteSpuelmaschine
  - id: Betriebsart
    channelTypeUID: mqtt:string
    label: Betriebsart
    description: Betriebsart Spülmaschine
    configuration:
      stateTopic: devices/NousSpMa/betriebsart

but the item connected to the Power channel just stopped getting updated since yesterday mid wash (its a dish washer):

item JSON
{
  "link": "http://192.168.78.20:8080/rest/items/EMS_SpMaAktuellerVerbrauch",
  "state": "1873 W",
  "stateDescription": {
    "pattern": "%.0f W",
    "readOnly": false,
    "options": []
  },
  "lastState": "1874.6 W",
  "lastStateUpdate": 1757493560000,
  "lastStateChange": 1757493560000,
  "unitSymbol": "W",
  "metadata": {
    "unit": {
      "value": "W",
      "editable": true
    },
    "semantics": {
      "value": "Point_Measurement",
      "config": {
        "relatesTo": "Property_Current",
        "isPointOf": "EMSDevices"
      },
      "editable": false
    },
    "stateDescription": {
      "value": " ",
      "config": {
        "pattern": "%.0f W"
      },
      "editable": true
    }
  },
  "editable": true,
  "type": "Number:Power",
  "name": "EMS_SpMaAktuellerVerbrauch",
  "label": "SpMa - aktueller Verbrauch",
  "tags": [
    "Measurement",
    "Current"
  ],
  "groupNames": [
    "EMSDevices"
  ]
}
mqtt payload
{
  "Time": "2025-09-11T10:35:54",
  "ENERGY": {
    "TotalStartTime": "2021-10-20T15:52:42",
    "Total": 709.232,
    "Yesterday": 1.096,
    "Today": 0,
    "Period": 0,
    "Power": 0,
    "ApparentPower": 0,
    "ReactivePower": 0,
    "Factor": 0,
    "Voltage": 0,
    "Current": 0
  }
}

I had this before and only a restart of openHAB did the trick. This time I want to be able to tell, what happens so I can avoid this. Because one of the fail safes of my architecture is to send MQTT-topics to openHAB if some component fails. So, I would have get a message via openHAB, that the dish washer integration was down → but there’s still no disconnect, the Wifi socket sends updaeds every 30secs to devices/NousSpMa/tele/SENSOR but they don’t get processed within openHAB - without any notification in the log, even on TRACE.

Any ideas on how to proceed and try to find the reason?

Make sure you have set the correct MQTT version in your Thing definition:

sudo mosquitto -h
mosquitto version 2.0.11

You need mosquitto > version 1.6 to enable MQTT 5.

I used v3 since ever, my broker runs in another docker, is the current mosquitto 2.0.22, which provides both v3 and v5.
I changed my broker configuration to v5, but that did change nothing. Still no new information on that specific device/thing - but other devices work as intended (I’ve got 121 devices/information coming in through MQTT with about 2 to 20 payloads each.)

Funny thing is: If I copy the whole Thing configuration into a new one and add a new item, the value gets updated as it should:

2025-09-12 08:34:17.347 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MQTT_Tasmota_Spulmaschine_Power' changed from NULL to 0

So, it seem, it doesn’t have to do with configuration of Thing or Broker? What else would result in a behaviour like that without a trace in the logs?

I’m not sure what could cause the described behavior. If the Thing loads at all, it should work. There is nothing unusual about this particular Thing. The behavior is odd and has never been reported.

If you complete duplicating the broken Thing and then comment out the old not working Thing, does the duplicate still work?

I have since restarted openHAB to be able to have my automations running (had to run my dish washer in rainy weather! :wink: ). So currently i cannot double check it. I do hope, it doesn’t come up again, but if it will, I’ll check! :wink:

Could this be related to

After the upgrade from 4.3.6 to 5.0.1, I noticed a difference in the behaviour of MQTT generic Thing channels.

Channels that do not have a Unit Of Measurement specified, worked properly on 4.3.6, but reported

2025-09-11 12:16:00.447 [DEBUG] [internal.profiles.StateFilterProfile] - Received non allowed state update from handler: -62, ignored

on 5.0.1. The default profile worked OK.

I do realise that the State Filter Profile is not involved in the original post, but the change seems to coming from MQTT.