home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.55k stars 30.72k forks source link

Tuya integreation don't update sensor, need to be reloaded... #91899

Closed Z4RR0 closed 9 months ago

Z4RR0 commented 1 year ago

The problem

Sometime, i need to go in device click on tuya and need to reload integration to update the sensor value. "the device work but the sensor are not update.

What version of Home Assistant Core has the issue?

2023.4.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

tuya integration

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

cypherbits commented 1 year ago

It was working since some weeks ago but started happening again yesterday. Quota API limits are ok. Renew trial is ok too.

IDK why this is happening again.

21Development commented 1 year ago

@cypherbits check your HA logs and see if you are getting any “Unexpected disconnection.7” errors?

I use an automation which reloads TUYA (see https://github.com/home-assistant/core/issues/91899#issuecomment-1529528776) when they occur, I’m getting the error once every 1-3 days and outside of that, the devices appear to be working as expected. (They wasn’t previously, even outside of the Unexpected disconnection events they would stop updating but are now manageable with the automation).

applegeeks commented 1 year ago

It had resumed working, but seems have stopped again in the last 36hrs. Is it still working for others?

I was about to comment the same with the rough time line you mentioned, my automation when from not having to reload for weeks to having to do it 13 times over the last few days.

bartplessers commented 1 year ago

no problem here (Belgium, EU-zone)

RLB7777 commented 1 year ago

Mine worked for 24hrs, from lunchtime (UK) on June 20th to about noon on 21st. Now has stopped again. I’m over my api call quota for June so that’s an added issue which hopefully others won’t have (have got rid of 2 USB powered air quality sensors which reported every few seconds, so I’m expecting to be under quota in July).

bonz26 commented 1 year ago

I set a monitor for readings so if tuya service stops it will restart Tuya automatically. The counter is safe guard for false or missed readings.

temporary (i will keep tho) workaround until someone notices and fix:

image

image

upper switch: image

lower switch: image

image

image

image

image

image

Sorry, i'm noobie. How to create this?

jkitney commented 1 year ago

You need Node-Red for that. The power of automation is in Node Red!

On Fri, 1 Sept 2023 at 04:46, bonz26 @.***> wrote:

I set a monitor for readings so if tuya service stops it will restart Tuya automatically. The counter is safe guard for false or missed readings.

temporary (i will keep tho) workaround until someone notices and fix:

[image: image] https://user-images.githubusercontent.com/101452982/239877461-cbdd7832-052d-41c5-b67b-d27ef8907c7c.png

[image: image] https://user-images.githubusercontent.com/101452982/239877650-f181717c-54ca-4103-b319-5578114b2a1e.png

upper switch: [image: image] https://user-images.githubusercontent.com/101452982/239877793-10beec3f-591c-4a11-a1ac-36eeed742fff.png

lower switch: [image: image] https://user-images.githubusercontent.com/101452982/239877980-f7ca50af-2ed9-43a7-ba78-73e4cc7f1024.png

[image: image] https://user-images.githubusercontent.com/101452982/239878145-eb156f75-0449-41a3-8b0a-6c19454374e5.png

[image: image] https://user-images.githubusercontent.com/101452982/239878342-5e775cc9-a93c-4bfb-aab1-57b47a152c06.png

[image: image] https://user-images.githubusercontent.com/101452982/239878428-9df9132f-bb70-4e2f-970d-360802591f9a.png

[image: image] https://user-images.githubusercontent.com/101452982/239878593-c235ac01-4710-48ab-adc8-95466fc7b394.png

[image: image] https://user-images.githubusercontent.com/101452982/239879081-bc4e6864-0f41-40fb-b104-4e64b50c0908.png

Sorry, i'm noobie. How to create this?

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/91899#issuecomment-1702050182, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYGAZNXCXMMRX3DMRYLEAC3XYFECHANCNFSM6AAAAAAXIQKSWU . You are receiving this because you were mentioned.Message ID: @.***>

--

Regards,

Jason Kitney

Reibeiro2017 commented 1 year ago

problem persists keeps losing communication with Tuya Home assistant, I have to do manual charging two to three times a day

Z4RR0 commented 1 year ago

I made a automation with reload tuya service every 6 hour and work at 100%

Il Ven 8 Set 2023, 23:19 REINALDO RIBEIRO @.***> ha scritto:

problem persists keeps losing communication with Tuya Home assistant, I have to do manual charging two to three times a day

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/91899#issuecomment-1712235067, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXSCLWNINKJ5AQVYZV2MZ7LXZODVRANCNFSM6AAAAAAXIQKSWU . You are receiving this because you authored the thread.Message ID: @.***>

Voltbeat commented 1 year ago

For the past 3 months it has been working fine just like before I had the issue. It's unclear to me to what caused the issue and what solved it. I have done nothing to try and resolve it except for keeping HA up to date.

Reibeiro2017 commented 1 year ago

Fiz uma automação com serviço de recarga tuya a cada 6 horas e trabalho a 100% Il Ven 8 Set 2023, 23:19 REINALDO RIBEIRO @.> ha scritto: ... problem persists keeps losing communication with Tuya Home assistant, I have to do manual charging two to three times a day — Reply to this email directly, view it on GitHub <#91899 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXSCLWNINKJ5AQVYZV2MZ7LXZODVRANCNFSM6AAAAAAXIQKSWU . You are receiving this because you authored the thread.Message ID: @.>

After the update, home assistant started working normally again on its own and Tuya was updated again!

mwborn commented 1 year ago

Hi All, I have the version 2023.10.1 Hassio and the problem is still there; it worked fine until a couple of months ago.

SuperKali commented 1 year ago

I have the same problem, i hope in a fix

dpgh947 commented 1 year ago

As well as the sluggish or absent status updates, I keep seeing some of my devices (plugs and bulbs) going unavailable in HA intermittently, often for only a few seconds, and I have managed to spot that they are also showing offline in the smart life app when this happens. It is not a network issue, my wifi is rock solid and nothing else is having problems.

I raised a ticket at Tuya when this happened back in April and I just found this ticket was still open, so I asked again what was wrong. They replied that they have an update to the HA Tuya plugin (their words) which has been in beta for a while and they are in the process of putting this out, but it might be a while, they said, I quote,

"Since the official HA requires review before it can be formally published, it's hard to determine the exact timeline. Therefore, this process could potentially last several months or a very short period of time."

So something is happening, but no idea when, and given that the app is showing the same offline/unavailable problem I am seeing in HA, I am not sure that the problems we are seeing are actually anything to do with the tuya/HA interface rather than a more general problem elsewhere at their end.

HanSyt commented 1 year ago

Well, the issue still exists, so I moved Zigbee devices from Tuya to de Zigbee plugin (works great), most wifi switches are sent tot the dustbin. Still have a IR interface for my Airco and a remote location temperature sensor running with Tuya. It was a good product, somehow Tuya managed to improve the product to a lower class system.

dpgh947 commented 11 months ago

Still having tuya problems. About a week ago I thought it had cleared up, I wasn't seeing any lost status updates or devices going unavailable for a few days, but now it seems as bad as ever. I am seriously considering getting rid of all tuya devices now and replacing them with zigbee - but I have a lot, 19, mixture of plugs and wifi bulbs.

dpgh947 commented 11 months ago

I asked again about this problem on the Tuya IOT ticket I have open, and they pointed me at this (beta)

https://github.com/tuya/tuya-smart-life

They said "it will improve the issues about the device Status updates". I haven't tried it yet...

renaudallard commented 9 months ago

I also have this issue. It's still well present in 2024.1.3.

HanSyt commented 9 months ago

To be honest, the issue disappeared since the December 2023 update. However only the IR Wifi receiver and 1 remote temperature sensor are operational.

dpgh947 commented 9 months ago

I have had the new "smartlife" tuya integration (still in beta) that I linked above installed for several weeks now, and it has been 100% trouble free. I originally installed it alongside the main integration and it worked alongside too, but it created a load of "_2" suffixed entities. When I finally decided to switch over, to avoid loads of work updating automations, node red etc. with the different entity names, I completely uninstalled both integrations, made sure all the devices and entities were completely gone, and then re-installed the new one again. Just about all the entities were re-created with the same original names, the only changes were due to device name changes I had made after installing the initial tuya integration ages ago, so I did not have much work to do updating names.

Give it a try. It is a breeze to install compared to the IOT project hoops that you have to jump through, it doesn't expire all the time, and it just works. If you have some slightly more unusual tuya devices, you might find they are not fully supported yet, but I have a mixture of plugs and bulbs of various makes, and they all work fine, including ones with power monitoring etc.

user514 commented 9 months ago

unusual tuya devices, you might find they are not fully supported

Hi dpgh947, I'm still with tuya-local addon, working great. That's the reason I still haven't changed with your option of smartlife beta (...as soon as I find a good reason, I will jump to it)... but I was wondering... do you know if smartlife beta support video from smartlife cameras?. Last time I checked some years ago with oficial tuya addon, cameras were not supported. It will be be great if smartlife addon support cameras today.

Thanks!

dpgh947 commented 9 months ago

@user514 Sorry, no idea about your camera question. All I can suggest is just install it and try. You can install alongside existing integrations just to test it. You will end up with different "_2"-suffixed entities for many devices, but you will be able to test it out and if you don't like it you can just remove it again. If you decide to convert to it then you will have to completely remove both integrations and then re-install the new one in order to minimise the amount of work from entities changing names.

renaudallard commented 9 months ago

I ended up moving everything tuya to localtuya and tuya-local. They work fine that way, everything is up to date, some functionalities which didn't work now work and it doesn't need the internet. I am wondering why those 2 integrations are not part of the base install instead of the quite bogus tuya.

bonz26 commented 9 months ago

I ended up moving everything tuya to localtuya and tuya-local. They work fine that way, everything is up to date, some functionalities which didn't work now work and it doesn't need the internet. I am wondering why those 2 integrations are not part of the base install instead of the quite bogus tuya.

whats diff between localtuya and tuya-local @renaudallard ?

renaudallard commented 9 months ago

I ended up moving everything tuya to localtuya and tuya-local. They work fine that way, everything is up to date, some functionalities which didn't work now work and it doesn't need the internet. I am wondering why those 2 integrations are not part of the base install instead of the quite bogus tuya.

whats diff between localtuya and tuya-local @renaudallard ?

They are completely different projects. localtuya needs some effort with the configuration, but it can be made to work with almost everything. While tuya-local just works fully or doesn't work at all. For example, my dehumidifier was supported on tuya-local and worked with all features (including the operation mode which was unsupported at all with normal tuya integration), while it was hard to try to configure it with localtuya. But my heater didn't work with tuya-local but was easy to configure with localtuya.

The common goal is to drop the internet dependency, like home assistant tries to do. Hence why I don't understand those integrations are not part of base HA.

https://github.com/rospogrigio/localtuya https://github.com/make-all/tuya-local

user514 commented 9 months ago

whats diff between localtuya and tuya-local

...in my case, the difference is that Tuya-Local is working and localtuya is not. Tuya-local is updating my entity values at least once a minute, and localtuya is not updating anything (or only updates when you have the phone app open which makes it useless).

Haven't tried smartlife beta app, but I will.

user514 commented 9 months ago

All I can suggest is just install it and try

dpgh947 (about cameras) I will try... thanks.

applegeeks commented 9 months ago

It appears alot of the issues mentioned here, like sensors not updating and cameras not loading have been fixed for me since updating to 2024.02 and updating the tuya integration to use the latest authentication method.

frenck commented 9 months ago

Yup! This issue should be solved with the changes in 2024.2

../Frenck