emsesp / EMS-ESP32

ESP32 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps
https://emsesp.github.io/docs
GNU Lesser General Public License v3.0
607 stars 102 forks source link

MQTT several values missing #659

Closed Lemonn closed 2 years ago

Lemonn commented 2 years ago

I tested Development Build v3.5.0b4. There seems to be some problem regarding the publication of several values over MQTT. Some values like selflowtemp, get published as expected. But others like heatingactive, brungas, tapwateractive, and ww3wayvalve, are not published. The web interface is not affected, as the values are displayed correctly.

  "MQTT": {
    "enabled": true,
    "host": "192.168.178.79",
    "port": 1883,
    "base": "ems-esp",
    "username": "admin",
    "password": "admin",
    "client_id": "ems-esp",
    "keep_alive": 60,
    "clean_session": true,
    "max_topic_length": 128,
    "publish_time_boiler": 0,
    "publish_time_thermostat": 0,
    "publish_time_solar": 0,
    "publish_time_mixer": 0,
    "publish_time_other": 0,
    "publish_time_sensor": 0,
    "mqtt_qos": 0,
    "mqtt_retain": false,
    "ha_enabled": false,
    "nested_format": 1,
    "discovery_prefix": "homeassistant",
    "publish_single": false,
    "publish_single2cmd": false,
    "send_response": false
  },
{"selflowtemp":0,"selburnpow":45,"heatingpumpmod":0,"curflowtemp":53.3,"exhausttemp":29,"heatingtemp":88,"pumpmodmax":100,"pumpmodmin":10,"pumpdelay":1,"burnminperiod":0,"burnminpower":0,"burnmaxpower":45,"boilhyston":0,"boilhystoff":0,"curburnpow":0,"burnstarts":586937,"burnworkmin":421038,"burn2workmin":0,"heatworkmin":298638,"ubauptime":3747205,"servicecodenumber":0,"maintenancemessage":"H00","maintenance":"off","maintenancetime":0}
{"wwsettemp":40,"wwseltemp":40,"wwtype":"flow","wwcomfort":"hot","wwflowtempoffset":0,"wwchargetype":"3-way valve","wwhyston":0,"wwhystoff":0,"wwdisinfectiontemp":70,"wwcircmode":"1x3min","wwcurtemp":48,"wwcurflow":0,"wwstoragetemp1":48,"wwstarts":153981,"wwworkm":122400}
proddy commented 2 years ago

I'll see if I can reproduce it.

(I'm also assuming you haven't blocked these in the Customization page?)

Lemonn commented 2 years ago

Nothing is blocked on the customizsation page, i just keept the default settings. Testet both versions whit the same settings.

Here is the output from MQTT whit version 3.4.2:

{"heatingactive":"off","tapwateractive":"off","selflowtemp":0,"selburnpow":45,"heatingpumpmod":0,"curflowtemp":29.2,"exhausttemp":24.8,"burngas":"off","burngas2":"off","heatingpump":"off","fanwork":"on","ignwork":"off","oilpreheat":"off","curburnpow":0,"burnstarts":586942,"burnworkmin":421040,"burn2workmin":0,"heatworkmin":298638,"servicecodenumber":0,"maintenancemessage":"H00","maintenance":"off","maintenancetime":0}
{"wwtapactivated":"on","wwsettemp":40,"wwtype":"flow","wwcirc":"off","wwcurtemp":26.6,"wwcurflow":0,"wwstoragetemp1":26.6,"wwonetime":"off","wwdisinfecting":"off","wwcharging":"off","wwrecharging":"off","wwtempok":"off","wwactive":"off","ww3wayvalve":"on","wwstarts":153986,"wwworkm":122402}
proddy commented 2 years ago

I can't reproduce. We would need to look into your particular setup

Lemonn commented 2 years ago

Okay, that's strange. Let me know what you need and what I should do to find the reason.

What I know so far is:

