Hello,
i finally got my MQTT running and logging my energy meter of my house.
The energy meter sends out 250Impulse/kWh. I fetching this with a light sensor attached to a ESP8266 running ESPEasy. The light sensor counts up 2 for every impulse of the energy meter (blinking LED is one impulse, but sensors counts LED On = 1, LED Off = 1)
In ESP Easy i multiply this with 2 and send this to my Mosquitto broker every 5 minutes.
So mosquitto receives every 5 minutes a value how many energy (W/h) was used in the last past minutes.
pimatic-mqtt gets this value and shows it.
This works very well for me.
Now i like to use this value (it’s actually a attribute of a device) to graph also
- Energy used last hour
- Energy used last day
- Energy used last month
Is there a way to sum all values stored in the database for the 5min counter up to something else?
Or -
how to transfer the attribute of a device to a variable?
Thank you