Does anyone have a home assistant script or method of detecting that GivTCP has stopped working?
Got up this morning and found that both batteries were fully exhausted and they didn't charge overnight. batpred had set the reserve soc, charge period etc to charge the batteries (could see in HA) but the inverters hadn't done anything. Nothing in the inverter notifications log, but eventually I found in the HA GivTCP console log that there were repeated "connection refused" messages.
I restarted the GivTCP add-on (which of course cleared out the console log) and communication to the inverters was re-established.
Does anyone have a script or method of checking that GivTCP is working and the commands sent to the inverters are actually being received and acted upon? All the Home Assistant entities showed as if the commands had been accepted and processed.
There's very little written to the GivTCP logs on the HA server, only this:
2023-10-19 08:00:00,329 - write - [INFO] - Setting battery charge rate to: 2600 (50)
2023-10-19 08:10:00,269 - write - [INFO] - Setting battery charge rate to: 2600 (50)
2023-10-19 08:20:00,284 - write - [INFO] - Setting battery charge rate to: 2600 (50)
2023-10-19 08:30:00,293 - write - [INFO] - Setting battery charge rate to: 2600 (50)
2023-10-19 08:40:00,244 - write - [INFO] - Setting battery charge rate to: 2600 (50)
2023-10-19 08:50:00,290 - write - [INFO] - Setting battery charge rate to: 2600 (50)
2023-10-19 08:59:02,848 - mqtt_client - [CRITICAL] - Connecting to MQTT broker for control- core-mosquitto
2023-10-19 08:59:08,970 - read - [CRITICAL] - First time running so saving AC Charge status
2023-10-19 08:59:08,980 - read - [CRITICAL] - Publishing Home Assistant Discovery messages
2023-10-19 09:00:00,164 - write - [INFO] - Setting battery charge rate to: 2600 (50)
2023-10-19 09:00:02,158 - write - [INFO] - Setting battery charge rate 50 was a success
2023-10-19 09:00:02,331 - read - [CRITICAL] - Publishing Home Assistant Discovery messages
2023-10-19 09:00:04,424 - read - [CRITICAL] - Publishing Home Assistant Discovery messages
2023-10-19 09:10:00,299 - write - [INFO] - Setting battery charge rate to: 2600 (50)
2023-10-19 09:10:02,324 - write - [INFO] - Setting battery charge rate 50 was a success
2023-10-19 09:10:02,570 - read - [CRITICAL] - Publishing Home Assistant Discovery messages
2023-10-19 09:20:00,295 - write - [INFO] - Setting battery charge rate to: 2600 (50)
2023-10-19 09:20:02,058 - write - [INFO] - Setting battery charge rate 50 was a success
2023-10-19 09:30:00,158 - write - [INFO] - Setting battery charge rate to: 2600 (50)
2023-10-19 09:30:01,954 - write - [INFO] - Setting battery charge rate 50 was a success
2023-10-19 09:40:00,140 - write - [INFO] - Setting battery charge rate to: 2600 (50)
2023-10-19 09:40:01,630 - write - [INFO] - Setting battery charge rate 50 was a success
From 8:00-8:50 the 'set charge rate' command was sent to the inverter, at 8:59 I restarted GivTCP, and then from there every 10 minutes when the charge rate is sent you can see there's a success message.
So maybe I could write something to parse for set commands but no success response?
(The every 10 minutes heartbeat is my Octopus power up script running today to get the battery up to 50% ahead of the free electricity this afternoon)
But there's no timeout errors written to the GivTCP HA log file, I just saw them in the console log.
(There's a separate issue with the givtcp logs not being log rotated properly that's been opened for a while on brikat's GitHub, but that's not the issue today)











