my_usage_dashboard/Readme.md

890 B

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