tp1de / ioBroker.ems-esp

EMS-ESP Adapter
MIT License
18 stars 4 forks source link

AHS (Alternative Heatsource / Buderus AM200 Module) values not displayed #12

Closed tglynx closed 1 year ago

tglynx commented 1 year ago

Hi,

great adapter! I really appreciate all the work you put into this...

I have the following problem / configuration: When a AM200 (Alternative Heatsource) module is present additional values are generated by EMS-ESP under the boiler/ahs path. The return value of http://ems-esp/api/boiler looks like this (please not the "ahs" part at the bottom):

{ "wwsettemp": 13, "wwseltemp": 52, "wwtype": "layered buffer", "wwcomfort": "eco", "wwflowtempoffset": 40, "wwmaxpower": 100, "wwcircpump": "off", "wwchargetype": "3-way valve", "wwhyston": -8, "wwhystoff": 0, "wwdisinfectiontemp": 69, "wwcircmode": "2x3min", "wwcirc": "off", "wwcurtemp": 27.2, "wwcurtemp2": 27.3, "wwcurflow": 0.0, "wwstoragetemp1": 27.3, "wwstoragetemp2": 27.3, "wwactivated": "on", "wwonetime": "off", "wwdisinfecting": "off", "wwcharging": "off", "wwrecharging": "off", "wwtempok": "off", "wwactive": "off", "ww3wayvalve": "off", "wwmixertemp": 32.7, "wwcylmiddletemp": 52.7, "wwstarts": 1068, "wwworkm": 11220, "heatingactive": "off", "tapwateractive": "off", "selflowtemp": 33, "selburnpow": 100, "heatingpumpmod": 10, "outdoortemp": 7.3, "curflowtemp": 32.7, "rettemp": 29.7, "switchtemp": 33.1, "syspress": 1.7, "burngas": "off", "burngas2": "off", "flamecurr": 0.0, "heatingpump": "on", "fanwork": "off", "ignwork": "off", "oilpreheat": "off", "heatingactivated": "on", "heatingtemp": 75, "pumpmodmax": 100, "pumpmodmin": 10, "pumpdelay": 3, "burnminperiod": 10, "burnminpower": 0, "burnmaxpower": 100, "boilhyston": -6, "boilhystoff": 6, "curburnpow": 0, "burnstarts": 2954, "burnworkmin": 138120, "burn2workmin": 0, "heatworkmin": 126900, "ubauptime": 666119, "lastcode": "6L(229) 07.04.2022 19:59 (0 min)", "servicecode": "0Y", "servicecodenumber": 204, "maintenancemessage": "H00", "maintenance": "off", "maintenancetime": 6000, "maintenancedate": "01.01.2009", "ahs": { "altflowtemp": 65.2, "cyltoptemp": 54.4, "cylcentertemp": 58.4, "cylbottomtemp": 46.8, "valvebuffer": 50, "valvereturn": 50, "altpumpmod": 50, "vr2config": "bypass", "ahsactivated": "off", "apumpconfig": "on", "apumpsignal": "off", "apumpmin": 50, "temprise": "off", "setreturntemp": 60, "mixruntime": 120, "setflowtemp": 70, "bufbypass": "no", "bufmixruntime": 120, "bufconfig": "monovalent", "blockmode": "blocking", "blockterm": "n_o", "blockhyst": 5, "releasewait": 60 } }

I am pretty much interested in /boiler/ahs/altflowtemp, cyltoptemp, cylcentertemp, cylbottomtemp and maybe apumpconfig and so on...

Instead of a folder 'ahs' inside of 'boiler' just a single node is created in ioBroker. I would expect a folder to be created with the values according to the JSON above...

Bildschirmfoto 2022-12-22 um 18 45 03

It seems that the Adapter is trying to pull the values from ems-esp. I get the following in the log:

