springfall2008 / batpred

Home battery prediction and charging automation for Home Assistant, supporting many inverter types
https://springfall2008.github.io/batpred/
130 stars 44 forks source link

Huawei Inverter Grid Charge Rate #1431

Open UKHarj opened 2 months ago

UKHarj commented 2 months ago

In the apps.yaml I have specified the charge/discharge rate as 3 kwh. However this is to force the plan to ensure it calculates this charging rate in the plan. My battery supports DC charging at 5 kwh and discharging at 5 kwh. Note the 3 kwh AC charging is apparently the limit allowed for Huawei batteries and cannot be exceeded. I've confirmed this in other Huawei forums, so in summary AC charging is limited to 3kwh.

The 3 kwh setting from the predbat yaml overrides and reduces the DC charging and discharging from 5kwh to 3kwh when the sun is shining or power drawn from the battery, something I want to avoid.

I would like the config to be amended so that grid charging is set at 3 kwh and the DC charging/charging is left at 5 kwh.

image

image

gcoan commented 2 months ago

Note the 3 kwh AC charging is apparently the limit allowed in the UK and is set up by my installer

Not quite sure I follow what the issue with Predbat is, but on the point above about 3kWh AC charging limit, there isn't any such UK charging limit to my knowledge. I have two 2.6kWh inverters and can charge both batteries at 5.2kWh import, and if the oven, washing machine, etc is on, I've seen 12kWh being imported before now.

It may be that your DNO fuse is quite small and that's what the installer is referring to? My fuse is 100A, and if yours is substantially smaller then you can get the DNO to replace it.

But 3kWh sounds way too low. If you put the oven on and the kettle at the same time you will draw more than 3kWh from the grid so I really don't know what your installer is referring to.

There are grid export limits and if you didn't get a G99 approval then you will be limited to 3.6kWh of export, but that's not related to import.

UKHarj commented 2 months ago

Thanks for coming back to me.

I have a 100A fuse so it's not an issue with my electrics. The 3kwh limit is applied by Huawei. It's a 10kwh battery and has a 3kwh charge limit, it normally takes 3 hrs 45 mins to charge. I can change the battery from sunlight at 5 kWh and discharge to loads at 5 kWh. However in the yaml I need to set the 3 kWh rate to allow the plan to have sufficient time to charge the battery (3 hrs 45 mins). The issue is that the 3kwh rate setting overrides the DC charging and load discharging DOWN to 3 kwh as well.

On Thu, 5 Sept 2024, 16:54 Geoffrey Coan, @.***> wrote:

Note the 3 kwh AC charging is apparently the limit allowed in the UK and is set up by my installer

Not quite sure I follow what the issue with Predbat is, but on the point above about 3kWh AC charging limit, there isn't any such UK charging limit to my knowledge. I have two 2.6kWh inverters and can charge both batteries at 5.2kWh import, and if the oven, washing machine, etc is on, I've seen 12kWh being imported before now.

It may be that your DNO fuse is quite small and that's what the installer is referring to? My fuse is 100A, and if yours is substantially smaller then you can get the DNO to replace it.

But 3kWh sounds way too low. If you put the oven on and the kettle at the same time you will draw more than 3kWh from the grid so I really don't know what your installer is referring to.

There are grid export limits and if you didn't get a G99 approval then you will be limited to 3.6kWh of export, but that's not related to import.

— Reply to this email directly, view it on GitHub https://github.com/springfall2008/batpred/issues/1431#issuecomment-2332097912, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJ43WOLIUQO67TFWZ7EZEZLZVB5CBAVCNFSM6AAAAABNWXEX6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZSGA4TOOJRGI . You are receiving this because you authored the thread.Message ID: @.***>

gcoan commented 2 months ago

Can you share your apps.yaml config to see if there's anything in the way you've set these limits?

UKHarj commented 2 months ago

------------------------------------------------------------------

Huawei Solar Config example - https://github.com/wlcrs/huawei_solar

------------------------------------------------------------------


pred_bat: module: predbat class: PredBat

Sets the prefix for all created entities in HA - only change if you want to run more than once instance

prefix: predbat

Timezone to work in

timezone: Europe/London

If you are using Predbat outside of HA then set the HA URL and Key (long lived access token here)

ha_url: 'http://homeassistant.local:8123'

ha_key: 'xxx'

Currency, symbol for main currency second symbol for 1/100s e.g. $ c or £ p or e c

currency_symbols:

car_charging_planned_response:

- 'yes'

- 'on'

- 'true'

- 'connected'

- 'ev connected'

- 'charging'

- 'paused'

- 'waiting for car demand'

- 'waiting for ev'

- 'scheduled'

