[RELEASE] Tuya Zigbee Metering Plug (w/ healthStatus)

This WiFi metering plug is Tuya again.

And so, same problems?

Just changed my Innr SP222 over to this driver - it appears to work the same as it did with the generic. It's not power reporting but then I am not sure it ever did.

With the Frient Smart Cable it does everything - power, voltage, amperage, presence etc

Ikea Tradfri it works but just turns it on and off, nothing extra.

In conclusion I will leave the Frient on your driver for the time being but change the other two back to generic.

1 Like

Thank you for the test - the Frient Plug Mini at a price of 35 Euro FOB Germany is something that I will consider to buy. For one of my applications I need a smart socket that I can trust, when the specs say "10A Constant Charge".

@djh_wolf I am not aware of random shut-off problems with Tuya WiFi sockets. I can't say they will not switch off if the mains voltage exceeds 250V, but at least the other reason of the random shut-offs (due to the Zigbee module specific batch) does not apply for the WiFi Tuya plugs. But the WiFi models are of no interest for me.

@Kkosev

Noted. As such, would you know if these wifi plugs would work, or would they potentially require.another driver?

If they'll work with this, I'm likely just to purchase due to cost

@kkossev your metering driver seems to at first glance work with the zigbee portion of these old but power reporting Iris plugs. Their zwave piece was not very good to begin with and not worth the trouble to use.

Their big downside from my experience was they don't play well with Xiaomi\Aquara devices.

Summary

image

1 Like

I tried it on the US Samsung plug that comes in the kits... I'm not home so i cant start the dryer but the voltage seems off by 10x
image

and with dryer on
image

I think the power is high due to the order of 10 on voltage

Here is the data for the device
image

I've posted here to avoid a thread derailment

1 Like

There are very good TP-Link energy monitoring plugs drivers, so surely these will work for you fine, solving the annoying >250V shutoff problem,

I was a bit confused on the different brands, hope will have the time to read this:
The Difference Between Kasa, Tapo and TP-Link (Which Is Discontinued?) - Smart Home Point.

The TP-Link drivers that I checked quickly provide monthly (and ever yearly) energy values. For me it is more important to know how the energy was consumed during a 24hours period and then during the 31 days of the month. So with this driver I will add first hourlyEnergy attribute.

Actually, we should be more interested on the actual costs of the energy which may vary during the day and during the seasons, so an attribute 'hourlyCost' (and later 'dailyCost') will give us a more useful information for optimizing the energy expenses.

@mpoole32 @tim.ocallag thank you for the information on Iris and Samsung energy reporting plugs!
I will include a correction for the Samsung voltage and power readings (factor x10) in one of the next updates. I am not going to include these devices fingerprints in this driver, because they are already fully supported by the inbuilt HE drivers, but it is useful for me to know if the automatic reporting configuration works with these.

1 Like

I have updated the development branch version 1.6.1. time stamp 2022/09/17 10:08 AM :

  • added hourlyEnergy;
  • fixed autoPoll bug;

Surely there are still some bugs left and some other things to improve, but with this test version we can now draw some hourly energy graphs without the need of Hub variables and RM5 rules:

2 Likes

I also have an Ikea and an old OSRAM Zigbee plugs which do not report power or energy. A possible future improvement here could be to add a constant/fixed power parameter for all non-reporting plugs. Usually, the power consumption of the devices that are powered by these plugs is known. So if the plugs are used to switch on and off the load, then the consumed energy can be easily calculated and sent as energy and energyCost events.

1 Like

@kkossev, thank you as always for adding these extra features, really appreciate it.
I am still struggling to generate any meaning graph or simple graph to display the energy info.
Could you please share the settings for your graph showing "hourlyEnergy" and "power" as above?
I will need to do a bit more reading on Hubigraph and others to understand these graphing methods. Thanks

Summary

image

Summary


1 Like

I also have the Innr SP222 plugs... so any possible improvements will give users more options!

Summary

1 Like

These are my HubiGraph settings. I am not an expert here and some settings may be not the best ones, but this is what I used for the sample graph above.

  1. Setup long term storage



    My current settings at the moment are 1 day for the hourlyEnergy and 1 year for power, voltage, etc...
    image
    Surely not the optimal one, as the Data Quantization is not in use, but works for my tests.

  2. Configure a graph of a type 'New Time Graph'
    image

image
image
Graph Time span: 1 day
Show Legend on graph: on
Show current values on graph: on
Long term storage: on
Plot type: bar
Time integration function : Average
Axis side : left for the hourlyEnergy, right for the power

The rest of the parameters have their default values

On the final configuration page :
switch on "Install Hubigraph Tile device" and name the virtual device. Then use it in HE dashboard ( template = 'Attribute', Graph).

As Hubigraph is not supported anymore (although it still works fine) I will try to make the driver compatible with the new Quick Chart also. Currently, there is a problem with QC probably because of the hourlyEnergy improper attribute type.

2 Likes

Thank you so much for this detailed instruction/guide.
Will try it later tonight when I get home.
EDIT: some test graphs :smile:

Summary

Summary

Summary

Note: power was not displaying for the last graph, Kettle, some reason. It was okay this morning after enabling Automatic reporting configuration ?

1 Like

Believe the webCoRE graphing is based on Hubigraph…

3 Likes

I am glad to hear that Hubigraph is living a second life atm! It's really one of the most advanced community apps for HE!

@iEnam congratulations on your first successful graphs!

I have updated the dev. branch (timeStamp "2022/09/18 8:42 PM") with some improvements related to the energy values reset when Initialize button is pressed or when a new plug is added using this driver. The last version is now also compatible with the new Quick Charts, although I still have a problem with the long-term Data Storage. Probably for now and for this kind of graphs the Hubigraph is better, I like the possibility to display two different types of data in a timeline graph using the left axis for one data and the right axis (respectively - different scaling!) for the other data.

If the 'Automatic Reporting Configuration' option is working for your smart plug, there should be power reading records every 15 minutes (if you use the default value of 900 seconds), even if the power consumption didn't change for this period. I am not 100% sure for this, as I can't test it at the moment, but I expect a Frient mini plug to come next week here, so I will be able to test it then.

For these plugs which do not support automatic reporting (as most of my AliExpress devices) we will need software timers to force a 'state change' update event, if more than 15 minutes (or whatever the 'Longest reporting interval' period is) has passed without a change event. This is normally not needed for the automations, but makes the graphs look much better! : )

If the latest dev. version is working stable, I will push it to HPM after a few days, as there were a lot of changes in the last week.

1 Like

I enabled automatic reporting on the Samsung plug but it doesn't report anything for Energy
Below is THAT info. I turned off the automatic reporting and still don't get energy.
You mentioned you weren't going to add this fingerprint... is that why it doesn't work?
The regular HE driver doesn't have the energy reporting (which I could live without) ....but it would be cool : )