localtuya icon indicating copy to clipboard operation
localtuya copied to clipboard

Devices constantly cycle between available and unavailable (4.1.1)

Open tunerooster opened this issue 2 years ago • 20 comments

Devices constantly cycle between available and unavailable (4.1.1)

I have tried turning "cloud api access" off, and it seems to help at first, but the problem persists. I turn cloud access back on and all devices immediately become available.

I really hate to revert back to the old tuya integration, so I hope there is a solution.

I will keep monitoring and post anything new...

Thanks...

tunerooster avatar Oct 16 '22 03:10 tunerooster

  • If I run "Reconfigure Cloud API account", all devices immediately become "available".
  • Over a period of time, some then become "unavailable".
  • All Tuya devices remain "available" in the Tuya App, regardless of their status in localtuya.

Is there a way to automate rerunning of the "Reconfigure Cloud API account" option from within HA? Ie, if I detect any unavailable, I could reconfigure.

tunerooster avatar Oct 17 '22 00:10 tunerooster

Same here!

dolods avatar Oct 18 '22 05:10 dolods

ditto!

EDIT seems like it was a router issue for me. I tried manually entering a different wifi 2.4ghz channel and that fixed everything

flying-butt-pliers avatar Oct 18 '22 06:10 flying-butt-pliers

ditto!

EDIT seems like it was a router issue for me. I tried manually entering a different wifi 2.4ghz channel and that fixed everything

I am already on 2.4ghz

dolods avatar Oct 18 '22 07:10 dolods

Why does running "Reconfigure Cloud API account" cause all devices to become "available" instantly? If it was a router issue, that shouldn't happen.

Again... Is there a way to trigger rerunning of the "Reconfigure Cloud API account" option from within HA in a script?

tunerooster avatar Oct 18 '22 08:10 tunerooster

ditto! EDIT seems like it was a router issue for me. I tried manually entering a different wifi 2.4ghz channel and that fixed everything

I am already on 2.4ghz

I edited the "channel"... I was on 2.4 also when I was having issues

flying-butt-pliers avatar Oct 18 '22 09:10 flying-butt-pliers

How did you do that? Can you elaborate please, I'll check it again at my end

On Tue, Oct 18, 2022, 15:09 flying-butt-pliers @.***> wrote:

ditto! EDIT seems like it was a router issue for me. I tried manually entering a different wifi 2.4ghz channel and that fixed everything

I am already on 2.4ghz

I edited the "channel"... I was on 2.4 also when I was having issues

— Reply to this email directly, view it on GitHub https://github.com/rospogrigio/localtuya/issues/1085#issuecomment-1282114099, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ7PMAEVR63RFMTRKAYXUGTWDZV6BANCNFSM6AAAAAARGFH3AY . You are receiving this because you commented.Message ID: @.***>

dolods avatar Oct 18 '22 09:10 dolods

How did you do that? Can you elaborate please, I'll check it again at my end On Tue, Oct 18, 2022, 15:09 flying-butt-pliers @.> wrote: ditto! EDIT seems like it was a router issue for me. I tried manually entering a different wifi 2.4ghz channel and that fixed everything I am already on 2.4ghz I edited the "channel"... I was on 2.4 also when I was having issues — Reply to this email directly, view it on GitHub <#1085 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ7PMAEVR63RFMTRKAYXUGTWDZV6BANCNFSM6AAAAAARGFH3AY . You are receiving this because you commented.Message ID: @.>

This is a setting on your router. Can't elaborate further since routers are so different but try to find the router page where you set your wifi password and hopefully the channel is listed there. I went from auto to choosing any random number... "2" in my case.

flying-butt-pliers avatar Oct 18 '22 10:10 flying-butt-pliers

I am having this same problem with a couple smart bulbs. This has been happening for the past few versions (before v4.0).

Brief example:

October 19, 2022
Tinas Lamp turned off
9:30:32 AM - 20 minutes ago
Tinas Lamp became unavailable
9:30:30 AM - 20 minutes ago
Tinas Lamp turned off
8:59:25 AM - 1 hour ago
Tinas Lamp became unavailable
8:59:23 AM - 1 hour ago
Tinas Lamp turned off
8:22:00 AM - 1 hour ago
Tinas Lamp became unavailable
8:21:58 AM - 1 hour ago
Tinas Lamp turned off
7:53:10 AM - 2 hours ago
Tinas Lamp became unavailable
7:53:05 AM - 2 hours ago
Tinas Lamp turned off
7:52:30 AM - 2 hours ago
Tinas Lamp became unavailable
7:52:27 AM - 2 hours ago
Tinas Lamp turned off
7:50:40 AM - 2 hours ago
Tinas Lamp became unavailable
7:50:37 AM - 2 hours ago
Tinas Lamp turned off
7:46:43 AM - 2 hours ago