- 'enabled'

- 'latched'

- 'locked'

- 'plugged in'

In some cases car planning is difficult (e.g. Ohme with Intelligent doesn't report slots)

The car charging now can be set to a sensor to indicate the car is charging and to plan

for it to charge during this 30 minute slot

car_charging_now:

- off

Positive responses for car_charging_now

car_charging_now_response:

- 'yes'

- 'on'

- 'true'

To make planned car charging more accurate, either using car_charging_planned or the Octopus Energy plugin,

specify your battery size in kwh, charge limit % and current car battery soc % sensors/values.

If you have Intelligent Octopus the battery size and limit will be extracted from the Octopus Energy plugin directly.

Set the car SOC% if you have it to give an accurate forecast of the cars battery levels.

One entry per car if you have multiple cars.

car_charging_battery_size:

- 75

car_charging_limit:

- 're:number.tsunami_charge_limit'

car_charging_soc:

- 're:sensor.tsunami_battery'

If you have Octopus intelligent, enable the intelligent slot information to add to pricing

Will automatically disable if not found, or comment out to disable fully

When enabled it overrides the 'car_charging_planned' feature and predict the car charging based on the intelligent plan (unless octopus intelligent charging is False)

This matches either the intelligent slot from the Octopus Plugin or from the Intelligent plugin

octopus_intelligent_slot: 're:(binary_sensor.octopus_intelligent_slot|re:binary_sensor.octopus_energy_intelligent_dispatching)'

octopus_intelligent_slot: 're:binary_sensor.octopus_energy_intelligent_dispatching'

octopus_ready_time: 're:time.octopus_energy_intelligent_ready_time'

octopus_charge_limit: 're:number.octopus_energy_intelligent_charge_limit'

Energy rates

Please set one of these three, if multiple are set then Octopus is used first, second rates_import/rates_export and latest basic metric

Set import and export entity to point to the Octopus Energy plugin

automatically matches your meter number assuming you have only one

Will be ignored if you don't have the sensor

Or manually set it to the correct sensor names e.g:

sensor.octopus_energy_electricity_xxxxxxxxxx_xxxxxxxxxxxxx_current_rate

sensor.octopus_energy_electricity_xxxxxxxxxx_xxxxxxxxxxxxx_export_current_rate

metric_octopus_import: 're:(sensor.(octopusenergy|)electricity[0-9a-z]+[0-9a-z]+_current_rate)' metric_octopus_export: 're:(sensor.(octopusenergy|)electricity[0-9a-z]+[0-9a-z]+_export_current_rate)'

Standing charge can be set to a sensor (e.g. Octopus) or manually entered in pounds here (e.g. 0.50 is 50p)

metric_standing_charge: 're:(sensor.(octopusenergy|)electricity[0-9a-z]+[0-9a-z]+_current_standing_charge)'

Or set your actual rates across time for import and export

If start/end is missing it's assumed to be a fixed rate

Gaps are filled with zero rate

rates_import:

- start: "00:30:00"

end: "04:30:00"

rate: 7.5

- start: "04:30:00"

end: "00:30:00"

rate: 40.0

#

rates_export:

- rate: 0

Import rates can be overridden with rate_import_override

Export rates can be overridden with rate_export_override

Use the same format as above, but a date can be included if it just applies for a set day (e.g. Octopus power ups)

This will override even the Octopus plugin rates if enabled

#

rates_import_override:

- date: '2023-09-10'

start: '14:00:00'

end: '14:30:00'

rate: 5

For pv estimate, leave blank for central estimate, or add 10 for 10% curve (worst case) or 90 or 90% curve (best case)

If you use 10 then disable pv_metric10_weight below

pv_estimate: 10

Days previous is the number of days back to find historical load data

Recommended is 7 to capture day of the week but 1 can also be used

if you have more history you could use 7 and 14 (in a list) but the standard data in HA only lasts 10 days

days_previous:

gcoan commented 2 months ago

Its very hard to follow the file pasted in like that as github has assumed some of the line with # are headings rather than comments.

Can you either edit the comment above and put ``` on a line before and after the apps.yaml which means it will be treated as text and be much more readable, or upload the file as an attachment to github (probably need to rename it to a .txt or .log extension first)

UKHarj commented 2 months ago

apps.yaml.txt

UKHarj commented 2 months ago

if it helps here is a screenshot from the Huawei software. The battery has setting for charge and discharge through to 5,000 kwh, however from AC the charge is limited to 3,000. Ideally the apps.yaml could have two entries, one for AC charge and one for DC. That way the plan would know that the AC charge will run at 3,000 kwh and the DC could charge at 5,000 and also discharge to loads at 5,000 maximum.

image

image