otmonitor hangs

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

Moderator: hvxl

MarcEberhard
Starting Member
Starting Member
Posts: 10
Joined: Fri Oct 25, 2013 1:00 pm

otmonitor hangs

Post by MarcEberhard »

Hi,

finally got around to solder and connect my OpenTherm gateway to my boiler. Using minicom with 9600 baud on /dev/ttyUSB0 under linux shows that the gateway has the diagnostics firmware on it:

Opentherm gateway diagnostics - Version 1.0

1. LED test
2. Bit timing thermostat
3. Bit timing boiler
4. Delay symmetry
5. Voltage leves

Enter test number: 5
Thermostat: 2.84
Boiler: 0.00
Reference: 1.22

However, when I start ./otmonitor /dev/ttyUSB0 it just hangs. I obviously would like to replace the diagnostics firmware with the gateway firmware. Is there a way to do this without using otmonitor, preferably with minicom? Or is there something I can try to figure out, why otmonitor gets stuck?

There is currently only the boiler connected, no thermostat. My intention is to control the boiler from an embedded PC in the long run. Any hints on how to get this to work would be greatly appreciated! The boiler is an Intergas HRE 24/18.

Many thanks,
Marc
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: otmonitor hangs

Post by hvxl »

Obviously you can always load the firmware using a PIC programmer. The self-program option of otmonitor is just a convenience for people who don't have access to a PIC programmer (or don't want to pull the PIC out of the gateway). It is not possible to flash the firmware using minicom. You may be able to use remserial to talk to /dev/ttyUSB0 and then make otmonitor connect to the socket opened by remserial.

It sounds like your USB serial device may be blocking on open. I am planning to use a different method to open the serial device in the next version of otmonitor, but it may be a while before that is ready to be published. I rebuilt the linux version of otmonitor 3.3 with just this one change for you. You can download it here.
Schelte
MarcEberhard
Starting Member
Starting Member
Posts: 10
Joined: Fri Oct 25, 2013 1:00 pm

Re: otmonitor hangs

Post by MarcEberhard »

Hi,

many thanks! The patched version of otmonitor works fine. I've ordered the USB version of the OpenTherm gateway, so am using the USB to serial that comes with it. I have now loaded firmware 4.0a10 onto the gateway and I can see the following output in the log window:

21:42:50.539988 R801C0000 Read-Data Return water temperature: 0.00
21:42:51.641844 R900E6400 Write-Data Maximum relative modulation level: 100.00
21:42:52.592899 R00060001 Read-Data Remote parameter flags: 00000000 00000001
21:42:53.337886 R00000000 Read-Data Status: 00000000 00000000
21:42:54.315143 R80190000 Read-Data Boiler water temperature: 0.00
21:42:55.292733 R10010A00 Write-Data Control setpoint: 10.00
21:42:56.270004 R80380000 Read-Data DHW setpoint: 0.00
21:42:57.247245 R00390000 Read-Data Max CH water setpoint: 0.00
21:42:58.224646 R00060001 Read-Data Remote parameter flags: 00000000 00000001
21:42:59.201992 R00120000 Read-Data CH water pressure: 0.00
21:43:00.179325 R00000001 Read-Data Status: 00000000 00000001
21:43:01.156629 R80190000 Read-Data Boiler water temperature: 0.00
21:43:02.134147 R20021401 Inv-Data Master configuration: 00010100 1
21:43:03.111406 R00060001 Read-Data Remote parameter flags: 00000000 00000001
21:43:04.088867 R00110000 Read-Data Relative modulation level: 0.00
21:43:05.066365 R00360001 Read-Data Remote parameter 7 boundaries: 0 1

It looks as if something is being read from the boiler, but all values seem to be 0. Are there any knobs I need to tweak to get real values from the boiler?

Thanks,
Marc
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: otmonitor hangs

Post by hvxl »

It looks like the gateway is sending messages to the boiler (R-reports), but doesn't get any responses (B-reports). Check the troubleshooting instructions to help figure out what may be wrong.
Schelte
MarcEberhard
Starting Member
Starting Member
Posts: 10
Joined: Fri Oct 25, 2013 1:00 pm

