PowerPi is a Python application that monitors electricity prices and automatically enables a charger when prices are low.
-
Fetches Electricity Prices: Every 5 minutes, the program connects to a Danish electricity price API to get the current electricity price per kWh.
-
Retrieves Configuration: It gets your personal settings from Boardom Dashboard. These settings are Electricity Company and Max Price/kwh
-
Compares Prices: It compares the current electricity price against your configured maximum price.
-
Controls the Charger: If the electricity price is below your threshold, it enables the charger. Otherwise, it keeps it disabled.
-
Caches Data: It stores the latest price information in a cache file for reference.
-
Logs Everything: The program provides detailed logs of what it's doing, so you can monitor its activity.
This program requires a config.py file in the same directory with the following:
USER_ID = "your_user_id_here"
ADMIN_KEY = "your_admin_key_here"
BEARER_TOKEN = "your_token_here"