Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Support for Junkers CerastarComfort ZWR and Junkers Bosch CR 100 #103

Closed
philrich opened this issue Apr 25, 2019 · 210 comments
Closed

Support for Junkers CerastarComfort ZWR and Junkers Bosch CR 100 #103

philrich opened this issue Apr 25, 2019 · 210 comments
Labels
enhancement New feature or request

Comments

@philrich
Copy link

Hello,

First of all: Thanks for the amazing work you have done on this project!

I own the following heating Components:

  • Boiler: Junkers CerastarComfort ZWR 18-7 KE 23
  • Thermostat: Junkers Bosch CR 100 (According to the manual this is an EMS+ Device)

I have ordered bbqkees circuit and connected it to the EMS-Bus (connected cables in parallel to the thermostat connectors). I also built and installed the latest Firmware from the dev-Branch (1.7.0b9).

As others it seems I am not able to send data to the bus (Tx: no signal). The Tx queue is filling up slowly. I also tried to set tx_delay on but that didn't help. autodetect, send .., refresh ist not working, nothing gets sent back, queue fills up.

After manually setting Boiler (set boiler_type 08) and Thermostat (set thermostat_type 18) I see stats in the info screen.
Unfortunately some values are missing or wrong.

This is how my info screen looks now:

EMS-ESP system stats:                                                                                                                                        [10/523]
  System logging set to None
  LED is off, Silent mode is off
  Thermostat is enabled, Boiler is enabled, Shower Timer is disabled, Shower Alert is disabled

EMS Bus stats:
  Bus is connected
  Rx: Poll=7 ms, # Rx telegrams read=0, # CRC errors=0
  Tx: no signal

Boiler stats:
  Boiler: DeviceID: 0x08 (ProductID:0 Version:?)
  Hot tap water: off
  Central heating: off
  Warm Water activated: ?
  Warm Water circulation pump available: ?
  Warm Water selected temperature: ? C
  Warm Water desired temperature: ? C
  Warm Water current temperature: 23.0 C
  Warm Water current tap water flow: 0.0 l/min
  Warm Water # starts: 6543 times
  Warm Water active time: 6 days 20 hours 4 minutes
  Warm Water 3-way valve: on
  Selected flow temperature: 0 C
  Current flow temperature: 24.0 C
  Return temperature: ? C
  Gas: off
  Boiler pump: off
  Fan: on
  Ignition: off
  Circulation pump: off
  Burner selected max power: 0 %
  Burner current power: 0 %
  Flame current: 0.1 uA
  System pressure: ? bar
  System service code:  (0)
  Heating temperature setting on the boiler: ? C
  Boiler circuit pump modulation max power: ? %
  Boiler circuit pump modulation min power: ? %
  Outside temperature: ? C
  Boiler temperature: ? C
  Pump modulation: 0 %
  Burner # starts: 17360 times
  Total burner operating time: 81 days 14 hours 10 minutes
  Total heat operating time: 74 days 18 hours 6 minutes

Thermostat stats:
  Thermostat: DeviceID: 0x18 (ProductID:0 Version:?)
  Setpoint room temperature: 16.5 C
  Current room temperature: 22.8 C
  Thermostat time is 01:07:24 26/4/2019
  Mode is set to ?

After disconnecting/reconnecting the Thermostat, this is what I get with log v.

