Coder Social home page Coder Social logo

ha-async-tcp-proxy's People

Contributors

cosote avatar

Watchers

 avatar

ha-async-tcp-proxy's Issues

Keeps crashing and not recovering

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.