Re: otmonitor hangs

Post by MarcEberhard »

Hi Schelte,

thanks for your reply! Going through the troubleshooting guide yields:

-> IC1 voltage: 4.96 V
-> X1 voltage: 22.2 V
-> X1 current: 6.4 mA
-> Connect IC1 pin 3 to 5
-> X1 current: 20.5 mA
-> Connecting X1 and X2
-> Connect IC1 pin 2 to 5
-> X2 voltage: 16.8 V
-> Connect IC1 pin 2 to 14
-> X2 voltage: 5.05 V
-> IC1 voltage pin 18 to 5 (pin 3 open): 0.00 V
-> IC1 voltage pin 18 to 5 (pin 3 connected to 5): 3.55 V
-> Entering PR=B in minicom: PR: B=20:34 10-10-2013

This looks to me as if the gateway itself is OK. As I don't have a thermostat, I can only connect the boiler to X1. Will do so next and also connect it to my scope to see if there is anything happening at all on the line. As far as I understand from the boiler manual (Intergas HRE 24/18), I have to remove the loop between contact 6 and 7 on the boiler to enable OpenTherm. If you know anything else that needs to be done, please let me know.

Thanks,
Marc
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: otmonitor hangs

Post by hvxl »

MarcEberhard wrote:As I don't have a thermostat, I can only connect the boiler to X1.
Another option is to connect the boiler to X2. That has a higher probability of giving good results. ;-)
Schelte
MarcEberhard
Starting Member
Starting Member
Posts: 10
Joined: Fri Oct 25, 2013 1:00 pm

Re: otmonitor hangs

Post by MarcEberhard »

... aehm, sorry. It is actually connected to X2...
MarcEberhard
Starting Member
Starting Member
Posts: 10
Joined: Fri Oct 25, 2013 1:00 pm

Re: otmonitor hangs

Post by MarcEberhard »

Hi Schelte,

haven't got around to test the cabling in the house yet, but have just been told that someone else has tested the beta firmware without a thermostat and got no communication from the boiler. It all worked fine for him with a thermostat connected. Thus, I'd like to ask you what the current status of the firmware is? Accoring to the changelog for the latest beta version you now generate messages if there is no thermostat connected. I can clearly see these messages being sent out in minicom. Should the boiler repond to these? Or do I need a thermostat in any case? Can the firmware emulate a thermostat?

Thanks,
Marc
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: otmonitor hangs

Post by hvxl »

Marc,

Someone made some comments to that effect, but it was totally unclear to me what he was doing and if he interpreted the results correctly. In any case, this is what happens when I pull my thermostat off the wall:

Code: Select all

