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 Strømligning 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.
Create a .env file in the project root or set them in your Docker Compose file:
USER_ID="your-user-id"
ADMIN_KEY="your-admin-key"
HOSTNAME="https://your-hostname"
AUDIENCE="https://your-audience"
OLD_JTI="your-jti"
SCOPES="scope1,scope2,scope3"
SERVICE="power-pi"