GivTCP won’t connect

21 comments started 2023-12-23 last 2024-01-01
Home AutomationGivEnergy ProductsAC Coupled
B
#1 Boffinboy

Hi there, I know there are quite a few HA and GivTCP users here. 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. Below is the log I get. I have the latest version available in the HA add ons.

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 <module>
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

S
#2 SteveCook

Have you got GivTCP running in addons as well as MQTT?
Have you got MQTT running in integrations?

B
#3 Boffinboy

SteveCook Yep, MQTT on in integrations. MQTT also showing as running in add ons. GivTCP also running, giving the log above. Unless I misunderstand and there are other places I need to enable?

S
#4 SteveCook

sorry I am not really an expert on this.
Have you clicked "start" on the integrations or tried "restart".
I did have to do restart sometimes after an update.
Have you tried a HA reboot, not just the button, but turning off power for 20s say

#5 PianSom

Boffinboy
It's curious that GivTCP seems to be finding your inverter but then fails to connect to it.

Just to confirm - Is your inverter at 192.168.1.21? Can you connect to it on port 8899? Do you have any vlan's etc which might stop GivTCP/HA/the Synology vm from connecting?

If I had to guess I'd say that the last question is the key. Looks like a firewall or comms issue between the Synology vm and the inverter.

B
#6 Boffinboy

SteveCook No problem! Thanks for trying to help

PianSom thanks. The inverter is on 192.168.1.91. I am wondering the same, whether there is some sort of networking issue preventing the Synology VM connecting. I don’t have any VLANs. What’s very puzzling is the GE app local connection works, so it must be accessible, but I tried accessing the IP in a browser and it doesn’t seem to be working. Hate trying to troubleshoot networking issues!

S
#7 SteveCook

Enable MQTT output in the GivTCP config is "on" and the right password?
HA auto discovery on in GivTCP config

B
#8 Boffinboy

I think it was my networking kit. My UniFi APs had updated, and leads to issues with the inverter and my hue sync box - very odd

#9 PianSom

Boffinboy
Odd, I wouldn't have thought that a change to 6.6.58 (if that's what you moved to) would have caused issues like those suggested in the GivTCP logs.

My money would still be on a networking config issue in the Synology. I wonder if port 80 is open (so it can do a search and discovery of the inverter) but 8899 is not (so it cannot connect to Modbus or whatever is on that port) - something like that. I am an AIO user, so can't check myself.

PS sorry for the typo - yes, I meant 91 not 21

B
#10 Boffinboy

PianSom rolled back my AP firmware and working fine now - can ping the inverter again and connect to it. It’s an issue I have had with previous firmware too - need to message UniFi about it. P.s. I did move to 6.6.58 that caused the issue

#11 PianSom

Boffinboy
Great, so you are now up and running with GivTCP?

B
#12 Boffinboy

PianSom it seems so! Time to have an experiment and see if I can get this PredBat working… The currently very attractive Agile rates have me curious! Currently using Cosy and charging up twice per day as usage is 30kW+ some days…

G
#13 geoffreycoan

Boffinboy If you need help with predbat, there's a few of us on here that can pitch in, or do log a github issue, the author Trefor is very helpful with resolving issues and bringing out new features & bug fixes

I've got an ASHP, on agile. Did consider Cosy but I didn't think I could get all my ASHP usage into the Cosy periods or have enough battery capacity to run me through the rest of the day.
So far, happy with my decision with Agile being about 1/3 cheaper than Cosy. The 60p/kW peak rates in early December were a bit scary, but by comparison we've been paid to heat the house and run the tumble dryer and hot tub for the last couple of days! So gotta take the rough with the smooth.

Average unit rate over the last month is 18.4p/kW

J
#14 Jellybaby

PianSom

It's curious that GivTCP seems to be finding your inverter but then fails to connect to it.

I had this issue when I would lose comms, I could see and connect to inverter just nothing that provides info on what its doing.

J
#15 Jellybaby

geoffreycoan I tried to wrap my head around it myself so I could do a youtube video about how to set it up in a step by step thing but as soon as people get to this whole yaml stuff they go from 0-60 and I just get whiplash.

#16 PianSom

Jellybaby
His issue disappeared when he sorted out his wifi problem.

Might something similar be the cause of your comms problems?

J
#17 Jellybaby

PianSom nah mine was on LAN and I was getting constant dropouts, but my new issue is inverter keeping going idle twice in a row, its happened 4 times today and ive been waiting 2 weeks for an answer as to why it started happening just after V8 BMS, im hoping they can see more info on their end that might give a reason as to why.

the 4th cycle today has gone through 3 phases of it dropping to grid and inverter going idle so far

Thinking about just power cycling the AIO to see if that clears anything up.

#18 PianSom

Jellybaby
So did you manage to identify what was causing your comms issues? Or did they just stop when you moved to BMS8?

J
#19 Jellybaby

PianSom No, they loaded another config onto it which helped, this was 21st November and the following was mentioned

I will load a different dongle firmware that can auto reboot it if lost comms detected but its designed to be lost comms with the inverter-portal not dongle itself and portal

So I am wondering if during the bms updates something might not be liking it or something (praying they interact in some way to explain the sudden occurence after the v8 upload), between 21st November and 11th December I had not needed to reboot the AIO due to lost comms and it had been rock solid, I am praying to god something is iffy with the V8 firmware and this issue is being seen on other units otherwise I am going to insist someone come out to see if they can identify if anything is wrong.

B
#20 Beeacon

Jellybaby

I’m having the same comms issue now where it can sometimes go down for days at a time on my AIO. It’s odd because I can still access the Access Point of the battery, it’s just not uploading/downloading any data. Rather aggravating when I’m LAN cabled in.

Did you get GivEnergy to load a different config? How did they connect to it if it is offline? I didn’t think the AIO had a dongle.

J
#21 Jellybaby

Beeacon When it went offline I pushed the button on side of the AIO then after I heard it click off I flipped the breaker in the gateway for the AIO and waited for the red light to go out (it goes from green to red when you shut off power) then turned it back on in the gateway and waited for it to boot back up, it could take a few minutes to start up though.