21:04:01.675440 Thermostat disconnected
21:04:02.645776 R00000000 Read-Data  Status: 00000000 00000000
21:04:02.735160 BC0000000 Read-Ack   Status: 00000000 00000000
21:04:03.695775 R80190000 Read-Data  Boiler water temperature: 0.00
21:04:03.815849 B4019179C Read-Ack   Boiler water temperature: 23.61
21:04:04.736364 R10010A00 Write-Data Control setpoint: 10.00
21:04:04.826461 BD0010A00 Write-Ack  Control setpoint: 10.00
21:04:05.787091 R807A0000 Read-Data  DHW pump/valve operation hours: 0
21:04:05.917079 B407A0530 Read-Ack   DHW pump/valve operation hours: 1328
21:04:06.837581 R00110000 Read-Data  Relative modulation level: 0.00
21:04:06.927672 BC0110000 Read-Ack   Relative modulation level: 0.00
21:04:07.888798 R007B0000 Read-Data  DHW burner operation hours: 0
21:04:08.018424 BC07B0000 Read-Ack   DHW burner operation hours: 0
21:04:08.938894 R801C0000 Read-Data  Return water temperature: 0.00
21:04:09.038960 B401C1766 Read-Ack   Return water temperature: 23.40
21:04:09.989724 R900E6400 Write-Data Maximum relative modulation level: 100.00
21:04:10.119211 B500E6400 Write-Ack  Maximum relative modulation level: 100.00
21:04:11.040053 R801C0000 Read-Data  Return water temperature: 0.00
21:04:11.140086 B401C1766 Read-Ack   Return water temperature: 23.40
21:04:12.090917 R00000000 Read-Data  Status: 00000000 00000000
21:04:12.201346 BC0000000 Read-Ack   Status: 00000000 00000000
21:04:13.141250 R80190000 Read-Data  Boiler water temperature: 0.00
21:04:13.301350 BC0191797 Read-Ack   Boiler water temperature: 23.59
21:04:14.191927 R10010A00 Write-Data Control setpoint: 10.00
21:04:14.301878 BD0010A00 Write-Ack  Control setpoint: 10.00
21:04:15.243099 R80380000 Read-Data  DHW setpoint: 0.00
21:04:15.442911 B40383C00 Read-Ack   DHW setpoint: 60.00
21:04:16.293657 R00390000 Read-Data  Max CH water setpoint: 0.00
21:04:16.403820 BC0394800 Read-Ack   Max CH water setpoint: 72.00
21:04:17.343758 R00740000 Read-Data  Burner starts: 0
21:04:17.503934 BC07401A8 Read-Ack   Burner starts: 424
21:04:18.394418 R80750000 Read-Data  CH pump starts: 0
21:04:18.505178 B40750348 Read-Ack   CH pump starts: 840
21:04:19.445001 R00000000 Read-Data  Status: 00000000 00000000
21:04:19.605043 BC0000000 Read-Ack   Status: 00000000 00000000
21:04:20.505587 R80190000 Read-Data  Boiler water temperature: 0.00
21:04:20.645671 BC0191780 Read-Ack   Boiler water temperature: 23.50
21:04:21.546327 R10010A00 Write-Data Control setpoint: 10.00
21:04:21.687350 BD0010A00 Write-Ack  Control setpoint: 10.00
21:04:22.597319 R80760000 Read-Data  DHW pump/valve starts: 0
21:04:22.697485 B407602F8 Read-Ack   DHW pump/valve starts: 760
21:04:23.647995 R00110000 Read-Data  Relative modulation level: 0.00
21:04:23.798242 BC0110000 Read-Ack   Relative modulation level: 0.00
21:04:24.698611 R00770000 Read-Data  DHW burner starts: 0
21:04:24.798739 BC0770078 Read-Ack   DHW burner starts: 120
21:04:25.818883 R801C0000 Read-Data  Return water temperature: 0.00
21:04:25.898849 B401C1766 Read-Ack   Return water temperature: 23.40
21:04:26.799299 R900E6400 Write-Data Maximum relative modulation level: 100.00
21:04:26.899319 B500E6400 Write-Ack  Maximum relative modulation level: 100.00
21:04:27.849873 R00780000 Read-Data  Burner operation hours: 0
21:04:28.000061 B40780040 Read-Ack   Burner operation hours: 64
21:04:28.900529 R00000000 Read-Data  Status: 00000000 00000000
21:04:29.000564 BC0000000 Read-Ack   Status: 00000000 00000000
21:04:29.951178 R80190000 Read-Data  Boiler water temperature: 0.00
21:04:30.101288 BC019178A Read-Ack   Boiler water temperature: 23.54
21:04:31.011850 R10010A00 Write-Data Control setpoint: 10.00
21:04:31.101715 BD0010A00 Write-Ack  Control setpoint: 10.00
21:04:32.062952 R80380000 Read-Data  DHW setpoint: 0.00
21:04:32.183044 B40383C00 Read-Ack   DHW setpoint: 60.00
21:04:33.102990 R00390000 Read-Data  Max CH water setpoint: 0.00
21:04:33.203126 BC0394800 Read-Ack   Max CH water setpoint: 72.00
21:04:34.153195 R80790000 Read-Data  CH pump operation hours: 0
21:04:34.283634 BC0790070 Read-Ack   CH pump operation hours: 112
21:04:35.204171 R807A0000 Read-Data  DHW pump/valve operation hours: 0
21:04:35.304232 B407A0530 Read-Ack   DHW pump/valve operation hours: 1328
21:04:36.254849 R00000000 Read-Data  Status: 00000000 00000000
21:04:36.384969 BC0000000 Read-Ack   Status: 00000000 00000000
21:04:37.315996 R80190000 Read-Data  Boiler water temperature: 0.00
21:04:37.406233 BC0191785 Read-Ack   Boiler water temperature: 23.52
21:04:38.357181 R10010A00 Write-Data Control setpoint: 10.00
21:04:38.486751 BD0010A00 Write-Ack  Control setpoint: 10.00
21:04:39.416619 R007B0000 Read-Data  DHW burner operation hours: 0
21:04:39.566825 BC07B0000 Read-Ack   DHW burner operation hours: 0
21:04:40.457235 R00110000 Read-Data  Relative modulation level: 0.00
21:04:40.567354 BC0110000 Read-Ack   Relative modulation level: 0.00
21:04:41.507951 R801C0000 Read-Data  Return water temperature: 0.00
21:04:41.668040 B401C1766 Read-Ack   Return water temperature: 23.40
21:04:42.568508 R801C0000 Read-Data  Return water temperature: 0.00
21:04:42.668537 BC01C175E Read-Ack   Return water temperature: 23.37
21:04:43.609255 R900E6400 Write-Data Maximum relative modulation level: 100.00
21:04:43.769147 B500E6400 Write-Ack  Maximum relative modulation level: 100.00
21:04:44.669734 R00740000 Read-Data  Burner starts: 0
21:04:44.780494 BC07401A8 Read-Ack   Burner starts: 424
21:04:45.720377 R00000000 Read-Data  Status: 00000000 00000000
21:04:45.922611 BC0000000 Read-Ack   Status: 00000000 00000000
21:04:46.771008 R80190000 Read-Data  Boiler water temperature: 0.00
21:04:46.880970 BC0191780 Read-Ack   Boiler water temperature: 23.50
21:04:47.821566 R10010A00 Write-Data Control setpoint: 10.00
21:04:47.962901 BD0010A00 Write-Ack  Control setpoint: 10.00
21:04:48.872876 R80380000 Read-Data  DHW setpoint: 0.00
21:04:48.962920 B40383C00 Read-Ack   DHW setpoint: 60.00
21:04:49.913613 R00390000 Read-Data  Max CH water setpoint: 0.00
21:04:50.062594 BC0394800 Read-Ack   Max CH water setpoint: 72.00
21:04:50.202951 Thermostat connected
IOW: WOMM
Schelte
MarcEberhard
Starting Member
Starting Member
Posts: 10
Joined: Fri Oct 25, 2013 1:00 pm

Re: otmonitor hangs

Post by MarcEberhard »

Hi Schelte,

apologies, yes, that information was very unspecific. I have now tested the electrical connection and it is fine, but no change. This is what it looks like (in minicom):

Code: Select all

OpenTherm Gateway 4.0a10
Thermostat disconnected
R00000000
R80190001
R10010A00
R00060000
R00110000
R001B0001
R801C0000
R900E6400
R00060001
R00000000
R80320001
R10010A01
R80380000
R00390001
R00060000
R00240001
R00000000
R80190000
I can see that the gateway is sending the same requests as in your log, but my boiler does not respond. Did you try to power cycle the boiler without a thermostat connected and still get the communication going? When you unplug the thermostat while the system is up and running all communications have already been established. I wonder if there are some initialisation messages that need to be sent first to get the communication going?

Thanks,
Marc
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: otmonitor hangs

Post by hvxl »

MarcEberhard wrote:Did you try to power cycle the boiler without a thermostat connected and still get the communication going?
I didn't originally. But I have now, just to make sure it doesn't make any difference: It doesn't.

There must be something wrong with the connection to your boiler. Do I understand correctly that you have never used your boiler with opentherm before? Maybe you need to connect to different screw clamps, or put a jumper somewhere. Some boilers require that. Check the documentation of your boiler.
Schelte
MarcEberhard
Starting Member
Starting Member
Posts: 10
Joined: Fri Oct 25, 2013 1:00 pm

