Skip to content

Commit

Permalink
Amelioration readme
Browse files Browse the repository at this point in the history
  • Loading branch information
loudemer committed Feb 25, 2024
1 parent d3ba179 commit 9e9e7ed
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 29 deletions.
Binary file modified .DS_Store
Binary file not shown.
63 changes: 34 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# PV Optimizer
# PV Optimizer #

This integration allows you to maximize the self-consumption of the energy production of your solar panels. It allows you to control large household appliances, such as dishwashers or washing machines with simple switches, but also more complex devices to manage, such as swimming pool filtration or heat pump control through applications. dedicated communicating systems requiring multiparametric control mechanisms.

It is written in python under appdaemon (Home Assistant) and should be easily accessible to those who have some knowledge of programming. This should make it easy to modify to improve it and adapt it to your own needs.
# Features
# Features #
• Taking into account subscriptions: Tempo, Off-peak Hours, Base

• Taking into account the French resale price EDF OA
Expand All @@ -15,14 +15,14 @@ It is written in python under appdaemon (Home Assistant) and should be easily ac
• Can work with a hot water tank router, if it is possible to recover the instantaneous power delivered to the latter. The addition of a router is even recommended.

• Allows you to control complex systems, such as swimming pool filtration or heat pumps, through separate applications which communicate with the optimizer.
# Prerequisites
# Prerequisites
- Home Assistant appdaemon add-on installed
- Solar power sensor in Watt available
- It is measured using a current clamp connected to the house power cable. This measure can be positive in the case of withdrawal from the network or negative in the case of export. If you have an ECS router, you must be able to have the power sent to the tank, in order to have the exact available solar power
P available = P export + P ballon.
- Color of the day for French tempo subscriptions. You can use the integration without this kind of subscription leave “” for the sensor name
- You can use the RTE API for example. https://www.api-couleur-tempo.fr/api.
# Functioning
- You can use the [RTE API](https://www.api-couleur-tempo.fr/api) for example.
# How it works #
Each device is described in the application by:
- his name,
- his power,
Expand All @@ -35,7 +35,9 @@ It shuts down devices that have reached their scheduled run time and attempts to
The device is started from a power threshold, which depends on the operating cost compared to that of off-peak hours.

The calculation of the power threshold necessary for startup is done according to the formula:
P threshold = P device \* (1-(HC price – Buyback price) / HP price).

`P threshold = P device \* (1-(HC price – Buyback price) / HP price)`

This mode allows you to lower the starting power and see if it is better to start during the day or during off-peak hours.

In the event of limited solar production due to cloud cover, the system schedules all devices that could not be started during off-peak hours at night at the times defined in the configuration file.
Expand All @@ -44,15 +46,17 @@ When a device is started, it completes its entire cycle, even if the available s

For those who have a Tempo subscription, the optimizer does not work on red days in order to avoid significant expenses linked to reductions in solar production.

# Installation
1. Install appdaemon add-on from settings / add-ons if not already done.
2. Download the repository[https://github.com/loudemer/PVOptimizer.git]
3. Put the PVOptimizer.py and PVOptimiser.yaml files in the addon_configs/a0d7b954_appdaemon/apps directory
4. Put the optimizerentities.yaml file in the /config/ directory of HA or in a subdirectory dedicated to yaml files if you have one.
# Configuration
![Icon](https://github.com/loudemer/pvoptimizer/blob/main/images/applications.png?raw=true)
# Installation #
1. Install [appdaemon](https://appdaemon.readthedocs.io/en/latest/INSTALL.html) add-on from settings / add-ons if not already done.
2. Download the [repository](https://github.com/loudemer/PVOptimizer.git)
3. Put the `PVOptimizer.py` and `PVOptimiser.yaml` files in the `addon_configs/a0d7b954_appdaemon/apps directory`
4. Put the `optimizerentities.yaml` file in the `/config/` directory of HA or in a subdirectory dedicated to yaml files if you have one.
# Configuration #
1\ Add in addon_configs/a0d7b954_appdaemon/appdaemon.yaml file

``` pvoptimizer_log:
```yaml
pvoptimizer_log:
name: PVOptimizerLog
filename: /homeassistant/log/pvoptimizer.log
log_generations: 3
Expand All @@ -62,14 +66,15 @@ This allows you to read the application logs in the /config/pvoptimizer\_log fil
2\. Complete the /addon\_configs/a0d7b954\_appdaemon/apps/PVOptimiser.yaml file:
1) name of your sensor which gives the solar energy available in available\_energy:
1) type of electricity subscription in subscription: must be : Tempo, HeuresCreuses(Off-peak Hours), Base
1) journee\_tempo. sensor which gives the color of the tempo day in tempo\_day: put two double quotes if you have another type of subscription
1) Kwh prices in Cents or Euros. For an off-peak hours subscription, enter the prices: prix\_bleu\_hc and prix\_bleu\_hp.
1) name of your sensor which gives the solar energy available in `available\_energy:`
2) type of electricity subscription in `subscription:` must be : `Tempo, HeuresCreuses, Base`
3) journee\_tempo. sensor which gives the color of the tempo day in `tempo\_day:` put two `""` if you have another type of subscription
4) `Kwh prices` in Cents or Euros. For an off-peak hours subscription, enter the prices: `prix\_bleu\_hc` and `prix\_bleu\_hp`.

