Tuya 20A Zigbee Relay Integration?

ok, what I wanted to know is if there is a way to remove the display of the absorption in the device, it seems more correct to me given that the device does not have a meter… perhaps using another driver… and I wanted to understand if the driver I am using is the correct one for this device. It’s still a great job and works great anyway.

ciao Mariano, sto utilizzando il tuo driver Zigbee Switch Power Mc per un interruttore con misurazione di potenza come da immagine…

It works well and can measure power. But how do I reset the kWh count?


With a routine or manual routine like this

Thanks so much for the reply.
Do you know if it is possible to set the reset once a month via routine?
Is it possible to count the energy consumed by multiple devices?


You can create a virtual calendar device in the Aplicaciones Virtualed Mc driver and run a routine that resets the power of the devices you want on the 1st of each month.

1 Like

To store values ​​from up to 5 devices you could use a virtual device with 5 number fields.

Using API rules to pass the value of each device to a numeric field before deleting them on the 1st of each month.

I can’t help you on how to make the API rules, I don’t know how to handle them, maybe @TapioX can help you with this.

1 Like

Can you specify what kind of calculation you would like to implement?
Is the goal of summing the energy values ​​once a month?


Thank you very much Mariano and Tapiox for your support, instructions and work you are doing, really very useful… Fantastic.
Yes, exactly, I would like to sum the consumption of different energy monitoring devices. It could be fine every month or every 2 months given that in Italy the bill arrives every two months… And it would be spectacular if we could give an economic value to the kWh in order to also have an approximate price of the bill…

In Italy you don’t have smart electricity meters?

Here in Spain, all homes have had a smart meter for years, which can be read at any time in real time with the distribution company’s app and check daily, weekly, monthly or billing period consumption in the app, even with consumption by valley, medium or high period cost

It can even be downloaded in a excel (CSV) file and in the Ministry of Energy app you can calculate the exact price of the invoice that you are going to receive or have received.

I thought it would be something implemented in all EU countries!

The purchase and sale price of solar surpluses for each hour or period of the day is displayed daily in the app.

Yes, even in Italy there is this possibility, what in my opinion would be nice is to count some of the devices counted to understand how much they affect the bill. It could be to add up the consumption of multiple devices by multiplying by the cost per kWh during the 2-month period

I added Rules API rule example to calculate Total Energy using @Mariano_Colmenarejo Number Fields’ calculations.

1 Like

thank you very much, how do I use this application? should I subscribe to your channel? can you post the invitation?


You find instructions here:

You have to install @Mariano_Colmenarejo SmartThings Driver Virtual Appliances Mc