Engelmann Sensostar Heat Meter Integration with ESPHome

Send me an email at: esphome_sensostar"at"avboard"dot"de

Dirk

Hey @STB3, my ESP Sensostar board and accesories arrived today. I already installed it and I would like to say THANK YOU for your time and effort! The solution works flawless and I’m very happy so far!

1 Like

@STB3 many thanks from my site as well. installation and configuration worked like a charm. One thing i’m not very familiar - i do get errors during the mqqt connection. looks like TLS handshake errors. but the port 1883 isn’t a TLS port, right?

_ERROR
Last error code reported from esp-tls: 0x8006
Last tls stack error number: 0x0

best regards

Unfortunately, I’m not an MQTT expert, but hopefully someone else will be able to answer your question.
The TLS port would be 8883.

Dirk

hello @STB3, is it correct that i’m only getting integer values of the temperatures? for difference caluclation between flow and return it is giving back two digits decimal numbers.

This is normal behaviour. You would also get integer numbers with the original Engelmann MBus module.

1 Like

ok that’s weired, because obviously it uses decimal numbers for calculation of the difference temperature or the created heat. It’s kind of not really usable in that way to like set offsets for the heatpump.

I just installed the 1st board into my sensostar. MQTT is working flawlessly so a big thanks here:

1 Like

Maybe one question: One of my sensostars is in the state reset. The values seem to be ok though. Should this be a topic of concern?

Hi!

Remove the module and use the Sensostar button to check the error codes and see if the issue is being caused by the ESP module.
The codes are explained here:

Look at pages 13 and 14. The manual says that it has no effect on the measured values.

I have a Sensostar E here as a test device and it also displays ‘Status Reset’ with and without the ESP-Sensostar module plugged in.

Dirk

1 Like