000+00:38:21.247 E 199: [emsesp] Call failed with error: cannot find values for entity 'ahs/valvebuffer' (Error) 000+00:38:21.247 E 200: [emsesp] Call failed with error: cannot find values for entity 'ahs/valvereturn' (Error) 000+00:38:21.247 E 201: [emsesp] Call failed with error: cannot find values for entity 'ahs/altpumpmod' (Error) 000+00:38:21.247 E 202: [emsesp] Call failed with error: cannot find values for entity 'ahs/vr2config' (Error) 000+00:38:21.247 E 203: [emsesp] Call failed with error: cannot find values for entity 'ahs/ahsactivated' (Error) 000+00:38:21.247 E 204: [emsesp] Call failed with error: cannot find values for entity 'ahs/apumpconfig' (Error) 000+00:38:21.247 E 205: [emsesp] Call failed with error: cannot find values for entity 'ahs/apumpsignal' (Error) 000+00:38:21.247 E 206: [emsesp] Call failed with error: cannot find values for entity 'ahs/apumpmin' (Error) 000+00:38:21.247 E 207: [emsesp] Call failed with error: cannot find values for entity 'ahs/temprise' (Error) 000+00:38:21.247 E 208: [emsesp] Call failed with error: cannot find values for entity 'ahs/setreturntemp' (Error) 000+00:38:21.247 E 209: [emsesp] Call failed with error: cannot find values for entity 'ahs/mixruntime' (Error) 000+00:38:21.247 E 210: [emsesp] Call failed with error: cannot find values for entity 'ahs/setflowtemp' (Error) 000+00:38:21.247 E 211: [emsesp] Call failed with error: cannot find values for entity 'ahs/bufbypass' (Error) 000+00:38:21.247 E 212: [emsesp] Call failed with error: cannot find values for entity 'ahs/bufmixruntime' (Error) 000+00:38:21.247 E 213: [emsesp] Call failed with error: cannot find values for entity 'ahs/bufconfig' (Error) 000+00:38:21.247 E 214: [emsesp] Call failed with error: cannot find values for entity 'ahs/blockmode' (Error) 000+00:38:21.247 E 215: [emsesp] Call failed with error: cannot find values for entity 'ahs/blockterm' (Error) 000+00:38:21.247 E 216: [emsesp] Call failed with error: cannot find values for entity 'ahs/blockhyst' (Error) 000+00:38:21.247 E 217: [emsesp] Call failed with error: cannot find values for entity 'ahs/releasewait' (Error) 000+00:38:29.733 E 218: [emsesp] Call failed with error: cannot find values for entity 'ahs/altflowtemp' (Error) 000+00:38:29.733 E 219: [emsesp] Call failed with error: cannot find values for entity 'ahs/cyltoptemp' (Error) 000+00:38:29.733 E 220: [emsesp] Call failed with error: cannot find values for entity 'ahs/cylcentertemp' (Error) 000+00:38:29.733 E 221: [emsesp] Call failed with error: cannot find values for entity 'ahs/cylbottomtemp' (Error) 000+00:38:29.733 E 222: [emsesp] Call failed with error: cannot find values for entity 'ahs/valvebuffer' (Error) 000+00:38:29.733 E 223: [emsesp] Call failed with error: cannot find values for entity 'ahs/valvereturn' (Error) 000+00:38:29.733 E 224: [emsesp] Call failed with error: cannot find values for entity 'ahs/altpumpmod' (Error) 000+00:38:29.733 E 225: [emsesp] Call failed with error: cannot find values for entity 'ahs/vr2config' (Error) 000+00:38:29.733 E 226: [emsesp] Call failed with error: cannot find values for entity 'ahs/ahsactivated' (Error) 000+00:38:29.733 E 227: [emsesp] Call failed with error: cannot find values for entity 'ahs/apumpconfig' (Error) 000+00:38:29.733 E 228: [emsesp] Call failed with error: cannot find values for entity 'ahs/apumpsignal' (Error) 000+00:38:29.733 E 229: [emsesp] Call failed with error: cannot find values for entity 'ahs/apumpmin' (Error) 000+00:38:29.733 E 230: [emsesp] Call failed with error: cannot find values for entity 'ahs/temprise' (Error) 000+00:38:29.733 E 231: [emsesp] Call failed with error: cannot find values for entity 'ahs/setreturntemp' (Error) 000+00:38:29.733 E 232: [emsesp] Call failed with error: cannot find values for entity 'ahs/mixruntime' (Error) 000+00:38:29.733 E 233: [emsesp] Call failed with error: cannot find values for entity 'ahs/setflowtemp' (Error) 000+00:38:29.733 E 234: [emsesp] Call failed with error: cannot find values for entity 'ahs/bufbypass' (Error) 000+00:38:29.733 E 235: [emsesp] Call failed with error: cannot find values for entity 'ahs/bufmixruntime' (Error) 000+00:38:29.733 E 236: [emsesp] Call failed with error: cannot find values for entity 'ahs/bufconfig' (Error) 000+00:38:29.733 E 237: [emsesp] Call failed with error: cannot find values for entity 'ahs/blockmode' (Error) 000+00:38:29.733 E 238: [emsesp] Call failed with error: cannot find values for entity 'ahs/blockterm' (Error) 000+00:38:29.733 E 239: [emsesp] Call failed with error: cannot find values for entity 'ahs/blockhyst' (Error) 000+00:38:29.733 E 240: [emsesp] Call failed with error: cannot find values for entity 'ahs/releasewait' (Error)

