GivEnergy Solar Inverter

This integration is great, thanks cdpuk for this.

My electricity setup works perfectly and is well-integrated into HA :slight_smile:

Great work on this. I’ve just started using this instead of GIVTCP (GitHub - britkat1980/giv_tcp: TCP connection (from inverter) and MQTT implementation) addon which provides similar functionality. I’ve noticed that although this provides an entity for Battery SOC percentage it doesn’t have one for Battery SOC in kWh remaining which the GIVTCP one does. Any chance of adding this in a future release.

Have you got separate device for the battery ? This is mine and does have that sensor:

Thx @Holdestmade , got it now

Has anyone else lost access to their GivEnergy inverter?
Mine’s still running from its own app, but the HA integration sees the devices as ‘unknown’.
I note there was a givenergy ‘system update’ which happened on backend servers just 24 hours ago. I suspect this might be related.

No problem via portal or app.

Thanks for the reply. I’ll go through my set-up phase again. Might be something else then.
I know the givenergy site is showing info so I’m online. Jus tthe HA integration that’s not playing ball.

Working OK here, have you tried reloading the integration ?

Excellent Integration, thanks. I have been doing some testing around the recent 1.7.0+ changes, and dithered about dropping it onto GitHub or here.

Most of this is about the inverter firmware’s response rather than the integration, with the exception of BATTERY_SOC_RESERVE being set to 100 by givenergy_modbus. It can be overridden by calling which doesn’t seem to be exposed, and stops all the export/discharge modes from doing anything useful ? I tried changing the BATTERY_SOC_RESERVE with the Givenergy web portal, which does then allow discharge/export to do something, But they both seem to dump to the grid, so I dont really understand if discharge mode is generally broken.

Please tell me if there is " user error " here :slight_smile: I was checking the new battery code, and making my first attempts at an octopus flux automation. In summary, new battery code works well with hybrid 5.0 Gen2 + 9.5 battery. Export and discharge, not so good.

Setup:
v1.7.2 givenergy local
Home Assistant 2023.3.4
Frontend 20230309.0 - latest
Hybrid 5.0 Gen2 + 9.5 battery.

Test conditions, PV (just) exceeding base load.

Using the services in HA

The Good

Set Battery charge and discharge rates by [number.set_value].
— Works as expected.

[GivEnergy Local: Activate eco mode. ]
— Works as expected
— PV to house primary
— Excess PV to battery limited by Battery Charge Power Limit until battery 100% charged
— Any Excess PV exported

[GivEnergy Local: Enable timed charging: ]
Works as expected, but some modbus errors.

If you enable it AFTER [GivEnergy Local: Activate eco mode. ]
Outside of set times:
— eco mode as above
Inside set times
— Charge battery at Battery Charge Power Limit, using PV + AC.
— stop charge when target soc reached

The Bad

[GivEnergy Local: Activate timed discharge mode]

Outside of set times:
— Battery charge is limited to 300W from PV
{update} — If BATTERY_SOC_RESERVE is set to <100 then PV charge limit is removed
— Excess PV not consumed by house exported
Inside set times
— No discharge
— BATTERY_SOC_RESERVE 100 ???
— Excess PV fills battery, as in eco, 300W limit removed

[GivEnergy Local: Activate timed discharge mode]

Outside of set times:
— Battery charge is limited to 300W from PV
— Excess PV not consumed by house exported
Inside set times
— No Export
— BATTERY_SOC_RESERVE 100 ???
— Excess PV charge still limited to 300W

The Ugly

I was consistently getting into a state where after setting the charge/discharge mode via services, the integration seemed to peg one of the python processes to 100%. Once in that state it was incredibly persistent, surviving over home-assistant and even docker container restarts. I have the logs, but didn’t get to the bottom of the issue, and it seems to have cleared after resetting the inverter. This was actually why I started trying all the options to find out what was broken :grinning:

Anyone here has GivEnergy beta firmware on their kit? And if you do does it work OK with this integration?
Thanks

Got this running after getting the system commissioned yesterday.

Main question at this stage is around control. For the moment I have octopus go, and want to be able to charge the car overnight without the battery getting involved.

I’m guessing disabling eco mode would be the normal way of doing this? Or perhaps switching the discharge limit to 100%. (Which I believe is described as “charge limit?”)
Any clear idea on what the charge switch does? Manually start charging?

You will have both number.battery_charge_power_limit and number.battery_discharge_power_limit, which do exactly what they say, and are probably the easiest way to achieve that effect. If you move out of Eco mode then you’re either in “Timed Discharge” or “Timed Export” mode, where scheduled slots come in to play. Pesonally I find the concept of timed slots less useful when you’ve got the power of HA automations.

As a similar example, I’m on Octopus Flux and would rather export during the peak period vs charge the battery. I simply have some automations that set the chage power to 0 at the start of the peak, then restore it to the maximum at the end.

I’m trying to figure out how to discharge from the battery at peak export times but with eco mode on the timed export or timed discharged appears to be doing nothing.

Thanks, those are helpful. I spent some time last night tracing through the source code and understanding the modes exposed by the givenergy-modbus library, and which are then translated through to HA.

Would you be open to a pull request on the documentation, and would you consider exposing charge/discharge/eco modes to allow the batteries to be dumped rather than simply excess solar? (I can be specific about which modes I think would be most useful)

Does anyone know if this can toggle the Discharge mode on / off without changing the time or messing with anything else?

I am on Flux, and my desired behaviour is that I can configure it so that Eco mode is enabled along with Discharge mode from 16:00 - 19:00, this prevents the battery from charging via solar, solar feeds house load and then exports to grid.

The issue with this integration is that Activate Eco Mode disables Discharge Mode. Activate Discharge Mode disables Eco Mode, and without both being enabled, the battery will charge from solar or otherwise not act like I want.

There is an option for this via the Modbus commands I think, but I don’t think any particular service option within this integration is capable of calling it. I found the code for this here: givenergy-modbus/cli.py at 9fc61b53f85f91a1bd16f0bfb6c9071d0090fc9e · dewet22/givenergy-modbus · GitHub

My workaround currently is to call Activate Eco Mode and then manually go into the GUI and enable Discharge Mode, this keeps them both enabled and does appear to influence the behaviour positively in my limited testing.

I am struggling with exactly the same issue- please update here if you find a solution

If you mean my issue above, so far not yet!

I’ve installed following the instructions and can see all the sensors listed but when I try to create an Energy dashboard, the sensors I want to add are missing. Sensors such as PV power, grid import, etc. I can only see the sensors for PV power today, etc. What am I missing? Please help!

Thanks.

Steve.

The goal of the services was always to replicate the high level features that you get via the app and the basic controls in the GE portal. For lower level control (like you get from the Remote Control page on the GE portal), it’s possible that more values need to be made configurable (like the discharge mode). Please raise an issue on Github if this is something you’d like to see.

My flux automations do something like:

  • 4pm - Activate Timed Export service
  • 7pm - Activate Eco mode service

Would that not achieve what you’re looking for?

If you tried to configure the Energy Dashboard very shortly after adding the integration, the sensors might not be available. Have you given HA a bit of time? I can’t remember how long I’ve seen it take, but I thougth it was only a few minutes.