Thanks! If someone else is interested in using MQTT to get the values into Node-Red, below an example
[{"id":"b56a79328b8dd035","type":"mqtt in","z":"16ac045bd2c2e916","name":"Heatmeter MQTT (Update Server and ID in topic (X's))","topic":"sensostar-XXXXXX/sensor/#","qos":"2","datatype":"auto","broker":"","nl":false,"rap":false,"inputs":0,"x":1260,"y":580,"wires":[["c3be265583f38af0"]]},{"id":"c3be265583f38af0","type":"join","z":"16ac045bd2c2e916","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":true,"accumulate":false,"timeout":"1","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1530,"y":580,"wires":[["dd687dee74934c45"]]},{"id":"dd687dee74934c45","type":"function","z":"16ac045bd2c2e916","name":"Store to WMZ WP","func":"// Note: If you have multiple heatmeters, set the name in the flow here and in line 43 individual for each one\nvar heatMeter = flow.get(\"heatMeter\") || {\n\tenergySoFar: 0,\n\tpowerInW: 0,\n\tvolumeFlow: 0,\n\ttempOut: 0,\n\ttempIn: 0,\n\ttempDiff: 0,\n\terrorFlags: 0\n}\n\nfor (const key in msg.payload) {\n\t// Check we have properties and if matching, put to the \n\tif (msg.payload.hasOwnProperty(key)) {\n\t\tconst value = msg.payload[key];\n\n\t\tswitch (true) {\n\t\t\tcase key.endsWith('/sensor/sensostar_energy/state'):\n\t\t\t\theatMeter.energySoFar = Number(value);\n\t\t\t\tbreak;\n\t\t\tcase key.endsWith('/sensor/sensostar_power/state'):\n\t\t\t\theatMeter.powerInW = Number(value);\n\t\t\t\tbreak;\n\t\t\tcase key.endsWith('/sensor/sensostar_flow/state'):\n\t\t\t\theatMeter.volumeFlow = Number(value) * 1000;\n\t\t\t\tbreak;\n\t\t\tcase key.endsWith('/sensor/sensostar_flow_temperature/state'):\n\t\t\t\theatMeter.tempOut = Number(value);\n\t\t\t\tbreak;\n\t\t\tcase key.endsWith('/sensor/sensostar_return_temperature/state'):\n\t\t\t\theatMeter.tempIn = Number(value);\n\t\t\t\tbreak;\n\t\t\tcase key.endsWith('/sensor/sensostar_temperature_difference/state'):\n\t\t\t\theatMeter.tempDiff = Number(value);\n\t\t\t\tbreak;\n\t\t\tcase key.endsWith('/sensor/sensostar_status/state'):\n\t\t\t\theatMeter.errorFlags = value;\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\nflow.set (\"heatMeter\", heatMeter );\nmsg.payload = heatMeter.energySoFar;\n\n// Node status\nvar nodeText = \"PWR: \" + heatMeter.powerInW + \" In: \" + heatMeter.tempIn + \" Out: \" + heatMeter.tempOut + \" Flow: \" + heatMeter.volumeFlow; \nnode.status({fill:\"yellow\", shape:\"dot\", text:nodeText});\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1690,"y":580,"wires":[[]]}]

1 Like

@STB3 my sensostar ESP is not reachable anymore. Am i able to reset it, without opening the sensostar? If removing the power cable, the power will be buffered by the battery right?

Removing the power cable cuts the power to the ESP32.

Dirk

During initial setup of a new Sensostar meter one could change the energy unit. The default unit is MWh. Does it make any difference on the accuracy of the values measured by the ESP to change it to kWh?

Has anyone tried to add a prometheus endpoint to the configuration? Does in works with just adding “prometheus:” in to the configuration and rebuild?

@STB3 many thanks for your dedication to build this excellent board!

Thank you very much for the board. It works a treat!

I’d also be interested to increase the resolution of the energy reading for calculating the warm water COP. According to the EN-MBRTU Modbus RTU Module manual the value is also available as a floating point value. Is this exposed by the Engelmann meter?

How should the Sensostar know how much electrical energy the heat pump has consumed???
The Sensorstar can not calculate a real COP because the COP is defined as “amount of heat in kWh divide by the amount of electrical energy in kWh”. Or did I get something wrong here?

Hi, the COP calculation was just an example for which I use the energy reading of the Sensostar. The calculation itself is performed by Home Assistant, based on the thermal energy reading from the Sensostar and the electrical energy reading from a Shelly Pro 3EM. Unfortunately right now the former only has a resolution of a kWh, whereas the Shelly has a resolution of a hundredth of a kWh.

You can see the different resolutions in action in the COP diagram. You can see a sawtooth, because due to the higher resolution of the electrical energy it changes often, whereas the thermal energy stay constant for a longer time. Dividing both values leads to a sawtooth.

Moreover the COP calculation can be off quite a bit depending on when the thermal energy last increased by 1 kWh. For yesterdays warm water production I got:

electrical energy: 1.66kWh
thermal energy: 5kWh (low resolution)
COP: 3.01

The thermal energy could be anywhere between 5 and 6 kWh. For the calculation I have to assume 5 kWh. In reality it could be 5.99 kWh but I would still calculate a COP of 3.01.

electrical energy: 1.66kWh
thermal energy: 5.99kWh (high resolution)
COP: 3.61

In the “reality” the COP would be 3.61. So in this extreme case the calculation is off by 0.6.

The COP for heating is not really an issue, because currently it is running the rest of the day and the readings are much higher, e.g.

electrical energy: 14.27kWh
thermal energy: 58kWh (low resolution)
COP: 4.06

electrical energy: 14.27kWh
thermal energy: 58.99kWh (high resolution, extrem case)
COP: 4.13

As you can see 4.06 vs. 4.13. Good enough for me. :wink: Of course this will change in spring or autumn, if one needs to heat the house less.

I hope that makes sense now. :wink:

2 Likes

Hello Dirk,

I’m interested in the Sensostar boards. I hope I’m in the right place to order two.

Thank you in advance.

Discussion on this topic continues in Expose energy reading with higher resolution · Issue #1 · brambo123/esphome-sensostar · GitHub