(20:40:04.110) Boiler -> all, type 0x18 telegram: 88 00 18 00 00 01 05 00 00 00 22 44 C0 00 F5 80 00 80 00 FF FF FF 00 00 00 00 00 00 00 (CRC=4A), #data=25
<--- UBAMonitorFast(0x18) received
(20:40:04.351) Boiler -> all, type 0x34 telegram: 88 00 34 00 37 00 F5 80 00 81 00 00 01 00 00 26 41 00 19 6A 00 (CRC=C9), #data=17
<--- UBAMonitorWWMessage(0x34) received
(20:40:05.223) Boiler -> all, type 0x07 telegram: 88 00 07 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (CRC=E6), #data=15
(20:40:13.464) Thermostat -> Boiler, type 0x07 telegram: 98 88 07 00 0E (CRC=67)
(20:40:13.498) Boiler -> Thermostat, type 0x07 telegram: 88 18 07 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 (CRC=7C), #data=14
(20:40:13.523) Thermostat -> Boiler, type 0xEF telegram: 98 88 EF 00 01 (CRC=E3)
(20:40:13.545) Boiler -> Thermostat, type 0xEF telegram: 88 18 EF 00 (CRC=83)
(20:40:13.595) Thermostat -> Boiler, type 0x02 telegram: 98 88 02 00 0A (CRC=77)
<--- Version(0x02) received
(20:40:13.625) Boiler -> Thermostat, type 0x02 telegram: 88 18 02 00 5F 23 03 00 00 00 00 00 00 00 (CRC=D1), #data=10
<--- Version(0x02) received
Boiler found. Model Bosch Condens 2500/Junkers Cerapur Comfort (DeviceID:0x08 ProductID:95 Version:35.03)
* Setting Boiler to model Bosch Condens 2500/Junkers Cerapur Comfort (DeviceID:0x08 ProductID:95 Version:35.03)
Requesting type UBAMonitorFast(0x18) from dest 0x08
Requesting type UBAMonitorSlow(0x19) from dest 0x08
Requesting type UBAParameterWW(0x33) from dest 0x08
Requesting type UBAParametersMessage(0x16) from dest 0x08
Requesting type UBATotalUptimeMessage(0x14) from dest 0x08
(20:40:13.706) Boiler -> Thermostat, type 0x04 telegram: 88 18 04 0B 27 00 00 00 (CRC=35)
(20:40:13.812) Boiler -> all, type 0x07 telegram: 88 00 07 00 03 00 01 00 00 00 00 00 00 00 00 00 00 00 00 (CRC=6F), #data=15
(20:40:14.101) Thermostat -> all, type 0x01A5 telegram: 98 00 FF 00 01 A5 00 E0 21 2C (CRC=06)
<--- RCPLUSStatusMessage(0x1A5) received
(20:40:14.298) Thermostat -> all, type 0x01A5 telegram: 98 00 FF 06 01 A5 2C 22 00 CA 03 03 (CRC=98)
<--- RCPLUSStatusMessage(0x1A5) received
(20:40:14.511) Boiler -> all, type 0x18 telegram: 88 00 18 00 00 01 05 00 00 00 22 44 C0 00 F5 80 00 80 00 FF FF FF 00 00 00 00 00 00 00 (CRC=4A), #data=25
<--- UBAMonitorFast(0x18) received
(20:40:14.751) Boiler -> all, type 0x34 telegram: 88 00 34 00 37 00 F4 80 00 81 00 00 01 00 00 26 41 00 19 6A 00 (CRC=DF), #data=17
<--- UBAMonitorWWMessage(0x34) received
(20:40:15.030) Thermostat -> all, type 0x01B9 telegram: 98 00 FF 08 01 B9 FF (CRC=FA)
(20:40:15.221) Thermostat -> all, type 0x01A5 telegram: 98 00 FF 0B 01 A5 03 01 00 CA (CRC=E7)
<--- RCPLUSStatusMessage(0x1A5) received
(20:40:15.470) Thermostat -> all, type 0x01F5 telegram: 98 00 FF 00 01 F5 00 (CRC=DD)
(20:40:15.661) Thermostat -> all, type 0x01A5 telegram: 98 00 FF 0D 01 A5 00 CA 02 D8 (CRC=77)
<--- RCPLUSStatusMessage(0x1A5) received
(20:40:15.943) Thermostat -> all, type 0x01A5 telegram: 98 00 FF 00 01 A5 00 E0 (CRC=1A)
<--- RCPLUSStatusMessage(0x1A5) received
(20:40:16.134) Thermostat -> all, type 0x01A5 telegram: 98 00 FF 1A 01 A5 07 (CRC=AA)
<--- RCPLUSStatusMessage(0x1A5) received
(20:40:16.406) Thermostat -> all, type 0x01A5 telegram: 98 00 FF 27 01 A5 00 (CRC=5C)
<--- RCPLUSStatusMessage(0x1A5) received
(20:40:16.585) Thermostat -> Boiler, type 0x33 telegram: 98 88 33 00 0D (CRC=B4)
<--- UBAParameterWW(0x33) received
Publishing boiler data via MQTT
Publishing thermostat data via MQTT
(20:40:16.777) Thermostat -> Boiler, type 0x25 telegram: 98 88 25 0A 0B (CRC=FE)
(20:40:16.793) Boiler -> Thermostat, type 0x25 telegram: 88 18 25 0A (CRC=04)
(20:40:16.818) Thermostat -> Boiler, type 0x15 telegram: 98 88 15 00 05 (CRC=24)
(20:40:16.830) Boiler -> Thermostat, type 0x15 telegram: 88 18 15 00 00 00 00 00 00 (CRC=75)
(20:40:16.852) Thermostat -> Boiler, type 0x18 telegram: 98 88 18 05 01 (CRC=1E)
<--- UBAMonitorFast(0x18) received
(20:40:16.863) Boiler -> Thermostat, type 0x18 telegram: 88 18 18 05 00 (CRC=E2)
<--- UBAMonitorFast(0x18) received
(20:40:16.884) Thermostat -> Boiler, type 0x34 telegram: 98 88 34 08 01 (CRC=B4)
<--- UBAMonitorWWMessage(0x34) received
(20:40:16.919) Boiler -> Thermostat, type 0x34 telegram: 88 18 34 08 01 (CRC=49)
<--- UBAMonitorWWMessage(0x34) received
(20:40:16.948) Thermostat -> Boiler, type 0x04 telegram: 98 88 04 05 01 (CRC=6E)
(20:40:16.982) Boiler -> Thermostat, type 0x04 telegram: 88 18 04 05 32 (CRC=A0)
(20:40:17.015) Thermostat -> all, type 0xFF01 telegram: 98 00 F7 00 FF 01 F5 27 0D (CRC=59)
(20:40:17.293) Thermostat -> all, type 0xFF01 telegram: 98 00 F7 00 FF 01 F5 07 0C (CRC=18)
(20:40:17.473) Thermostat -> Boiler, type 0x04 telegram: 98 88 04 0F 01 (CRC=7A)
(20:40:17.480) Boiler -> Thermostat, type 0x04 telegram: 88 18 04 0F (CRC=43)
(20:40:17.498) Thermostat -> Boiler, type 0x04 telegram: 98 88 04 14 01 (CRC=4C)
(20:40:17.511) Boiler -> Thermostat, type 0x04 telegram: 88 18 04 14 (CRC=58)
(20:40:17.530) Thermostat -> Boiler, type 0x25 telegram: 98 88 25 00 01 (CRC=E0)
(20:40:17.543) Boiler -> Thermostat, type 0x25 telegram: 88 18 25 00 (CRC=0E)
(20:40:17.681) Thermostat -> 0x09, type 0x29 telegram: 98 89 29 00 01 (CRC=D8)
(20:40:17.700) 0x09 -> Thermostat, type 0x29 telegram: 89 18 29 00 69 (CRC=55)
(20:40:17.733) Thermostat -> Boiler, type 0x26 telegram: 98 88 26 06 02 (CRC=E3)
(20:40:17.761) Boiler -> Thermostat, type 0x26 telegram: 88 18 26 06 (CRC=0E)
(20:40:17.786) Thermostat -> Boiler, type 0x16 telegram: 98 88 16 00 02 (CRC=2F)
<--- UBAParametersMessage(0x16) received
(20:40:17.795) Boiler -> Thermostat, type 0x16 telegram: 88 18 16 00 FF 42 (CRC=1C)
<--- UBAParametersMessage(0x16) received
(20:40:18.185) Thermostat -> Boiler, type 0x16 telegram: 98 88 16 00 02 (CRC=2F)
<--- UBAParametersMessage(0x16) received
(20:40:18.201) Boiler -> Thermostat, type 0x16 telegram: 88 18 16 00 FF 42 (CRC=1C)
<--- UBAParametersMessage(0x16) received
(20:40:18.229) Thermostat -> all, type 0xFF02 telegram: 98 00 F7 00 FF 02 1D 07 (CRC=CF)
(20:40:18.409) Thermostat -> Boiler, type 0x07 telegram: 98 88 07 00 0E (CRC=67)
(20:40:18.433) Boiler -> Thermostat, type 0x07 telegram: 88 18 07 00 03 00 01 00 00 00 00 00 00 00 00 00 00 00 (CRC=B4), #data=14
(20:40:18.497) Thermostat -> Boiler, type 0x08 telegram: 98 88 08 00 0A (CRC=5F)
(20:40:18.511) Boiler -> Thermostat, type 0x08 telegram: 88 18 08 00 (CRC=54)
(20:40:18.531) Thermostat -> Boiler, type 0x19 telegram: 98 88 19 19 02 (CRC=21)
<--- UBAMonitorSlow(0x19) received
(20:40:18.544) Boiler -> Thermostat, type 0x19 telegram: 88 18 19 19 80 00 (CRC=BC)
<--- UBAMonitorSlow(0x19) received
(20:40:18.572) Thermostat -> Boiler, type 0x34 telegram: 98 88 34 03 02 (CRC=A1)
<--- UBAMonitorWWMessage(0x34) received
(20:40:18.612) Boiler -> Thermostat, type 0x34 telegram: 88 18 34 03 80 00 (CRC=A5)
<--- UBAMonitorWWMessage(0x34) received
(20:40:18.635) Thermostat -> Boiler, type 0x14 telegram: 98 88 14 00 03 (CRC=26)
<--- UBATotalUptimeMessage(0x14) received
(20:40:18.873) Thermostat -> Boiler, type 0x17 telegram: 98 88 17 00 18 (CRC=31)
(20:40:18.886) Boiler -> Thermostat, type 0x17 telegram: 88 18 17 00 (CRC=6A)
(20:40:18.913) Thermostat -> all, type 0x01F5 telegram: 98 00 FF 00 01 F5 01 (CRC=DC)
(20:40:19.097) Thermostat -> Boiler, type 0x19 telegram: 98 88 19 00 1B (CRC=0A)
<--- UBAMonitorSlow(0x19) received
(20:40:19.141) Boiler -> Thermostat, type 0x19 telegram: 88 18 19 00 80 00 80 00 00 EC FF FF 00 00 00 43 AB 01 CA C0 00 00 00 01 A4 7E 00 2A 41 80 00 (CRC=BF), #data
=27
<--- UBAMonitorSlow(0x19) received
(20:40:19.273) Thermostat -> Boiler, type 0x1C telegram: 98 88 1C 06 13 (CRC=1A)
(20:40:19.297) Boiler -> Thermostat, type 0x1C telegram: 88 18 1C 06 00 00 01 CA C0 (CRC=8E)
(20:40:19.319) Thermostat -> Boiler, type 0x16 telegram: 98 88 16 01 01 (CRC=2E)
<--- UBAParametersMessage(0x16) received
(20:40:19.361) Boiler -> Thermostat, type 0x16 telegram: 88 18 16 01 42 (CRC=90)
<--- UBAParametersMessage(0x16) received
(20:40:19.379) Thermostat -> Boiler, type 0x25 telegram: 98 88 25 00 0B (CRC=EA)
(20:40:19.386) Boiler -> Thermostat, type 0x25 telegram: 88 18 25 00 (CRC=0E)
(20:40:19.713) Thermostat -> Boiler, type 0x25 telegram: 98 88 25 00 0B (CRC=EA)
(20:40:19.729) Boiler -> Thermostat, type 0x25 telegram: 88 18 25 00 (CRC=0E)
(20:40:19.747) Thermostat -> Boiler, type 0x26 telegram: 98 88 26 01 07 (CRC=E8)
(20:40:19.760) Boiler -> Thermostat, type 0x26 telegram: 88 18 26 01 (CRC=09)
(20:40:19.779) Thermostat -> Boiler, type 0x27 telegram: 98 88 27 02 0C (CRC=E1)
(20:40:19.791) Boiler -> Thermostat, type 0x27 telegram: 88 18 27 02 (CRC=08)
(20:40:19.811) Thermostat -> 0x09, type 0x29 telegram: 98 89 29 00 01 (CRC=D8)
(20:40:19.824) 0x09 -> Thermostat, type 0x29 telegram: 89 18 29 00 69 (CRC=55)
(20:40:20.274) Thermostat -> Boiler, type 0x2A telegram: 98 88 2A 14 01 (CRC=F4)
(20:40:20.291) Boiler -> Thermostat, type 0x2A telegram: 88 18 2A 14 (CRC=04)
(20:40:20.314) Thermostat -> Boiler, type 0x34 telegram: 98 88 34 00 09 (CRC=AC)
<--- UBAMonitorWWMessage(0x34) received
(20:40:20.333) Boiler -> Thermostat, type 0x34 telegram: 88 18 34 00 37 00 F5 80 00 81 00 00 01 (CRC=09), #data=9
<--- UBAMonitorWWMessage(0x34) received
(20:40:20.598) Thermostat -> all, type 0x01A5 telegram: 98 00 FF 0D 01 A5 00 C9 02 D9 (CRC=7A)
<--- RCPLUSStatusMessage(0x1A5) received
(20:40:22.426) Thermostat -> Boiler, type 0x18 telegram: 98 88 18 23 01 (CRC=52)
<--- UBAMonitorFast(0x18) received
(20:40:22.446) Boiler -> Thermostat, type 0x18 telegram: 88 18 18 23 (CRC=57)
<--- UBAMonitorFast(0x18) received