2022-10-03 17:43:07.875 DEBUG 2294: [mqtt] Publishing topic ems-esp/boiler_data_ww (#839, retain=0, retry=1, size=272, pid=1)

2022-10-03 17:43:07.976 DEBUG 2295: [mqtt] Publishing topic ems-esp/boiler_data (#840, retain=0, retry=1, size=441, pid=1)

2022-10-03 17:43:09.694 DEBUG 2296: [mqtt] Publishing topic ems-esp/heartbeat (#841, retain=0, retry=1, size=29


<details>
  <summary>Settings</summary>

  ```json
{
  "type": "settings",
  "System": {
    "version": "3.5.0b4"
  },
  "Network": {
    "ssid": "xxxxxxxx",
    "password": "xxxxxxxx",
    "hostname": "ems-esp",
    "static_ip_config": false,
    "enableIPv6": true,
    "bandwidth20": false,
    "tx_power": 20,
    "nosleep": false,
    "enableMDNS": true
  },
  "AP": {
    "provision_mode": 1,
    "ssid": "ems-esp",
    "password": "ems-esp-neo",
    "channel": 1,
    "ssid_hidden": false,
    "max_clients": 4,
    "local_ip": "192.168.4.1",
    "gateway_ip": "192.168.4.1",
    "subnet_mask": "255.255.255.0"
  },
  "MQTT": {
    "enabled": true,
    "host": "192.168.178.79",
    "port": 1883,
    "base": "ems-esp",
    "username": "admin",
    "password": "admin",
    "client_id": "ems-esp",
    "keep_alive": 60,
    "clean_session": true,
    "max_topic_length": 128,
    "publish_time_boiler": 0,
    "publish_time_thermostat": 0,
    "publish_time_solar": 0,
    "publish_time_mixer": 0,
    "publish_time_other": 0,
    "publish_time_sensor": 0,
    "mqtt_qos": 0,
    "mqtt_retain": false,
    "ha_enabled": false,
    "nested_format": 1,
    "discovery_prefix": "homeassistant",
    "publish_single": false,
    "publish_single2cmd": false,
    "send_response": false
  },
  "NTP": {
    "enabled": true,
    "server": "time.google.com",
    "tz_label": "Europe/Amsterdam",
    "tz_format": "CET-1CEST,M3.5.0,M10.5.0/3"
  },
  "OTA": {
    "enabled": true,
    "port": 8266,
    "password": "ems-esp-neo"
  },
  "Security": {
    "jwt_secret": "ems-esp-neo",
    "users": [
      {
        "username": "admin",
        "password": "admin",
        "admin": true
      },
      {
        "username": "guest",
        "password": "guest",
        "admin": false
      }
    ]
  },
  "Settings": {
    "tx_mode": 2,
    "ems_bus_id": 11,
    "syslog_enabled": true,
    "syslog_level": 9,
    "trace_raw": true,
    "syslog_mark_interval": 0,
    "syslog_host": "192.168.178.79",
    "syslog_port": 9342,
    "shower_timer": false,
    "shower_alert": false,
    "shower_alert_coldshot": 10,
    "shower_alert_trigger": 7,
    "rx_gpio": 5,
    "tx_gpio": 17,
    "dallas_gpio": 4,
    "dallas_parasite": false,
    "led_gpio": 2,
    "hide_led": false,
    "low_clock": false,
    "telnet_enabled": true,
    "notoken_api": false,
    "readonly_mode": false,
    "analog_enabled": true,
    "pbutton_gpio": 33,
    "solar_maxflow": 30,
    "board_profile": "E32",
    "fahrenheit": false,
    "bool_format": 1,
    "bool_dashboard": 1,
    "enum_format": 1,
    "weblog_level": 9,
    "weblog_buffer": 100,
    "weblog_compact": false,
    "phy_type": 1,
    "eth_power": 16,
    "eth_phy_addr": 1,
    "eth_clock_mode": 0
  }
}

Customizations ```json { "type": "customizations", "Customizations": { "sensors": [], "analogs": [], "masked_entities": [] } } ```
proddy commented 2 years ago

Can you see the values from the Telnet Console using show? The code that generates the MQTT/Console/API data is different than the one that does the Web. If you're interested the function is EMSdevice::generate_values() .

proddy commented 2 years ago

I also don't see the locale in your settings so maybe that has something to do with it

CheeseE commented 2 years ago

btw, same here with version v3.5.0b2, only bool values are not published.

Lemonn commented 2 years ago

Thank you for the fast fix, great work. Tested https://github.com/emsesp/EMS-ESP32/issues/659, works as expected.

proddy commented 2 years ago

@Lemonn you asked how to test the code with simulating the EMS bus. It's all described in https://emsesp.github.io/docs/#/Coding?id=standalone-testing

I also had a version using cmake and realtime debugging in VSCode on a Windows environment but stopped that as I was the only one using it. I use WSL/Ubuntu now and gcc

jasonkaisersmith commented 1 year ago

I have the same problem, with this version. When Can I expect a fix?

This is my first device, so not the best starting experience!

proddy commented 1 year ago

I have the same problem, with this version. When Can I expect a fix?

This is my first device, so not the best starting experience!

you could uninstall this free software application that took 4 painstaking years to write and develop your own solution if you're dissapointed? :)

jasonkaisersmith commented 1 year ago

There is no need to be rude. I simply asked when a fix is expected.

I did not disparage or insult you or the software, but simply stated that as this is my first experience that it was not the best start.

I was amazed and delighted to discover that there was such a solution as this, and I am appreciative of that fact and all the effort that goes into it. Working in the SW industry myself, then I do know and understand how much effort it really is hidden behind what we see here.

Don't forget that your SW is just one part of a complex eco system that one must learn. As such, the learning curve is rather high as there is not just this SW, but also the physical device that connects to the EMS-bus, Rpi, Grafana, Influx, Mosquitto MQTT, telegraf, docker, Portainer, etc. on-top of trying to understand the terminology of the EMS devices themselves and intrepret what is meant by the abbreviations. The majority of these technologies I have little or no experience of using previously, (I have spent 8+ hours just "fighting" with the telegraf config, and longer with grafana, trying to get it all work). So then I'm sure that you can understand when one expresses a little bit of disappointment when one discovers the reason for something not working is a bug that doesn't yet have a release date.

proddy commented 1 year ago

There is no need to be rude. I simply asked when a fix is expected.

If you scroll up you'll see this issue was fixed 29 days ago. If you're still seeing similar issues please open a new GitHub issue and make sure you attached the relevant information (https://emsesp.github.io/docs/#/Support)