This script enables the control of the inverter battery (in this case Fronius and BYD Battery) to manage the home battery based on dynamic electricity prices (awattar), weather and the use of the ev wallbox. The code runs under ioBroker. The code uses the node names of my adapters. Of cource you have to change it for your specific adapters.
To successfully use this project, the following prerequisites must be met:
-
ioBroker: Ensure that ioBroker is installed and set up on your system.
-
Inverter Adapter: The inverter adapter must be installed in ioBroker to access the Fronius inverter. The inverter must be able to charge your battery with grid power.
-
Wallbox Adapter: The wallbox adapter must be installed in ioBroker to obtain information about electric vehicle charging.
-
Install the pvforcast adapter in iobroker.
-
Open the ioBroker interface.
-
Create a new JavaScript instance or script.
-
Copy the contents of the
charge.js
file and paste it into your ioBroker instance. -
Save and activate the script.
-
Monitor the script execution through the ioBroker interface.
The control logic in this project consists of two main parts:
-
Stopping Battery Discharge When Charging the Car: The control logic ensures that the home battery is not discharged when the electric car is being charged.
-
Using Awattar Electricity Prices for Charging and Discharging the Battery: The control logic uses Awattar electricity prices to determine when the battery should be charged or discharged. The logic also takes into account weather conditions and the current time.
This project is licensed under the MIT license. For more information, see the License file.