Re: otmonitor hangs

Post by MarcEberhard »

Hi Schelte,

thanks for testing this! Yes, one wire bridge has to be removed on the boiler to enable OpenTherm communication, but I have done that. I also measured the voltage coming from the boiler on the gateway contacts, so electrically that's all fine. I can hook an oscilloscope up on it. Is there some documentation as to what I should see? Then I can check if there is any signal coming from the boiler apart from a constant voltage of about 16 V or so shown on a simple multimeter. Are there test points on the PCB where I can check for the incoming signal? Maybe it is just that the voltage level thresholds are too low or high for my boiler.

All the best,
Marc
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: otmonitor hangs

Post by hvxl »

The Opentherm specs explain exactly what you should see. However, the boiler communicates by changing the current, so you won't be able to see much if just hook up an oscilloscope to the wires between the gateway and the boiler. You should be able to see something when monitoring the voltage over R3, or R2+R3.

Have you performed test #4 of the diagnostics firmware?
Schelte
MarcEberhard
Starting Member
Starting Member
Posts: 10
Joined: Fri Oct 25, 2013 1:00 pm

Re: otmonitor hangs

Post by MarcEberhard »

Hi Schelte,

diagnostic test #4 yields:

Code: Select all

Opentherm gateway diagnostics - Version 1.1

Enter test number: 4

OK1A high-to-low: 8us
OK1A low-to-high: 28us
OK1B high-to-low: 9us
OK1B low-to-high: 3us
The voltages are:

R2 + R3 against GND1(red line is 1.54 V)
R2 + R3 against GND1
R2 + R3 against GND1
R2_R3_small.png (18.85 KiB) Viewed 13178 times
OK pin 5 against GND (red line is 4.59 V)
OK pin 5 against GND
OK pin 5 against GND
OC_5_small.png (13.54 KiB) Viewed 13178 times
OK pin 3 against GND1 (red line is 1.25 V)
OK pin 3 against GND1
OK pin 3 against GND1
OC_3_small.png (13.5 KiB) Viewed 13178 times
OK pin 1 against GND (red line is 1.18 V)
OK pin 1 against GND
OK pin 1 against GND
OC_1_small.png (13.34 KiB) Viewed 13178 times
Time base is 1 millisecond.

Thanks,
Marc
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: otmonitor hangs

Post by hvxl »

I guess the traces were all made at different times, but it seems like they all cover an opentherm message being sent from the gateway to the boiler, nothing from the boiler. At least the OC_1 trace is clearly a transmission by the gateway. That looks good.

R2_R3 mostly stays below 1.54, which corresponds to 4.8mA - a bit on the low side (should be 5-9 mA). But that's not a problem for the gateway circuitry. In any case it's not enough to get the phototransistor of OK1B conducting. The spikes are probably the result of the voltage (driven by the gateway) changing between 6 and 16V. The boiler circuitry takes a bit of time to adjust.

OC_3 shows that during the upward spikes, the voltage on OK pin 3 reaches the level required to light up the LED in OK1B (around 1.2V). So the OK1B phototransistor conducts very briefly, resulting in the spikes seen in the OC_5 trace. These spikes will be ignored by the firmware of the gateway.

During opentherm messages from the boiler you should see voltages above 3.8V on R2+R3 for around 0.5 or 1 ms. If you don't get that, it means the boiler is not sending any opentherm messages. One reason may be that it doesn't understand the messages from the gateway.

The test #4 results show that the boiler interface of the gateway is working, although there is some difference between the rise and fall delays of OK1A. You may try to change the value of R8 to get them closer together. But with a tolerance of -100μs/+150μs allowed by the opentherm specs, those 20μs shouldn't really be a problem.

Debugging would be so much easier if you could borrow an opentherm thermostat somewhere. That way you could first make sure that the boiler works with the thermostat. Then check if the gateway works in monitor mode. And finally go to full gateway mode. Maybe if you mention which city you're in, someone on the forum living near you is willing to lend you his thermostat for a few tests.
Schelte
Post Reply

Return to “Opentherm Gateway Forum”