EMS ESP Mqtt not working properly

  • Platform information:
    • Hardware: CPUArchitecture/RAM/storage
    • OS: what OS is used and which version
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version:
  • Issue of the topic: please be detailed explaining your issue
  • Please post configurations (if applicable):
    • Items configuration related to the issue
    • Sitemap configuration related to the issue
    • Rules code related to the issue
    • Services configuration related to the issue
  • If logs where generated please post these here using code fences:

Hi all,

I started to configure my EMS ESP hardware gateway for heating boiler. I sucessfully integrated setting the thermostat temperature for two heating circuits, but can’t find solution for much simplier task of showing if boiler is heating up right now.
I run OH3 on RPi4.

thing file:

Bridge mqtt:broker:mqttbroker "MQTT broker" [ host="192.168.10.70", username="", password="", secure=false ]{

Thing mqtt:topic:ems-esp "Buderus" {

Type switch : heating_active "Stan ogrzewania" [ stateTopic="ems-esp/heating_active"]
     }
}

item file

Switch Stan_ogrzewania  "Stan ogrzewania"                          <temperature>     (HEATING)         { channel="mqtt:topic:ems-esp:heating_active"}

sitemap:

Switch item=Stan_ogrzewania label="Stan ogrzewania"

I don’t know how to check if openhab receive mqtt message when status of heating is changed, and item Stan_ogrzewania always shows 1/on.

I can’t help at all with the text based MQTT Thing configuration. But I might be able to help with some discussion about how MQTT and OH works.

MQTT works with clients publishing messages to topics. Other clients will subscribe to those topics and receive the messages. OH is one such client.

When OH receives a message, it will update the state of the Item. So the state of the Item will represent the last message received. Checking the state of the Item will show whether the boiler is heating right now.

However, what is something went wrong? Look in openhab.log for errors. If there is nothing in there use a third party MQTT client like MQTTExplorer to verify the device is sending the message in the first place.

What if there is something wrong with my UI config? Look in events.log and and you should see events as the Item changes.

I thought I resolve this problem, but in openhab.log see this message:

2021-09-24 07:58:23.327 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '0' not supported by type 'OnOffValue': No enum constant org.openhab.core.library types.OnOffType.0

I changed mqtt settings, and the values are sent in a format of 1/0 for bool variables.Before this change the only difference in log was “commnad 'off” not supported by type ‘OnOffValue’. In the events log I can’t see anything regarding this issue. The log warn is clear to me, but I run out of possible solutuons for that. I changed types of items for sting type too.

And strangly enough it seems that this log ocurs exaclty when heating is changing status, so it is maybe a problem of incorrect data types, but as I said I run out of ideas to rectify this.

You should look more closely at the other thread you found

You have a channel -

They have -

[ stateTopic="ems-esp/heating_active", on="1", off="0" ]

First I tried it, but it didn’t work. Now I reverted to this setting and wainting for heating to be activated. But already see it did not change a status of heating from on to off. In the app I still see that heating is on, and that is not true.

Don’t expect this binding to pick up edits in xxx.things file ‘in flight’.
Restart when you’ve edited to what you want.

Then follow Rich’s advice to investigate. What message is coming from your device exactly?

I changed config to on=“1”, off=“0”, but now, I get the error (openhab.log):

Command '' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.

So I suppose that the mqtt wroks good, cause I changed settings to format mqtt mesages fo bool variables to 1/0 instead default on/off. And this logs shows up when the heating is on/off.

This tells you it’s trying to process an empty message. Let us know when you’ve used mqtt.fx or something to see the messages you are trying to capture.

It looks like i had to change mqtt setings in EMS ESP enum to be number not text. And all of this was complicated by the fact i was not restarting openhab instance after changes, and the binding not always responding to the changes immediately.