Problems installing GivTCP addon for home assistant

12 comments started 2024-09-13 last 2024-09-13
APIsHome AutomationHome Assistant
W
#1 Weasel

Hi, and thanks for reading

I have been a happy GiveEnergy user for the past 3 months and have just got round to looking at HomeAssistant with a view to limiting my battery charging based upon predicted solar generation for the following day. I have an all-in-one plus gateway and 11 solar panels connected to a Solis 3.5kWh inverter. The GivEnergy inverter is limited to 3.68kW export.

My thoughts were to add GiveTCP and PredBat to my HomeAssistant Server (a VM running HaOS under Hyper-V), but when I install and start GivTCP, I get the log shown below and no new devices are seen in MQTT. MQTT itself seems to be working fine because I use it to pull in data from the door sensors on my Ring Alarm system.

I am a relative newbie to HA so am struggling to figure out what I have done wrong - does anybody have a debugging and/or troubleshooting guide bceause I am sure I have done (or not done) something simple - I just can't see where I have gone wrong.

I know I could use wonderwatt or similar, but it would be cool to figure it all out on my own system

Thanks In Advance
Chris

2024-09-13 11:44:56,603 - startup - [CRITICAL] - HA MQTT Service has been found at core-mosquitto
2024-09-13 11:44:56,605 - startup - [INFO] - Supervisor Timezone: Europe/London
2024-09-13 11:44:58,609 - startup - [CRITICAL] - Scanning network for GivEnergy Devices...
2024-09-13 11:45:02,351 - startup - [CRITICAL] - Inverter GW2335G432 which is a Gen 1 - Gateway has been found at: 192.168.1.136
2024-09-13 11:45:02,507 - startup - [CRITICAL] - Inverter CD2347G136 which is a Gen 1 - All in One has been found at: 192.168.1.213
2024-09-13 11:45:02,507 - startup - [INFO] - Searching for Inverters again
2024-09-13 11:45:02,507 - startup - [CRITICAL] - Running Redis
2024-09-13 11:45:02,508 - startup - [CRITICAL] - Setting up invertor: 1 of 2
2024/09/13 11:45:02 [notice] 69#69: using the "epoll" event method
2024/09/13 11:45:02 [notice] 69#69: nginx/1.20.2
2024/09/13 11:45:02 [notice] 69#69: OS: Linux 6.6.46-haos
2024/09/13 11:45:02 [notice] 69#69: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816
2024/09/13 11:45:02 [notice] 69#69: start worker processes
2024/09/13 11:45:02 [notice] 69#69: start worker process 70
2024/09/13 11:45:02 [notice] 69#69: start worker process 71
2024/09/13 11:45:02 [notice] 69#69: start worker process 72
2024/09/13 11:45:02 [notice] 69#69: start worker process 76
2024-09-13 11:45:02,517 - startup - [CRITICAL] - Running RQ worker to queue and process givernergy-modbus calls
2024-09-13 11:45:02,517 - startup - [CRITICAL] - Running Invertor (192.168.1.213) read loop every 15s
2024-09-13 11:45:02,518 - startup - [CRITICAL] - Subscribing MQTT Broker for control
2024-09-13 11:45:02,518 - startup - [CRITICAL] - Starting Gunicorn on port 6345
2024-09-13 11:45:02,521 - startup - [CRITICAL] - Setting up invertor: 2 of 2
2024-09-13 11:45:02,534 - startup - [CRITICAL] - Running RQ worker to queue and process givernergy-modbus calls
2024-09-13 11:45:02,534 - startup - [CRITICAL] - Running Invertor (192.168.1.136) read loop every 15s
2024-09-13 11:45:02,535 - startup - [CRITICAL] - Subscribing MQTT Broker for control
2024-09-13 11:45:02,536 - startup - [CRITICAL] - Starting Gunicorn on port 6346
[2024-09-13 11:45:02 +0100] [80] [INFO] Starting gunicorn 23.0.0
[2024-09-13 11:45:02 +0100] [80] [INFO] Listening at: http://0.0.0.0:6345 (80)
[2024-09-13 11:45:02 +0100] [80] [INFO] Using worker: sync
[2024-09-13 11:45:02 +0100] [85] [INFO] Booting worker with pid: 85
[2024-09-13 11:45:02 +0100] [86] [INFO] Booting worker with pid: 86
[2024-09-13 11:45:02 +0100] [87] [INFO] Booting worker with pid: 87
[2024-09-13 11:45:02 +0100] [84] [INFO] Starting gunicorn 23.0.0
[2024-09-13 11:45:02 +0100] [84] [INFO] Listening at: http://0.0.0.0:6346 (84)
[2024-09-13 11:45:02 +0100] [84] [INFO] Using worker: sync
[2024-09-13 11:45:02 +0100] [90] [INFO] Booting worker with pid: 90
[2024-09-13 11:45:02 +0100] [91] [INFO] Booting worker with pid: 91
[2024-09-13 11:45:02 +0100] [92] [INFO] Booting worker with pid: 92
2024-09-13 11:45:03,386 - Inv2 - mqtt_client - [CRITICAL] - Connecting to MQTT broker for control- core-mosquitto
2024-09-13 11:45:03,630 - Inv1 - mqtt_client - [CRITICAL] - Connecting to MQTT broker for control- core-mosquitto
2024-09-13 11:45:57,472 - Inv1 - read - [ERROR ] - 10 failed inverter reads in a row so removing regCache to force update...
2024-09-13 11:46:43,486 - Inv2 - mqtt_client - [ERROR ] - No serial_number found in MQTT queue. MQTT Control not available.
Traceback (most recent call last):
File "/app/GivTCP_2/mqtt_client.py", line 402, in <module>
client.loop_forever()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2297, in loop_forever
rc = self._loop(timeout)
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1686, in loop
rc = self.loop_read()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2100, in loop_read
rc = self.
packet_read()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3142, in packet_read
rc = self.
packet_handle()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3814, in packet_handle
return self.
handle_connack()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3934, in handle_connack
on_connect(
File "/app/GivTCP_2/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'
2024-09-13 11:46:43,725 - 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 2297, in loop_forever
rc = self.
loop(timeout)
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1686, in loop
rc = self.loop_read()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2100, in loop_read
rc = self.
packet_read()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3142, in packet_read
rc = self.
packet_handle()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3814, in packet_handle
return self.
handle_connack()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3934, 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'

G
#2 geoffreycoan

I can’t remember for sure but I think you may need the beta version of GivTCP to properly support the All in One inverter. Or wait for v3 of the addon to be published which is soon and it will include the latest code.

If you are still getting the serial number error then doing a ‘reset to defaults’ in the portal can often cure it

R
#3 Rbor

Have a look at this thread:
https://community.givenergy.cloud/d/4954-how-to-use-predbat-from-scratch/34

There are many hints to help you to get started. The thread was started by another prospective new user to Predbat.

The predbat documentation and videos are a must:
https://springfall2008.github.io/batpred/
https://springfall2008.github.io/batpred/video-guides/

You do need to spend some time getting everything set up but it is well worth it.
My Predbat just runs and sorts everything, (importing and exporting) automatically for me.
It is 'fun' and very rewarding to set up Predbat from scratch.
I started 8 months ago and was a real rabbit. But I now know my way around Predbat and HA, and I hope that I, along with others, can help out new Predbat pioneers.

Others may be able to help you with your screenshot, although this line does look very strange to me:
[2024-09-13 11:45:02 +0100] [84] [INFO] Listening at: http://0.0.0.0:6346 (84)
Have you checked out this excellent video from Speak to the Geek about setting up MQTT, givTCP and more.:
https://www.youtube.com/watch?v=ygD9KyciX54

Rob

#4 PianSom

No, uncharacteristically for Geoffrey, it is not correct that non-beta GivTCP does not support the AIO - I used it for many months.

Looking at the logs, it seems that you have set up both the Gateway and the AIO in GivTCP. Unless you are using multiple batteries then you should only specify the AIO. (I believe the opposite is true if you have multiple batteries, and you WILL need the beta in that case.) I think that is probably the real issue here, causing the crash.

2024-09-13 11:45:02,351 - startup - [CRITICAL] - Inverter GW2335G432 which is a Gen 1 - Gateway has been found at: 192.168.1.136
2024-09-13 11:45:02,507 - startup - [CRITICAL] - Inverter CD2347G136 which is a Gen 1 - All in One has been found at: 192.168.1.213

IIRC GivTCP includes its own MQTT broker. You are specifying your own existing external one correctly?

G
#5 geoffreycoan

PianSom Looking at the logs, it seems that you have set up both the Gateway and the AIO in GivTCP. Unless you are using multiple batteries then you should only specify the AIO. (I believe the opposite is true if you have multiple batteries.) I think that is probably the real issue here, causing the crash.

I think you are right @PianSom for single AIO’s you only need to setup the gateway, for multiple AIO’s you configure the gateway and do need the latest software.
I just couldn’t remember the extent to which the current GivTCP release supports AIO’s. I thought there was improvements in the beta, but maybe that was just specifically for 3 phase and multi-AIO’s.

#6 PianSom

geoffreycoan for single AIO’s you only need to setup the gateway

Typo alert! For single AIOs you only need to setup the AIO (NOT the Gateway) 🙂

J
#7 JasonF

Can confirm, when you only have one AIO you point givtcp at the AIO.

When you have multiple which I do now, you need the beta and you can add all 3 devices. (Mainly because not all data is available from just the gateway yet, and is useful to see individual AIO info - but you only control the gateway).

G
#8 geoffreycoan

PianSom I’m going home.

It’s what the other person said.

If only someone had written this down clearly in the GivTCP or Predbat documentation. I wonder who might do that for the community to save future confusion … 😉

#9 PianSom

geoffreycoan
You have my full permission to take the weekend off to think about how you can contribute going forward. Just make sure you are ready to perform properly next week

🙂

S
#10 SteveClubley

I’ve only been using GivTCP for a week so have little experience but I tried GivTCP version 2.4.7 I think it was with MQTT on a Home Assistant Green and whilst it found my Gen 3 inverter it would not extract any data. I tried reinstalling a few times but no luck. I tried GivTCP version 3 beta and it worked first time and continues to work.

W
#11 Weasel

Thanks for all the responses so far. I was getting hung up about not being able to install GivTCP without realising that there was a GE Cloud integration that works with PredBat. That serves me right for working bottom-up rather than top-down. I appreciate that this integration relies upon GE Cloud so if my interwebs fails, then I am snookered, but I will also be relying upon the interwebs for the solcast data.

So far I have the Solcast and the GE Cloud installed, along with the Octopus Energy integration, and I will tackle the predbat install over the weekend. I might leave it until I have migrated my HomeAssistant from its current HaOS VM running under hyper-V to the HomeAssistant Green appliance I have just purchased

T
#12 treborUK

Also have to setup AIO as 0 for batteries in GivTCP setup if I recall