Is there anything I can try to make Tx work?
What else can I do to help to get my Boiler/Thermostat get fully supported?

cheers,
Philipp

@philrich philrich added the enhancement New feature or request label Apr 25, 2019
@proddy
Copy link
Collaborator

proddy commented Apr 26, 2019

damn, I thought we'd fixed the Tx problem! I assume its all wired up correctly so it can only be a timing issue on the bus itself, which in itself is strange since another user also uses a similar Junkers boiler and it works for him. When the code starts it is supposed to autodetect both the boiler and thermostat models but since Tx is not working this is why you had to manually set them with set.

Could you try
log v
send 0B 98 02 00 20

this sends a read request to your 0x18 boiler for type 0x02 which is the version. So in the log you should see 'Sending....' and hopefully a response back. If not I'm afraid you may need to get a cheap 5 Euro logic analyzer and see what's blocking the transmits. Also worth searching for the guy with the other Junkers and comparing results.

@philrich
Copy link
Author

hi, thanks for the quick response.
i tried your suggestions and this is what i get

log v
System Logging set to Verbose
send 0B 98 02 00 20(00:01:05.895) Thermostat -> all, type 0x01A5 telegram: 98 00 FF 0D 01 A5 01 CD 01 D5 (CRC=68)
<--- RCPLUSStatusMessage(0x1A5) received

