GivTCP 2.0.6 not re-connecting data - until a restart

if there a know issue with GivTCP as for the past through weeks, I have discovered that my GivTCP stops collecting information from my GivEnergy invertor, and log the following error. this only resolves itself, after I do a restart on the Addon.

2022-12-17 10:26:11,839 - read - [ERROR] - Error collecting registers: (<class ‘KeyError’>, KeyError(IR:183), <traceback object at 0x7f125d213d80>)
2022-12-17 10:28:30,239 - sync - [ERROR] - Connection to (192.168.40.2, 8899) failed: timed out
2022-12-17 10:28:35,175 - GivLUT - [CRITICAL] - Consecutive failure count= 1
2022-12-17 10:28:35,175 - read - [ERROR] - Error collecting registers: (<class ‘KeyError’>, KeyError(IR:000), <traceback object at 0x7f125d20f900>)

and here is the results after a restart

2022-12-17 12:37:58,068 - startup - [CRITICAL] - Config directory already exists
2022-12-17 12:37:58,068 - startup - [CRITICAL] - Running Redis
2022-12-17 12:37:58,072 - startup - [CRITICAL] - Running RQ Dashboard on port 9181
2022-12-17 12:37:58,072 - startup - [CRITICAL] - Setting up invertor: 1 of 1
2022-12-17 12:37:58,080 - startup - [CRITICAL] - Recreating settings.py for invertor 1
2022-12-17 12:37:58,081 - startup - [CRITICAL] - Removing old invertor data cache
2022-12-17 12:37:58,081 - startup - [CRITICAL] - Removing old battery data cache
2022-12-17 12:37:58,082 - startup - [CRITICAL] - Running RQ worker to queue and process givernergy-modbus calls
2022-12-17 12:37:58,082 - startup - [CRITICAL] - Running Invertor read loop every 5s
2022-12-17 12:37:58,087 - startup - [CRITICAL] - Subscribing Mosquitto on port 1883
2022-12-17 12:37:58,092 - startup - [CRITICAL] - Starting Gunicorn on port 6345
2022-12-17 12:37:58,104 - startup - [CRITICAL] - Setting daily charge target forecast job to run at: 00:20
[2022-12-17 12:37:58 +0000] [16] [INFO] Starting gunicorn 20.1.0
[2022-12-17 12:37:58 +0000] [16] [INFO] Listening at: http://0.0.0.0:6345 (16)
[2022-12-17 12:37:58 +0000] [16] [INFO] Using worker: sync
[2022-12-17 12:37:58 +0000] [19] [INFO] Booting worker with pid: 19
[2022-12-17 12:37:58 +0000] [20] [INFO] Booting worker with pid: 20
[2022-12-17 12:37:58 +0000] [21] [INFO] Booting worker with pid: 21
RQ Dashboard version 0.6.0

  • Running on 0.0.0.0:9181
  • Serving Flask app ‘rq_dashboard.cli’
  • Debug mode: off
    2022-12-17 12:38:00,889 - sync - [ERROR] - Connection to (192.168.40.2, 8899) failed: timed out
    2022-12-17 12:38:07,632 - GivLUT - [CRITICAL] - Consecutive failure count= 1
    2022-12-17 12:38:07,632 - read - [ERROR] - Error collecting registers: (<class ‘KeyError’>, KeyError(HR:013), <traceback object at 0x7f599fb1b600>)
    2022-12-17 12:38:12,923 - read - [CRITICAL] - First time running so saving AC Charge status
    2022-12-17 12:38:12,924 - read - [CRITICAL] - Publishing Home Assistant Discovery messages
    2022-12-17 12:40:16,062 - GivLUT - [CRITICAL] - Consecutive failure count= 1
    2022-12-17 12:40:16,062 - read - [ERROR] - Error collecting registers: (<class ‘KeyError’>, KeyError(HR:013), <traceback object at 0x7f599fb1f240>)

I have checked my MQTT and goggle the results and it looks like it is heathy

