Tuya energy monitoring only updating when app is open?

Hello guys, did you find a solution?
I have 2 devices tuya wifi: a socket Aubess whith power metering, and a CT energy meter. The first one works quite well, but the CT works only with app Tuya opened… I’m getting crazy

Same promblem here - plugs, lights on / off - status update immediately…
Smart plug - power, voltage only report when starting Tuya / Smar Life app.

Home Assistant 2023.2.4
Supervisor 2023.01.1
Operating System 9.5
Frontend 20230202.0 - latest

@hollowandi didn’t find a setting in the local tuya integration to set 60 s refresh?

It’s the scan interval here at the bottom


Set it to 60

It does not working on my setup. I have set it to 10 seconds, but power updates come with huge gaps from one wi-fi relay and a smart plug (both works with Tuya v3.4 protocol), but the same “Scan interval” option works fine for my other 2 smart plugs (with Tuya v3.3 protocol).

And when I open Tuya app - the relay data starts to update with higher frequency (~5 seconds between updates), and data stops updating when I close Tuya app.

Which protocol version do you use with bad monitoring devices? v3.3? v3.4?

1 Like

Hello, same problem for me. Have you found solutions? Thanks

hi,
same problem to me. zigbee plug not reports it power usage statistics only when entering the device from the tuya app.

Same problem. Sensors from smart plug update very quick when smartlife app is open and about 35s when is not open.
It is interesting that when the socket turns on, the current update appears after about 35s, and when it turn off, it appears after a much shorter time, about 10s
I’m interested in monitoring current or power to create automations, but it doesn’t seem possible under these conditions.

Hi there, got the same problem and tried the workaround with the localtuya integration, without success. What did end up working for me was the Tuya local custom integration!

I know localtuya and the Tuya (devices & services) integration, but, what do you mean by ‘tuya local custom integration’?.. thanks!..

Edited: I respond to myself in case someone is interested…:
Some hours later I see that there is another integration called ‘tuya local’. I suppose you are refering to that one. Correct me if I’m wrong:

Hi. It’s been months but just in case it can be useful : I had exactly the same problem (with Tuya Local all my devices only updated when the app was open, so I switched to LocalTuya for the scan interval - it worked, but only for my 3.3 devices, not the 3.4).

So I figured the fix (that forces the update at the interval) must be used with 3.3 devices, but not with the 3.4 devices, I searched the python files in LocalTuya, and I was right ! (thank God it was obvious, as I am completely unfamiliar with python).

In the “_init.py” file - the one in the pytuya folder, not the one in the root of localtuya - at line 813, is the update_dps function, which only did something
“if self.version in [3.2, 3.3]:” (line 820) - so with 3.4 devices, it did … nothing.

So by simply adding 3.4 in the list (so we have “if self.version in [3.2, 3.3, 3.4]:” on line 820), it started working !! (I did need a restart of HA of course to reload localtuya properly)

Now all my tuya devices - 3.3 and 3.4 - update using the “Scan interval” value !!

I hope it can help someone (I spent so much time trying to make it work …)

5 Likes

Thanks Matt, seem a very nice trick.

I’m not going to try it, because my solution was the contrary. I have localtuya and devices didn’t update (maybe for the software version, now that you say it). But I tried Tuya-Local and it worked perfectly on all my devices. So now I’m staying with Tuya-Local. Just my experience.

…but thanks for the trick, sure it serve others.

I have experienced the same issue (thermostat that reports current_temp only when the Smart Life app is opened on the thermostat).

I have found a workaround that works for me.

I saw through the devive debug on IOT TUYA API that the smart life app sends an event named 唤醒通知 to trigger the thermostat response.

Using the IOT TUYA API, I have discovered all the device properties and found out that 唤醒通知 is a property called “week_up_btn” (probably misspelled wake).

If you set that property to true, it triggers the device to report the status and then reset to default.

The workaround is setting this property to true every x seconds, making the device report regularly.

I’m not sure if this applies to other devices, but for my thermostat works.

2 Likes

It works!!!
Thank you for sharing!

Could you tell me how you did that? I have same problem and localtuya and tuya-local not refresh every x seconds in my case.

Hello, I’m having the same issue and I would like to know how you set that, please.
@mistrello96

Looks like my subscription on Tuya IOT has expired. How do you guys get this to work? The cheapest option for payed subscription is 25000 dollar?? What am I doing wrong?

Edit: found extending the trial option :slight_smile:

Chipping here in again, what I found to be the most reliable is to use the tuya-local integration to have all the sensors and entities easily available as I suggested earlier. When you have issues with updating even then, I suggest to add the localtuya integration with the dps set to 10 seconds (and using the trick of @matt3003 for 3.4 devices) and have the two integrations work in parallel, whilst hiding the entity of localtuya. This should solve the updating issue.

I stopped foolin around with the Tuya plugs and ordered these:
Smart Power Plugs:Zigbee Smart Plug with Measure and Timer Function, Tuya App Control, Push Notification, Zigbee Hub Required, 16A Zigbee Plug,Compatible with Alexa and Google Home,Pack of (4 Pack) : Amazon.nl: DIY & Tools

Works perfectly and gives live data!
It has the following sensors (top 4 are my own Helpers for periodic data).

are you setting that property through Local Tuya ? calling the api externally to HASS ?

Thanks a LOTTTTT it works!