queue(00:01:10.434) Thermostat -> all, type 0x06 telegram: 98 00 06 00 13 04 10 1A 04 05 04 01 18 FF 00 (CRC=0F), #data=11
<--- RCTime(0x06) received

Tx queue (10/50)
 [1] action=read dest=0x08 type=0x02 offset=0 length=6 dataValue=32 comparisonValue=0 type_validate=0x00 comparisonPostRead=0x00 @ (00:00:03)
 [2] action=read dest=0x30 type=0x02 offset=0 length=6 dataValue=32 comparisonValue=0 type_validate=0x00 comparisonPostRead=0x00 @ (00:00:03)
 [3] action=read dest=0x18 type=0x02 offset=0 length=6 dataValue=32 comparisonValue=0 type_validate=0x00 comparisonPostRead=0x00 @ (00:00:03)
 [4] action=read dest=0x18 type=0x06 offset=0 length=6 dataValue=32 comparisonValue=0 type_validate=0x00 comparisonPostRead=0x00 @ (00:01:00)
 [5] action=read dest=0x08 type=0x18 offset=0 length=6 dataValue=32 comparisonValue=0 type_validate=0x00 comparisonPostRead=0x00 @ (00:01:00)
 [6] action=read dest=0x08 type=0x19 offset=0 length=6 dataValue=32 comparisonValue=0 type_validate=0x00 comparisonPostRead=0x00 @ (00:01:00)
 [7] action=read dest=0x08 type=0x33 offset=0 length=6 dataValue=32 comparisonValue=0 type_validate=0x00 comparisonPostRead=0x00 @ (00:01:00)
 [8] action=read dest=0x08 type=0x16 offset=0 length=6 dataValue=32 comparisonValue=0 type_validate=0x00 comparisonPostRead=0x00 @ (00:01:00)
 [9] action=read dest=0x08 type=0x14 offset=0 length=6 dataValue=32 comparisonValue=0 type_validate=0x00 comparisonPostRead=0x00 @ (00:01:00)
 [10] action=? dest=0x18 type=0x02 offset=0 length=6 dataValue=0 comparisonValue=0 type_validate=0x00 comparisonPostRead=0x00 @ (00:01:06)
(00:01:12.268) Boiler -> all, type 0x18 telegram: 88 00 18 00 00 00 E2 00 00 00 22 44 C0 00 E1 80 00 80 00 FF FF FF 00 00 00 00 00 00 00 (CRC=7E), #data=25
<--- UBAMonitorFast(0x18) received
(00:01:12.509) Boiler -> all, type 0x34 telegram: 88 00 34 00 37 00 E0 80 00 81 00 00 01 00 00 26 83 00 19 92 00 (CRC=9B), #data=17
<--- UBAMonitorWWMessage(0x34) received
log n
System Logging set to None

This was directly after a reboot of the ems-esp, therefore the short tx queue.

You said, i should see a 'Sending....' in the log but aparently it is not there. and no response either.
Maybe the delay is not right and sometimes works, sometimes not??

I am not really into hardware hacks but if it has to be done then I would try. But I have no idea about this logic analyzer thing .. :-/ I will also search the other Junkers guy ..

Any other Ideas?

@proddy
Copy link
Collaborator

proddy commented Apr 26, 2019

i noticed the "Tx: no signal" in your log which gets displayed after an 'info' command. This means the EMS bus master (boiler) is not sending a poll request to our device (which has a type 0x0B) which in turn is the trigger to send any Tx messages. I recall seeing this issue before and need to look at older issues to see if this is the same conditions. In the meantime you can try the 'startup' command which is not documented and experimental but tries to send commands to the Boiler saying our device is alive

@philrich
Copy link
Author

philrich commented Apr 27, 2019

Unfortunately no response from the Busmaster after startup command. I think you refer to this issue: #39.

I have also tried all send ... commands which you recommended in this issue - to no avail.

Later, i will reboot the Thermostat and attach the log from the boot sequence. you can already see a thermostat boot in the log of the initial issue message. It starts at timestamp '(20:40:13.464)'

@philrich
Copy link
Author

ok, so the boot sequence from the thermostat is this

(00:09:11.720) Thermostat -> Boiler, type 0x07 telegram: 98 88 07 00 0E (CRC=67)
(00:09:11.749) Boiler -> Thermostat, type 0x07 telegram: 88 18 07 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 (CRC=7C), #data=14
(00:09:11.771) Thermostat -> Boiler, type 0xEF telegram: 98 88 EF 00 01 (CRC=E3)
(00:09:11.796) Boiler -> Thermostat, type 0xEF telegram: 88 18 EF 00 (CRC=83)
(00:09:11.843) Thermostat -> Boiler, type 0x02 telegram: 98 88 02 00 0A (CRC=77)
<--- Version(0x02) received
(00:09:11.870) Boiler -> Thermostat, type 0x02 telegram: 88 18 02 00 5F 23 03 00 00 00 00 00 00 00 (CRC=D1), #data=10
<--- Version(0x02) received

i tried to simulate this with

send 8B 88 07 00 0E
send 8B 88 EF 00 01
send 8B 88 02 00 0A

but it didnt work

@philrich
Copy link
Author

so what i don't get: if we need to get polled by the busmaster before we can send something, the above send-commands never get sent because we are not getting polled. right?

i see above send requests in the txqueue which is growing. so if there has to be done some kind of handshake before we get polled there has to be some other way to send to the bus.

@proddy
Copy link
Collaborator

proddy commented Apr 28, 2019