2022-12-27 12:03:48: New connection from 192.168.1.7:45413 on port 1883.
2022-12-27 12:03:48: New client connected from 192.168.1.7:45413 as GivEnergy_GivTCP_1 (p2, c1, k60, u’mqttuser’).
2022-12-27 12:03:48: Client GivEnergy_GivTCP_1 disconnected.

but I am not able to result why I have to repeaty restart the addon for it to start to collect the information each day.

1 Like

I’m having a complete nightmare with 2.0.6 today. It’s just completely stopped working altogether all entities are now Unknown and can get anything back even after restarting add-ons, HA and the VM.

2023-02-01 10:54:44,338 - startup - [CRITICAL] - Config directory already exists
2023-02-01 10:54:44,342 - startup - [CRITICAL] - Running Redis
2023-02-01 10:54:44,344 - startup - [CRITICAL] - Running RQ Dashboard on port 9181
2023-02-01 10:54:44,345 - startup - [CRITICAL] - Setting up invertor: 1 of 1
2023-02-01 10:54:44,396 - startup - [CRITICAL] - Recreating settings.py for invertor 1
2023-02-01 10:54:44,399 - startup - [CRITICAL] - Running RQ worker to queue and process givernergy-modbus calls
2023-02-01 10:54:44,400 - startup - [CRITICAL] - Running Invertor read loop every 5s
2023-02-01 10:54:44,409 - startup - [CRITICAL] - Subscribing Mosquitto on port 1883
2023-02-01 10:54:44,414 - startup - [CRITICAL] - Starting Gunicorn on port 6345
[2023-02-01 10:54:46 +0000] [16] [INFO] Starting gunicorn 20.1.0
[2023-02-01 10:54:46 +0000] [16] [INFO] Listening at: http://0.0.0.0:6345 (16)
[2023-02-01 10:54:46 +0000] [16] [INFO] Using worker: sync
[2023-02-01 10:54:46 +0000] [19] [INFO] Booting worker with pid: 19
[2023-02-01 10:54:46 +0000] [20] [INFO] Booting worker with pid: 20
[2023-02-01 10:54:46 +0000] [21] [INFO] Booting worker with pid: 21
RQ Dashboard version 0.6.0
 * Running on 0.0.0.0:9181
 * Serving Flask app 'rq_dashboard.cli'
 * Debug mode: off
2023-02-01 10:54:55,024 - GivLUT - [CRITICAL] - Consecutive failure count= 9
2023-02-01 10:54:55,029 - read - [ERROR] - Error collecting registers: (<class '_pickle.UnpicklingError'>, UnpicklingError("invalid load key, '\\x00'."), <traceback object at 0x7f2ebb24f3c0>)

I have installed this last week and am having the same issues. I’m running latest homeassistant OS and core.
Home Assistant 2023.2.2
Supervisor 2023.01.1
Operating System 9.5
Frontend 20230202.0 - latest
When I restart GivTCP I get data initially but then it stops. Also my automations aren’t working. None of the switches work to disable battery charging schedules or level adjustments.
I have similar errors as mentioned here:

GivTCP Logs

