cosote / ha-async-tcp-proxy Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Dear all,
I'm running this modus proxy in Home Assistant and it works fine when it works, but at least twice per day it crashes and does not recover. I have setup an auto-start automation so when data becomes null or not correct, it attempts to restart this 'add on'.
I believe my SolarEdge inverter is the cause of the issue on IP address 131 in the error log below, but I have not had any issues at all with Solaredge Modbus which had been running for many months before I replaced comms with this module.
192,168.1.131 is Solaredge Inverter
192.168.1.132 is Home Assistant which also hosts this modus proxy
Each crash leaves my system without any PV data and I have lost a lot already. IF I manually restart the module in HA, everything works again. How can this be made robust/reliable please?
Thanks.
ERROR LOG:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Preparing to run async-tcp-proxy
Server: 192.168.1.131:1502
Server timeout: 1
Client timeout: 1
Loglevel: INFO
Execute: python async-tcp-proxy.py --port 8899 --server-host 192.168.1.131 --server-port 1502 --server-timeout 1 --client-timeout 1 --loglevel INFO
2023-11-07 18:21:19,900 - root - INFO - TCP proxy server started on port 8899
2023-11-07 18:21:23,392 - 192.168.1.132:50175 - INFO - New client connection
2023-11-07 18:21:23,394 - 192.168.1.132:50175 - ERROR - Error connecting to remote server: [Errno 111] Connect call failed ('192.168.1.131', 1502)
2023-11-07 18:21:23,394 - 192.168.1.132:50175 - INFO - Closing client connection, reason: unknown
2023-11-07 18:21:23,394 - asyncio - ERROR - Task exception was never retrieved
future: <Task finished name='Task-4' coro=<handle_client() done, defined at //async-tcp-proxy.py:55> exception=TypeError('cannot unpack non-iterable NoneType object')>
Traceback (most recent call last):
File "//async-tcp-proxy.py", line 69, in handle_client
remote_reader, remote_writer = await get_remote_server_connection(log)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object
2023-11-07 18:21:24,198 - 192.168.1.132:52749 - INFO - New client connection
2023-11-07 18:21:24,200 - 192.168.1.132:52749 - ERROR - Error connecting to remote server: [Errno 111] Connect call failed ('192.168.1.131', 1502)
2023-11-07 18:21:24,200 - 192.168.1.132:52749 - INFO - Closing client connection, reason: unknown
2023-11-07 18:21:24,201 - asyncio - ERROR - Task exception was never retrieved
future: <Task finished name='Task-6' coro=<handle_client() done, defined at //async-tcp-proxy.py:55> exception=TypeError('cannot unpack non-iterable NoneType object')>
Traceback (most recent call last):
File "//async-tcp-proxy.py", line 69, in handle_client
remote_reader, remote_writer = await get_remote_server_connection(log)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object
2023-11-07 18:21:26,605 - 192.168.1.132:40791 - INFO - New client connection
2023-11-07 18:21:26,606 - 192.168.1.132:40791 - ERROR - Error connecting to remote server: [Errno 111] Connect call failed ('192.168.1.131', 1502)
2023-11-07 18:21:26,606 - 192.168.1.132:40791 - INFO - Closing client connection, reason: unknown
2023-11-07 18:21:26,607 - asyncio - ERROR - Task exception was never retrieved
future: <Task finished name='Task-8' coro=<handle_client() done, defined at //async-tcp-proxy.py:55> exception=TypeError('cannot unpack non-iterable NoneType object')>
Traceback (most recent call last):
File "//async-tcp-proxy.py", line 69, in handle_client
remote_reader, remote_writer = await get_remote_server_connection(log)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object
2023-11-07 18:21:33,810 - 192.168.1.132:47701 - INFO - New client connection
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.