Home Assistant and Giv Energy Log

10 comments started 2024-01-28 last 2024-01-29
APIsHome AutomationHome Assistant
W
#1 WillC

I use Home Assistant and Giv TCP to control various aspects of the battery, but these changes don't show in the inverter log and they're not reflected in the visible settings on the inverter, but they do have an affect and charging/discharging happens as expected.

Is this normal behaviour? I'd assume all changes should be reflected in the log and in the settings.

B
#2 Blasteh

local changes don't reflect in the log as that's only visible when changes are made online, the only way it would show up is if GE decides to upload all changes to the web... which is probably not what most people want if they just want local control.

W
#3 WillC

Surely all changes are "remote"? I assume everything uses the API to update the inverter. Changes made by the app, Web UI and remote control interface all show in the log.

That also doesn't explain why the changes don't show in the settings. That makes no sense to me.

D
#4 DD

WillC no, it doesn't use the API to control the inverter. It uses a direct connection over WiFi to the dongle, and reads and writes modbus registers that way.
When the app runs in local mode, it similarly connects directly to the inverter over WiFi. That's why it only works when you are at home. Though as you say, the app chooses to make changes via the API, rather than doing so directly.

W
#5 WillC

Thanks... Is it also normal for the settings changes to not be shown in the UI? That seems extremely strange to me. I effectively have two sets of settings and the one that I can't see without logging in to Home Assistant seems to take precedence.

D
#6 DD

WillC by UI you mean the web portal? Since there are no "official" mechanisms to write changes directly to the inverter, there's no reason for the web portal to suppose that inverter config differs from what it last sent. If you go into the remote control section of the web portal (the gears icon on the inverter page), there are buttons to force it to fetch the register contents from the inverter, which should sync the views.

The 3rd party free inverter monitor app for android does give you a way to read many of the registers directly from the inverter.

G
#7 geoffreycoan

@WillC The above is correct, but maybe a bit more explanation of how things are connected together

You have an inverter in your home, connected to the battery and solar panels.

The inverter is connected to your home wifi/network

Every 5 minutes the inverter will push a copy of the current inverter power input, output, battery level, etc to the givenergy cloud servers

If you use the portal or givenergy app then they look at the status information in those cloud servers - which is why its always a 5 minute snapshot *

If you then issue a command to say charge or discharge the battery, the command you enter is sent from the givenergy cloud servers to your inverter (over the internet). Sometimes you see a timeout error on the givenergy server if it can’t connect to your home inverter over the internet.
So key thing to note is you in your home sent the command through the internet to the cloud servers, they log it, then send it down to your inverter

If you use GivTCP it is making a direct connection on your home network to your inverter and changing the inverter settings. It is not doing so via the internet or the givenergy cloud servers, they don’t know anything about the command, and as @dd says, the inverter doesn’t push a copy of that command (to log it) to the cloud servers.

  • One slight variation is that if you are using the givenergy app in local mode then it will read the current power, charging status, Soc etc directly from the inverter every 10 seconds rather than the 5-minute old copy from the cloud server. All commands however still go via the internet and givenergy cloud servers

The ‘last updated’ in the app shows you how up to date the information is its looking at

W
#8 WillC

Ok, that's makes sense, although a slightly debatable design. So I can assume the settings in Home Assistant are the actual settings as that seems to update correctly when changes are made in the web ui.

I've tried the "Read All Unread Registers" button, which doesn't seem to do anything for me.

G
#9 geoffreycoan

WillC Ok, that's makes sense, although a slightly debatable design. So I can assume the settings in Home Assistant are the actual settings as that seems to update correctly when changes are made in the web ui.

Strictly speaking the settings in home assistant are just another copy of the data!

GivTCP polls the inverter every 10-30 seconds (it’s a config item in the GivTCP setup), reads the current inverter settings and stores them in home assistant entities. When you change those entities in HA, GivTCP sends the changes back to the inverter.
You can see this read / write polling and any comms errors in the GivTCP log. For most purposes it is a direct connection to the inverter, but in reality it isn’t

V
#10 Vestas

WillC I've tried the "Read All Unread Registers" button, which doesn't seem to do anything for me.

Doesn't do anything for anyone AFAIK. You have to go through each register and refresh it manually.

The portal is broken in many ways....