[kind of solved] Victron GX MQTT messages to OpenHab 3 unstable

I don’t have another option, do I?
For every MQTT-Topic I use a channel in my MQTT-Thing:

  - id: WetterstationTempOutside
    channelTypeUID: mqtt:number
    label: Außentemperatur
    description: ""
    configuration:
      min: -30
      stateTopic: openHAB/master/Wetterstation/tempOutsideC
      max: 60

…but you’re right. Sometimes the log just have “changed from …” entries and sometimes, there’s the “received command”, “predicted” and “changed from” entries… strange.

I do not get any log messages in openhab.log for mqtt value updates.
And I do get info level messages so it’s not like i have all logging turned off.

After looking into this some more and connecting the mqtt.fx client directly to the GX I figured it to be silly to configure the GX to publish to the broker on the OH machine when OH can just connect to the broker on the GX.
That however does not resolve the stability issues. It will get messages for a minute then stop again.

That Thing is the only place where the temp readings come in? You don’t have any rules or UI widgets that change this Item? As configured, all the messages received on openhab/master/Wetterstation/tempOutsideC will result in updates and never commands. So the commands need to be coming from somewhere else.

There is a special flag you have to set to true (default is false) to have incoming MQTT messages processed as commands.

Isn’t there a NodeRead openHAB module? My understanding is that module uses openHAB’s REST API, not MQTT. So maybe NodeRed is sending the readings as a command.

Yes, it’s the only time, the item is changed. and there’s no nodeRed module I know of - nodeRed just resends the sensors and stuff on MQTT-topics. But there’s an “advanced” option “Is Command” for an mqtt-channel as you said, but that’s false in default, yes. :man_shrugging:

We promise that you are not getting spontaneous commands. There is a rule, or a link to your Item, or some external agency (like NodeRed) that is deliberately sending commands.

If it were a UI widget, you’d probably know when poked it, so can rule that out.

You might search links to your Item using API Explorer, to further narrow down.

oh. you meant a node-red module. Ok - yes, seems to use REST API!

ok, I’ll have a look into that, I’m 99,9% sure, I only import MQTT-values. And I get the feeling, that if my OH3 is somehow under “rapid fire” or can’t persist the values fast enough in my MySQL-database it will do the “receive/predict/changed”-stuff - but if that’s impossible code-wise, I’ll rest my case…

2021-07-28 15:13:59.090 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'MQTTWetterstationBinder_Aussentemperatur' received command 18.22
2021-07-28 15:13:59.106 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'MQTTWetterstationBinder_Aussentemperatur' predicted to become 18.22
2021-07-28 15:13:59.132 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MQTTWetterstationBinder_Windchill' changed from 17.78 to 18.22
2021-07-28 15:13:59.137 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MQTTWetterstationBinder_Aussentemperatur' changed from 17.78 °C to 18.22 °C
2021-07-28 15:13:59.140 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MQTTWetterstationBinder_letztesUpdate' changed from 2021-07-28T14:13:32.931+0000 to 2021-07-28T14:13:59.077+0000

vs

2021-07-28 15:35:51.101 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MQTTWetterstationBinder_Aussentemperatur' changed from 18.22 °C to 18.72 °C
2021-07-28 15:35:51.106 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MQTTWetterstationBinder_Windchill' changed from 18.22 to 18.72
2021-07-28 15:35:51.108 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MQTTWetterstationBinder_WindboenBeschreibung' changed from leiser Zug to still
2021-07-28 15:35:51.132 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MQTTWetterstationBinder_letztesUpdate' changed from 2021-07-28T14:35:32.929+0000 to 2021-07-28T14:35:51.085+0000

…but slowly and steadily we’re definitely moving away from topic! :wink:

I managed to roll the GX back to 2.66 which appears to resolve the mqtt issue.
The change-log I found by creating a Victron professional account only has a vague hint as what could possibly be the cause “Update Qt5 to 5.13.”
However the cause is in the GX v2.72 firmware.

2 Likes