britkat1980 / giv_tcp

TCP connection (from inverter) and MQTT implementation
78 stars 37 forks source link

Cannot connect to inverter - host is unreachable / timeout error (v 2.4.3) #162

Closed Boffinboy closed 9 months ago

Boffinboy commented 9 months ago

Hi there, I am struggling to get GivTCP to work. I am running Home Assistant on Synology in a VM. I have set my inverter IP, and set up a user for MQTT. Unfortunately I just keep getting host is unreachable / timeout errors and it never connects to the inverter. Wondering if I am doing something stupid? I have an AC3 inverter, and have tried with / without the “old firmware” option: 2023-12-23 09:06:32,622 - startup - [CRITICAL] - HA MQTT Service has been found at core-mosquitto 2023-12-23 09:06:32,629 - startup - [INFO] - Supervisor Timezone: Europe/London 2023-12-23 09:06:34,640 - startup - [CRITICAL] - Scanning network for GivEnergy Devices... 2023-12-23 09:06:39,317 - startup - [CRITICAL] - No inverters found... 2023-12-23 09:06:39,317 - startup - [INFO] - Searching for Inverters again 2023-12-23 09:06:39,317 - startup - [CRITICAL] - Scanning network for GivEnergy Devices... 2023-12-23 09:06:44,078 - startup - [CRITICAL] - No inverters found... 2023-12-23 09:06:44,080 - startup - [INFO] - Searching for Inverters again 2023-12-23 09:06:44,086 - startup - [CRITICAL] - Scanning network for GivEnergy Devices... 2023-12-23 09:06:48,880 - startup - [CRITICAL] - No inverters found... 2023-12-23 09:06:48,882 - startup - [CRITICAL] - Running Redis 2023-12-23 09:06:48,884 - startup - [CRITICAL] - Setting up invertor: 1 of 1 2023/12/23 09:06:48 [notice] 249#249: using the "epoll" event method 2023/12/23 09:06:48 [notice] 249#249: nginx/1.20.2 2023/12/23 09:06:48 [notice] 249#249: OS: Linux 6.1.63-haos 2023/12/23 09:06:48 [notice] 249#249: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816 2023/12/23 09:06:48 [notice] 249#249: start worker processes 2023/12/23 09:06:48 [notice] 249#249: start worker process 253 2023/12/23 09:06:48 [notice] 249#249: start worker process 254 2023-12-23 09:06:48,939 - startup - [CRITICAL] - Running RQ worker to queue and process givernergy-modbus calls 2023-12-23 09:06:48,939 - startup - [CRITICAL] - Running Invertor (192.168.1.91) read loop every 15s 2023-12-23 09:06:48,941 - startup - [CRITICAL] - Subscribing MQTT Broker for control 2023-12-23 09:06:48,947 - startup - [CRITICAL] - Starting Gunicorn on port 6345 [2023-12-23 09:06:49 +0000] [258] [INFO] Starting gunicorn 21.2.0 [2023-12-23 09:06:49 +0000] [258] [INFO] Listening at: http://0.0.0.0:6345 (258) [2023-12-23 09:06:49 +0000] [258] [INFO] Using worker: sync [2023-12-23 09:06:49 +0000] [259] [INFO] Booting worker with pid: 259 [2023-12-23 09:06:49 +0000] [260] [INFO] Booting worker with pid: 260 [2023-12-23 09:06:49 +0000] [261] [INFO] Booting worker with pid: 261 2023-12-23 09:06:50,992 - Inv1 - mqtt_client - [CRITICAL] - Connecting to MQTT broker for control- core-mosquitto 2023-12-23 09:06:53,474 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:06:54,530 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:06:57,036 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:06:58,114 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:07:00,619 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:07:01,698 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:07:04,594 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:07:05,666 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:07:08,170 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:07:09,250 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:07:11,754 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:07:12,834 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:07:30,777 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:07:31,842 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:07:34,346 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:07:35,426 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:07:37,931 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:07:39,010 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:07:56,924 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:07:58,018 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:08:00,522 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:08:01,602 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:08:04,108 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:08:05,186 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:08:23,088 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:08:24,194 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:08:26,699 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:08:27,778 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable 2023-12-23 09:08:30,283 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: timed out 2023-12-23 09:08:31,107 - Inv1 - mqtt_client - [ERROR ] - No serial_number found in MQTT queue. MQTT Control not available. Traceback (most recent call last): File "/app/GivTCP_1/mqtt_client.py", line 402, in client.loop_forever() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1164, in _loop rc = self.loop_read() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1556, in loop_read rc = self._packet_read() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2439, in _packet_read rc = self._packet_handle() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3039, in _packet_handle return self._handle_connack() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3138, in _handle_connack on_connect( File "/app/GivTCP_1/mqtt_client.py", line 386, in on_connect client.subscribe(MQTT_Topic+"/control/"+GiV_Settings.serial_number+"/#") AttributeError: type object 'GiV_Settings' has no attribute 'serial_number' 2023-12-23 09:08:31,362 - Inv1 - sync - [ERROR ] - Connection to (myip, 8899) failed: [Errno 113] Host is unreachable

Boffinboy commented 9 months ago

Turns out it was a networking kit issue!