Not sure if the problem is in ems-esp API itself or the ioBroker.ems-esp

This happens in native ems-esp and the KM200 structure

thanks, Michael

tp1de commented 1 year ago

Hi Michael, The iobroker adapter does not support substructures in boiler. Anyhow I might believe that the am200 should be an own device. Could you post the device structure from http://ems-esp/api/system command please?

tglynx commented 1 year ago

Hello Thomas,

i agree, for me the AM200 is 'just a second heat source' or boiler as it is called in ems-esp. According to that logic it could be implemented like it is done with the mixers.

Mixer (heating circuit / hs1;hs2) example:

{ "hc1": { "flowtemphc": 24.0, "valvestatus": 52, "flowsettemp": 25, "pumpstatus": "on" }, "hc2": { "flowtemphc": 21.8, "valvestatus": 0, "flowsettemp": 0, "pumpstatus": "off" } }

Here we go with /api/system:

{ "System Status": { "version": "3.5.0b7", "platform": "ESP32", "uptime": "000+03:59:55.390", "freemem": 100, "free_app": 74, "reset reason": "Software reset CPU / Software reset CPU" }, "Network Status": { "connection": "Ethernet", "hostname": "ems-esp", "MAC": "94:B5:55:FF:DF:D7", "IPv4 address": "192.168.123.144/255.255.255.0", "IPv4 gateway": "192.168.123.254", "IPv4 nameserver": "192.168.123.254", "phy type": 1, "eth power": 16, "eth phy addr": 1, "eth clock mode": 0, "static ip config": false, "enable IPv6": false, "low bandwidth": false, "disable sleep": false, "AP provision mode": "disconnected", "AP security": "wpa2", "AP ssid": "ems-esp" }, "NTP Status": { "network time": "connected", "enabled": true, "server": "time.google.com", "tz label": "Europe/Berlin" }, "OTA Status": { "enabled": true, "port": 8266 }, "MQTT Status": { "MQTT status": "disconnected", "enabled": false, "client_id": "ems-esp", "keep alive": 60, "clean session": false, "base": "ems-esp", "discovery prefix": "homeassistant", "nested format": 1, "ha enabled": false, "mqtt qos": 0, "mqtt retain": false, "publish time boiler": 10, "publish time thermostat": 10, "publish time solar": 10, "publish time mixer": 10, "publish time other": 10, "publish time sensor": 10, "publish single": false, "publish2command": false, "send response": false }, "Syslog Status": { "enabled": false }, "Sensor Status": { "temperature sensors": 0, "temperature sensor reads": 0, "temperature sensor fails": 0, "analog sensors": 0, "analog sensor reads": 0, "analog sensor fails": 0 }, "API Status": { "API calls": 1676, "API fails": 0 }, "Bus Status": { "bus status": "connected", "bus protocol": "Buderus", "bus telegrams received (rx)": 64371, "bus reads (tx)": 7241, "bus writes (tx)": 0, "bus incomplete telegrams": 0, "bus reads failed": 29, "bus writes failed": 0, "bus rx line quality": 100, "bus tx line quality": 100 }, "Settings": { "board profile": "E32", "locale": "en", "tx mode": 2, "ems bus id": 11, "shower timer": false, "shower alert": false, "rx gpio": 5, "tx gpio": 17, "dallas gpio": 4, "pbutton gpio": 33, "led gpio": 2, "hide led": false, "notoken api": false, "readonly mode": false, "fahrenheit": false, "dallas parasite": false, "bool format": 1, "bool dashboard": 5, "enum format": 1, "analog enabled": true, "telnet enabled": true }, "Devices": [ { "type": "Boiler", "name": "Logamax Plus/GB192/Condens GC9000", "device id": "0x08", "product id": 208, "version": "01.04", "entities": 70, "handlers received": "0x10 0x15 0x1C 0x18 0x19 0x34 0x2A", "handlers fetched": "0x14 0x16 0x33 0x26", "handlers pending": "0xBF 0x11 0xC2 0x1A 0x35 0xD1 0xE3 0xE4 0xE5 0xE6 0xE9 0xEA 0x0494 0x0495 0x048F 0x04A2 0x0486 0x0492", "handlers ignored": "0x2E" }, { "type": "Boiler", "name": "Alternative Heatsource", "device id": "0x60", "product id": 228, "version": "03.02", "entities": 23, "handlers received": "0x054D 0x054E 0x0550", "handlers fetched": "0x054C", "handlers pending": "0x054F", "handlers ignored": "0xBF" }, { "type": "Thermostat", "name": "RC300/RC310/Moduline 3000/1010H/CW400/Sense II", "device id": "0x10", "product id": 158, "version": "74.03", "entities": 79, "handlers received": "0x06 0xA2 0x02BB 0x02BC 0x02BD 0x02BE 0x02BF 0x02C0 0x031D 0x0267", "handlers fetched": "0x02A5 0x02B9 0x02AF 0x029B 0x02A6 0x02BA 0x02B0 0x029C 0x02CE 0x02F5 0x031B 0x023A 0x0240", "handlers pending": "0xA3 0x12 0x13 0x0471 0x0472 0x02A7 0x02B1 0x029D 0x0473 0x02A8 0x02B2 0x029E 0x0474 0x02A9 0x02B3 0x029F 0x0475 0x02AA 0x02B4 0x02A0 0x0476 0x02AB 0x02B5 0x02A1 0x0477 0x02AC 0x02B6 0x02A2 0x0478 0x02CC 0x02D0 0x02D2 0x031E", "handlers ignored": "0x0292 0xF9 0x02E1 0x02E2 0x02EB 0x02EC 0x35 0xBF 0x0291" }, { "type": "Thermostat", "name": "RC100/Moduline 1000/1010", "device id": "0x39", "product id": 165, "version": "12.03", "entities": 0, "handlers pending": "0x042B 0x047B 0x0273", "handlers ignored": "0x029C 0x0292 0x02BA 0x042C 0xF7" }, { "type": "Mixer", "name": "MM100", "device id": "0x20", "product id": 160, "version": "24.05", "entities": 4, "handlers received": "0x02D7", "handlers ignored": "0x1E 0x1A 0x0255 0xBF" }, { "type": "Mixer", "name": "MM100", "device id": "0x21", "product id": 160, "version": "24.05", "entities": 4, "handlers received": "0x02D8", "handlers ignored": "0x1A 0x0255 0xBF" }, { "type": "Solar", "name": "SM100/MS100", "device id": "0x30", "product id": 163, "version": "27.07", "entities": 36, "handlers received": "0x0362 0x0363 0x0366 0x0364 0x036A", "handlers fetched": "0x0358 0x035A 0x0380 0x038E 0x0391", "handlers pending": "0x035D 0x035F 0x035C 0x0361", "handlers ignored": "0x0368 0x03A9 0x03AA 0x35 0xBF" }, { "type": "Gateway", "name": "KM200/MB LAN 2", "device id": "0x48", "product id": 189, "version": "04.08", "entities": 0 }, { "type": "Controller", "name": "9000i", "device id": "0x09", "product id": 224, "version": "35.06", "entities": 0 }, { "type": "Controller", "name": "BC30", "device id": "0x16", "product id": 220, "version": "01.05", "entities": 0 } ] }

