Otgw and Remeha tzerra ace with etwist thermostat

This Forum is about the Opentherm gateway (OTG) from Schelte

Moderator: hvxl

Otgw and Remeha tzerra ace with etwist thermostat

Postby Willem » Sat May 16, 2020 4:38 pm

The Remeha Tzerra Ace boiler has what they call an R-bus. This bus should be capable, according to the documentation, of running the OT protocol as well as some kind of specific Remeha protocol. The E-twist thermostat should also be able to talk Opentherm.
I have the Nodo shop opentherm gateway running and connected via Wifi to Openhab with the OpenTherm gateway binding installed, so far so good everything comes online as it should.
At the gateway side things are a bit more problematic. With only the thermostat connected and the reference set to 1.25V I am only seeing error 3 messages in the terminal and the thermostat does not connect.
When 1 set the reference to voltage to 0.625V (0) the error 3 message disappears and the thermostat keeps connecting disconnecting.
I am running version 4.2.5 firmwater.
I hooked up a scope to the Ot bus and that seems to look fine I have a base line of 6 volt and on that I have 10 volt pulses.
The thermostat sends out first 9 bits then a 6mSec pause followed by 18 bits this is then repeated every 500 mSec.

With nothing connected the gateway is sending out the following messages:
17:10:38.761797 R00000000 Read-Data Status: 00000000 00000000
- CH enable: disabled (0)
- DHW enable: disabled (0)
- Cooling enable: disabled (0)
- OTC active: not active (0)
- CH2 enable: disabled (0)
- Summer/winter mode: winter (0)
- DHW blocking: unblocked (0)
I found nothing on-line about connecting the Tzerra ace (new version of the Tzerra plus) with Etwist to the openhab gateway so I might be the first to try this.
I am a bit stuck at this moment and was hoping that somebody could help me forward.
Kind regards Willem
Starting Member
Starting Member
Posts: 2
Joined: May 2020

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby Willem » Sat May 16, 2020 11:38 pm

Had a better look at what the thermostat was sending out:
First it sends out 10 bits with a cycle time of 2 msecs if these are manchester coded then it would read 1111.1111.11
After this there is a 6msec wait followed by what looks like a manchester coded opentherm message with 34 bits of exactly 1msec:
The above is repeated every 500mSec.

The terminal program shows only error 03 messages with very rarely the following messages in between the errors:
23:46:39.651051 T9002000B Write-Data Master configuration: 00000000 11
- Smart power: not supported (0)
Starting Member
Starting Member
Posts: 2
Joined: May 2020

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby hvxl » Sun May 17, 2020 9:47 am

The first 10 bits clearly do not match OpenTherm timings. This is why the OTGW reports error 03. The next issue is that the thermostat then only waits 6 ms before sending the OpenTherm message. The OpenTherm spec requires an interval of 20 to 400 ms between the message from the master and the response from the slave. So an idle time of 6 ms is much shorter than expected. Currently the OTGW wants to see the line idle for at least 10 ms before it looks for a new OpenTherm message. As a result, the actual OpenTherm message from the thermostat is considered to still be part of the garbage. Apparently sometimes the gap is just long enough and the OTGW manages to find an occasional message.

Dialing the reference voltage all the way down to 0.625V stops the error messages because then the OTGW doesn't detect any changes on the line anymore (the line voltage always stays above the threshold).

You can recompile the gateway firmware with a shorter idle time requirement. How that works is clearly documented in the sources. Look for the line "constant PRELOADT0=100". Change that to "constant PRELOADT0=178" to use a 5 ms idle timer. (PRELOADT0 is the start value for timer 0, which counts up to 256. So, to halve the time, you have to halve the difference between PRELOADT0 and 256.)
Senior Member
Senior Member
Posts: 1424
Joined: June 2010

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby dimplou » Wed Nov 25, 2020 1:54 pm

Unfortunately changing PRELOADT0 to 178 does not help for my setup. I'm getting the Error 03 about every second. In monitor mode (as well as in gateway mode) the display of the eTwist doesn't turn on. Is there a way to directly pass through the OT signal to see if without any software the setup is working?

With the diagnose firmware I get this results:
Code: Select all
Enter test number: 2

Code: Select all
Enter test number: 5
Thermostat: 0.66, 1.89
Boiler: 0.00
Reference: 1.21
Starting Member
Starting Member
Posts: 5
Joined: November 2020

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby hvxl » Wed Nov 25, 2020 11:06 pm

