GivEnergy Solar Inverter

I can raise one, the enable or disable of the timed export/discharge without switching mode all seem to be high level things you can do in the portal, so hopefully it sort of fits the criteria of being useful to more people than just me.

I don’t know what version of the inverter you have but mine is the G1 Hybrid 5kW with the 8.2kWh battery. Behaviour may vary between the different ones.

The way of using this efficiently will vary person to person, but for my purposes, this is what I do (with my thoughts in brackets):

02:00 - 05:00 - Timed Charged target 100% SOC (may as well always charge the battery as much as I can, just in case of bad weather).
05:00 - 14:00 - Eco Mode (Charge battery to full, then export, battery feeds house load as needed).
14:00 - 16:00 - Timed Charge target 50% SOC (Not really necessary but on the off chance the weather is really poor, this ensures I have enough battery to get through the peak window).
16:00 - 19:00 - Eco Mode + Timed Discharge (This combo appears to stop the battery charging but doesn’t export anything natively. Solar + battery feeds house load. Excess solar goes to grid export.
19:00 - 02:00 - Eco Mode (Back to BAU).

The reason I don’t want to necessarily always do Timed Export at 16:00 - 19:00 is because draining my battery to then use the grid later on doesn’t make sense both financially as well as for battery cycles. I get paid £0.36 per kWh in the peak window, and then I pay £0.34 after the peak period ends, but there are some losses in conversion between AC and DC. I think these net losses in energy would result in that being a loss.

Restricting the discharge rate to slow it down may also lead to grid being used so didn’t want to do that.

I’m a fairly heavy user as well, so essentially don’t have enough charge or panels producing to go too crazy with dumping energy to export.

What I have configured is a conditional export which (in addition to the list I put above) does a Timed Export in the 16:00 - 19:00 window only if the battery SOC is above 90%, and I want to stop it exporting if the battery reaches 70% SOC before 19:00 to preserve power for later. If this timed export finishes early, I want to go back into the previous Eco Mode + Timed Discharge mode.

To make this behave how I want with the Eco Mode + Timed Discharge today, I have told HA to run Activate Eco Mode, but then I need to go into the portal and enable the Timed Discharge slot again manually as I can’t automate that action.

This sounds like a lot of work, but this allows me to opportunistically export energy when I have some spare.

Wanted to mention that with a Gen 2 Hybrid, the discharge power limit seems to be completely ignored while in charge mode. It’s a mess at the moment even with just the GivEnergy portal used - it charges to 80%, then switches back into eco mode, discharges and then realises it’s below charge level and then recharges.
There are a fair number of qwerks with the Gen 2’s which Giv are supposedly working through on a new firmware. So it might not be possible to get things working quite as you want them right now.

The view I’m trying to take is that it’s a long term investment, and i need to get it working in the long term, but I do find it wasteful and annoying.

Thanks for the reply, but I don’t think I explained clearly enough the issue I’ve got. In Overview I think that all the sensors are list, at least the ones I think I want to add to the Energy dashboard. I can see Battery Power, Consumption Power, Grid Export Power and PV Power. The problem is when I try to set up the Energy Dashboard, these sensors aren’t listed. The ones that are listed are ones such as Battery Charge Today, Battery Charge Total, Grid Export Today, Grid Export Total, Grid Import Today, Grid Import Total, PV Energy Today and PV Energy Total. Only 14 sensors are available to the dashboard. Does that make sense?

Thanks.

Steve.

I added the ones ending in today. You need energy entities, ie in kWh, not power entities in W

Oh I see. Thanks. So the energy dashboard isn’t meant to show ‘current’ power flow?

Steve.

No not instant, over time

Your hardware is identical and approach to using Octopus Flux very similar to mine. I’ve been jumping between a few discussions so just to recap my 4pm-7pm automations:

  • 4pm: Set charge power limit to 0W
  • 5pm: Service call to Activate Timed Export
  • When battery reaches 60%, service call to Activate Eco
  • 7pm: Set charge power to 2600W

So that all means I never charge from 4-7pm, and I choose to export what I think I’ve got spare.

I’m out of time today but will have to go and re-read everything again to see if I’m missing something.

Your 4 - 5PM slot would certainly act like mine, if I could rely on the inverter being available then that same approach would probably work for me (my connectivity via the WiFi dongle is less than perfect).

As much as possible I like to set stuff to run ahead of time, that way I can attempt to set it a few times just in case the dongle is giving me issues, means it’s more likely to work.

Timed Discharge is one such setting, once enabled, it should remain enabled, at least until Eco mode or Timed Export is activated. Eco mode/Timed Export both turn off the Timed Discharge option when ran.

My combo of Eco mode + Timed Discharge would work the same as your Eco Mode + 0W Charge limit in respect to behaviour, the main difference being I don’t need to schedule it just in time.

If it’s not a lot of work to do it, adding the option to call a service to run client.enable_discharge() after I flip Eco Mode back on would solve a lot of my issues, and would mean I don’t accidentally set my Charge Limit to 0W, with the the undo step failing because the dongle went offline when it was meant to execute it.

It’s hard to get this all perfect, at least until GE push out a better firmware that can do more locally, but I think this is the final missing piece of the puzzle for the current configuration I’m aiming for.

Not sure if this helps, but I dont understand why you get the behaviour you do :slight_smile:

Activate Eco mode calls:

# r27=1 r110=4 r59=0
    return set_discharge_mode_to_match_demand() + set_shallow_charge(4) + disable_discharge()

Then toggle enble_discharge on the portal should leave you in the state:

# r27=1 r110=4 r59=1

Activate Timed discharge:

ret = set_discharge_mode_to_match_demand()  # r27=1
 ret.extend(set_shallow_charge(100))  # r110=100
    ret.extend(enable_discharge())  # r59=1
    ret.extend(set_discharge_slot_1(discharge_slot_1))  # r56=1600, r57=700

Should leave you in the same state: ( match demand and enable discharge)
# r27=1 r110=100 r59=1, plus defines the timed slots.

So the only apparent difference between the two is that the reserve soc is set to 4 rather than 100.

The issue I was seeing on gen2 was different, but it might be worth trying to set Timed discharge via givenergy-local, then changing the reserve soc value and see if that makes any difference ?

I’ll see if I can do something a little more scientific with the modes tomorrow to highlight the behavior.

Thanks @reidjr I’ve had a play about with it this morning, it’s basically as you say.

  1. Activate Timed Export mode disables Eco mode + Timed Discharge
  2. Activate Eco Mode disables Timed Discharge sets SOC reserve to 4%
  3. Activate Timed Discharge doesn’t disable Eco Mode, sets SOC reserve to 100%

Unfortunately even knowing this, and the potential resolution being to update the SOC reserve, this isn’t possible with the current options available:

  • Activate Eco Mode
  • Activate Timed Discharge
  • Set SOC reserve to 4%

There doesn’t seem to be a way of setting the SOC reserve to 4% without calling extra things that conflict with eachother.

I think the ideal fix for me is:

  • Activate Eco Mode
  • Enable Timed Discharge(*) which doesn’t exist in the current service calls.

(*)Not the same call as Activate Timed Discharge which updates extra settings, I just want to call the client.enable_discharge() by itself without modifying anything else.

So If setting the soc actually achieves your goal, then

And as if by magic :grinning:

try this. You can set number.battery_soc_reserve by service: number.set_value.

I’ll rig it up and test it today, weather looks nice as well, so if it stays this way I can check how the charge behavior acts at the end of the discharge period.

Nice if this works, but it’s an inferior fix to having the ability to toggle discharge on or off for two reasons:

  1. The WiFi dongle is simply not that reliable and can fail to accept changes sometimes. Doing 3 changes in sequence has a higher chance of failing.
  2. The setting must be adjusted at the proper time. My toggle request/change would allow me to apply it whenever, and it would not ultimately modify the behavior that badly if it failed.

With all that said, no harm in seeing how this changes things today.

Update - This worked OKish I think, I need to force export earlier to test the charge behavior afterwards though, today the sun went out as the export ended, so the solar was less than the house load after.

If we get another good day soon I’ll do that as a bit of an experiment,

I did my forced export earlier today and doing a cocktail of what I said seemed to have the desired behavior for me, though I still stand by what I said before, it’s not as good of a solution as being able to simply toggle the Timed Discharge option on once I’ve run Activate Eco Mode.

What I have to do:

  • Activate Eco Mode
  • Activate Timed Discharge
  • Set SOC reserve to 4%

What I’d like to do:

  • Activate Eco Mode
  • Enable Timed Discharge(*) which doesn’t exist in the current service calls

The second is method is superior from both a simplicity point of view, as well as not being tied to needing to be run at a specific time.

Hi - getting ‘retrying setup - none’ over and over. I’ve only just got this commissioned - do I need to wait 24h or anything? Its an AC coupled inverter and battery setup I want to monitor. Don’t need control (happy to use the givenergy app for adjusting that) but would like the battery integrated into the energy page (and my own personal stats page) in HA.

Similar issue here & same conditions; new install that was provisioned today and had a mix of Config flow could not be loaded: {"message":"Invalid handler specified"} and retrying setup - none.

any tips to help us get our invertors working?

edit: looks like i’ve got just this moment got a HA update. 2023.5.0. seems to be working past these errors. Problem is now i’ve a new ‘EA’ serial numbered device and not yet supported. Unsupported serial number prefix: EA · Issue #31 · cdpuk/givenergy-local · GitHub.
the HA logs is giving more info than the basic error modals are.

got it sorted. for HAOS, need to use portainer to access the containers. By default these are hidden in portainer so portainer > settings > hidden containers. unhide the ‘homeassistant’ container. then ‘attach’ to it in portainer and do the changes given in that github link i mentioned above.

Restart HA, add invertor via the GivEnergy Local addon as normal. I’ve sucessfully got invertor & battery added to my entities now.

Interesting “development” over in GivTCP. [britkat1980] has exposed the 163 register in their forked givenergy_modbus library, allowing automated reboot of the inverter. Very useful at the moment due to certain bugs such as the slow startup in the morning. However it is one of the " there be dragons" registers apparently, and could allegedly brick the inverter. If added to this integration would need to use the forked givenergy_modbus.

Appreciate the update that has just come out, I’ll test it out today! :slight_smile:

Edit (being limited to 3 replies in the same topic for some reason) - Good success with the new update, I’ve gone over the outlined options you set here: Possible to add service options for Enable/Disabled Timed Discharge? · Issue #48 · cdpuk/givenergy-local · GitHub

So instead of doing:

  • Activate Eco Mode
  • Activate Timed Discharge
  • Set SOC reserve to 4%

I can now just do:

  • Activate Timed Discharge

This enables eco mode and puts the battery back into discharge mode, or battery_power_mode=1 + enable_discharge=1 for sensor.battery_mode = “Timed Discharge”.

The last question I have is, can the current state of the battery be detected with conditions?

I’m currently detecting export by using “Current Grid Export power” > 500 in the inverter device under conditions, this lets me cut back to Timed Discharge mode if the SOC gets below a certain % value.

Many thanks for your work on this by the way, it’s a really handy package to use! :sunglasses:

I’ve been using this integration successfully for about 6 months or so, thanks @cdpuk!

I’ve just had the incorrectly installed Gen 1 inverter replaced with a Gen 2 (ED prefix), so I removed the integration for the old inverter, then added the new one. So far so good, as all entities have the same name so everything works as it should. I’ve also updated my automation which calls the services to update mode, charge/discharge rate etc. with the new inverter as the target.

However, the integration appears to think it is still a Gen 1: the charge and discharge rates both show as 2600W, and the services won’t allow an input > 2600W, i.e. up to 3600W.

Is there anything else I need to do?