creeve4 avatar Oct 19 '22 15:10 creeve4

I am having this same problem with a couple smart bulbs. This has been happening for the past few versions (before v4.0).

Brief example:

October 19, 2022
Tinas Lamp turned off
9:30:32 AM - 20 minutes ago
Tinas Lamp became unavailable
9:30:30 AM - 20 minutes ago
Tinas Lamp turned off
8:59:25 AM - 1 hour ago
Tinas Lamp became unavailable
8:59:23 AM - 1 hour ago
Tinas Lamp turned off
8:22:00 AM - 1 hour ago
Tinas Lamp became unavailable
8:21:58 AM - 1 hour ago
Tinas Lamp turned off
7:53:10 AM - 2 hours ago
Tinas Lamp became unavailable
7:53:05 AM - 2 hours ago
Tinas Lamp turned off
7:52:30 AM - 2 hours ago
Tinas Lamp became unavailable
7:52:27 AM - 2 hours ago
Tinas Lamp turned off
7:50:40 AM - 2 hours ago
Tinas Lamp became unavailable
7:50:37 AM - 2 hours ago
Tinas Lamp turned off
7:46:43 AM - 2 hours ago

Same issue!

Have you tried anything?

dolods avatar Oct 20 '22 04:10 dolods

Same issue!

Have you tried anything?

I have not found a solution yet.

creeve4 avatar Oct 20 '22 15:10 creeve4

Same sort of issue going on for me. I find when I reload the LocalTuya integration my bulbs will show up again.

Mucka911 avatar Oct 20 '22 16:10 Mucka911

Regrettably, I have gone back to the old original Tuya integration and all devices now stay "available" reliably. I will leave this issue open so if there is ever a resolution, I will be notified.

tunerooster avatar Oct 21 '22 03:10 tunerooster

Regrettably, I have gone back to the old original Tuya integration and all devices now stay "available" reliably. I will leave this issue open so if there is ever a resolution, I will be notified.

To which integration are you referring?

creeve4 avatar Oct 21 '22 03:10 creeve4

I too am having the problem. I've backed down to ver4.0 and it's stable. Not sure what the deal is.

FS1961 avatar Oct 21 '22 07:10 FS1961

I too am having the problem. I've backed down to ver4.0 and it's stable. Not sure what the deal is.

Same here. I will downgrade to 4.0.2 and monitor behaviour.

FragMenthor avatar Oct 24 '22 12:10 FragMenthor

I too am having the problem. I've backed down to ver4.0 and it's stable. Not sure what the deal is.

Same issue on ver4.0 for me persists

dolods avatar Oct 25 '22 04:10 dolods

For me, using 4.0.2, it's been stable for a full day, and it wasn't since I upgraded to 4.1.x. Gonna stick to this version for now.

FragMenthor avatar Oct 25 '22 08:10 FragMenthor

Yes went back to stable as well thanks for heads up

Mucka911 avatar Oct 26 '22 12:10 Mucka911

The old cloud based integration.

On Thu, Oct 20, 2022, 9:07 PM Chris Reeve @.***> wrote:

Regrettably, I have gone back to the old original Tuya integration and all devices now stay "available" reliably. I will leave this issue open so if there is ever a resolution, I will be notified.

To which integration are you referring?

— Reply to this email directly, view it on GitHub https://github.com/rospogrigio/localtuya/issues/1085#issuecomment-1286399107, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFMVIX6IXM7WPYZH5ZAXYTWEICH3ANCNFSM6AAAAAARGFH3AY . You are receiving this because you authored the thread.Message ID: @.***>

tunerooster avatar Oct 29 '22 21:10 tunerooster

Having the same issue in the past but it was the wifi router or access point that causes the issue. Its wild but yes, its a AP issue.

Just go grab a cheap 10usd xiaomi 2.4ghz wifi router and flash it with openwrt.that should solve tuya device getting frequent unavailable issue.

I used to have this issue on certain devices specially smartplugs with power monitoring that goes unavailble 4-5 times an hour and takes about 5min to recover even if that smartplug is just right beside the wifi router and have excellent - 32dbm signal stregth.

remlei avatar Nov 25 '22 06:11 remlei