that's correct. Its waiting for the Poll which is single byte of 0x8B which for some reason you're not getting. You could modify the code around line 656 in ems.cpp to print out which polls you are getting?

@philrich
Copy link
Author

philrich commented Apr 28, 2019

i made this:

 653         _last_emsPollFrequency          = EMS_RxTelegram.timestamp;
 654         myDebug("Received 1 Byte: 0x%02X", value);
 655         // check first for a Poll for us

i attached the log which i am getting after this here: ems-log-received1b.txt (made with tmux capture so all control characters like ^M are in there. best view with less -R ..)

i also made a short count of values with this command (grep "Received 1 Byte" ems-log-received1b.txt | sort | uniq -c) here: received1b-count.txt

so, in many of these single byte telegrams the 7th bit is not set. also, there seems to be a clear pattern in the frequency of the single byte telegrams as seen in the second file i uploaded.
it would be interesting to compare the log i made with maybe your own system to see the differences.

does this make any sense? any ideas?
( i just started reading the ems-wiki to get some knowledge of the ems protocol.)

@proddy
Copy link
Collaborator

proddy commented Apr 28, 2019

those logs helped. What's interesting is a few of these telegrams like

Received 1 Byte: 0x18
(00:05:28.075) Thermostat -> all, type 0x06 telegram: 98 00 06 00 13 04 12 1C 1F 23 06 01 18 FF 00 (CRC=04), #data=11
<--- RCTime(0x06) received
Received 1 Byte: 0x98

shows the Poll for the thermostat (type 0x18) doesn't have the MSB set, and also replies with 0x98. This is the opposite to how it's implemented now. You could try and remove the mod from (EMS_ID_ME | 0x80) and see if that helps

@philrich
Copy link
Author

i will try this as soon as i am back in vienna (attending a conference in munich at the moment). i want to be physically there just in case something odd happens .. i'll report back no later than wednesday.

@sadrov
Copy link

sadrov commented Apr 28, 2019

Hi @philrich, I'm also using this with a junkers cerapur boiler and in the info I see more than what you see, on the other hand i can't get my thermostat to be recognized. And I also have the same Tx issue, I can't send commands.
I wish I had the knowledge to contribute to this investigation but for now I can just follow and hope you'll get it working.
Anyhow many thanks for all the contributors spending a lot of time on this and especially Proddy for the always quick replies!

@philrich
Copy link
Author

@proddy, i tried your suggestions.
first, i rebooted the thermostat with the 1-byte debug code in:

Received 1 Byte: 0x13
Received 1 Byte: 0x14
Received 1 Byte: 0x15
Received 1 Byte: 0x16
Received 1 Byte: 0x17
Received 1 Byte: 0x18
(00:00:30.341) Thermostat -> Boiler, type 0x07 telegram: 98 88 07 00 0E (CRC=67)
(00:00:30.373) Boiler -> Thermostat, type 0x07 telegram: 88 18 07 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 (CRC=7C), #data=14
(00:00:30.400) Thermostat -> Boiler, type 0xEF telegram: 98 88 EF 00 01 (CRC=E3)
(00:00:30.420) Boiler -> Thermostat, type 0xEF telegram: 88 18 EF 00 (CRC=83)
(00:00:30.464) Thermostat -> Boiler, type 0x02 telegram: 98 88 02 00 0A (CRC=77)
<--- Version(0x02) received
(00:00:30.500) Boiler -> Thermostat, type 0x02 telegram: 88 18 02 00 5F 23 03 00 00 00 00 00 00 00 (CRC=D1), #data=10
<--- Version(0x02) received
Boiler found. Model Bosch Condens 2500/Junkers Cerapur Comfort (DeviceID:0x08 ProductID:95 Version:35.03)
* Setting Boiler to model Bosch Condens 2500/Junkers Cerapur Comfort (DeviceID:0x08 ProductID:95 Version:35.03)
Requesting type UBAMonitorFast(0x18) from dest 0x08
Requesting type UBAMonitorSlow(0x19) from dest 0x08
Requesting type UBAParameterWW(0x33) from dest 0x08
Requesting type UBAParametersMessage(0x16) from dest 0x08
Requesting type UBATotalUptimeMessage(0x14) from dest 0x08
Received 1 Byte: 0x98
Received 1 Byte: 0x18
Received 1 Byte: 0x98
(00:00:30.655) Boiler -> all, type 0x07 telegram: 88 00 07 00 03 00 01 00 00 00 00 00 00 00 00 00 00 00 00 (CRC=6F), #data=15
Received 1 Byte: 0x20
Received 1 Byte: 0x28
Received 1 Byte: 0x18

at 00:00:30.341 the thermostat starts sending after receiving a "poll" request without MSB set. so it seems junkers boilers don't always set MSB to poll!?

following is a list of 1-byte telegrams which get received over and over again:
0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x20 0x21 0x28 0x29 0x30 0x31 0x36 0x38 0x39 0x3E 0x3F 0x40 0x41 0x46 0x47 0x48 0x49 0x4E 0x4F 0x50 0x51 0x56 0x57 0x58 0x59 0x5E 0x5F 0x60 0x61 0x66 0x67 0x68 0x69 0x6E 0x6F