You clearly need the PRELOADT0 modification, and you should have seen a change. With the original value you would only get Error 03. After changing PRELOADT0 to 178 you should see both Error 03 and T9002000B.

But there is another problem. Both in monitor mode and with the diagnostic firmware, the OTGW does directly pass through the OT signal, incorrect timings and all. However, no response appears on the boiler interface, as can be seen from your test #5. On the boiler interface only 0V is measured. So most likely there is an issue on the boiler interface. Either the signal doesn't get out, or the response is not detected. While you have the diagnostic firmware loaded, you can run test #4 (with the OTGW interfaces looped). You can also check the Opentherm interfaces as described in the troubleshooting instructions.
Senior Member
Senior Member
Posts: 1424
Joined: June 2010

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby dimplou » Fri Nov 27, 2020 10:38 am

I removed IC1 and connected X1 to X2.
When I connect IC1 pin 2 to pin 14 (VCC), the voltage on X2 changes and IC1 pin 17 changes.
When I connect IC1 pin 3 to pin 5 (GND), the current on X1 changes from 20,2 mA to 6,1 mA. IC1 pin 18 however stays all the time to 0,0V.
The connection to the thermostat is fully working. OTGW can send messages to the boiler, but can't receive messages from the boiler anymore. This problem occurs since yesterday.

The optocoupler is fine. Do you have some advice how to find out what is wrong?
Starting Member
Starting Member
Posts: 5
Joined: November 2020

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby hvxl » Sat Nov 28, 2020 10:50 am

Something seems to be wrong with the boiler interface of your OTGW. With X1 still connected to X2 (IC1 pin 3 not grounded), measure the voltages across D9, R2, and R3. Expected values are something like: D9: 4.7V, R2: 1.1V, R3: 3.6V.

How did you establish that the optocoupler is fine?
Senior Member
Senior Member
Posts: 1424
Joined: June 2010

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby dimplou » Sat Nov 28, 2020 5:41 pm

I reasoned that either Q1 or D9 should be the cause of the problems, since the problem was in the receiving part of the boiler interface. I replaced Q1 with a new one and the interface is working fine again.

Then I flashed the customized firmware, connected X1 to the eTwist and did not connect the boiler. Result is Error 03's again, and not the T9002000B.
I realised I have a 18V transformer in stead of a 15V one. Could that be a problem?
Starting Member
Starting Member
Posts: 5
Joined: November 2020

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby hvxl » Sat Nov 28, 2020 11:21 pm

The higher transformer voltage might be what blew your Q1 when you connected X1 to X2. An 18V transformer will provide 18V under its nominal load. But when not fully loaded, it produces a higher voltage. Suppose it puts out 23V AC. After rectifying and smoothing, that results in a DC voltage above 30V, the absolute maximum Vceo for a BC548. Now there is some other circuitry in between, so I would still not expect Q1 to have to deal with a voltage above its maximum rating, but you may be getting close. However, the higher voltage has no effect on the timing of the code in the PIC.

Looking at the timings you provided earlier:

The first 921 µs high level will immediately produce the Error 03, because a valid OT signal must always start with a high level of half a bit length (between 400 and 650 µs). After the OTGW detects an error, it waits for the line to be idle for some amount of time before it will try to match an OT signal again. By default this is 10ms. The data following the 6674 µs low level is a proper OT message 9002000B. So, if you correctly reduced the idle timer to 5ms, the OT message should have been detected.
Senior Member
Senior Member
Posts: 1424
Joined: June 2010

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby dimplou » Sun Nov 29, 2020 5:58 pm

I changed line 190 in gateway.asm from
Code: Select all
      constant PRELOADT0=100

Code: Select all
      constant PRELOADT0=178

The output results in almost the same firmware as 4.2.5 gateway.hex. Only line 185 changes from
Code: Select all

Code: Select all

The resulting gateway.hex can be found as attachment. I'm 100% sure that firmware is running on the OTGW.

