tnemrap
(Michael Parment)
January 18, 2021, 10:26am
1
I have alot of this errors in my log. Would it be possible to give a Waring when it retries and Error when al retries fails?
2021-01-18 11:20:47.094 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/5 error: connect timed out. Connection TCPMasterConnection@e533c0[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@1d6b7db[address=192.168.192.68,port=502]
2021-01-18 11:21:43.347 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/5 error: connect timed out. Connection TCPMasterConnection@7a5fca[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@1d6b7db[address=192.168.192.68,port=502]
2021-01-18 11:22:50.964 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/5 error: connect timed out. Connection TCPMasterConnection@a4de66[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@1d6b7db[address=192.168.192.68,port=502]
tnemrap
(Michael Parment)
January 19, 2021, 10:48am
2
@ssalonen Do you have any input on this?
rossko57
(Rossko57)
January 19, 2021, 11:18am
3
off-topic ; you could try fixing the underlying error by use of timeBetweenReconnectMillis
parameter
TCP tuning
If you are a user only of Modbus-RTU over serial, ignore this section. Modbus-TCP users read onā¦
I wondered whether to make this a separate guide, as this is more about performance external to openHAB, but it is closely related.
In Modbus-TCP, we use the standard TCP/IP communications protocol as a ācarrierā for our Modbus flavoured data transactions. TCP in general is really peer-to-peer, but with Modbus our Master (openHAB) becomes a TCP Client, initiating communications with TCPā¦
tnemrap
(Michael Parment)
January 19, 2021, 3:14pm
4
I can not se how this parameters should change that it is timing out on the first try?
rossko57
(Rossko57)
January 19, 2021, 3:21pm
5
We donāt know why it times out on the first try, but it might be because the remote end is still tidying up the old connection and will not yet accept a new connection. It might work better if you allow more time between a disconnect and reconnect.
tnemrap
(Michael Parment)
January 19, 2021, 4:47pm
6
I am just pulling every 60 sec.
rossko57
(Rossko57)
January 19, 2021, 4:51pm
7
Alright, weāve seen devices before that do not disconnect cleanly with the default binding settings. Try increasing reconnectAfterMillis
to an hour or so.
ssalonen
(Ssalonen)
January 19, 2021, 5:15pm
8
tnemrap
(Michael Parment)
January 19, 2021, 6:35pm
9
I will look into if i can do a PR
1 Like
tnemrap
(Michael Parment)
January 19, 2021, 6:38pm
10
If i use reconnectAfterMillis it does not reconnect and i get to much updates.
rossko57
(Rossko57)
January 19, 2021, 8:21pm
11
You are always using reconnectAfterMillis whether you set it to something non-default or not, it exists and is used.
If you want some help with that, please say what you are doing and what ātoo much updatesā means.
1 Like
tnemrap
(Michael Parment)
January 19, 2021, 9:23pm
12
PR done.
Can you check it i missed something.
openhab:main
ā tnemrap:main
opened 09:18PM - 19 Jan 21 UTC
1 Like