Persistent data for sensors etc.. influxdb the answer?

Hello

I am getting frustrated by my sensors settings resetting after a reboot and also a purge. I used to have InfluxDB setup but never used it. Is that the solution? I chose which sensors I want to keep long term and then pull the values from InfluxDB into HA? then display them in lovelace graphs etc?

Thoughts please? for example i want to track the energy use of multiple MQTT energy plugs flashed with Tasmota.

  - platform: mqtt
    name: "Heater Energy Today"
    state_topic: "tele/heater/SENSOR"
    value_template: '{{ value_json["ENERGY"]["Today"] }}'
    unit_of_measurement: "kWh"
  - platform: mqtt
    name: "Heater Energy Yesterday"
    state_topic: "tele/heater/SENSOR"
    value_template: '{{ value_json["ENERGY"]["Yesterday"] }}'
    unit_of_measurement: "kWh"
  - platform: mqtt
    name: "Heater Energy Total"
    state_topic: "tele/heater/SENSOR"
    value_template: '{{ value_json["ENERGY"]["Total"] }}'
    unit_of_measurement: "kWh"

I did try the utility meter but this will also reset on a DB purge. and am finding it reset on reboots as well.

That’s exactly what I’ve done. Store the values in InfluxDB then use Grafana to chart them

I’m going to pull the values back from InfluxDB so I can template them to give monetary values to them… so far it looks like it working… :slight_smile:

1 Like