Today I found the T9002000B in the log, directly after connecting the thermostat:
Code: Select all
17:23:57.955971  Thermostat connected
17:24:00.957499  Error 03
17:24:04.077589  Error 03
17:24:04.166622  T9002000B  Write-Data  Master configuration: 00000000 11
17:24:04.618150  Error 03
17:24:05.127118  Error 03
17:24:05.653598  Error 03
17:24:05.925314  Thermostat disconnected
17:24:06.755402  R00000000  Read-Data   Status: 00000000 00000000
17:24:07.546045  Thermostat connected
17:24:10.617758  Error 03
17:24:10.651716  T9002000B  Write-Data  Master configuration: 00000000 11
17:24:11.178268  Error 03
17:24:11.657068  Error 03
17:24:12.163612  Error 03
17:24:12.677593  Error 03
17:24:13.182861  Error 03
17:24:13.678445  Error 03
17:24:14.210833  Error 03
17:24:14.702331  Error 03
17:24:15.196309  Error 03
17:24:15.707923  Error 03
17:24:16.223229  Error 03
17:24:16.718322  Error 03
17:24:17.272303  Error 03
17:24:17.491768  Thermostat disconnected
17:24:18.431856  R00000000  Read-Data   Status: 00000000 00000000
17:24:18.878664  Thermostat connected
17:24:21.890070  Error 03
17:24:21.934223  T9002000B  Write-Data  Master configuration: 00000000 11
17:24:22.450623  Error 03
17:24:22.933456  Error 03
17:24:23.442339  Error 03
17:24:23.953955  Error 03
17:24:24.454074  Error 03
17:24:24.971875  Error 03
17:24:25.463319  Error 03
17:24:25.994969  Error 03
17:24:26.510293  Error 03
17:24:26.970879  Thermostat disconnected
17:24:27.887085  R00000000  Read-Data   Status: 00000000 00000000
17:24:28.894887  R00000000  Read-Data   Status: 00000000 00000000
17:24:29.885487  R00000000  Read-Data   Status: 00000000 00000000
17:24:30.869626  R00000000  Read-Data   Status: 00000000 00000000
17:24:31.683674  Thermostat connected
17:24:34.691185  Error 03
17:24:34.727720  T9002000B  Write-Data  Master configuration: 00000000 11
17:24:35.230482  Error 03
17:24:35.740873  Error 03
17:24:36.238491  Error 03
17:24:36.758749  Error 03
17:24:37.280206  Error 03
17:24:37.827096  Error 03

The Error 03's continue if I leave the connection to the thermostat intact.

A bit longer log from the diagnosis firmware:
Code: Select all
Opentherm gateway diagnostics - Version 1.1

1. LED test
2. Bit timing thermostat
3. Bit timing boiler
4. Delay symmetry
5. Voltage levels
6. Idle times

Enter test number: 2

And the log when I start without a thermostat connection and connect the thermostat after a few seconds:
Code: Select all
Enter test number: 2
(8.79 KiB) Downloaded 29 times
Starting Member
Starting Member
Posts: 5
Joined: November 2020

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby hvxl » Fri Dec 11, 2020 12:30 am

I created an scl file from the timings you reported. Running that through the simulator, I also see only Error 03. Closer inspection revealed that my expectation that the initial pulse of around 912 µs would cause an error was incorrect. The first signal that the OTGW doesn't like is the 6600 µs gap between the rubbish and the actual Opentherm signal.

By the time the firmware concludes that the gap duration exceeds a valid Opentherm bit, 2ms have already passed. So only 4.5 ms of idle time remains by the time timer T0 is started. This explains why the workaround to reduce the timer to 5ms doesn't work for you, except on very rare occasions. You will have to reduce the idle line detection time even further. To make it 4 ms, set PRELOADT0 to 194. If that still misses too many messages, set PRELOADT0 to 201, for 3.5 ms.
Simulator stimulus file
(3.46 KiB) Downloaded 25 times
Senior Member
Senior Member
Posts: 1424
Joined: June 2010

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby dimplou » Wed Dec 16, 2020 6:48 pm

Thanks for the analysis!

