bbqkees / ems-esp-domoticz-plugin

Domoticz plugin for the EMS Wi-Fi Gateway with Proddy's EMS-ESP firmware
MIT License
7 stars 8 forks source link

problem with the units #40

Closed Bartekn86 closed 2 years ago

Bartekn86 commented 2 years ago

Hi, There is a problem with the units Esp32 shows the truth, domoticz do not ;-)

from domoticz ems_solar | 000D005B | 91 | daily energy | RFXMeter | RFXMeter counter | 0.013 kWh | - | - |  | from esp32 web i-face energy today | 13 085 Wh

bbqkees commented 2 years ago

The counter in Domoticz expects the value as input from EMS-ESP in Wh, and displays it as kWh, so it divides the value by 1000. Can you post a MQTT payload of the solar topic? I don not have a solar module myself, so I need to see an example payload for the modification.

Bartekn86 commented 2 years ago

sure 2021-10-11 16:46:43.213 TRACE 734: [emsesp] Solar(0x30) -> Me(0x0B), SM100CollectorConfig(0x380), data: 50 64 00 00 3F 01 00 00 01 2021-10-11 16:46:43.298 DEBUG 735: [mqtt] Publishing topic ems-esp/solar_data (#44873, retain=0, retry=1, size=639, pid=1) 2021-10-11 16:46:43.628 DEBUG 736: [telegram] Sending read Tx [#176], telegram: 0B B0 FF 00 20 02 8E 2021-10-11 16:46:43.628 TRACE 737: [emsesp] Me(0x0B) <- Solar(0x30), SM100Energy(0x38E), data: 20 2021-10-11 16:46:43.719 DEBUG 738: [emsesp] Last Tx read successful 2021-10-11 16:46:43.719 TRACE 739: [emsesp] Solar(0x30) -> Me(0x0B), SM100Energy(0x38E), data: 00 00 00 00 00 00 30 B7 00 00 08 72

if you wish, i can give you full access to esp32 and to domoticz too

bbqkees commented 2 years ago

I would need to see a MQTT payload of the solar device topic as the text string. The plugin uses the MQTT data to decode all parameters. You can see them with f.i. http://mqtt-explorer.com/

Bartekn86 commented 2 years ago

{ "id": 164, "collectortemp": 51.6, "tankbottomtemp": 39.6, "solarpump": "on", "pumpworktime": 11973, "tankmaxtemp": 85, "solarpumpmodulation": 100, "pumpminmod": 1, "turnondiff": 10, "turnoffdiff": 5, "cylinderpumpmodulation": 0, "valvestatus": "off", "tankheated": "off", "collectorshutdown": "off", "collectormaxtemp": 120, "collectormintemp": 20, "energylasthour": 2303.5, "energytoday": 9796, "energytotal": 321.5, "heattransfersystem": "off", "externaltank": "off", "thermaldisinfect": "off", "heatmetering": "off", "activated": "on", "solarpumpmode": "constant", "pumpkick": "off", "plainwatermode": "off", "doublematchflow": "off", "climatezone": 80, "collector1area": 6.3, "collector1type": "flat" }

bbqkees commented 2 years ago

Please try out the new Autodiscovery feature of Domoticz instead of this plugin. See https://bbqkees-electronics.nl/wiki/gateway/domoticz-configuration.html

(You can run them side by side with the existing plugin for a while).