Tasmota Energy Monitoring with NodeRED, Influx and Grafana

18. Februar 2023 at 19:07

Tasmota-Energy-Monitor

Energy monitor using NodeRED, InfluxDB and Grafana

This project is using power monitoring devices like Gosund SP111, SONOFF POW to measure the energy consumption. Data is collected by NodeRED and pushed to a Influx database. Finally Grafana is used to provide a dashboard.

Supporting files are availabe on github:

https://github.com/ThomasH-W/Tasmota-Energy-Monitor

Grafana Monitoring

3825759A-FF9F-4E9A-95C6-94841B3EACC9

4B077E85-3864-49A2-B832-98EFC162FBA3

NodeRED

EE548C94-9332-4D77-9C91-5CADC5A79EF2_4_5005_c

The flow is kept very generic. You do not need to manually create flows for each devices. Instead of using discovery, NodRED is listening to all SENSOR messages and creating automatically a list of devices.

The fields pushed to the influx database are

  • device: myDevice,
  • event: ‘tele’,
  • power: msg.payload.ENERGY.Power,
  • today: msg.payload.ENERGY.Today,
  • yesterday: msg.payload.ENERGY.Yesterday,
  • total: msg.payload.ENERGY.Total

At the end of each day at 11.58 p.m. the value of today is pushed to another measurement in influx.

Tsamota Devices

Hardware

Any Tasmota device with power measurement will work: NOUS A1T, Gosund SP111, BlitzWolf SHP2 (old version with ESP), SONOFF POW

Configuration

When I started with home automation I thought it is a bright idea to seperate MQTT messages by building. Accordingly I changed the full topic to “house/%prefix%/%topic/”.
Probably I would not do it anymore.