Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial documentation for Solis inverters #308

Merged
merged 10 commits into from
Dec 10, 2023
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Introduction

Home battery prediction and automatic charging for Home Assistant with GivTCP
Home battery prediction and automatic charging for Home Assistant

Also known by some as Batpred or Batman!

Expand All @@ -25,7 +25,7 @@ It also explains how you can contribute to the project.

## Support

For support please raise a Github ticket or use the [GivTCP Facebook page](https://www.facebook.com/groups/615579009972782).
For support please raise a Github ticket or use the [GivTCP](https://www.facebook.com/groups/615579009972782) or [Solis](https://www.facebook.com/groups/288045168816481) Facebook Groups.

```text
Copyright (c) Trefor Southwell October 2023 - All rights reserved
Expand Down
83 changes: 40 additions & 43 deletions docs/config-yml-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ is the suggested amount (to match energy rate cycles)

## Inverter information

The following are entity names in HA for GivTCP, assuming you only have one inverter and the entity names are standard then it will be auto discovered
The following are entity names in HA for GivTCP, assuming you only have one inverter and the entity names are standard then it will be auto discovered. For other brands of inverter see [Other Inverters](other-inverters.md)

- **num_inverters** - If you increase this above 1 you must provide multiple of each of these entities
- **geserial** - This is a helper regular expression to find your serial number, if it doesn't work edit it manually or change individual entities to match.
Expand All @@ -27,12 +27,12 @@ The following are entity names in HA for GivTCP, assuming you only have one inve

### Data from GivTCP

It's recommended you get this data from GivTCP, there are also controls for load_scaling and import_export_scaling if they need scale adjustments
It's recommended you get this data from GivTCP, there are also controls for load_scaling and import_export_scaling if they need scale adjustments

- **load_today** - GivTCP Entity name for the house load in kWh today (must be incrementing)
- **load_today** - GivTCP Entity name for the house load in kWh today (must be incrementing)
- **import_today** - GivTCP Imported energy today in kWh (incrementing)
- **export_today** - GivTCP Exported energy today in kWh (incrementing)
- **pv_today** - GivTCP PV energy today in kWh (incrementing)
- **pv_today** - GivTCP PV energy today in kWh (incrementing)

If you have multiple inverters then you may find that the load_today figures from GivTCP are incorrect as the inverters share the house load between them.
In this circumstance one solution is to create a template helper to calculate house load from {pv generation}+{battery discharge}-{battery charge}+{import}-{export}.
Expand All @@ -49,11 +49,11 @@ e.g.

### GivEnergy Cloud Data

If you have an issue with the GivTCP data you can get this historical data from the GivEnergy cloud instead. This data is updated every 30 minutes.
If you have an issue with the GivTCP data you can get this historical data from the GivEnergy cloud instead. This data is updated every 30 minutes

- **ge_cloud_data** - When True use the GE Cloud for data rather than load_today, import_today and export_today
- **ge_cloud_data** - When True use the GE Cloud for data rather than load_today, import_today and export_today
- **ge_cloud_serial** - Set the inverter serial number to use for the Cloud data
- **ge_cloud_key** - Set to your API Key for GE Cloud (long string)
- **ge_cloud_key** - Set to your API Key for GE Cloud (long string)

## Inverter control

Expand Down Expand Up @@ -182,14 +182,14 @@ Delete this line from apps.yaml or set it to zero if you don't want the standing
Or manually set your rates in a 24-hour period using these:

```yaml
rates_import:
- start : "HH:MM:SS"
end : "HH:MM:SS"
rate : pence
rates_export:
- start : "HH:MM:SS"
end : "HH:MM:SS"
rate : pence
rates_import:
- start: "HH:MM:SS"
end: "HH:MM:SS"
rate: pence
rates_export:
- start: "HH:MM:SS"
end: "HH:MM:SS"
rate: pence
```

**start** and **end** are in the time format of "HH:MM:SS" e.g. "12:30:00" and should be aligned to 30 minute slots normally.
Expand All @@ -201,16 +201,16 @@ You can also override the energy rates (regardless of if they are set manually o
The override is used to set times where rates are different, e.g. an Octopus Power Up session (zero rate for an hour or two)

```yaml
rates_import_override:
- start : "HH:MM:SS"
end : "HH:MM:SS"
rate : pence
date : "YYYY-MM-DD"
rates_export_override:
- start : "HH:MM:SS"
end : "HH:MM:SS"
rate : pence
date : "YYYY-MM-DD"
rates_import_override:
- start : "HH:MM:SS"
end : "HH:MM:SS"
rate : pence
date : "YYYY-MM-DD"
rates_export_override:
- start : "HH:MM:SS"
end : "HH:MM:SS"
rate : pence
date : "YYYY-MM-DD"
```

**date** is in the date format of "YYYY-MM-DD" e.g. "2023-09-09"
Expand Down Expand Up @@ -266,10 +266,10 @@ charging plan, e.g. you are using Intelligent Octopus or you use the car slots i
- CAUTION: If you turn this switch back on during a car charging session you will need to set your battery discharge rate back to maximum manually.

- Multiple cars can be planned with Predbat, in which case you should set **num_cars** in apps.yaml to the number of cars you want to plan
- **car_charging_limit**, **car_charging_planned**, **car_charging_battery_size** and **car_charging_soc** must then be a list of values (e.g. 2 entries for 2 cars)
- If you have Intelligent Octopus then Car 0 will be managed by Octopus Energy plugin if enabled
- Each car will have it's own slot sensor created **predbat_car_charging_slot_1** for car 1
- Each car will have it's own SOC planning sensor created e.g **predbat.car_soc_1** and **predbat.car_soc_best_1** for car 1
- **car_charging_limit**, **car_charging_planned**, **car_charging_battery_size** and **car_charging_soc** must then be a list of values (e.g. 2 entries for 2 cars)
- If you have Intelligent Octopus then Car 0 will be managed by Octopus Energy plugin if enabled
- Each car will have it's own slot sensor created **predbat_car_charging_slot_1** for car 1
- Each car will have it's own SOC planning sensor created e.g **predbat.car_soc_1** and **predbat.car_soc_best_1** for car 1

## Workarounds

Expand Down Expand Up @@ -311,26 +311,23 @@ The trigger feature is useful to help trigger your own automation based on Predb

The triggers count export energy until the next active charge slot only.

For each trigger give a name, the minutes of export needed and the energy required in that time.

Multiple triggers can be set at once so in total you could use too much energy if all run!

Each trigger create an entity called 'binary_sensor.predbat_export_trigger_[name]' which will be turned On when the condition is valid.

Connect your automation to this binary sensor to start whatever you want to trigger.
For each trigger give a name, the minutes of export needed and the energy required in that time
Multiple triggers can be set at once so in total you could use too much energy if all run
Each trigger create an entity called 'binary_sensor.predbat_export_trigger_<name>' which will be turned On when the condition is valid
connect this to your automation to start whatever you want to trigger.

Set the name for each trigger, the number of minutes of solar export you need, and the amount of energy in kwH you will need available during that time period in apps.yaml:

For example:

```yaml
export_triggers:
- name: 'large'
minutes: 60
energy: 1.0
- name: 'small'
minutes: 15
energy: 0.25
export_triggers:
- name: "large"
minutes: 60
energy: 1.0
- name: "small"
minutes: 15
energy: 0.25
```

If you wish to trigger based on charging or discharging the battery rather than spare solar energy you can instead use the following binary sensors
Expand Down
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ For support please raise a Github ticket or use the GivTCP Facebook page:

[https://www.facebook.com/groups/615579009972782](https://www.facebook.com/groups/615579009972782)

For support specific to the Solis inverter you can use the [Solis Facebook Group:](https://www.facebook.com/groups/288045168816481).

If you want to buy me a beer then please use Paypal - [tdlj@tdlj.net](mailto:tdlj@tdlj.net)
![image](https://github.com/springfall2008/batpred/assets/48591903/b3a533ef-0862-4e0b-b272-30e254f58467)

Expand Down
13 changes: 9 additions & 4 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Install

## GivTCP install
## Inverter Control Integration install (GivTCP/SolaX-ModBus)

You must have GivTCP installed and running first ([https://github.com/britkat1980/giv_tcp](https://github.com/britkat1980/giv_tcp))
The Integration that communicates with your inverter will be dependen on the brand:

You will need at least 24 hours history in HA for this to work correctly, the default is 7 days (but you can configure this back to 1 day if you need to).
| Brand | Integration | Github Link |
| :-------- | :----------- | :------------------------------------------------------------------------------- |
| GivEnergy | GivTCP | [https://github.com/britkat1980/giv_tcp](https://github.com/britkat1980/giv_tcp) |
| Solis | SolaX ModBus | https://github.com/wills106/homeassistant-solax-modbus |

- You will need at least 24 hours history in HA for this to work correctly, the default is 7 days (but you configure this back 1 day if you need to)

## AppDaemon install

Expand Down Expand Up @@ -92,7 +97,7 @@ Note: **Not recommended if you have HACS**

Predbat needs a solar forecast in order to predict battery levels.

If you don't have solar then comment out the Solar forecast part of the apps.yml: **pv_forecast_* **
If you don't have solar then comment out the Solar forecast part of the apps.yml: **pv*forecast*\* **
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why star's in place of underscore?


Make sure Solcast is installed and working (<https://github.com/oziee/ha-solcast-solar>).

Expand Down
26 changes: 26 additions & 0 deletions docs/other-inverters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Other Inverters

PredBat was originally written for GivEnergy inverters using the GivTCP integration but this is now being extended to othert models:

- Solis Hybrid inverters [Solax Modbus integration](https://github.com/wills106/homeassistant-solax-modbus)
- Solax Gen4 inverters [Solax Modbus integration](https://github.com/wills106/homeassistant-solax-modbus) in Modbus Power Control Mode\*
- SolarEdge inverters\*

\*Work in progress

Note that support for all these inverters is in various stages of development. Please expect things to fail and report them as Issues on Github. Please also ensure you have set up enhanced logging in AppDaemon as described here

### Solis Inverters

To run PredBat with Solis hybrid inverters, follow the following steps:

1. Install PredBat as per the [Installation Summary](installation-summary.md)
2. Ensure that you have the Solax Modbus integration running. There are a number of entities which this integration disables by defaul that you will need to enable via the Home Assistant GUI:

| Name | Description |
| :---------------------------- | :-------------- |
| `sensor.solisx_rtc` | Real Time Clock |
| `sensor.solisx_battery_power` | Battery Power |

3. Instead of `apps.yaml` use `ginlong_solis.yaml` from this Repo as your starting template. The majority of settings should be correct but please cleck. You will need to un-comment the `template` line to enable it. Save it to the `config/appdaemon/apps/predbat/config` folder.
4. Ensure that the inverter is set Control Mode 35 - on the Solax integration this is `Timed Charge/Discharge`. If you want to use the `Reserve` functionality within PredBat you will need to select `Backup/Reserve` (code 51) instead but be aware that this is not fully tested. In due course these mode settings will be incorporated into the code.
4 changes: 1 addition & 3 deletions ginlong_solis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pred_bat:
prefix: predbat

# XXX: This is a configuration template, delete this line once you edit your configuration
# template: True
template: True

# Timezone to work in
timezone: Europe/London
Expand All @@ -16,14 +16,12 @@ pred_bat:
# however if you have two inverters only set one of them as they will both read the same.
#


inverter_type: "GS"
num_inverters: 1
#
# Controls/status - must by 1 per inverter
#


# Max inverter power from battery
battery_rate_max:
- 3600
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ nav:
- creating-charts.md
- predbat-plan-card.md
- 'Predbat development':
- other-inverters.md
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I'd add this in another section, rather than in the section on developing on Predbat, as it's not really developer content.

- todo-list.md
- developing.md
markdown_extensions:
Expand Down
Loading