Energy consumption of sonoff plug

Hello,

Through zigbee2mqtt (which actually accesses my zigbee2mqtt and mqtt instances in my HA), I successfully retrieve my Sonoff outlets in Gladys.

However, if I want to retrieve the energy consumption via the electricity consumption widget, the widget tells me that there is no energy consumption data for this period (although I have not created a utility_meter for this outlet).

Is this the issue or is there anything else to do?

Thank you for your help.

Can you provide us with screenshots of the features of your devices since the appropriate integration?
We need to check if you have conso30 and cout30 on these devices.
In the MQTT integration, you need to trigger the creation of these 2 features, but first, we need to see what you have exactly.

I’m not sure I understood everything, but in my Gladys devices, if I click on my smart plug, I get this:

is this what you wanted me to tell you?

and in my energy widget, I have this

and, finally, in the zigbee integration, I have this:

Thanks @filbou40, the features are in the Zigbee (or MQTT or Z-Wave, etc.) integration only:

So you do have the 30-minute consumption and 30-minute cost with history, you should have access to this data in an energy monitoring widget.
And your screenshot here is correct with the Sonoff Opensprinkler Outlet (30-minute Cost) for tracking.
In all logic, you should have information in your Energy Monitoring widget.

There’s 1 thing left to check: do you have an energy contract declared?
What I don’t know is if we can see the consumption in kWh even if we don’t have a contract :frowning:

sorry but I don’t understand your question "do you have an energy contract

But, I have another sonoff plug that correctly sends my information to Gladys. The difference is that for this plug, I created utility_meter meters in HA. And since Gladys finds these plugs through my MQTT hosted on HA, I think that might be it.

Just in case, I created utility_meter meters in HA for my opensprinkler plug but I think I need to wait at least a day to get the day’s stats. I’ll see tomorrow.

Thanks for looking into my case, anyway

I have no idea what that is, but we don’t have it in Gladys (to my knowledge).

For the contract, it’s in the Energy Tracking integration:


and you should have something like this:

Could you show us the features of your other outlet?

A utility_meter is a counter that you can create in Home Assistant to record statistics (you can create hourly, daily, monthly counters, etc.).

I do have an active contract:

and I do have my plug, but be careful, it wasn’t connected to the meter. I just connected it, so maybe that was the issue.

It’s possible, verdict in 24 hours if you use your plug :smiling_face:

@mutmut, no need to wait 24 hours.

I think the stats were recorded correctly, but since the outlet wasn’t connected to the meter, they couldn’t be displayed (at least, that’s what I understand).

Thanks for your help

Hope it works! :smiling_face: