emsesp / EMS-ESP

ESP8266 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
303 stars 97 forks source link

Support Buderus GB125 and external temperature sensor #220

Closed bobzomer closed 5 years ago

bobzomer commented 5 years ago

My EMS-ESP setup detects correctly my RC300 thermostat, but neither my GB125 boiler nor my external temperature sensor.

With telnet:

These device IDs are on the EMS Bus: 0x08 0x09 0x10
and 3 were recognized by EMS-ESP as:
 unknown? (DeviceID:0x08 ProductID:133 Version:01.44)
 unknown? (DeviceID:0x09 ProductID:230 Version:37.01)
 RC300/RC310/Moduline 3000/Bosch CW400 (DeviceID:0x10 ProductID:158 Version:18.06)

You have a device is that is not known by EMS-ESP. Please report this as a GitHub issue so we can expand the EMS device library.

How can I help you add the support for those devices?

proddy commented 5 years ago

Thanks for reporting. It has been added to the latest dev build 1.9.3b5. Can you build the firmware youself?

bobzomer commented 5 years ago

Built and deployed:

  1. Now boiler is correctly recognized but reported as GB133 instead of GB125. Typo? ;-)
  2. Data coming from boiler seems wrong
  3. The external temperature sensor is reported as BC Base Controller but I see no data. Having the outdoor temperature would be very very nice.

Here is a screenshot of the web dashboard so you can better see. image

In any case, thanks for your very quick support!

proddy commented 5 years ago

yes, typo. fixed now. So for the wrong boiler temps could you go into the telnet, turn on verbose logging log v and capture a few 0x18 (UBAMonitorFast) and 0x19 (UBAMonitorSlow) telegrams so I can look at the data format.

When you mentioned the external temp sensor I thought it was a home-grown Dallas sensor, not a separate EMS device. Do you have details on the device? If you type info in the telnet does it show the outside temperature?

bobzomer commented 5 years ago

A few minutes log... log.txt

The outdoor temperature is not shown in info:

EMS-ESP system stats:
  System logging set to None
  LED is on, Listen mode is off
  Boiler is enabled, Thermostat is enabled, Solar Module is disabled, Mixing Module is disabled, Shower Timer is disabled, Shower Alert is disabled

EMS Bus stats:
  Bus is connected, protocol: Buderus
  Rx: # successful read requests=2254, # CRC errors=217
  Tx: Last poll=3.226 seconds ago, # successful write requests=0

Boiler stats:
  Boiler: Buderus GB133 (ProductID:133 Version:01.44)
  Warm Water activated: ?
  Warm Water circulation pump available: ?
  Warm Water selected temperature: ? C
  Warm Water desired temperature: ? C
  Warm Water current temperature: ? C
  Warm Water current tap water flow: ? l/min
  Warm Water # starts: ? times
  Warm Water 3-way valve: ?
  Selected flow temperature: ? C
  Current flow temperature: ? C
  Return temperature: ? C
  Gas: ?
  Boiler pump: ?
  Fan: ?
  Ignition: ?
  Circulation pump: ?
  Burner selected max power: ? %
  Burner current power: ? %
  Flame current: ? uA
  System pressure: ? bar
  System service code: ??
  Heating temperature setting on the boiler: ? C
  Boiler circuit pump modulation max power: ? %
  Boiler circuit pump modulation min power: ? %
  Boiler temperature: ? C
  Pump modulation: ? %
  Burner # starts: ? times
  Total UBA working time: 150 days 16 hours 23 minutes

Thermostat stats:
  Thermostat: RC300/RC310/Moduline 3000/Bosch CW400 (ProductID:158 Version:18.06)
  Thermostat time is 15:05:10 25/10/2019
  Heating Circuit 1
   Current room temperature: 20.3 C
   Setpoint room temperature: 19.5 C
   Mode is set to auto
proddy commented 5 years ago

I see lots of unrecognized telegram types like 0xE4, 0xE9 and 0xD1 from the boiler which explains why they cannot be interpreted. They also don't look like EMS+ messages. Do you know what is special about this GB125? Is it new? Never seen this before...

bobzomer commented 5 years ago

This has been installed in my house earlier this year, but I don't know about the product itself.

moustic999 commented 5 years ago

