Skip to content

Commit

Permalink
Documentation, template and minor code changes (#1563)
Browse files Browse the repository at this point in the history
* added inverter_limit_charge/discharge to GivTCP template, tweak descriptions

* typo in github bug_report template

* Suppress discharge limit (99) from status when Freeze Discharging

* Predbat error monitor changes when upgrading from Appdaemon to Predbat addon

* Correct currency_symbols indentation in apps.yaml

* Add Predbat Web Console link to predbat dashboard

* inverter_limit - add multi-AIO note

* multi-AIO set charge/discharge limits

* Output data: add missing Predbat PV forecasts

* Review & expand best entity list in output data

* Completed review & expanding 'best' entity descriptions

* Remove duplicated and redundant predbat.soc_min_kwh entity

* Review & expand baseline entity list in output data

* Prediction window and in-day load adjustment sensors

* update automation scripts to HA 2024.10 notation

* Typo high rate entity names

* Update templates for new Octopus Intelligent sensor names in Octopus Integration v13

* Explain load scaling more clearly in apps.yaml

* Advice about setting losses correctly

* #1548 Check 'car ready to charge' sensor value is configured in apps.yaml

* #1559 Add correct curve type to curve calculation messages

* Update nordpool energy rates URL for Predbat 8.5.1

* highlight that manual car SoC must be in kWh not SoC %

* Corrected YAML indentation for rates override

* Documented h0 sensors

* energy rate overrides

* Energy saving data sensors, remove references to appdaemon-predbat install method

* Carbon and export trigger sensors

* Revert predbat.soc_min_kwh and correct friendly name

* [pre-commit.ci lite] apply automatic fixes

* Correct octopus sensor id's in apps.yaml templates

* Inverter setup capitalisation

* Simplify and resolve naming issues in sample EV setup

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
gcoan and pre-commit-ci-lite[bot] authored Oct 27, 2024
1 parent 6ee7406 commit 438a663
Show file tree
Hide file tree
Showing 24 changed files with 493 additions and 365 deletions.
1 change: 1 addition & 0 deletions .cspell/custom-dictionary-workspace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ unstaged
useid
venv
Wallbox
weblink
welink
xaxis
xlabel
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ assignees: springfall2008
**Describe the bug**
A clear and concise description of what the bug is.

**Expected behavior**
**Expected behaviour**
A clear and concise description of what you expected to happen.

**Predbat version**
Expand Down
14 changes: 7 additions & 7 deletions apps/predbat/inverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def find_charge_curve(self, discharge):
if final_curve_count[index] > 0:
final_curve[index] = self.base.dp2(final_curve[index] / final_curve_count[index])

self.log("Curve before adjustment is: {}".format(final_curve))
self.log("{} curve before adjustment is: {}".format(curve_type, final_curve))

# Find info for gap filling
found_required = False
Expand Down Expand Up @@ -632,7 +632,7 @@ def find_charge_curve(self, discharge):
if self.base.battery_charge_power_curve_auto:
self.log("Curve automatically computed as:\n" + text)
else:
self.log("Curve curve can be entered into apps.yaml or set to auto:\n" + text)
self.log("{} curve can be entered into apps.yaml or set to auto:\n".format(curve_type) + text)
rate_scaling = round(rate_scaling, 2)
if discharge:
if rate_scaling != self.base.battery_rate_max_scaling_discharge:
Expand All @@ -642,15 +642,15 @@ def find_charge_curve(self, discharge):
self.log("Consider setting in HA: input_number.battery_rate_max_scaling: {} - currently {}".format(rate_scaling, self.base.battery_rate_max_scaling))
return final_curve
else:
self.log("Note: Found incorrect battery charging curve (was 0), maybe try again when you have more data.")
self.log("Note: Found incorrect battery {} curve (was 0), maybe try again when you have more data.".format(curve_type))
else:
self.log("Note: Found incomplete battery charging curve (no data points), maybe try again when you have more data.")
self.log("Note: Found incomplete battery {} curve (no data points), maybe try again when you have more data.".format(curve_type))
else:
self.log("Note: Cannot find battery charge curve (no final curve), one of the required settings for predbat_status, soc_kw, battery_power and charge_rate do not have history, check apps.yaml")
self.log("Note: Cannot find battery {} curve (no final curve), one of the required settings for predbat.status, soc_kw, battery_power and {}_rate do not have history, check apps.yaml".format(curve_type, curve_type))
else:
self.log("Note: Cannot find battery charge curve (missing history), one of the required settings for predbat_status, soc_kw, battery_power and charge_rate do not have history, check apps.yaml")
self.log("Note: Cannot find battery {} curve (missing history), one of the required settings for predbat.status, soc_kw, battery_power and {}_rate do not have history, check apps.yaml".format(curve_type, curve_type))
else:
self.log("Note: Cannot find battery charge curve (settings missing), one of the required settings for soc_kw, battery_power and charge_rate are missing from apps.yaml")
self.log("Note: Cannot find battery {} curve (settings missing), one of the required settings for soc_kw, battery_power and {}_rate are missing from apps.yaml".format(curve_type, curve_type))
return {}

def create_entity(self, entity_name, value, uom=None, device_class="None"):
Expand Down
98 changes: 49 additions & 49 deletions apps/predbat/predbat.py

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions docs/apps-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ Depending on how you installed Predbat the `apps.yaml` file will be held in one

- if you have used the [Predbat add-on installation method](install.md#predbat-add-on-install), apps.yaml will be in the directory `/addon_configs/6adb4f0d_predbat`,

- if the [combined AppDaemon/Predbat add-on installation method](install.md#appdaemon-predbat-combined-install) was used, it's in `/addon_configs/46f69597_appdaemon-predbat/apps`,
or
- with the [HACS, Appdaemon add-on then Predbat installation method](install.md#predbat-installation-into-appdaemon), it's in `/config/appdaemon/apps/batpred/config/`, or

- with the [HACS, Appdaemon add-on then Predbat installation method](install.md#predbat-installation-into-appdaemon), it's in `/config/appdaemon/apps/batpred/config/`.
- if the combined AppDaemon/Predbat add-on installation method was used, it's in `/addon_configs/46f69597_appdaemon-predbat/apps`.

You will need to use a file editor within Home Assistant (e.g. either the File editor or Studio Code Server add-on's)
to edit the `apps.yaml` file - see [editing configuration files within Home Assistant](install.md#editing-configuration-files-in-home-assistant) if you need to install an editor.
Expand Down Expand Up @@ -41,6 +40,8 @@ car_charging_now_response:
The two spaces before the dash are especially critical. Its easy to mis-edit and have one or three spaces which isn't valid YAML.
NB: the sequence of entries in `apps.yaml` doesn't matter, as long as the YAML itself is structured correctly you can move things and edit things anywhere in the file.

## Templates

You can find template configurations in the following location: <https://github.com/springfall2008/batpred/tree/main/templates>
Expand Down Expand Up @@ -314,19 +315,25 @@ for more accurate predictions.
## Inverter control configurations

- **inverter_limit** - One per inverter. When set defines the maximum AC output power in watts for your inverter or micro-inverters (e.g. 3600).
This will help to emulate clipping when your solar produces more than the inverter can handle, but it won't be that accurate as the source of the data isn't minute by minute.
This is used by Predbat in calculating the plan to emulate clipping that occurs in the inverter when your solar produces more than the inverter can handle,
but it won't be that accurate as the source of the data isn't minute by minute.
If you have a separate Solar inverter as well then add the solar inverter limit to the battery inverter limit to give one total amount.<BR>
For example, if you have a GivEnergy hybrid inverter you should set export_limit to 3600 or 5000 depending on which size inverter you have.
If though you have a GivEnergy All-in-one (6kW AC limit) and a 5kW Solis solar inverter, you should set inverter_limit to 11000 (6000+5000).
For multiple All-in-one's, add each of their limits together, plus any separate solar inverter limits.

NB: inverter_limit is ONLY used by Predbat to improve the quality of the plan, any solar clipping is done by the inverter and is not controlled by Predbat.

- **export_limit** - One per inverter (optional). When set defines the maximum watts of AC power your inverter can export to the grid at (e.g. 2500).
This will emulate the software export limit setting in the Inverter that you will have if your G98/G99
This is used by Predbat in calculating the plan to emulate your inverter's software export limit setting that you will have if your G98/G99
approval was lower than your maximum inverter power (check your install information for details).
If you do not set an export limit then it's the same as the inverter limit.

- **inverter_limit_charge** and **inverter_limit_discharge** - One per inverter (optional). When set in watts, overrides the maximum
NB: export_limit is ONLY used by Predbat to improve the quality of the plan, any export limit is done by the inverter and is not controlled by Predbat.

- **inverter_limit_charge** and **inverter_limit_discharge** - One per inverter (optional). When set in Watts, overrides the maximum
charge/discharge rate settings used when controlling the inverter.
This can be used if you need to cap your inverter battery rate (e.g. charge overnight at a slower rate to reduce inverter/battery heating) as Predbat
This can be used if you need Predbat to cap your inverter battery rate (e.g. charge overnight at a slower rate to reduce inverter/battery heating) as Predbat
will normally configure all timed charges or discharges to be at the inverter's maximum rate.

## Controlling the Inverter
Expand Down
Loading

0 comments on commit 438a663

Please sign in to comment.