rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.84k stars 546 forks source link

Device status update frequency issue for smart plug (AVATTO OT08) #350

Open JayChun opened 3 years ago

JayChun commented 3 years ago

I installed the smart plug - AVATTO - today. It was easy to get a DPs for Current_W & mA & Voltage. But It was impossible to get an Energy (accumulated consumption) sensor. So I just made a Integration & Utility_meter sensor in Home Assistant. Yes! Everything is fine.

But I have a question about updating status on HA. I think there are many same cases in here, but I can't find the case.

My question is For example, on the HA dashboard, Current_Watt doesn't update even actual Watt is changing by real-time. So I opened Smart Life Application which had been closed before in smartphone. and I confirmed the status of plug current watt on the App. and then I went back to the HA dashboard at the same time. The status is updated on the HA dashboard.

I have tried to 1) unplug from socket, 2)reset & re-install the device on HA without activation of Smart Life Application. But same before.

The status - Current_Watt is changing every 5 ~ 10 seconds on Smart Life Application. But it doesn't change on HA. Maybe Integration senor & daily utility_meter sensor also can't be changed.

Does anyone know how to solve it?

JayChun commented 3 years ago

I think I found out a same case. (https://github.com/rospogrigio/localtuya/issues/87) Unfortunately, It is still an issue. Does anyone know anything about this?

veedubb65 commented 3 years ago

I came here looking for information on basically the same issue.

The only thing I can add is that for my energy monitoring smart plugs, it did eventually update, and it seems to update inconsistently every few minutes. However, if I have HA open in the web browser on my desktop, and check the Energy tab of the Smart Life application, the energy usage updates constantly in real time in both the Smart Life app and HA. As soon as the app goes away, the smart plug stops sending the cosntant updates.

tesnaa commented 3 years ago

I noticed this too. The data did updated I think maximum every 1-5 minutes when the smart life app closed. When Smart Life app opens and viewing the particular sensor, the data updates constantly both in HA/smart life. Perhaps this is limitation from tuya.

No delay though on switching, its happen instantly.