https://github.com/manelix2000/docker-electricity-spain-pvpc-chart
Docker image to show Spain Electricity price in HomeKit
https://github.com/manelix2000/docker-electricity-spain-pvpc-chart
docker docker-compose homebridge homekit pvpc spain
Last synced: 2 months ago
JSON representation
Docker image to show Spain Electricity price in HomeKit
- Host: GitHub
- URL: https://github.com/manelix2000/docker-electricity-spain-pvpc-chart
- Owner: manelix2000
- Created: 2025-05-06T15:39:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-12T11:27:00.000Z (about 1 year ago)
- Last Synced: 2025-09-13T16:11:40.617Z (10 months ago)
- Topics: docker, docker-compose, homebridge, homekit, pvpc, spain
- Language: Python
- Homepage:
- Size: 357 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spain Electricity Price Graph
## π Introduction
Docker image to broadcast Spain electricity prices as a camara feed to use with [Homebridge Camera FFmpeg](https://github.com/homebridge-plugins/homebridge-camera-ffmpeg) and integrate it into HomeKit.
Prices are loaded from **Red ElΓ©ctrica** [ESIOS API](https://api.esios.ree.es/). You will need a *personal token* (you can request it [here](https://api.esios.ree.es/)).
Home App

Camera Widget

## β
Project structure
```
project-root/
βββ docker-compose.yml
βββ README.md
βββ prices/
βββ Dockerfile
βββ requirements.txt
βββ prices_server.py
βββ prices_generator.py
βββ images/ # Directory to hold price png's
```
## π Explanation
- ```docker-compose.yml```: docker compose configuration
- ```prices/Dockerfile```: docker build configuration
## π οΈ Installation
1. Copy files into your docker installation
2. Execute
```
docker compose up --build -d
```
## π§ͺ Test Installation
Open your favourite browser to:
1. *Camera feed*
```
http://:8080/prices
````
2. *Camera snapshot*
```
http://:8080/prices.png
````
## π οΈ Docker compose environment values
Change values as your needs:
```
version: '3.8'
services:
pvpc_prices_server:
build: ./prices
container_name: pvpc-prices-server
restart: unless-stopped
ports:
- "8080:8080"
environment:
- TZ=Europe/Madrid
- ESIOS_API_TOKEN=_your_esios_token_here_
```
## π οΈ Integration with your homebridge-camera-ffmpeg plugin
Once you have your docker image up, install the homebridge plugin [Homebridge Camera FFmpeg](https://github.com/homebridge-plugins/homebridge-camera-ffmpeg) and configure it as follows:
- ```source```:
-f mjpeg -i http://:8080/prices
- ```stillImageSource```: -i http://:8080/prices.png
- ```maxStreams```: 2
- ```maxWidth```: 800
- ```maxHeight```: 600
- ```maxFPS```: 1