2024-10-28 21:15:14 +01:00
|
|
|
This is the docker container and script to publish the energy consumption of the Huette to the MQTT broker.
|
|
|
|
|
|
|
|
The data is a json array with index 0 means today, index 1 one day in the past, index 2 two days in the past and so on. The data is in watt hours.
|
|
|
|
|
|
|
|
e.g. [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000]
|
|
|
|
|
|
|
|
# Environment variables
|
|
|
|
|
2024-10-28 21:16:36 +01:00
|
|
|
- MQTT_HOST: The host of the MQTT broker
|
|
|
|
- MQTT_PORT: (Optional) The port of the MQTT broker
|
|
|
|
- MQTT_TOPIC: The topic to publish to
|
|
|
|
- MQTT_USERNAME: (Optional) The user for the MQTT broker
|
|
|
|
- MQTT_PASSWORD: (Optional) The password for the MQTT broker
|
2024-10-28 21:15:14 +01:00
|
|
|
|
2024-10-28 21:16:36 +01:00
|
|
|
# Docker
|
|
|
|
## Build
|
2024-10-28 21:07:57 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
docker build -t huette-energy-consumption-weekperday .
|
|
|
|
```
|
|
|
|
|
2024-10-28 21:16:36 +01:00
|
|
|
## Run
|
2024-10-28 21:07:57 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
docker run -d -e MQTT_HOST=10.2.3.2 -e MQTT_TOPIC=c3re/huette/energy/consumption/week_per_day -t huette-energy-consumption-weekperday
|
|
|
|
```
|