3\. Describe each device in ‘my\_devices:’ respecting the indentation as described below. The file is pre-populated with 2 example devices that you can edit.

``` my_devices:
``` yaml
my_devices:
dishwasher:
name: dishwasher
power: 2000
Expand All @@ -85,37 +90,37 @@ This allows you to read the application logs in the /config/pvoptimizer\_log fil
```
The power is in Watt, the duration in minutes, the start-up time must be None if it is another application such as swimming pool filtration for example.

4\. Reload the yaml configuration in tools/all configuration
4\. Reload the yaml configuration in `tools/all configuration`

5\. Create the device control dashboard or adapt the one given in the repository.
# The Dashboard
# The Dashboard #
As an example, you will find in the repository a basic configuration example yaml file that can be improved.

It contains 4 entities per device:
• The startup request: input\_boolean.device\_request\_1,
• The sensor switch controlling the device switch.<device>,
• The sensor power of the sensor device.<power device>
• The execution duration sensor: input\_text.device\_duration\_1.
1. • The startup request: `input\_boolean.device\_request\_1`,
1. • The sensor switch controlling the device switch.<device>,
1. • The sensor power of the sensor device.<power device>
1. • The execution duration sensor: input\_text.device\_duration\_1.

The input_boolean.device_request_x and input_text.device_duration_x sensors are predefined in the optimizerentities.yaml file. x for the definition rank of the device.
You will need to add an entry on the dashboard for the sensor input_boolean. enable_solar_optimizer which allows you to deactivate the application if necessary.

# Basic instructions for use
# Basic instructions for use #
Once the installation is complete, the integration is operational.
This part concerns devices which are only controlled by a switch sensor.

## Activating a device
## Activating a device ##
To request the activation of a device, simply click on the first sensor (Request).
If the available solar energy is enough, the device switch will be activated, the power delivered will be displayed and the execution time will begin to count down and be displayed every minute.
It is possible to force the start of a device, even if the available solar power is not enough, by clicking directly on the switch. The device entities will then be displayed as if the startup had been carried out by the integration.
## Shutting down a device
## Shutting down a device ##
The device will shut down when the scheduled run time has elapsed. You can force the shutdown by clicking on the switch.

## Off-peak programming
## Off-peak programming ##
All devices for which a request has not been satisfied during the day due to lack of sufficient energy are automatically reprogrammed at night during off-peak hours.
To do this, you must ensure that you configure start times during off-peak periods.

## Visualizing problems
# Visualizing problems #
The integration generates a log file which is stored in the /config/log/pvoptimizer.log file.
It is also possible to have more details by directly calling the appdaemon debug console: http://<ip_homeassistant>:5050

Expand Down

0 comments on commit 9e9e7ed

Please sign in to comment.