Is anyone else getting connection drops from their MySensors gateway in the latest update?
After about a day from a restart of HA the connection to the gateway drops and never recovers. Error message as follows:
2018-06-14 01:05:19 ERROR (MainThread) [mysensors.gateway_tcp] No response from ('192.168.1.204', 5003). Disconnecting
2018-06-14 01:05:19 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback AsyncTCPGateway._check_connection()
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/mysensors/gateway_tcp.py", line 144, in _check_connection
super()._check_connection()
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/mysensors/gateway_tcp.py", line 35, in _check_connection
self.server_address))
OSError: No response from ('192.168.1.204', 5003). Disconnecting
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/events.py", line 126, in _run
self._callback(*self._args)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/mysensors/gateway_tcp.py", line 147, in _check_connection
self.protocol.transport.close()
AttributeError: 'NoneType' object has no attribute 'close'
If I access the gateway via MYSController after this error I see all the nodes responding properly to the gateway so I know the gateway is working properly.
The fixes in your PR seem to be working fine, after updating to 0.73 I was having issues again, swapping out to the PR version I havenāt had an error yet.
After a few more tests, and after enabling debug logging, iāve found out that the gateway is not timing out, but somehow the responses of both gateways get mixed in a way that it only resets the timeout of one of the gateways. The other one times out and reconnectsā¦
Donāt know if this scenario is not supported but it was working fine in 0.72.
Similar problem here, 2 gateways, raspberry pi gateway and arduino uno with ethernet shield. All working ok on 0.73.2, all versions since to 0.75.3 home-assistant looses connection to uno which then resets, this repeats every minute. Remove raspberry pi gateway from configuration file all ok. have tested with 2 uno gateways and all ok. Nothing new to add to logs already submitted by friopes
Thanks everyone for the feedback and logs. I think Iāve found the bug. Now Iāll work on verifying it, a fix and testing. Iāll update here when I have something to show.