Unfortunately with the new firmware (PRELOADT0=201) and the eTwist my OTGW broke again. I'm afraid the thermostat asks the boiler for a bigger current/voltage the OTGW can handle. This is the log with the (last) communication:
Code: Select all
05:37:53.662526  Error 03
05:37:53.691515  T9002000B  Write-Data  Master configuration: 00000000 11
05:37:54.156821  Error 03
05:37:54.199709  T9002000B  Write-Data  Master configuration: 00000000 11
05:37:54.670997  Error 03
05:37:54.703824  T9002000B  Write-Data  Master configuration: 00000000 11
05:37:54.805242  B5002000B  Write-Ack   Master configuration: 00000000 11
05:37:55.166802  Error 03
05:37:55.212233  T80870B00  Read-Data   Message ID 135: 2816
05:37:55.311015  BE0870B00  Data-Inv    Message ID 135: 2816
05:37:58.387838  Error 03
05:37:58.428135  T9002000B  Write-Data  Master configuration: 00000000 11
05:37:58.518367  B5002000B  Write-Ack   Master configuration: 00000000 11
05:37:58.702158  Error 03
05:37:58.743448  T80870B00  Read-Data   Message ID 135: 2816
05:37:58.906282  BE0870B00  Data-Inv    Message ID 135: 2816
05:38:01.987844  Error 03
05:38:02.029229  T9002000B  Write-Data  Master configuration: 00000000 11
05:38:02.115765  B5002000B  Write-Ack   Master configuration: 00000000 11
05:38:02.238481  Error 03
05:38:02.278962  T80870B00  Read-Data   Message ID 135: 2816
05:38:02.404192  B4087000B  Read-Ack    Message ID 135: 11
05:38:05.490665  Error 03
05:38:05.533388  T9002000B  Write-Data  Master configuration: 00000000 11
05:38:05.787525  Error 03
05:38:06.020407  T9002000B  Write-Data  Master configuration: 00000000 11
05:38:06.284252  Error 03
05:38:06.502000  T9002000B  Write-Data  Master configuration: 00000000 11
05:38:06.784753  Error 03
05:38:06.985018  T9002000B  Write-Data  Master configuration: 00000000 11
05:38:07.295253  Error 03
05:38:07.483102  T9002000B  Write-Data  Master configuration: 00000000 11
05:38:07.794623  Error 03
05:38:07.958779  T9002000B  Write-Data  Master configuration: 00000000 11
05:38:08.303900  Error 03
05:38:08.442894  T9002000B  Write-Data  Master configuration: 00000000 11
05:38:08.810668  Error 03
05:38:08.932422  T9002000B  Write-Data  Master configuration: 00000000 11
05:38:09.319904  Error 03

After this the boiler doesn't respond anymore, and the T9002000B continues together with the Error 03.

Is message ID 135 a OpenTherm 3.0 message? I can't find any documentation about OpenTherm 3.0, except the Wikipedia article which describes OpenTherm Smart Power is added in OpenTherm 3.0.
Starting Member
Starting Member
Posts: 5
Joined: November 2020

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby Templar » Wed Dec 16, 2020 9:46 pm

dimplou wrote:Is message ID 135 a OpenTherm 3.0 message? I can't find any documentation about OpenTherm 3.0, except the Wikipedia article which describes OpenTherm Smart Power is added in OpenTherm 3.0.

It's a Data-ID above 127 so is most likely a manufacturers (Remeha) message for test & diagnostic purposes. Here some Remeha meesages I recorded in 2017:

ID 131: {u8 u8} "Remeha dF-/dU-codes"
ID 132: {u8 u8} "Remeha Servicemessage"
ID 133: {u8 u8} "Remeha detection connected SCU’s"

Perhaps there is a Data-ID 134 too. More info about thermostat Data-ID's: http://otgw.tclcode.com/matrix.cgi#thermostats
Last edited by Templar on Wed Dec 16, 2020 10:52 pm, edited 1 time in total.
Posts: 171
Joined: March 2011
Location: Netherlands

Re: Otgw and Remeha tzerra ace with etwist thermostat

Postby hvxl » Wed Dec 16, 2020 9:46 pm

The Opentherm spec only defines messages up to 127: "Id’s 0 .. 127 are reserved for OpenTherm pre-defined information, while id’s from 128 .. 255 can be used by manufacturers (members of the association) for test & diagnostic purposes only. The MemberID codes of the master and slave can be used to handshake between two compatible devices and enable the use of the Test & Diagnostic-Area data-items."

So, message ID 135 is a manufacturer specific message, not an OT 3.0 message. The text quoted above also hints at a possible way out: Modify the message ID 3 response to pretend that you have a Daalderop boiler instead of a Remeha Tzerra Ace (SR=3:1,29). If that doesn't do the trick, you can try to mark message IDs 2 or 3 as unknown (UI=2, UI=3). The best solution would be if you could prevent message ID 135 from getting to the boiler. But unfortunately, the OTGW currently does not support marking message IDs above 127 as unknown. There is not enough space to track all 256 messages individually. But maybe it would be possible to add a way to mark all "test & diagnostic" messages as unknown.
Senior Member
Senior Member
Posts: 1424
Joined: June 2010

Return to Opentherm Gateway Forum

Who is online

Users browsing this forum: No registered users and 1 guest