cdpuk / givenergy-local

Home Assistant integration for local access to GivEnergy inverter and battery systems
MIT License
50 stars 14 forks source link

Gen2 battery charging rates - new values. #37

Closed reidjr closed 1 year ago

reidjr commented 1 year ago

Just had gen2 hybrid installed.

The appropriate values in sensor.py for 3600 battery limits are below: Works for me perfectly alligned to webportal with local edit. Obviously needs some logic based on gen1/gen2 to be usable for all.

class BatteryPowerLimitSensor(InverterBasicSensor):
    """Battery power limit sensor for charging or discharging."""

    def convert_raw_power_to_watts(self, raw_value: int) -> int:
        """Convert an inverter register value to a power value in Watts."""
        # Here be dragons.
        # Interprets the raw value in the same way as the GivEnergy web portal.
        # Step values are 95W up to 38*95=3610W.
        # Tested on a Gen 2 inverter with +/- 3.6kW max battery power
        return 3600 if raw_value > 37 else raw_value * 95

And thanks a lot for this excellent add on !

cdpuk commented 1 year ago

Thanks for the data. For completeness, and so I've got it on record, it would be very useful if you could just double check some values using the GE web portal. On the Remote Control page, use one of those power sliders to send the 4 highest possible values, and for each one record:

e.g. for my Gen1:

2600W slider = 2600W command history = 50 raw 2511W slider = 2540W command history = 31 raw 2430W slider = 2458W command history = 30 raw 2349W slider = 2376W command history = 29 raw

Also, please confirm the first 2 letters of the inverter serial number.

reidjr commented 1 year ago

As requested:

3600W slider = 3600W command history = 50 raw 3420W slider = 3428W command history = 36 raw 3325W slider = 3333W command history = 35 raw 3230W slider = 3238W command history = 34 raw

First 2 letters of the inverter serial number. = ED

If you need anything else, happy to help.