Hi I would really need the power statistics in my HA project, but somehow I cannot see the details of my Tuya smart plug with power consumption details in my HA devices overview. Anyone can see what I am doing wrong? Should I upgrade to a certain version HA?
I cant really flash these plugs as I am using them in other automations (ie homebridge for example)
For whatever reason, for most (not all, interestingly) of my Tuya-connected sockets, the power entities were initially deactivated. Maybe that’s the case for you, too? Just go to the Home Assistant entities list (/config/entities) and change the filter so you also see deactivated entities. If the ones in question appear now, just activate them and go ahead.
Am only known to tuyalocal and there you can select the individual sensor-attributes when setting it up
But… there are many more entries on the same topic with tuya devices, tuyalocal may not work too.
does not appear in energy dashboard settings until I restart HA
even after that does not show any actual values in energy dashboard - always 0, but I can see that socket does have power readings in home assistant history
I had similar issues - not always, interestingly, but it seems it just takes some time, because it probably needs a certain amount/timespan of statistics to show meaningful values. That’s at leas my guess :-). Did you check again a couple of hours later? Still nothing shown?
I did and the values are now showing, but the helper sensors with other interval then 1 hour do not show.
So 1 hour, left, kilo prefix seems to be best way how to set it up. I still don’t understand left right trapezoid difference Riemann sum - Wikipedia
I’m running test today with the 3 helper sensors sensors for the same thing set up as left, right and trapezoid
Good to hear. To be honest, I did not fiddle around with all these settings. So, for me it’s also 1 hour and kilo (I think). The left, right, trapezoid is mathematical stuff. I can recommend looking into the wikipedia article Riemann sum - Wikipedia. Try NOT to read and understand but look at the graphs on the right side when you scroll down. They give you a simple explanation also for why “trapezoid” is the most precise approximation for the most use cases.
my question: is the data saved in the HA database and is it about to fill my device disk or download data from the tuya cloud?
at the beginning i had 0 now growing
For those who are still not able to pull in the power usage metrics with the standard Tuya integration, have a look at Local Tuya (where you are able to monitor your devices locally instead of over the cloud) plus it has the added benefit of configuring the state_attr (consumption, voltage, current) - GitHub - rospogrigio/localtuya: local handling for Tuya devices
Here is a screenshot where I hooked up my Connex Connect Smart plug (installed and added with the Tuya app on iOS)
I have just set up 9 of these power monitoring plugs from different manufacturers on Local Tuya, and all plugs are based on Tuya protocol 3.3.
When configuring the plug initially in the Local Tuya Integration, note that the switched socket is listed as ‘switch’, and then the other entities for Current, Power and Voltage are noted as ‘sensor’. When choosing which attribute to assign from a drop-down list taken directly from the type of plug… (in my case there were numerous items, with a value noted afterwards) which was very confusing at first, but I came to the conclusion after doing the first two that the items in the list correspond to different figures produced by the plug i.e. kWh, total kWh, current, voltage etc
Based on Tuya protocol 3.3, they were:-
18 = power
19 = current
20 = voltage
The list of attributes from the plug extended well into the 20’s with some much longer figures after the item number - I suspect these are kWh, and Total kWh figures calculated by the plugs - but I may be wrong. I didn’t get as far as including these as entities (I presumed that HA could calculate these if needed) so couldn’t compare to the Tuya phone app.
I hope this helps somebody when installing their own power monitoring plugs.
I’m using S-Link SWAPP SL-03 model smart plugs which has power meter function and I can monitor power consumption on Tuya app, (and also in Tuya IOT platform as logs too) but can’t see any entity in Home Assistant even if it’s disabled.
Is there any option that I can do or did you find any solution?