<<<<< DEPRECATED: This blueprint is deprecated. I implemented it from the ground up as HACS integration, you can find the new thread here: PV Excess Control HACS Integration >>>>>
Hi everybody,
I used the power of pyscript and the easy-to-use-approach of blueprints to implement an extensive solar excess optimization, which lets you auto-control your appliances based on power excess of your PV / solar system.
Please let me know if you have questions, if you do encounter any bugs, or if you have feature requests.
For the last two topics (bugs & feature requests) you can also directly raise them on my GitHub repository: PV Excess Control
ā
ā
# PV Excess Control
Automatically control your appliances (wallbox, heatpump, washing machine, ā¦) based on excess solar power
## Features
Works with hybrid and standard inverters
Configurable priority handling between multiple appliances
Include solar forecasts from Solcast to ensure your home battery is charged to a specific level at the end of the day
Define an On/Off switch interval / solar power averaging interval
Supports dynamic current control (e.g. for wallboxes)
Define min. and max. current for appliances supporting dynamic current control
Supports one- and three-phase appliances
Supports Only-Switch-On devices like washing machines or dishwashers
## Prerequisites
- A working installation of pyscript (can be installed via HACS)
- (Optional: A working installation of solcast (can be installed via HACS custom repository)
- Home Assistant v2023.1 or greater
- Access to the following values from your hybrid PV inverter:
- Export power
- PV Power
- Load Power
- Home battery level
- OR: Access to the following values from your standard inverter:
- Combined import/export power
- PV Power
- Pyscript must be configured to allow all imports. This can be done
- either via UI:
- Configuration ā Integrations page ā ā+ā ā Pyscript Python scripting
- After that, you can change the settings anytime by selecting Options under Pyscript in the Configuration page
- or via configuration.yaml:
</s> <s>pyscript:</s> <s> allow_all_imports: true</s> <s>
## Installation
- Download (or clone) the GitHub repository: PV Excess Control
- Copy both folders (blueprints and pyscript) to your HA config directory, or manually place the automation blueprint pv_excess_control.yaml and the python module pv_excess_control.py into their respective folders.
- Configure the desired logging level in your configuration.yaml:
</s> <s>logger:</s> <s> logs:</s> <s> custom_components.pyscript.file.pv_excess_control: debug</s> <s>
## Configuration & Usage
### Initial Configuration
- For each appliance which should be controlled, create a new automation based on the PV Excess Control blueprint
- After creating the automation, manually execute it once. This will send the chosen configuration parameters and sensors to the python module and start the optimizer in the background
- The python module stays active in background, even if HA or the complete system is restarted
### Update
- To update the configuration, simply update the chosen parameters and values in your automation, which was created based on the blueprint.
- After that, manually execute the automation once to send the changes to the python module
### Deactivation
- To deactivate the auto-control of a single appliance, simply deactivate the related automation.
### Deletion
- To remove the auto-control of a single appliance, simply delete the related automation.
##
Known Bugs ![]()
### Script not active after HA restart
ā Solved through PR of @stefan73. Thanks!
Original Workaround description:
ā The problem appears, if all your PV Excess Control automations are disabled and you restart Home Assistant.
ā As a workaround, you can create this automation (make sure to fill out to entity_id):
</s> <s>alias: PV Excess Control Initial Trigger</s> <s>description: >-</s> <s> Triggers one of the PV Excess Control Automations after starting HA to prevent</s> <s> the prevent the script from not running in the background (happens when all PV</s> <s> Excess Control Automations are switched off at startup)</s> <s>trigger:</s> <s> - platform: homeassistant</s> <s> event: start</s> <s>condition: []</s> <s>action:</s> <s> - service: automation.trigger</s> <s> data:</s> <s> skip_condition: true</s> <s> target:</s> <s> entity_id:</s> <s> - automation.[ONE_OF_YOUR_PV_EXCESS_AUTOMATIONS_HERE]</s> <s>mode: single</s> <s>
