Outside temperature probe

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

Moderator: hvxl

hvxl
Senior Member
Senior Member
Posts: 1966
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Outside temperature probe

Post by hvxl »

RedNax wrote:When the connection drops, it can be revived with a GW=R
If you can still issue commands then the connection didn't drop. Check the icon in the bottom right-hand corner of otmonitor. That's green when connected, red otherwise.

It sounds more like the gateway simply stops sending data. When this happens again, can you try some other commands before you reset the gateway? For example, do you get any response from PR=M or PR=A?

Please also try some things I suggested earlier, if you can:
hvxl wrote:Can you configure the GPIO ports back to GA=0 and GB=0 to check if that makes any difference? If it doesn't, can you disconnect the temperature sensor cable? Maybe it is picking up some interference.
Schelte
RedNax
Starting Member
Starting Member
Posts: 39
Joined: Wed Sep 25, 2013 12:18 pm

Re: Outside temperature probe

Post by RedNax »

When first switching to monitor mode it threw a LOT of error 03's for some reason. So i upped the Ref voltage from 1.250 to 1.458 and they disappeared.

When i set DHW Setpoint from the thermostat when the OTGW is in monitor mode it get's succesfully updated and shows in ot monitor. When i switch back to gateway mode and try to alter it in otmonitor, the command gets accepted but nothing changes. When i then change it again through the thermostat, this happens:

Code: Select all

14:52:13.398154 T90384000 Write-Data DHW setpoint: 64.00
14:52:13.410163 R103840C8 Write-Data DHW setpoint: 64.78
14:52:13.517879 BD03840C8 Write-Ack  DHW setpoint: 64.78
14:52:13.528960 A50384000 Write-Ack  DHW setpoint: 64.00
I've sent (via email) you a piece of log which covers (not this), but the succesful setting of DHW setpoint from the thermostat with the otgw in monitor mode.
hvxl
Senior Member
Senior Member
Posts: 1966
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Outside temperature probe

Post by hvxl »

You're right, that's not the most useful way to handle this. I will have to come up with a different method. Thanks for reporting.
Schelte
RedNax
Starting Member
Starting Member
Posts: 39
Joined: Wed Sep 25, 2013 12:18 pm

Re: Outside temperature probe

Post by RedNax »

This morning the rs232 connection was lost again. powecycling of the usb port which usually solves the problem resulted in exclusively error 01's in GW mode. In monitor mode all works fine. Also the thermostat which had been displaying the usual changed to 'No Connection' when the error 01's started.

I tried:

Restart of GW (GW=R) no change
Powercycle USB no change
Powercycle GW no change
Powercycle Boiler no change
Changing Ref voltage no change
GA=0, GB=0 no change
IT=1 Success, no more Error 01... but where did they suddenly come from?

When i set IT=0 the error01's return, back to IT=1 they're gone again...

Code: Select all

19:16:49.072193 B403840C8 Read-Ack   DHW setpoint: 64.78
19:16:49.085001 AC0090000 Read-Ack   Remote override room setpoint: 0.00
19:16:49.510175 T80190000 Read-Data  Boiler water temperature: 0.00
19:16:49.627468 B40191980 Read-Ack   Boiler water temperature: 25.50
19:16:50.065752 T80640000 Read-Data  Remote override function: 00000000
19:16:50.079010 R00060000 Read-Data  Remote parameter flags: 00000000 00000000
19:17:05.977730 BC0060101
 Read-Ack   Remote parameter flags: 00000001 00000001
06:19:48.320562 Command: GW=R
06:20:24.381991 00384000
06:20:24.388702 Error 01
06:20:25.328241 T00384000 Read-Data  DHW setpoint: 64.00
06:20:25.334233 Error 01
06:20:26.260027 T00384000 Read-Data  DHW setpoint: 64.00
06:20:26.278708 Error 01
06:20:27.226611 T00384000 Read-Data  DHW setpoint: 64.00
06:20:27.241455 Error 01
06:20:28.172427 T00384000 Read-Data  DHW setpoint: 64.00
06:20:28.192537 Error 01
06:20:29.118096 T00384000 Read-Data  DHW setpoint: 64.00
06:20:29.133081 Error 01
....
06:20:57.567981 Command: GW=R
06:20:57.574222 T00384000 Read-Data  DHW setpoint: 64.00
06:20:57.620029 Error 01
06:20:57.625353 SE
06:20:58.513185 T00384000 Read-Data  DHW setpoint: 64.00
06:20:58.571368 Error 01
06:20:59.082473 Command: GW=R
06:21:00.245248 OpenTherm Gateway 4.0a8
06:21:00.566267 T80000800 Read-Data  Status: 00001000 00000000
06:21:00.597743 Error 01
06:21:01.515969 T80000800 Read-Data  Status: 00001000 00000000
06:21:01.533336 Error 01
06:21:02.460456 T80000800 Read-Data  Status: 00001000 00000000
06:21:02.474436 Error 01
06:21:03.404351 T80000800 Read-Data  Status: 00001000 00000000
06:21:03.419895 Error 01
...
06:35:05.746464 T00030000 Read-Data  Slave configuration: 00000000 0
06:35:05.767622 Error 01
06:35:06.690596 T00030000 Read-Data  Slave configuration: 00000000 0
06:35:06.703008 Error 01
06:35:07.660567 T00030000 Read-Data  Slave configuration: 00000000 0
06:35:07.672757 Error 01
06:35:08.582051 T00030000 Read-Data  Slave configuration: 00000000 0
06:35:08.593740 Error 01
06:35:08.754799 Command: GW=0
06:35:08.824262 OK
06:35:09.536793 T00030000 Read-Data  Slave configuration: 00000000 0
06:35:09.609498 BC0030918 Read-Ack   Slave configuration: 00001001 24
06:35:10.079631 T00030000 Read-Data  Slave configuration: 00000000 0
06:35:10.225192 BC0030918 Read-Ack   Slave configuration: 00001001 24
06:35:10.661754 T00030000 Read-Data  Slave configuration: 00000000 0
06:35:10.755420 BC0030918 Read-Ack   Slave configuration: 00001001 24
06:35:11.234843 T80310000 Read-Data  Max CH setpoint boundaries: 0 0
06:35:11.319572 B40314B14 Read-Ack   Max CH setpoint boundaries: 75 20
06:35:11.790729 T80310000 Read-Data  Max CH setpoint boundaries: 0 0
06:35:11.882608 B40314B14 Read-Ack   Max CH setpoint boundaries: 75 20
06:35:12.429726 T80310000 Read-Data  Max CH setpoint boundaries: 0 0
06:35:12.496356 B40314B14 Read-Ack   Max CH setpoint boundaries: 75 20
...
06:35:22.899758 T00000900 Read-Data  Status: 00001001 00000000
06:35:22.986252 BC0000900 Read-Ack   Status: 00001001 00000000
06:35:23.447217 T801C0000 Read-Data  Return water temperature: 0.00
06:35:23.532428 B401C2E00 Read-Ack   Return water temperature: 46.00
06:35:24.022809 T801A0000 Read-Data  DHW temperature: 0.00
06:35:24.161935 B401A1980 Read-Ack   DHW temperature: 25.50
06:35:24.558334 T001B0000 Read-Data  Outside temperature: 0.00
06:35:24.642918 BF01B0000 Unk-DataId Outside temperature: 0.00
06:35:24.998464 Command: GW=1
06:35:25.014760 OK
06:35:25.111945 T10010A00 Write-Data Control setpoint: 10.00
06:35:25.126977 Error 01
06:35:26.079809 T10010A00 Write-Data Control setpoint: 10.00
06:35:26.093695 Error 01
06:35:27.032677 T10010A00 Write-Data Control setpoint: 10.00
06:35:27.046814 Error 01
06:35:27.974283 T00000900 Read-Data  Status: 00001001 00000000
06:35:27.988496 Error 01
06:35:29.033706 T80000800 Read-Data  Status: 00001000 00000000
06:35:29.039507 Error 01
06:35:29.904752 T80000800 Read-Data  Status: 00001000 00000000
6:35:29.910230 Error 01
06:35:29.927037 Command: GW=0
06:35:30.013037 OK
06:35:30.816218 T80000800 Read-Data  Status: 00001000 00000000
06:35:30.902830 B40000800 Read-Ack   Status: 00001000 00000000
06:35:31.374463 T10010A00 Write-Data Control setpoint: 10.00
06:35:31.454975 BD0010A00 Write-Ack  Control setpoint: 10.00
06:35:31.924816 T80190000 Read-Data  Boiler water temperature: 0.00
06:35:32.008913 B40192E00 Read-Ack   Boiler water temperature: 46.00
06:35:32.480192 T801A0000 Read-Data  DHW temperature: 0.00
06:35:32.565116 BC01A1A00 Read-Ack   DHW temperature: 26.00
06:35:33.035030 T80000800 Read-Data  Status: 00001000 00000000
06:35:33.119025 B40000800 Read-Ack   Status: 00001000 00000000
06:35:33.589901 T00120000 Read-Data  CH water pressure: 0.00
06:35:33.673587 BC01202E6 Read-Ack   CH water pressure: 2.90
...
06:51:19.822263 Error 01
06:51:20.516231 T80000800 Read-Data  Status: 00001000 00000000
06:51:20.588508 Error 01
06:51:21.461111 T80000800 Read-Data  Status: 00001000 00000000
06:51:21.475618 Error 01
06:51:22.408955 T80000800 Read-Data  Status: 00001000 00000000
06:51:22.437503 Error 01
06:51:23.666452 T80000800 Read-Data  Status: 00001000 00000000
06:51:23.672904 Error 01
06:51:24.304108 T80000800 Read-Data  Status: 00001000 00000000
06:51:24.318312 Error 01
06:51:24.946426 Command: IT=1
06:51:24.966519 OK
06:51:25.249650 T80000800 Read-Data  Status: 00001000 00000000
06:51:25.367829 B40000800 Read-Ack   Status: 00001000 00000000
06:51:25.805182 T10010A00 Write-Data Control setpoint: 10.00
06:51:25.923773 BD0010A00 Write-Ack  Control setpoint: 10.00
06:51:26.362290 T80190000 Read-Data  Boiler water temperature: 0.00
06:51:26.478947 B40192700 Read-Ack   Boiler water temperature: 39.00
06:51:26.916034 T801A0000 Read-Data  DHW temperature: 0.00
hvxl
Senior Member
Senior Member
Posts: 1966
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Outside temperature probe

Post by hvxl »

I appreciate that you try a lot of things when the gateway stops communicating, but I'm having a little trouble understanding the exact sequence of events.

Can you please explain what "the rs232 connection was lost" means to you exactly? Does the connection icon on otmonitor still indicate it is connected? Do you just not get any messages any more? Do you get any response when trying to send serial commands? It looks like you tried to send GW=R at 06:19:48, but that did not have any effect.

So, at that point you power-cycled the USB port and started seeing information from the gateway again (albeit lots of Error 01). The thermostat, which had been operating normally until this point, now changed to 'No Connection'. That would suggest the the IT=0 setting was somehow activated by the USB port reset.

Did you get any response to serial commands at that point? Was this at 06:20:57, where the first GW=R got a SE response (presumably the gateway had seen some rubbish on the serial line due to the USB reset)?

You then did another GW=R which worked, judging by the "OpenTherm Gateway 4.0a8" report, but that didn't clear up the Error 01. The IT setting is present in two places: RAM and EEPROM. You would see the errors if the setting in RAM is 0. On a reset the RAM setting is initialized from EEPROM. The persistence of the errors indicates that the IT setting was also 0 in EEPROM.

I don't see the power-cycle of the gateway or boiler in the logs, but they were not likely to change anything at this point. The reference voltage only affects reception of messages from the thermostat. That part was working properly, so changing the reference voltage could only have made things worse. However, setting the reference voltage will also save the IT setting to EEPROM. It is important to know that you didn't change the reference voltage before you reset the gateway. Can you confirm that?

My suggestion to change GA and GB to 0 was not intended as a fix when things were already messed up. You seem to get communication problems about once a day. You're the only one reporting these problems and you're the only one I know who uses the temperature sensor feature. If the problems don't occur when you run the gateway for a couple of days without probing the temperature sensor, that would be a strong clue that the problem is in temperature sensor code. Conversely, if it doesn't make any difference, that part of code is not to blame.

Please correct me if the description I gave is incorrect in any way.

If I understood everything correctly, my guess is that the IT setting changing was just a freak occurrence caused by random data from resetting the USB port and you will not see it again. In the unlikely case that it does happen again, please issue the commands PR=V, PR=T, and DP=6D before you reset the gateway. Then reset the gateway to determine if the setting was copied to EEPROM. Finally you can run the IT=1 command to get rid of the errors and make the gateway operational again.

I realize it may be difficult to know which would be helpful things to try out if you don't have deep knowledge of the internal workings of the gateway. That's why I try to explain as much as possible in the hope that will allow you to provide the most useful data points.

For my understanding, you have a gateway with a serial port and use a USB-serial converter to connect it to the USB port of a router on your network, correct? And your normal method to restore communications is to unplug the converter from the USB port on the router and plug it back in? Have you tried disconnecting and reconnecting otmonitor? Does that not clear up the situation? How does otmonitor communicate with the USB serial device of the router? Is there any possibility to hook up a laptop (or raspberry pi) directly to the gateway for a few days to rule out much of the intermediate equipment?
Schelte
RedNax
Starting Member
Starting Member
Posts: 39
Joined: Wed Sep 25, 2013 12:18 pm

Re: Outside temperature probe

Post by RedNax »

Hi,

In hindsight "the rs232 connection was lost" could have been descriptive of both events... ie, red (broken) connection icon on otmonitor or no msgs appearing in the log. Whilst trying to get this thing stable i'm working on a script to enter the data from PS=1 into mysql. Ofcourse when a PS=1 has been issued, no further communication comes from the gateway until a next command is issued. A pitfall i might have fallen into maybe once or twice.

That being said, the GW=R should have worked first time.

I wasn't aware TI defaulted to 1.. From the description on the website i'd think it defaults to 0.

The error01's started immediately after powercycling the usb port, so the connection to the gw was restored at that point and it accepted commands. However it issued error01's teh entire time. Not knowing what caused them led me to powercycle the GW (because GW=R didn't yield a working GW in my view as the error01's were still present), and then the boiler for the same reason. It the time i wasn't aware of the TI= settings..

Changing the Ref voltage would have been one of the later things i did, certainly after GW=R and even powercycling the gw.

The gateway is built without the max232 and connected directly to a rs232/usb converter which in turn is connected to a tp-link 702 which is in client bridge mode to my main wifi router. Powercycling the usb port on the tplink is accomplished by issuing: "

Code: Select all

echo 0 >/sys/class/gpio/gpio8/value && sleep 5 && echo 1 >/sys/class/gpio/gpio8/value && sleep 5"
on it.

I'll just leave it running for now, and i'll hold off on my dev'ing as not to interfere with the setup. I do really hope it's not the dallas (code) causing it, because love the outside temp on the thermostat :D

I could rig a direct connection to the gw with a netbook i have... Next time it all stops again, i'll hook that up.
RedNax
Starting Member
Starting Member
Posts: 39
Joined: Wed Sep 25, 2013 12:18 pm

Re: Outside temperature probe

Post by RedNax »

Well, that didn't take long:

I'll hook up the netbook for now..

Notice that in the last image Max CH water setpoint has changed... from the former ones. When only the usb was reset.. neither the gateway or otmonitor were restarted. otmonitor was reconnected ofcourse as shown in the pics below.

Image
Image
Image
Image
Image
Image
Image
RedNax
Starting Member
Starting Member
Posts: 39
Joined: Wed Sep 25, 2013 12:18 pm

Re: Outside temperature probe

Post by RedNax »

Hi Schelte,

Since i've switched to a raspberrypi there has been no loss of communication between the gateway and the pi, which is great! One question did arise.. The PI has it's own serial port, however it's at 3.3v where the gw is at 5v levels. I'm not an EE, so my question to you.. Is there an (easy) way to convert the voltage levels so i can eliminate the usb/serial converter cable from the setup?
hvxl
Senior Member
Senior Member
Posts: 1966
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Outside temperature probe

Post by hvxl »

That's good News. I have also hooked up a DS18B20 to my own gateway and had it running like that for days without getting any communication issues. So to me the temperature sensor already didn't seem to be the cause of your troubles.

In theory it should suffice to use a simple voltage divider (2 resistors) on the serial transmit line from the gateway to the Raspberry Pi. The serial receive line into the gateway from the Raspberry Pi shouldn't even need any special treatment. That's the theory. When I have some time, I may play with it in practice.
Schelte
hvxl
Senior Member
Senior Member
Posts: 1966
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Outside temperature probe

Post by hvxl »

Unfortunately, in practice it's not as simple as I hoped. When configured as a serial interface, the I/O port of the PIC acts as a Schmitt trigger. While a normal I/O port considers everything above 2V as logical high, for a Schmitt trigger the voltage has to go above 4V. The Raspberry Pi only supplies 3.3V, so that's clearly not enough.

One possible way around it would be to put a buffer chip in between, like a 74HCT08 or 74HCT245 (powered from the 5V of the gateway). Those chips will consider everything above 2V logical high and provide a proper high level output of 4.5V. It can also be done using discrete components, like this bit of circuitry that proved to work in my test setup:Image
Note: To be able to use the built-in serial port of the Raspberry Pi for the gateway I had to disable it as a serial console by editing /boot/cmdline.txt and /etc/inittab.
Schelte
RedNax
Starting Member
Starting Member
Posts: 39
Joined: Wed Sep 25, 2013 12:18 pm

Re: Outside temperature probe

Post by RedNax »

Thanks for trying it out. After doing some googling on the buffer it would seem when using a 74hc part you'll still need the voltage divider, as the part will have to be driven @5v for the pic port to be triggered. Would there be an optically isolated way to do it?
hvxl
Senior Member
Senior Member
Posts: 1966
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Outside temperature probe

Post by hvxl »

The theory about the voltage divider part turned out to be correct, so receiving data from the gateway worked straight away in my test setup. The trouble I described was with sending commands to the gateway. That's where you would use the buffer chip. So then the circuitry would look something like this (untested):Image

When using buffer chips I really advise to use the 74HCT versions I mentioned. These accept TTL level signals. The 74HC versions accept CMOS level signals. Even though such a device would typically consider a voltage level above 2.7V high, the specs only guarantee a high level for anything above 3.5V. With only 3.3V available that may lead to problems, which could even be temperature dependent.

Opto-couplers have a tendency to be a bit slow to react to changes on their inputs. At 9600 baud that is probably not an issue, but I see no benefit in going that route. The gateway is already isolated on the boiler side. Isolating it at the interface side as well leaves the gateway floating. That may create more problems than it solves.
Schelte
hvxl
Senior Member
Senior Member
Posts: 1966
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Outside temperature probe

Post by hvxl »

RedNax wrote:When i set DHW Setpoint from the thermostat when the OTGW is in monitor mode it get's succesfully updated and shows in ot monitor. When i switch back to gateway mode and try to alter it in otmonitor, the command gets accepted but nothing changes.
Fixed in firmware 4.0a9.
Schelte
RedNax
Starting Member
Starting Member
Posts: 39
Joined: Wed Sep 25, 2013 12:18 pm

Re: Outside temperature probe

Post by RedNax »

Something is wrong with 4a9:

There's weird messages with, what looks like, the outside temperature. However, the outside temp gets reported as a whopping 94.88 degrees....

When GA=0 and GB=0, the strange msgs disappear, GA=2,GB=7 and they return again..

Code: Select all

21:15:37.826053 T10011E00 Write-Data Control setpoint: 30.00
21:15:37.945183 BD0011E00 Write-Ack  Control setpoint: 30.00
21:15:38.806966 11.88T10011E00
21:15:38.967465 BD0011E00 Write-Ack  Control setpoint: 30.00
21:15:39.413707 T80190000 Read-Data  Boiler water temperature: 0.00
21:15:39.511791 B40191F80 Read-Ack   Boiler water temperature: 31.50
21:15:39.915675 T001B0000 Read-Data  Outside temperature: 0.00
21:15:40.035373 BF01B0000 Unk-DataId Outside temperature: 0.00
21:15:40.045085 AC01B5EE0 Read-Ack   Outside temperature: 94.88
21:15:40.477742 11.94T80000B00
21:15:40.597164 B40000B00 Read-Ack   Status: 00001011 00000000
21:15:41.039668 T80000B00 Read-Data  Status: 00001011 00000000
21:15:41.161699 B40000B00 Read-Ack   Status: 00001011 00000000
21:15:41.582403 T80000B00 Read-Data  Status: 00001011 00000000
21:15:41.702353 B40000B00 Read-Ack   Status: 00001011 00000000
21:15:42.144894 11.94T80000B00
21:15:42.266320 B40000B00 Read-Ack   Status: 00001011 00000000
21:15:42.748769 T10011E00 Write-Data Control setpoint: 30.00
21:15:42.815088 BD0011E00 Write-Ack  Control setpoint: 30.00
hvxl
Senior Member
Senior Member
Posts: 1966
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Outside temperature probe

Post by hvxl »

Without even looking at the code I'm pretty sure I know what the problem is. I'll fix it. Thanks for reporting.
Schelte
Post Reply

Return to “Opentherm Gateway Forum”