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
548 stars 96 forks source link

"hc1 program" not available when MQTT formating is set to "Nested in a single topic"; errors and warnings when parsing MQTT in Home Assistant #763

Closed lukcz closed 1 year ago

lukcz commented 1 year ago

Affected version: v3.4.4 Hardware:

Boiler | Condens 2500/Logamax/Logomatic/Cerapur Top/Greenstar/Generic HT3 -- | -- Thermostat | RC300/RC310/Moduline 3000/1010H/CW400/Sense 2

When MQTT formatting is set to "Nested in a single topic" there is no option to set value of "hc1 program" from Hoem Assitant. Seems like information about "hc1 program" is not published at all. Workaround is to switch format option to "As individual topics" - "hc1 program" published correctly then.

Additinally I can see some warnings and errosrs in home assistant log:

Logger: homeassistant.helpers.template
Source: helpers/template.py:588
First occurred: 07:53:53 (909 occurrences)
Last logged: 15:17:29

Error parsing value: 'dict object' has no attribute 'hc1' (value: {"datetime":"21.11.2022 15:16","floordry":"off","dampedoutdoortemp":3.1,"floordrytemp":0,"building":"medium","minexttemp":-10,"damping":"on","wwsettemp":60,"wwmode":"off","wwsettemplow":45,"wwcircmode":"own_prog","wwchargeduration":15,"wwcharge":"off","wwextra1":0,"wwdisinfecting":"off","wwdisinfectday":"tu","wwdisinfecttime":120}, template: {{value_json.hc1.summermode}})
Logger: homeassistant.components.mqtt.number
Source: components/mqtt/number.py:210
Integration: MQTT ([documentation](https://www.home-assistant.io/integrations/mqtt), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+mqtt%22))
First occurred: 08:00:27 (734 occurrences)
Last logged: 15:05:03

Payload '{"datetime":"21.11.2022 15:04","floordry":"off","dampedoutdoortemp":3.4,"floordrytemp":0,"building":"medium","minexttemp":-10,"damping":"on","wwsettemp":60,"wwmode":"off","wwsettemplow":45,"wwcircmode":"own_prog","wwchargeduration":15,"wwcharge":"off","wwextra1":0,"wwdisinfecting":"off","wwdisinfectday":"tu","wwdisinfecttime":120,"hc1":{"seltemp":22.5,"currtemp":23.1,"mode":"auto","modetype":"comfort","ecotemp":17.5,"manualtemp":20.5,"comforttemp":21.5,"summertemp":24,"designtemp":65,"offsettemp":0,"minflowtemp":30,"maxflowtemp":65,"roominfluence":10,"roominflfactor":0.1,"curroominfl":-6,"nofrostmode":"outdoor","nofrosttemp":5,"targetflowtemp":36,"heatingtype":"radiator","summersetmode":"auto","summermode":"winter","controlmode":"weather-compensated","program":"prog_1","tempautotemp":-1,"remoteseltemp":0,"fastheatup":50,"switchonoptimization":"off","reducemode":"room","noreducetemp":-31,"reducetemp":0}}' is not a Number
MichaelDvP commented 1 year ago

https://emsesp.github.io/docs/#/Troubleshooting?id=home-assistant

lukcz commented 1 year ago

Thsnks! Indeed, it was my problem - it can be close.

MichaelDvP commented 1 year ago

Keep it in mind, with v3.5. the entities will change again (see #758, #759) and you need this procedure again.