According to this we simply have 2 boilers (same as 2 mixers). So yes, i would also believe that the AM200 should be its own device (second boiler -> heat source -> hs1, hs2)

Basically what we come up with is that we suggest the structure in ems-esp should be changed? I could open an issue there...

Regards, Michael

tp1de commented 1 year ago

Yes that's what I thought: 2 x Boiler within device structure - the adapter is not prepared for this. Some month ago I had a discussion mit proddy and MichaelDVP about naming. A system with thermostats like RC310 can manage more than one heatsource (hs1...hs4) and more then one WW-System (dhw1 / dhw2). This is not implemented within ems-esp. Whenever you chose the the km200-like structure within ioBroker Adapter I will translate this into heatSources/hs1. The am200 should be heatSources/hs2. I will check how to do this.

And please post the response by reading a single ahs field like: http://ems-esp/api/boiler/ahs/altflowtemp (I believe that the error messages come from ems-esp by polling the single field info's)

I recognized that you have a km200 interface as well. How does the object-structure looks like when you just use km200 (no ems-esp) within a second instance of the adapter?

tp1de commented 1 year ago

BTW: I uploaded an updated adapter version to Github. You can install from there. I changed "ahs" to hs2 while using km200 structure. But I believe that the main problem is that reading the individual field info might not work probably within ems-esp api calls. Please check.

