Energy management using MQTT data

Is there a way to see the payload history? I have monitored it via the sender (DashBox) but nothing ever looks weird to me. Just set the mqtt logging level in HA to debug and restarted as I am thinking thats the next step. I have not really seen what the payload really looks like and I am not sure something like MQTT explorer can do that? seems to want to talk to a broker not be one?

A history of values is recorded for each entity (unless you explicitly exclude it in the recorder configuration). Click the sensor in the Lovelace UI and a popup will appear showing its history.

So like this?

The only other thing I can see is maybe some are coming in as floats and the zero values are not (as in line 1 and 3 of the following)?

A value of 0 isnā€™t a problem itā€™s when a value isnā€™t recognizable as being numeric (ā€˜NoneTypeā€™) thatā€™s causing the error message. It might be rendered as a gap in the graph and thatā€™s not going to be easy to find using that graph.

You could try the nuclear option and purge all data from the database. Alternately, if you know your way around SQL, you can surgically delete only the values belonging to the sensor(s). However, thatā€™s not something I will coach you through.

SQL is not an issue here, I am just not familiar with how one gets to the database instance. Iā€™ll look around but if you have a hint by all means I am listening :slight_smile:

Figured out the default was sqlite, so poking around now. I noticed thisā€¦

image

I am guessing that since the units column is in ā€œWā€ that could be part of the issue? I originally messed up what I was grabbing and used watts on initial configā€¦

I would delete anything that could serve to corrupt the calculation. If you arenā€™t too concerned about any of the data, stop Home Assistant, delete the database, then start Home Assistant (it will create a new, empty database on startup).

I started to pick and choose what I was removing, but I do not have anything I specifically care about so I just purged the database. Now I wait and see if that resolved my issues.

I do appriciate you entertaining this issue with me. Thanks so far and hope I get to mark a solution on this one soon :slight_smile:

Success!! Thanks a ton!

1 Like

Hi,

Iā€™ve configured my MQTT energy sensors and they work and have valid values. But I was unable to define the last reset as shown bellow:

image

The problem is that the Energy Management requires the Ā«last resetĀ» when defining the energy entities.

image

Sorry for the portuguese but I think i could see it complains about the missing last_reset .

How can I solve this?

Thanks

Use something like this:

 last_reset_topic: "shellies/shellyem1/emeter/0/total"
 last_reset_value_template: '1970-01-01T00:00:00+00:00'

last_reset is no longer used IIRC.