Installation
Note: This application requires Python 3.12.8 to run properly. Please ensure you have this specific version installed on your system before proceeding with the installation steps below. Earlier or later versions may not be compatible with all dependencies or features used in this project.
- Clone the repository:
git clone https://github.com/Bloodwing1/Strom.git cd strom - Install required dependencies:
pip install -r requirements.txt - Create necessary configuration files:
- Create a
configdirectory in the root folder of the project - Add your API keys and credentials (please see Configuration section bellow)
- Create a
Configuration
API Keys Setup
-
Create the following files in the
configdirectory:weather_api_key.txt: Contains your OpenWeatherMap API keyprice_api_key.txt: Contains your ENTSO-E API keytapologin.env: Contains your TP-Link Kasa login credentials
- For the
tapologin.envfile, use the following format:EMAIL=your_tplink_account_email PASSWORD=your_tplink_account_password - You can optionally add your custom house heating parameters to a
house_config.jsonfile with the following structure to theconfig_folder.
{
"C_air": 0.56,
"C_wall": 3.5,
"R_interior": 1.0,
"R_exterior": 6.06,
"Q_heater": 2.0,
"Q_cooling": 0.0,
"T_min": 18.0,
"T_max": 24.0,
"T_interior_init": 18.5,
"T_wall_init": 18.5,
"P_base": 0.01,
"freq": "1h"
}
Device Configuration
Update the device_ip variable in main.py with the IP address of your Kasa smart plug:
device_ip = "192.191.1.14" # Replace with your device's IP address