It is a brand new buderus heater. Messaging is done via ems+, no ems anymore. You can control it via command of rc300, but getting values from boiler will requires work to decode new messages.... Take a log of 20 30 minutes, to see how messages are repeated.... that is a first step. Before logging check amount of starts, and check after logging... finding this value in message will help identifying which packet is used to

Envoyé depuis mon smartphone Samsung Galaxy.

-------- Message d'origine -------- De : bobzomer notifications@github.com Date : 25/10/19 16:06 (GMT+01:00) À : proddy/EMS-ESP EMS-ESP@noreply.github.com Cc : Subscribed subscribed@noreply.github.com Objet : Re: [proddy/EMS-ESP] Support Buderus GB125 and external temperature sensor (#220)

This has been installed in my house earlier this year, but I don't know about the product itself.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fproddy%2FEMS-ESP%2Fissues%2F220%3Femail_source%3Dnotifications%26email_token%3DACLI2P3CWEFO7UVOQ5EMURDQQL4MPA5CNFSM4JFAD5B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECIOYAA%23issuecomment-546368512&data=02%7C01%7C%7C90a9c3ef7bb74c082f5a08d75954771d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637076091614003970&sdata=BEHwS3ptFNtod7BxgPySya7AlO%2F5r0ZE7p342fUjCgQ%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACLI2P64ZP6RVE33SAS6URLQQL4MPANCNFSM4JFAD5BQ&data=02%7C01%7C%7C90a9c3ef7bb74c082f5a08d75954771d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637076091614013979&sdata=2Lnr9uAYn7IEl7YNjuDhtKY0Zfm6EKVUbk8LlfZ2hh8%3D&reserved=0.

bobzomer commented 5 years ago

Here is a longer log. long_log.txt I don't know where to look for the number of starts...

moustic999 commented 5 years ago

thermostat is known, so you can retrieve HC values via 01A5 messages. almost sure that write to it will work too : 01B9 ;-)

now to retrieve the boilers value 0xE4 is sent cyclicly every 60 seconds. seems some value are decreasing in it, not every minutes, but regularly, I would be tempted to say it is a temperature decreasing, but which one ? that need to be checked real time with value on the heater

bobzomer commented 5 years ago

To be checked during a longer period, but the first two bytes of an E4 message seems to be the heater temperature.

(00:12:04.865) Boiler -> all, type 0xE4, telegram: 08 00 E4 00 10 20 30 59 00 CC 29 02 3F 64 00 02 00 00 00 00 00 80 00 00 00 FF 00 02 3F 80 00 (CRC=EE) #data=27
(00:12:05.016) Boiler -> all, type 0xE4, telegram: 08 00 E4 1B 02 44 80 00 01 E9 80 00 (CRC=48) #data=8

0x244 = 580, reported as 58°C on heater HMI. I checked in front of the heater during one or two minutes (while the heater was active, so the temperature was moving fast), and it seems correct.

bobzomer commented 5 years ago

To checked also, but the E9 message could contain the hot water temperature. Displayed as 55.9°C on my thermostat, so 0x022F (= 559).

(00:20:12.532) Boiler -> all, type 0xE9, telegram: 08 00 E9 00 37 02 2F 02 2F 00 00 00 00 46 3C 00 00 01 00 0A 8E 00 01 5C 00 00 00 37 00 37 (CRC=FF) #data=26
proddy commented 5 years ago

nice work!

bobzomer commented 5 years ago

I think I get the outdoor temperature, in D1 messages. The outdoor temperature displayed by the thermostat has just increased from 8.5°C to 9°C at the same time as we got a switch from 0x0057 (= 87) to 0x0058 (= 88).

(12:42:20.562) Boiler -> all, type 0xD1, telegram: 08 00 D1 00 00 57 (CRC=90) #data=2
(12:43:20.543) Boiler -> all, type 0xD1, telegram: 08 00 D1 00 00 57 (CRC=90) #data=2
(12:44:20.573) Boiler -> all, type 0xD1, telegram: 08 00 D1 00 00 58 (CRC=9F) #data=2
(12:45:20.529) Boiler -> all, type 0xD1, telegram: 08 00 D1 00 00 58 (CRC=9F) #data=2
(12:46:20.635) Boiler -> all, type 0xD1, telegram: 08 00 D1 00 00 58 (CRC=9F) #data=2
(12:47:20.541) Boiler -> all, type 0xD1, telegram: 08 00 D1 00 00 58 (CRC=9F) #data=2
(12:48:20.622) Boiler -> all, type 0xD1, telegram: 08 00 D1 00 00 58 (CRC=9F) #data=2
bobzomer commented 5 years ago