2023-02-07 23:27:29,359 - startup - [CRITICAL] - Config directory already exists
2023-02-07 23:27:29,518 - startup - [CRITICAL] - Running Redis
2023-02-07 23:27:29,605 - startup - [CRITICAL] - Running RQ Dashboard on port 9181
2023-02-07 23:27:29,609 - startup - [CRITICAL] - Setting up invertor: 1 of 1
2023-02-07 23:27:30,247 - startup - [CRITICAL] - Recreating settings.py for invertor 1
2023-02-07 23:27:30,270 - startup - [CRITICAL] - Removing old invertor data cache
2023-02-07 23:27:30,277 - startup - [CRITICAL] - Removing old battery data cache
2023-02-07 23:27:30,336 - startup - [CRITICAL] - Running RQ worker to queue and process givernergy-modbus calls
2023-02-07 23:27:30,356 - startup - [CRITICAL] - Running Invertor read loop every 5s
2023-02-07 23:27:30,426 - startup - [CRITICAL] - Subscribing Mosquitto on port 1883
2023-02-07 23:27:30,522 - startup - [CRITICAL] - Starting Gunicorn on port 6345
2023-02-07 23:27:30,674 - startup - [CRITICAL] - Creating web dashboard config
2023-02-07 23:27:30,695 - startup - [CRITICAL] - Serving Web Dashboard from port 3061
2023-02-07 23:27:31,600 - startup - [CRITICAL] - Setting daily charge target forecast job to run at: 00:20
[2023-02-07 23:27:45 +0000] [17] [INFO] Starting gunicorn 20.1.0
[2023-02-07 23:27:45 +0000] [17] [INFO] Listening at: http://0.0.0.0:6345 (17)
[2023-02-07 23:27:45 +0000] [17] [INFO] Using worker: sync
[2023-02-07 23:27:45 +0000] [31] [INFO] Booting worker with pid: 31
[2023-02-07 23:27:45 +0000] [32] [INFO] Booting worker with pid: 32
[2023-02-07 23:27:45 +0000] [33] [INFO] Booting worker with pid: 33
RQ Dashboard version 0.6.0

  • Running on 0.0.0.0:9181
  • Serving Flask app ‘rq_dashboard.cli’
  • Debug mode: off
    UPDATE The latest version of serve is 14.2.0.
    INFO: Accepting connections at http://localhost:3061.
    2023-02-07 23:27:58,433 - read - [CRITICAL] - First time running so saving AC Charge status
    2023-02-07 23:27:58,588 - read - [CRITICAL] - Publishing Home Assistant Discovery messages
    2023-02-07 23:36:44,090 - GivLUT - [CRITICAL] - Consecutive failure count= 1
    2023-02-07 23:36:44,111 - read - [ERROR] - Error collecting registers: (<class ‘KeyError’>, KeyError(HR:013), <traceback object at 0x7fbc8f4740>)
    2023-02-07 23:37:30,661 - GivLUT - [CRITICAL] - Consecutive failure count= 1
    2023-02-07 23:37:30,667 - read - [ERROR] - Error collecting registers: (<class ‘KeyError’>, KeyError(HR:013), <traceback object at 0x7fbc8f0700>)
    2023-02-07 23:39:41,939 - GivLUT - [CRITICAL] - Consecutive failure count= 1
    2023-02-07 23:39:41,942 - read - [ERROR] - Error collecting registers: (<class ‘KeyError’>, KeyError(HR:120), <traceback object at 0x7fbc9003c0>)
    2023-02-07 23:40:41,356 - GivLUT - [CRITICAL] - Consecutive failure count= 1
    2023-02-07 23:40:41,359 - read - [ERROR] - Error collecting registers: (<class ‘KeyError’>, KeyError(IR:110), <traceback object at 0x7fbc904740>)
    2023-02-07 23:52:34,229 - GivLUT - [CRITICAL] - Consecutive failure count= 1
    2023-02-07 23:52:34,232 - read - [ERROR] - Error collecting registers: (<class ‘KeyError’>, KeyError(IR:110), <traceback object at 0x7fbc8d0800>)
    2023-02-07 23:56:44,160 - GivLUT - [CRITICAL] - Consecutive failure count= 1
    2023-02-07 23:56:44,168 - read - [ERROR] - Error collecting registers: (<class ‘KeyError’>, KeyError(HR:013), <traceback object at 0x7fbc8e8780>)
    2023-02-07 23:59:43,390 - GivLUT - [CRITICAL] - Consecutive failure count= 1
    2023-02-07 23:59:43,394 - read - [ERROR] - Error collecting registers: (<class ‘KeyError’>, KeyError(HR:113), <traceback object at 0x7fbc8e4980>)
    2023-02-08 00:00:07,180 - read - [CRITICAL] - Midnight, so resetting Day/Night stats…
    2023-02-08 00:00:08,518 - mqtt - [ERROR] - Error connecting to MQTT Broker: (<class ‘TypeError’>, TypeError(‘payload must be a string, bytearray, int, float or None.’), <traceback object at 0x7f9f6eb3c0>)
    2023-02-08 00:00:18,984 - read - [CRITICAL] - Midnight, so resetting Day/Night stats…
    2023-02-08 00:00:30,869 - read - [CRITICAL] - Midnight, so resetting Day/Night stats…
    2023-02-08 00:00:42,748 - read - [CRITICAL] - Midnight, so resetting Day/Night stats…
    2023-02-08 00:00:54,619 - read - [CRITICAL] - Midnight, so resetting Day/Night stats…
    2023-02-08 00:02:40,574 - GivLUT - [CRITICAL] - Consecutive failure count= 1
    2023-02-08 00:02:40,577 - read - [ERROR] - Error collecting registers: (<class ‘KeyError’>, KeyError(HR:013), <traceback object at 0x7fbc8d4740>)

Mosquito Logs

2023-02-08 00:01:43: New connection from 172.30.32.1:60221 on port 1883.
2023-02-08 00:01:43: New client connected from 172.30.32.1:60221 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:01:43: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:01:54: New connection from 172.30.32.1:54867 on port 1883.
2023-02-08 00:01:55: Client closed its connection.
2023-02-08 00:01:55: New connection from 172.30.32.1:44073 on port 1883.
2023-02-08 00:01:55: New client connected from 172.30.32.1:44073 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:01:55: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:02:06: New connection from 172.30.32.1:36633 on port 1883.
2023-02-08 00:02:07: Client closed its connection.
2023-02-08 00:02:07: New connection from 172.30.32.1:50061 on port 1883.
2023-02-08 00:02:07: New client connected from 172.30.32.1:50061 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:02:07: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:02:18: New connection from 172.30.32.1:48061 on port 1883.
2023-02-08 00:02:19: Client closed its connection.
2023-02-08 00:02:19: New connection from 172.30.32.1:42083 on port 1883.
2023-02-08 00:02:19: New client connected from 172.30.32.1:42083 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:02:19: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:02:30: New connection from 172.30.32.1:60285 on port 1883.
2023-02-08 00:02:31: Client closed its connection.
2023-02-08 00:02:31: New connection from 172.30.32.1:42479 on port 1883.
2023-02-08 00:02:31: New client connected from 172.30.32.1:42479 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:02:31: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:02:41: New connection from 172.30.32.1:55043 on port 1883.
2023-02-08 00:02:42: Client closed its connection.
2023-02-08 00:02:42: New connection from 172.30.32.1:58535 on port 1883.
2023-02-08 00:02:42: New client connected from 172.30.32.1:58535 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:02:42: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:02:52: New connection from 172.30.32.1:54109 on port 1883.
2023-02-08 00:02:53: Client closed its connection.
2023-02-08 00:02:53: New connection from 172.30.32.1:56131 on port 1883.
2023-02-08 00:02:53: New client connected from 172.30.32.1:56131 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:02:54: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:03:04: New connection from 172.30.32.1:46637 on port 1883.
2023-02-08 00:03:05: Client closed its connection.
2023-02-08 00:03:05: New connection from 172.30.32.1:33961 on port 1883.
2023-02-08 00:03:05: New client connected from 172.30.32.1:33961 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:03:06: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:03:16: New connection from 172.30.32.1:40907 on port 1883.
2023-02-08 00:03:17: Client closed its connection.
2023-02-08 00:03:17: New connection from 172.30.32.1:38119 on port 1883.
2023-02-08 00:03:17: New client connected from 172.30.32.1:38119 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:03:17: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:03:23: New connection from 172.30.32.2:59276 on port 1883.
2023-02-08 00:03:23: Client closed its connection.
2023-02-08 00:03:28: New connection from 172.30.32.1:59367 on port 1883.
2023-02-08 00:03:29: Client closed its connection.
2023-02-08 00:03:29: New connection from 172.30.32.1:55899 on port 1883.
2023-02-08 00:03:29: New client connected from 172.30.32.1:55899 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:03:29: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:03:40: New connection from 172.30.32.1:58823 on port 1883.
2023-02-08 00:03:41: Client closed its connection.
2023-02-08 00:03:41: New connection from 172.30.32.1:60013 on port 1883.
2023-02-08 00:03:41: New client connected from 172.30.32.1:60013 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:03:41: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:03:52: New connection from 172.30.32.1:40375 on port 1883.
2023-02-08 00:03:53: Client closed its connection.
2023-02-08 00:03:53: New connection from 172.30.32.1:41865 on port 1883.
2023-02-08 00:03:53: New client connected from 172.30.32.1:41865 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:03:53: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:04:04: New connection from 172.30.32.1:47019 on port 1883.
2023-02-08 00:04:05: Client closed its connection.
2023-02-08 00:04:05: New connection from 172.30.32.1:38101 on port 1883.
2023-02-08 00:04:05: New client connected from 172.30.32.1:38101 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:04:05: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:04:15: New connection from 172.30.32.1:50765 on port 1883.
2023-02-08 00:04:16: Client closed its connection.
2023-02-08 00:04:16: New connection from 172.30.32.1:51767 on port 1883.
2023-02-08 00:04:16: New client connected from 172.30.32.1:51767 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:04:17: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:04:27: New connection from 172.30.32.1:42529 on port 1883.
2023-02-08 00:04:28: Client closed its connection.
2023-02-08 00:04:28: New connection from 172.30.32.1:51171 on port 1883.
2023-02-08 00:04:28: New client connected from 172.30.32.1:51171 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:04:29: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:04:39: New connection from 172.30.32.1:48727 on port 1883.
2023-02-08 00:04:40: Client closed its connection.
2023-02-08 00:04:40: New connection from 172.30.32.1:47979 on port 1883.
2023-02-08 00:04:40: New client connected from 172.30.32.1:47979 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:04:41: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:04:51: New connection from 172.30.32.1:43035 on port 1883.
2023-02-08 00:04:52: Client closed its connection.
2023-02-08 00:04:52: New connection from 172.30.32.1:58299 on port 1883.
2023-02-08 00:04:52: New client connected from 172.30.32.1:58299 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:04:52: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:05:03: New connection from 172.30.32.1:43987 on port 1883.
2023-02-08 00:05:04: Client closed its connection.
2023-02-08 00:05:04: New connection from 172.30.32.1:41003 on port 1883.
2023-02-08 00:05:04: New client connected from 172.30.32.1:41003 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:05:04: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:05:15: New connection from 172.30.32.1:34721 on port 1883.
2023-02-08 00:05:16: Client closed its connection.
2023-02-08 00:05:16: New connection from 172.30.32.1:60367 on port 1883.
2023-02-08 00:05:16: New client connected from 172.30.32.1:60367 as GivEnergy_GivTCP_1 (p2, c1, k60, u’MQTT-User’).
2023-02-08 00:05:16: Client GivEnergy_GivTCP_1 disconnected.
2023-02-08 00:05:23: New connection from 172.30.32.2:39222 on port 1883.
2023-02-08 00:05:23: Client closed its connection.
2023-02-08 00:05:27: New connection from 172.30.32.1:53811 on port 1883.
2023-02-08 00:05:28: Client closed its connection.
2023-02-08 00:05:28: New connection from 172.30.32.1:51869 on port 1883.

I’m keen to get this working so if there is any advice one this I’d be extremely grateful!

I have tried deleting the pkl files in the GivTCP folder but it didn’t help unfortunately.

Did you ever get a solution for this, as I have exactly the same problem.
Tried a full reboot, restarting mqtt, restarting GivTCP - makes no difference.

Everything was working fine until I turned the RPi off accidentally.

I’m running: Home Assistant 2023.5.2, GivTCP version 2.1.13 on a RPi.

After some investigation, it seems that follwoing a recent update to GivTCP, the various entities now have the inverter serial number integrated within the IDs. This means that all I need to do is to edit the pages and select the newer entities (with serial numbers embedded). Doing this, the data is shown correctly.

I just had the same issue after upgrading to
OS Version: Home Assistant OS 10.0
Home Assistant Core: 2023.6.1
All GivTCP entities stopped working
After checking Mikes reply I notice that all GivTCP entities were duplicated the 2nd one having “_2” suffix. I’ve added _2 to all my charts using GivTCP. I suppose it would have been better to remove the non working one and rename the _2. But there are so many…