tglynx commented 1 year ago

Thomas, you did it :) I installed the current github version (1.17.1) of ioBroker.ems-esp. I can see all the values in heatsources/hs2/ahs which is great - thank you so much!

And please post the response by reading a single ahs field like: http://ems-esp/api/boiler/ahs/altflowtemp (I believe that the error messages come from ems-esp by polling the single field info's)

{ "message": "cannot find values for entity 'ahs/altflowtemp'" }

I recognized that you have a km200 interface as well. How does the object-structure looks like when you just use km200 (no ems-esp) within a second instance of the adapter?

I will check that and come back in this matter as i am currently using the ioBroker.km200 adapter for this. I initially started to use ems-esp as the buderus gateways (KM100 in my case) do not support the AM200 modules (at least thats what i thought because the ioBroker.km200 adapter does not show a second heatsource or anything else from the AM200 module).

Result

tp1de commented 1 year ago

And please post the response by reading a single ahs field like: http://ems-esp/api/boiler/ahs/altflowtemp (I believe that the error messages come from ems-esp by polling the single field info's)

{ "message": "cannot find values for entity 'ahs/altflowtemp'" }

That's an ems-esp api error - are you making an ems-esp GH issue? Maybe better testing the latest dev version first if already solved. From this api-call the iobroker adapter reads units of measurement, min/max etc .

Additionally I believe that the second device for ahs within api should be not boiler. Better boiler 2 or ahs !

I recognized that you have a km200 interface as well. How does the object-structure looks like when you just use km200 (no ems-esp) within a second instance of the adapter?

I will check that and come back in this matter as i am currently using the ioBroker.km200 adapter for this.

The logic of the ems-esp adapter is basically the same as km200. I just upgrades for actual js-controller, added solar etc and if available an better integration of recordings (historic consumption data).

tglynx commented 1 year ago

Allright, i am going to update my ems-esp to the latest DEV version first. i will do some additional tests that are on my list then.

From this api-call the iobroker adapter reads units of measurement, min/max etc .

I see, so it makes sense that those API calls should also work. I am going to test this further ASAP ... Happy Holidays already, and thanks for your help!

tglynx commented 1 year ago

i have tested the ems-esp V3 api with the current development version (which is v3.5.0-dev.14) as of today and the subsequent calls to http://ems-esp/api/boiler/ahs/altflowtemp - as an example - do not work. i will check for issues in the ems-esp GH project.

tp1de commented 1 year ago

I opened an GH issue within ems-esp.

proddy commented 1 year ago

I saw it, and will look into it.

tp1de commented 1 year ago

@tglynx Hi Michael the ems-esp part should work from the ioBroker side now.

I would be interested to learn if the am200 is imbedded within the Bosch/Buderus api and/or the Buderus App? What about the Buderus App - Is the alternative heatsource displayed there?

tglynx commented 1 year ago

Unfortunately Bruderus does not support the AM200 module yet. No sign of it in the Buderus app (iOS) or in the KM100 API… so as of now, i think it is up to you where you put it.

tp1de commented 1 year ago

@tglynx I am not sure if I had understood the api structure changes. There is a new adapter version on GH to be tested. Please check if ems-esp mode and km200 structure mode are working. (please check ahs, mixer, boiler / heatSource)

tglynx commented 1 year ago

Hi Thomas, i tested both structure modes and everything works just as expected. Perfect! Looks very nice now…

Also no errors or warnings in ioBroker or ems-esp logs - so all entity details can be retrieved.

thanks!!!

tp1de commented 1 year ago

I just released version 1.21.0 with all the changes. Should be in dev in a couple of hours.

tglynx commented 1 year ago

allright! great... i hope it will also still work with ems-esp 3.4.x / not for me but for other users not on 3.5.x-dev

i did update to 1.21.0 without issues!

tp1de commented 1 year ago

Should work for older V3 versions as well otherwise users should go to latest dev version ems-esp firmware. I will close this issue now.