Another match in E4 message.

(13:16:01.463) Boiler -> all, type 0xE4, telegram: 08 00 E4 1B 01 53 80 00 01 60 80 00 (CRC=7A) #data=8

The second part of this message contains the smoke temperature (0x160 = 352, displayed as 35.2°C on HMI).

bobzomer commented 5 years ago

Here is a summary of all my findings:

E4 message seems to be heater-related: When offset (byte 4) is 0 (ex. 08 00 E4 00 10 20 30 59 00 CC 1E 01 02 64 00 02 00 00 00 00 00 80 00 00 00 FF 00 01 02 80 00)

When offset (byte 4) is 1B (ex. 08 00 E4 1B 01 00 80 00 00 F8 80 00)

E9 message seems to be water-related (ex. 08 00 E9 00 37 02 03 02 03 00 00 00 00 46 3C 00 00 01 00 0A C5 00 01 62 00 00 00 37 00 37):

D1 message seems to be related to outdoor temperature sensor (ex. 08 00 D1 00 00 80)

proddy commented 5 years ago

nice work @bobzomer . We should add this to the Wiki, or you can I have give you edit privileges?

Then how do you suggest we implement this? We could detect the boiler type and correctly set the external/outdoor temp and the status code since these values are already captured and sent to MQTT. What about the other values? Are they important to monitor and send?

Also watch out for values like 0x8000 (80 00) as EMS uses this a lot to indicate an unknown value. Like the D1 message.

bobzomer commented 5 years ago

For the wiki, as you want. If you want, I can copy-paste my message in your wiki... :-)

For the implementation, you are the master. The minimum burner power does not seem interesting. The real burner power seems interesting only to detected the burner is active. I don't know if the flame current is relevant to anything, as I'm not a heater-expert.

Regarding the different temperatures, as you send as a JSON array with MQTT, maybe we can just send them if you have them?

Regarding the outdoor temperature, do you plan to send the value as any other Dallas-type temperature sensor?

proddy commented 5 years ago

@bobzomer check out this link too which I had forgotten about. @Th3M3 worked a lot of these messages out before, like the E3, E4, E9, D1 and others. Worth comparing notes.

theloukou commented 5 years ago

I can provide logs for double checking telegram types and data if needed. Regarding implementation, would it be possible to detect boiler type, and switch which telegrams it decodes/forwards? I suppose since @Th3m3 seems to have done a lot of the guesswork (i don't speak german to be sure), the real trouble would be to code the proper decoding.

proddy commented 5 years ago

Could you verify https://github.com/proddy/EMS-ESP/wiki/MC110-controller and provide some example telegrams. Then I'll start implementing.

theloukou commented 5 years ago

0xD1: reports correctly, bad value for me. I suppose no outdoor sensor is present. 0x14: correct 0xBF: 2=0xEA, 235, for my BG122 4=0x00 for me, instad of 0x11 on your wiki 0xE3/0xE4: seems different for me. different lengths, not sure i decode temps correctly. only thing i can definitelyconfirm is inE4, bytes 8-9/24-25 are actually right temps. 0xE9: byte 1 is correct, not sure about the rest I don't get 0x07E4 at all Also, my data frequencies are a bit different to those on the wiki, but i dont think that this is a huge factor

Data i compared is as follows: Heating temp setpoint to 31C, hot water to 55C. At timestamp 08:10:45 actual water temp was 46.5 on screen At timestamp 08:15:49 actual water temp was 58.8 on screen At timestamp 08:17:19 actual water temp was 59.2 on screen ems log.txt

proddy commented 5 years ago

thanks @theloukou . From all this data what is most important to send via MQTT do you think?

theloukou commented 5 years ago

I would personally like to have water/heating temps, temp setpoints, status for heating and water, and maybe system pressures? Also modification of setpoints and heating on/off would be a welcome addition. Obviously, the more the merrier, but let's not be needy :D

Also, if you could maybe point me out to where you do the decoding, and the mqtt stuff, i would like to try and mess around with the code myself, for my own needs, and if it's good enough, you could use some/all of it. if anything comes out useable of course.

proddy commented 5 years ago

https://github.com/proddy/EMS-ESP/wiki/how-the-code-works

proddy commented 5 years ago

it's all in ems-esp.cpp