so i changed the code in ems.cpp as follows:

        // check first for a Poll for us
        //if (value == (EMS_ID_ME | 0x80)) {
        if ((value & 0x7F) == EMS_ID_ME) {
            myDebug("Received poll request for us: 0x%02X", value);

unfortunately it is not working. i see log messages about "Sending raw telegrams", sometimes followed by CRC errors:

Received poll request for us: 0x0B
(00:02:38.165) Sending read of type 0x16 to 0x08: telegram: 0B 88 16 00 20 EC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 D5 69 02
00 68 ED FF 3F 0
(00:02:38.192) Corrupt telegram: telegram: 0B 88 16 00 (CRC=EC)
(00:02:38.531) Thermostat -> Boiler, type 0x35 telegram: 98 08 35 00 11 01 (CRC=B0)
Received poll request for us: 0x0B
(00:02:39.727) Sending read of type 0x14 to 0x08: telegram: 0B 88 14 00 20 E4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 EF 6F 02
00 68 ED FF 3F 0
(00:02:39.753) Corrupt telegram: telegram: 0B 88 14 00 (CRC=E4)
Received poll request for us: 0x0B

i think the telegrams are much too long.

when i try to send 8B 88 02 00 0A i get

(00:28:54.225) Sending raw telegram: 8B 88 02 00 0A 5E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51 76 1A 00 6
8 ED FF 3F 06 00 00 00 00 C2 FF 3F
(00:28:54.251) Corrupt telegram: telegram: 8B 88 02 00 (CRC=5E)

or

(00:29:01.002) Sending raw telegram: 8B 88 02 00 0A 5E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 CA 90 1A 00 6
8 ED FF 3F 06 00 00 00 00 C2 FF 3F
(00:29:01.029) Corrupt telegram: telegram: 8B 88 02 00 (CRC=5E)

i tried with set tx_delay on and set tx_delay off

@proddy
Copy link
Collaborator

proddy commented May 1, 2019

there was a bug in how the telegrams were printed in raw mode which I just fixed. But it shouldn't have changed the behavior but anyway please try again

@philrich
Copy link
Author

philrich commented May 1, 2019

hmm. that did not do the trick.
log messages look fine now but i get no response to any command i send.
with set tx_delay on i see corrupt telegrams like this:

Received poll request for us: 0x0B
(10:00:31.370) Sending read of type 0x16 to 0x08: telegram: 0B 88 16 00 20 (CRC=EC)
(10:00:31.385) Corrupt telegram: telegram: 0B 88 16 00 (CRC=EC)
Received poll request for us: 0x0B
(10:00:40.646) Sending read of type 0x14 to 0x08: telegram: 0B 88 14 00 20 (CRC=E4)
(10:00:40.661) Corrupt telegram: telegram: 0B 88 14 00 (CRC=E4)
Received poll request for us: 0x0B

so it looks like the last byte got lost.
but i get no answer of the boiler. i even modified the startup command to include the telegrams the thermostat sends on boot, like this:

Sending startup sequence...
Received poll request for us: 0x0B
(10:10:53.987) Sending raw telegram: 0B 08 1D 00 00 (CRC=84)
Received poll request for us: 0x0B
(10:10:55.461) Sending raw telegram: 0B 88 01 00 1B (CRC=8B)
Received poll request for us: 0x0B
(10:10:56.960) Sending raw telegram: 0B 88 07 00 0E (CRC=86)
Received poll request for us: 0x0B
(10:10:58.484) Sending raw telegram: 0B 88 EF 00 01 (CRC=02)

(also tried with 0x8B as src). again, no response.

any other ideas?

i looked at all other junkers issues and as far as i can tell no one has gotten tx to work. i would really like to get this working as my original intention was to implement some kind of smart thermostat (maybe even with zigbee? controlled radiator thermostats).

(there exists a german company named tado. they sell a smart thermostat which is able to speak ems with junkers boilers but controlling the boiler is done in "the cloud" and i don't like this. i even thought about getting this, sniffing with ems-esp, and then return the thing, but okay, maybe we can solve the puzzle..)

@proddy
Copy link
Collaborator

proddy commented May 1, 2019

if after every manually send it's missing the last byte then it could be something to do with the uart timing and how the BRK signal is sent. However a strange thing I see in your examples, like:

(10:00:31.385) Corrupt telegram: telegram: 0B 88 16 00 (CRC=EC)

is that the CRC byte is correct so it's sending through 0B 88 16 00 EC instead of 0B 88 16 00 20 EC

If you had a 7 EUR logical analyzer you could hook up to the Rx and Tx lines on the board and you'll find out exactly what is happening.

@philrich
Copy link
Author

philrich commented May 1, 2019

hmm. okay, will order a logic analyzer. do you have any recommendations or should i buy the first hit on amazon?

i get the corrupt telegrams only if i turn on tx_delay. with tx_delay turned off, no errors reported - and no response from busmaster either.

@proddy
Copy link
Collaborator

proddy commented May 1, 2019

something cheap like I mentioned in #23 (comment)

@philrich
Copy link
Author

philrich commented May 2, 2019

i ordered a cheap logic analyzer from amazon, 'cause aliexpress shipping times are too long for me.
in the meantime i tried to change EMS_ID_ME to 0x18 (my Thermostat), just to check if i get then a response. But nada. So i will wait for the analyzer.

I also saw the other issue #104 with the link to the Heatronic implementation. very interesting! maybe there are some hints regarding timing? have to look at it when i get the time.
if i can help anyhow this would be cool. I am austrian so if you have any questions regarding translation of german words, i should be able to help. some coding should be possible too (have written only python recently but used to write some c-code)

@proddy
Copy link
Collaborator

proddy commented May 5, 2019

I don't think that other Heatronic project does sending of telegrams?

@philrich
Copy link
Author

philrich commented May 6, 2019

Here (https://www.mikrocontroller.net/topic/317004#3925213) the author talks about the different hardware. At least ht_piduino and ht_pitiny are able to send telegrams. On the software side ht_transceiver is meant to implement the sending part. This message is from 2014, in the meantime i think ht_transceiver.py is the replacement. In the directory /HT3/docu/HT3_Adaption.pdf you can find documentation for this (page 44ff).

FYI: this project identifies as 0x0d on the bus (Modem).

The logic analyzer arrived today so i hope i can provide some findings soon.

@proddy
Copy link
Collaborator

proddy commented May 6, 2019

yes you're right. The circuit does have a Tx part and the code in his ht_proxy_if.py gives examples of how the data is sent. It looks its using 0x23 as the device ID and not 0x0B. Also quickly scanning his code I think this Heatronics uses a completely different schema to EMS+. I'd like to be abale to handle both the Bosch EMS2.0 and Heatronics formats based on which version. The tricky part if finding the right command to query the bus to determine if its Bosch or Junkers.

@philrich
Copy link
Author

philrich commented May 6, 2019

ok, here are the first logic analyzer captures.

this is with set tx_delay off:
Bildschirmfoto 2019-05-06 um 23 27 27
so no response.

following a capture with set tx_delay on (sorry for swapping rx/tx rows):
Bildschirmfoto 2019-05-07 um 00 56 39
which is interpreted like this:
Bildschirmfoto 2019-05-07 um 00 57 49

what is interesting:

  • i see the last telegram byte (0x20) in RX capture but in debug output its missing. maybe some kind of timing issue?
  • see markers A/B: first response from busmaster is a bit slower. RX not finished when TX starts. could this be a problem?
  • at marker C: it says "Frame Error" but i don't know exactly what that means.

just to try something out i set the tx delay to 2500 but that didn't change anything (corrupt telegrams, no answer).

@proddy
Copy link
Collaborator

proddy commented May 7, 2019 via email

@proddy
Copy link
Collaborator

proddy commented May 7, 2019

it looks like the send is sending an extra 0x00 before the break. After the crc checksum value D4 it should show the break immediately. We actually want frame-errors as the is 11-bits and longer than the 8N1 package. I checked the code and can't see how this can happen. Do you have tx_delay on?

@philrich
Copy link
Author

philrich commented May 7, 2019

yes, the second capture is done with set tx_delay on. the second capture in this comment -> #23 (comment) looks similar to mine.

@moustic999
Copy link

yes you're right. The circuit does have a Tx part and the code in his ht_proxy_if.py gives examples of how the data is sent. It looks its using 0x23 as the device ID and not 0x0B. Also quickly scanning his code I think this Heatronics uses a completely different schema to EMS+. I'd like to be abale to handle both the Bosch EMS2.0 and Heatronics formats based on which version. The tricky part if finding the right command to query the bus to determine if its Bosch or Junkers.

I don't think it is needed to determine if it is Junkers of Bosch. Even if the the bus is the same, message exchanged between devices is different depending on brand.
This is most probably a strategy to avoid mixing brand. You could connect Junkers on Buderus, these are EMS, but it will not work because message are not same.

emitter and receiver must know each others how to talk. it is hardcoded in them.

implementation wise, each Brand/device type will need specific processing.
for each one, we must find what are message type and how the message is formatted.

@proddy
Copy link
Collaborator

proddy commented Oct 3, 2019

We need to find out why the Tx is failing. Could you

log v
autodetect quick

and capture the logs into a file and attach it.

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 3, 2019

Here is the autodetect quick log :
autodetect-quick-junkers-201910031915.log

@proddy
Copy link
Collaborator

proddy commented Oct 4, 2019

from the logs, I see none of the telegram messages are being sent, which is strange because it worked in 1.9.0 also with the same tx_mode setting of 3. Is that correct?

The command send 8B 08 02 00 20 should work. It just asks the boiler to return the version information. In the latest 1.9.1 dev build can you try this with verbose logging and see if it returns any corrupted messages?

If not I need to take a close look at what's changed with 1.9.0 and double-check with other Junker users to see if they experience the same problem.

@m1588
Copy link

m1588 commented Oct 4, 2019

I have the same behaviour as Neonox31 with by HT3 bosch 2500 with the 1.9.1b11 build.
tx_mode=3

Tx: no signal
These device IDs are on the EMS Bus: 0x08 0x09 0x18
No devices recognized. This could be because Tx is disabled or failing.

Sending above command seems to not have an effect:

send 8B 08 02 00 20

(00:01:58.234) Sending raw: 8B 08 02 00 20 (CRC=10)
(00:02:02.855) 0x18 -> 0x08, type 0x23, telegram: 98 08 23 00 26 FF 00 (CRC=39) #data=3
(00:02:05.393) 0x08 -> all, type 0x18, telegram: 88 00 18 00 21 01 4A 46 23 09 23 25 C0 80 00 80 00 80 00 FF FF FF 00 00 00 00 00 02 18 (CRC=4D) #data=25
<--- UBAMonitorFast(0x18)
(00:02:05.633) 0x08 -> all, type 0x34, telegram: 88 00 34 00 2F 01 E4 01 E4 A1 00 00 03 00 00 53 F2 00 08 8C 00 (CRC=48) #data=17
<--- UBAMonitorWWMessage(0x34)


@proddy
Copy link
Collaborator

proddy commented Oct 4, 2019

same issue as #98 - 1.9.1 is not detecting Junkers correctly.

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 4, 2019

I think I found the problem, the autodetect sends 8B 10 02 00 20 frame instead 8B 90 02 00 20 for the 0x10 device id. Pay attention to the second byte which is the telegram dest I think.

If I use the send 8B 90 02 00 20 command, the thermostat replies to the service key :

(00:04:16.136) Sending raw: 8B 90 02 00 20 (CRC=B4)
(00:04:16.192) 0x10 -> me, type 0x02, telegram: 90 0B 02 00 C0 35 02 00 00 00 00 00 00 00 (CRC=F8) #data=10
<--- Version(0x02)
EMS Device recognized as Thermostat: Junkers FW120 (DeviceID:0x10 ProductID:192 Version:53.02)

I have to check the code to understand why.

@proddy
Copy link
Collaborator

proddy commented Oct 4, 2019

Exactly! That was what I was thinking too but hadn’t had time to look at the code. With the latest build does ‘autodetect’ show anything?

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 4, 2019

With 1.9.1b11 same behavior is observed :

(00:00:14.154) Sending read of type 0x02 to 0x10, telegram: 8B 10 02 00 20 (CRC=D0)

Here is the log of autodetect command : autodetect-201910041905.log

@proddy
Copy link
Collaborator

proddy commented Oct 4, 2019

for Junkers, when sending a read request the Source has the MSB (8th bit set) and the destination has also the 8th bit set since its a read command. So to find out details of the boiler you would send 8B 88 02 00 20 . Does this work with you?

@proddy
Copy link
Collaborator

proddy commented Oct 4, 2019

also @Neonox31 I forgot to ask. When you do info does it show the protocol as Junkers?

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 4, 2019

Yes it works :

(01:05:09.321) Sending raw: 8B 88 02 00 20 (CRC=74)
(01:05:09.368) 0x08 -> me, type 0x02, telegram: 88 0B 02 00 5F 0A 0B 00 00 00 00 00 00 00 (CRC=B5) #data=10
<--- Version(0x02)
EMS Device recognized as Boiler: Bosch Condens 2500/Junkers Heatronic 3 (DeviceID:0x08 ProductID:95 Version:10.11)

And the protocol is correct :

EMS Bus stats:
  Bus is connected, protocol: Junkers HT3
  Rx: # successful read requests=0, # CRC errors=0
  Tx: no signal

Here is the detailled log : autodetect_20191004_201157.log

@proddy
Copy link
Collaborator

proddy commented Oct 4, 2019

ok then, so autodetect doesn't work. if so I think I know where the problem is

@Vuego123
Copy link
Contributor

Vuego123 commented Oct 4, 2019

Same issue here: a Junkers installation that worked fine for 2-3 months on v1.8.X. Since my upgrade to 1.9.1b11, I'm having the same issue. My components: FW100 thermostat, ISM1 solar module and heatronic boiler.

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

EMS Bus stats:
Bus is connected, protocol: Junkers HT3
Rx: # successful read requests=0, # CRC errors=0
Tx: no signal

Let me know if I can help debugging / testing.

@proddy
Copy link
Collaborator

proddy commented Oct 5, 2019

what does send 8B 88 02 00 20 show with logging on?

@Vuego123
Copy link
Contributor

Vuego123 commented Oct 5, 2019

Connected to: EMS-ESP version 1.9.1b11

send 8B 88 02 00 20

(01:31:51.477) Sending raw: 8B 88 02 00 20 (CRC=74) #data=1
(01:31:51.518) 0x08 -> me, type 0x02, telegram: 88 0B 02 00 5F 17 00 00 00 00 00 00 00 00 (CRC=74) #data=10
<--- Version(0x02)
EMS Device recognized as Boiler: Bosch Condens 2500/Junkers Heatronic 3 (DeviceID:0x08 ProductID:95 Version:23.00)
Requesting type UBAMonitorFast(0x18) from dest 0x08
Requesting type UBAMonitorSlow(0x19) from dest 0x08
Requesting type UBAParameterWW(0x33) from dest 0x08
Requesting type UBAParametersMessage(0x16) from dest 0x08
Requesting type UBATotalUptimeMessage(0x14) from dest 0x08
(01:31:52.717) SM -> all, type 0x0003, telegram: B0 00 FF 00 00 03 0B 0B 01 49 01 38 00 EB 01 00 00 F2 D8 (CRC=91) #data=13
<--- ISM1StatusMessage(0x03)
(01:31:53.372) Sending read of type 0x18 to 0x08, telegram: 8B 08 18 00 20 (CRC=78)
(01:31:53.434) Sending read of type 0x19 to 0x08, telegram: 8B 08 19 00 20 (CRC=7C)
(01:31:53.518) Boiler -> all, type 0x07, telegram: 88 00 07 00 0B 01 00 00 00 01 00 00 00 00 00 00 00 00 00 (CRC=6F) #data=15
<--- UBADevices(0x07)
(01:31:53.870) Sending read of type 0x33 to 0x08, telegram: 8B 08 33 00 20 (CRC=D4)
(01:31:53.938) Boiler -> all, type 0x33, telegram: 88 00 33 02 32 (CRC=B2) #data=1
<--- UBAParameterWW(0x33)
(01:31:54.306) Sending read of type 0x16 to 0x08, telegram: 8B 08 16 00 20 (CRC=40)
(01:31:54.418) Boiler -> all, type 0x16, telegram: 88 00 16 00 FF 2B 64 00 00 F6 03 01 03 64 0A 04 (CRC=F2) #data=12
<--- UBAParametersMessage(0x16)
(01:31:54.651) Boiler -> all, type 0x18, telegram: 88 00 18 00 23 01 7E 64 00 01 03 00 C0 80 00 80 00 80 00 FF FF FF 00 00 00 00 00 00 00 (CRC=A8) #data=25
<--- UBAMonitorFast(0x18)
(01:31:54.873) Boiler -> all, type 0x34, telegram: 88 00 34 08 00 (CRC=88) #data=1
<--- UBAMonitorWWMessage(0x34)
(01:31:55.179) Sending read of type 0x14 to 0x08, telegram: 8B 08 14 00 20 (CRC=48)
(01:31:55.854) Boiler -> all, type 0x07, telegram: 88 00 07 00 03 01 00 00 00 01 00 00 00 00 00 00 00 00 00 (CRC=DF) #data=15
<--- UBADevices(0x07)

@Vuego123
Copy link
Contributor

Vuego123 commented Oct 5, 2019

So it detected the Junkers heatronic boiler, but it still says TX: no signal. No other devices were detected (Thermostat and Solar Module).

@proddy
Copy link
Collaborator

proddy commented Oct 5, 2019 via email

@proddy
Copy link
Collaborator

proddy commented Oct 5, 2019

closing, if there are bugs please re-open or create a new issue.

@proddy proddy closed this as completed Oct 5, 2019
@Vuego123
Copy link
Contributor

Vuego123 commented Oct 5, 2019

I deployed 1.9.2b1 but the issue is not resolved. I don't see any difference.

@proddy proddy reopened this Oct 5, 2019
@rskallies
Copy link

rskallies commented Oct 5, 2019

Running self compiled 1.9.2b1 and finally TX is working again with tx_mode 3 the first time after 1.8.3. All devices are detected fine.

EMS Bus stats:
Bus is connected, protocol: Junkers HT3
Rx: # successful read requests=18, # CRC errors=0
Tx: Last poll=2.600 seconds ago, # successful write requests=0

Boiler stats:
Boiler: Buderus GBx72/Nefit Trendline/Junkers Cerapur (ProductID:123 Version:06.03)

Thermostat: Bosch EasyControl CT200 (ProductID:203 Version:02.06)
Heating Circuit 1

@proddy Thank you for fixing this!

@proddy
Copy link
Collaborator

proddy commented Oct 5, 2019

phew! that was a hard bug to find. thanks for being patient.

@proddy proddy closed this as completed Oct 5, 2019
@Vuego123
Copy link
Contributor

Vuego123 commented Oct 5, 2019

My bad, config issue. It is working here as well. Thank you for the bugfix!

@fwPunsher
Copy link

Sorry If I maybe missed ome obvious documentation. But I am confused whether the CW 100 is supported now. And if it is, are all operations possible? Especially setting the temperature?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests