Commands not always send to OTGW

For OpenTherm-gateway related questions in Domoticz
cp9999
Posts: 16
Joined: Tuesday 04 February 2014 0:05
Target OS: Raspberry Pi
Domoticz version:
Contact:

Commands not always send to OTGW

Postby cp9999 » Wednesday 28 December 2016 16:27

My setup:
OTGW, firmware 4.2
Connected to LAN using a TPLink
Domoticz version v3.6136 running on Ubuntu server 14.04

Issue:
Commands that are issued from devices (e.g. changing the Room thermostat setpoint) are not always send to the OTGW.

My analysis:
Looking at the domoticz log:

Code: Select all

2016-12-28 10:12:06.216 OTGW: Connection reset!
2016-12-28 10:12:06.216 TCP: Reconnecting in 30 seconds...
2016-12-28 10:12:36.219 TCP: Reconnecting...
2016-12-28 10:12:37.219 OTGW: connected to: 192.168.10.3:10001
2016-12-28 10:12:50.221 OTGW: PR: BV
2016-12-28 10:13:06.223 OTGW: Connection reset!
2016-12-28 10:13:06.223 TCP: Reconnecting in 30 seconds...
2016-12-28 10:13:36.226 TCP: Reconnecting...
2016-12-28 10:13:37.226 OTGW: connected to: 192.168.10.3:10001
2016-12-28 10:13:50.228 OTGW: PR: BV
2016-12-28 10:14:06.230 OTGW: Connection reset!
2016-12-28 10:14:06.230 TCP: Reconnecting in 30 seconds...
2016-12-28 10:14:36.233 TCP: Reconnecting...
2016-12-28 10:14:37.233 OTGW: connected to: 192.168.10.3:10001
2016-12-28 10:14:50.235 OTGW: PR: BV

I can see that the connection with the OTGW is being reset approx. every minute, followed by a TCP message that it will reconnect in 30 seconds.
All commands for the OTGW that are initiated within this time range are not send to the OTGW (e.g. in between the 'Connection reset' message and the 'TCP Reconnecting' message 30 seconds later).
Then I captured the network traffic to find out more about this OTGW reset. This is a snapshot:
Network capture.png
Network capture.png (89.64 KiB) Viewed 84 times

It seems that the frame received from the OTGW (source 192.168.10.3) including the [FIN, ACK] results in the 'OTGW: Connection reset'.

Question:
Is this continuous resetting of the OTGW connection the normal behaviour or is there something wrong in my setup?


I think it would also be great if the OTGW with LAN hardware driver could be adjusted in a way that it would suspend any messages for the OTGW during a connection reset interval and actually send them when connection is restored.

cp9999
Posts: 16
Joined: Tuesday 04 February 2014 0:05
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Commands not always send to OTGW

Postby cp9999 » Wednesday 28 December 2016 17:28

Update:

Found the reason for the connection reset.
In the OpenWrt firmware running on the TPLink, I had added the following configuration line to the startup script (according several descriptions I had found at the time):

Code: Select all

echo "10001:raw:15:/dev/ttyUSB0:9600 NONE 1STOPBIT 8DATABITS" > /etc/ser2net.conf

This specifies a timeout of 15 seconds (during which there is no communication) after which the port will be closed. Therefore the port on the TPLink was closed after each request since Domoticz reads data from the OTGW only every 30 seconds.
Changed the timeout to 60 seconds and connection stays open now.

sincze
Posts: 521
Joined: Monday 02 June 2014 22:46
Target OS: Linux
Domoticz version: 3.6179
Location: Netherlands
Contact:

Re: Commands not always send to OTGW

Postby sincze » Thursday 29 December 2016 12:28

Known issue why not change to : echo "10001:raw:0:/

Sent from my SM-G925F using Tapatalk


Return to “OpenTherm gateway”

Who is online

Users browsing this forum: No registered users and 1 guest