Problem with OTGW

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

Moderator: hvxl

Post Reply
Hobbybob
Starting Member
Starting Member
Posts: 6
Joined: Mon Apr 23, 2018 9:48 pm

Problem with OTGW

Post by Hobbybob »

Hello everyone,

I'm (as you can see) completely new to this forum, and actually still relatively new to the world of domotica. So if I don't make sense, or if I am missing something obvious, please tell me.

I am running a Domoticz-installation (latest stable-version) on a RPi 3, and that has run problem-free for over a year. Recently, I decided to add a OTGW to this since I was replacing my boiler and thermostat, so it was simple to choose someting that was OpenTherm-compatible.

I got everything for the original (Schelte Bron-design) PCB and soldered everything together. I included a USR TCP232-T2 so I could connect to it through my network (of course I included the "heavier" transformer and replaced the 7805 with the recom DC/DC-converter to power it properly). I hooked everything up, and it was all very nicely working. I could read all the different readings in the devices that appeared in Domoticz, and control the thermostat.

However, after about half an hour it started to put weird entries in the log-file. A couple of times it returned back to the normal, readable log-entries, and the temperatures would be updated, but never for long. After about a 1,5 hours it also stopped giving readable entries, and the temperatures were no longer updated. I unhooked the OTGW, and reattached it (IT helpdesks always advise to reboot first, so why not), but this did not have any effect. I disconnected it, and let it be for about a day. After that it worked again, but the same errors began coming up after about 30 to 45 minutes.

I then tried with otmonitor.exe (from otgw.tclcode.com). The OTGW had been able to "cool off" for a couple of days, so I expected it to work for half an hour and then start to give errors, but it did not have any issues. The log was completely clear of any error or strange reading for more than 3 hours straight. My next test was (on suggestion of another domoticz-forum-user) to forward the otmonitor-messages to domoticz instead of getting them directly from the OTGW. This proved to be an interesting one.

At first everything was fine (the OTGW had been switched off for a coupe of days before I started). But sure enough: after about half an hour I started to get weird messages and errors again. I have a snippet from the otmonitor.exe-log from the moment it started to go wrong.

Code: Select all

12:04:33.830083  Command (via relay server, from 192.168.0.35:46590): SC=12:04/6
12:04:33.858651  OE
12:04:33.870621  Command (via relay server, from 192.168.0.35:46590): PR=G
12:04:33.879377  Command (via relay server, from 192.168.0.35:46590): PR=I
12:04:33.890342  Command (via relay server, from 192.168.0.35:46590): PR=O
12:04:33.901889  Command (via relay server, from 192.168.0.35:46590): PS=1
12:04:33.909426  PR: G=00
12:04:33.929078  PR: I=00
12:04:33.935229  PR: O=N
12:04:34.102348  PS: 1
12:04:34.135880  00000010/00000000,10.00,00000000/00000000,100.00,0/0,15.00,0.00,0.00,23.03,60.69,0.00,0.00,0.00,0/0,0/0,65.00,0.00,0,0,0,0,0,0,0,0
12:05:03.903179  Command (via relay server, from 192.168.0.35:46590): SC=12:05/6
12:05:03.943236  SC: 12:05/6
12:05:03.953064  Command (via relay server, from 192.168.0.35:46590): PR=G
12:05:03.960159  Command (via relay server, from 192.168.0.35:46590): PR=I
12:05:03.969040  Command (via relay server, from 192.168.0.35:46590): PR=O
12:05:03.976229  Command (via relay server, from 192.168.0.35:46590): PS=1
12:05:03.985858  PR: G=00
12:05:04.090766  PR: I=0(SOH)OpenTherm Gateway 4.2.5
12:05:04.979805  T80000200  Read-Data   Status: 00000010 00000000
                               - CH enable: disabled (0)
                               - DHW enable: enabled (1)
                               - Cooling enable: disabled (0)
                               - OTC active: not active (0)
                               - CH2 enable: disabled (0)
                               - Summer/winter mode: winter (0)
                               - DHW blocking: unblocked (0)
12:05:05.145968  B40000200  Read-Ack    Status: 00000010 00000000
                               - Fault indication: no fault (0)
                               - CH mode: not active (0)
                               - DHW mode: not active (0)
                               - Flame status: flame off (0)
                               - Cooling status: not active (0)
                               - CH2 mode: not active (0)
                               - Diagnostic indication: no diagnostics (0)
                               - Electricity production: not active (0)
This piece of log was exactly at one of the moments the Domoticz-log started showing gibberish (at 12:04:34 I have correct messages in the log, at 12:05:05 it starts logging messages like "T80000200").

The (SOH) on the first line of 12:05:04 I put in there myself as this is what was shown in Notepad++, but I cannot copy it over to this forum.

Now, I can see the OE-error quite a lot in the Domoticz-log, and also in the log above this. But like I said, it does not occur when I am just using otmonitor.exe (so without domoticz couped to it).

I am hoping someone can make something out of this, as I am starting to get a bit of a headache when I try to understand this. It works, when not connected to Domoticz, so I think my soldering and everything should be OK, but then again: I'm far from the only one to use the OTGW with Domoticz, so the problem is most likely also not in that part...
hvxl
Senior Member
Senior Member
Posts: 1959
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Problem with OTGW

Post by hvxl »

It looks like domoticz bombards the OTGW with commands without waiting for a response. The OTGW was not designed to handle such abuse. Then at some point it resets. That clears the PS=1 mode and the OTGW starts reporting Opentherm messages again (that is not gibberish, it's valuable data).

It may be interesting to check the reason for the reset (PR=Q).

The OE reports also indicate that the gateway is receiving data faster than it can handle. I don't know if domoticz has configuration settings to make it behave nicer, for example by switching off some of the commands it spits out. Otherwise you will have to investigate getting domoticz fixed.
Schelte
Hobbybob
Starting Member
Starting Member
Posts: 6
Joined: Mon Apr 23, 2018 9:48 pm

Re: Problem with OTGW

Post by Hobbybob »

hvxl wrote:It looks like domoticz bombards the OTGW with commands without waiting for a response. The OTGW was not designed to handle such abuse. Then at some point it resets. That clears the PS=1 mode and the OTGW starts reporting Opentherm messages again (that is not gibberish, it's valuable data).

It may be interesting to check the reason for the reset (PR=Q).

The OE reports also indicate that the gateway is receiving data faster than it can handle. I don't know if domoticz has configuration settings to make it behave nicer, for example by switching off some of the commands it spits out. Otherwise you will have to investigate getting domoticz fixed.
Hello Schelte, thanks for responding! Sorry for calling it gibberish, that wasn't meant badly, just that I cannot read it myself at this moment.

I'll try the PR=Q command, and also check again on the forum of Domoticz. See if I can get some more help there.
Hobbybob
Starting Member
Starting Member
Posts: 6
Joined: Mon Apr 23, 2018 9:48 pm

Re: Problem with OTGW

Post by Hobbybob »

Okay, so no solution to my probem yet.

So I decided to test the harware first, since I did not do that when I assembled it. Again: with otmonitor everything is working fine, so I didn't expect to find anything big, but I'm starting to run out of options...

I disconnected the gateway from everything, and removed the PIC and octocoupler. Then I started to follow everything described on http://otgw.tclcode.com/debugging.html

All the voltages check out, but I don't register any amps on X1... Now I figured my multimeter might be broken, so I got a 100 ohm resistor, and screwed one end in X1, and then measured the voltage between the other end of the resistor and the other side of X1. I am still measuring the exact same voltage as when I don't have the resistor connected.

This is really weird. Am I doing something wrong here?
hvxl
Senior Member
Senior Member
Posts: 1959
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Problem with OTGW

Post by hvxl »

No, that is normal. If you don't screw the other end of the resistor into X1, no current can run. And so the voltage doesn't drop. You need to connect the resistor between the two X1 contacts.

The Amp part of a multimeter usually has a fuse that can easily be blown if you try to measure a voltage with the meter accidentally on the Amp setting.
Schelte
Hobbybob
Starting Member
Starting Member
Posts: 6
Joined: Mon Apr 23, 2018 9:48 pm

Re: Problem with OTGW

Post by Hobbybob »

hvxl wrote:No, that is normal. If you don't screw the other end of the resistor into X1, no current can run. And so the voltage doesn't drop. You need to connect the resistor between the two X1 contacts.
Okay, I'll try that tomorrow then.
hvxl wrote:The Amp part of a multimeter usually has a fuse that can easily be blown if you try to measure a voltage with the meter accidentally on the Amp setting.
Yeah, that sounds like me :)
Hobbybob
Starting Member
Starting Member
Posts: 6
Joined: Mon Apr 23, 2018 9:48 pm

Re: Problem with OTGW

Post by Hobbybob »

Okay, so I've checked the hardware, and that is okay.

I have received another tip on the Domoticz-forum, and that is to try it with an older version of the software. Apparently the software before version 4 was giving less errors in combination with Domoticz.

I have checked the website, but I can only download the latest version. Does anybody have version 3.4 somewhere? I would like to try that.
hvxl
Senior Member
Senior Member
Posts: 1959
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Problem with OTGW

Post by hvxl »

I don't think it's the proper way to go to use an older version of the otgw firmware that may be a bit more tolerant of the abuse by Domoticz, but will obviously also miss several features and bug fixes. Domoticz should be fixed to wait for a response after it sends a command.

Nonetheless I have posted the 3.4 firmware at http://otgw.tclcode.com/download/gateway-3.4.hex (md5: 00facd400e57c00b9b8bad91a4201076)
Schelte
Hobbybob
Starting Member
Starting Member
Posts: 6
Joined: Mon Apr 23, 2018 9:48 pm

Re: Problem with OTGW

Post by Hobbybob »

Thanks Schelte! I had some other things going on, so I wasn't able to look at it for quite some time. I just downloaded it, and will try it out (though with the current weather, the last thing I want now is for my heating to switch on :))
Post Reply

Return to “Opentherm Gateway Forum”