Skip to content

ArianYN/power-pi

Repository files navigation

PowerPi - Smart Electricity Price Monitor

What This Program Does

PowerPi is a Python application that monitors electricity prices and automatically enables a charger when prices are low.

How It Works:

  1. Fetches Electricity Prices: Every 5 minutes, the program connects to a Strømligning API to get the current electricity price per kWh.

  2. Retrieves Configuration: It gets your personal settings from Boardom Dashboard. These settings are Electricity Company and Max Price/kwh

  3. Compares Prices: It compares the current electricity price against your configured maximum price.

  4. Controls the Charger: If the electricity price is below your threshold, it enables the charger. Otherwise, it keeps it disabled.

  5. Caches Data: It stores the latest price information in a cache file for reference.

  6. Logs Everything: The program provides detailed logs of what it's doing, so you can monitor its activity.

Setting Environment Variables

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"

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors