Go to file
Dirk Heilig fed0c7124a fix roken refactor 2024-10-28 21:56:07 +01:00
Dockerfile first commit 2024-10-16 14:22:30 +02:00
Readme.md reformat 2024-10-16 14:23:06 +02:00
devrun first commit 2024-10-16 14:22:30 +02:00
run.php fix roken refactor 2024-10-28 21:56:07 +01:00

Readme.md

My Usage Dashboard

This script is used to calculate the energy consumption and coast since the last time the door was opened.

It gets 2 values via mqtt, the door status and the current energy meter value. With this Information, it gives the following outputs:

  • the energy amount in kwh as float.
  • the coast in € as float.
  • the coast in euro rounded to 2 decimal places as string, ready for displaying.

all this topics will get a empty payload if the door is closed.

configuration

The script is configured env vars:

MQTT_HOST: the mqtt host to connect to
ENERGY_METER_TOPIC: the mqtt topic to get the energy meter value
DOOR_TOPIC: the mqtt topic to get the door status
ENERGY_PRICE: the price per kwh in €
OUTPUT_TOPIC_PREFIX: the mqtt topic to publish the outputs to

optionally: 
MQTT_USER: the user to connect with
MQTT_PASSWORD: the password to connect with