milo526 / homebridge-tuya-web

Hoobs and Homebridge plugin for Tuya devices using Home Assistant Tuya Web Api
MIT License
219 stars 95 forks source link

Slow to respond, No Respond #267

Closed MycroftVoodoo closed 2 years ago

MycroftVoodoo commented 3 years ago

Describe the bug Homebridge warns that this plugin is slowing performance.

Specifically I get these warning: "This plugin slows down Homebridge. The read handler for the characteristic 'On' was slow to respond! See https://git.io/JtMGR for more info."

This plugin slows down Homebridge. The read handler for the characteristic 'On' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

[USB] - [GET] Request failed with status code 504

Steps To Reproduce This happens after running for a day or two

Plugin Version @milo526/homebridge-tuya-web v1.0.1

Homebridge Config

{
    "name": "TuyaWebPlatform",
    "options": {
        "username": REDACTED,
        "password": REDACTED,
        "countryCode": REDACTED,
        "platform": "smart_life"
    },
    "defaults": [
        {
            "device_type": "form"
        }
    ],
    "scenes": false,
    "platform": "TuyaWebPlatform"
}

Device Config Getting credentials Got credentials { 'access_token': 'AZhaz1616246896211p4sCbb6Hoj9kPvS', 'expires_in': 864000, 'refresh_token': 'AZhaz1616246896211p4sCbpswPljWQ8u', 'token_type': 'bearer'} Getting devices Got devices { 'header': {'code': 'SUCCESS', 'payloadVersion': 1}, 'payload': { 'devices': [ { 'data': {'online': True, 'state': True}, 'dev_type': 'switch', 'ha_type': 'switch', 'icon': 'https://images.tuyaus.com/smart/icon/1504185916_0.png', 'id': '04200497dc4f22c2dfc7_1', 'name': 'Switch 1'}, { 'data': {'online': True, 'state': False}, 'dev_type': 'switch', 'ha_type': 'switch', 'icon': 'https://images.tuyaus.com/smart/icon/1504185916_0.png', 'id': '04200497dc4f22c2dfc7_2', 'name': 'Switch 2'}, { 'data': {'online': True, 'state': False}, 'dev_type': 'switch', 'ha_type': 'switch', 'icon': 'https://images.tuyaus.com/smart/icon/1504185916_0.png', 'id': '04200497dc4f22c2dfc7_3', 'name': 'Switch 3'}, { 'data': {'online': True, 'state': False}, 'dev_type': 'switch', 'ha_type': 'switch', 'icon': 'https://images.tuyaus.com/smart/icon/1504185916_0.png', 'id': '04200497dc4f22c2dfc7_4', 'name': 'Switch 4'}, { 'data': {'online': True, 'state': False}, 'dev_type': 'switch', 'ha_type': 'switch', 'icon': 'https://images.tuyaus.com/smart/icon/1504185916_0.png', 'id': '04200497dc4f22c2dfc7_7', 'name': 'USB'}], 'scenes': []}}

Additional Context Homebridge version v1.3.4

milo526 commented 3 years ago

Thanks for notifying me :)

milo526 commented 3 years ago

I hope that the newest pre-release (v1.1.0-0) solves this issue.

If you can install the pre-release, please do so and let me know how it goes!

If you have other issues with the pre-release, please post them in the discussion https://github.com/milo526/homebridge-tuya-web/discussions/276

MycroftVoodoo commented 3 years ago

Will do. Thanks for follow up

John Biasi @.***

On May 18, 2021, at 3:55 PM, Milo Cesar @.***> wrote:

 I hope that the newest pre-release (v1.1.0-0) solves this issue.

If you can install the pre-release, please do so and let me know how it goes!

If you have other issues with the pre-release, please post them in the discussion #276

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ldhall1856 commented 3 years ago

I see the same error. I do not know how to upgrade to the pre-release using docker. When will the update be released?

Thanks, L. Hall

milo526 commented 3 years ago

I see the same error. I do not know how to upgrade to the pre-release using docker. When will the update be released?

Thanks, L. Hall

Whenever I feel like enough people have tested it and I am confident that there are no big issues in the release.

ldhall1856 commented 3 years ago

Awesome! Thanks!

Would you mind telling me how to install the pre-release?

milo526 commented 3 years ago

For homebridge please see here

For hoobs please follow this comment

ldhall1856 commented 3 years ago

Still seeing the same error. Any updates?

jonpeng commented 3 years ago

Still seeing the same issues on v1.0.2.

MycroftVoodoo commented 3 years ago

I have not seen any issues since updating to 1.1.xx (Next) version.

JeffGoldner commented 3 years ago

I'm getting these errors lately. I'll give the 1.1 version a go.

JeffGoldner commented 3 years ago

And the v1.1.0 branch worked for me.

Witar23 commented 2 years ago

I am having the same issue, plugins works but HomeBridge raporting slow down issue I am using version 1.02 and do not see update notification

avidteacher commented 2 years ago

I am having the same issue (on v 1.3.8). One report for every Tuya device, repeating about every 90 seconds. Interestingly, my PI 4 is showing CPU spikes each time it does this. All of the Tuya devices are also show as "No Response" in the Home App, and then come back on within 30 seconds or so. It wasn't doing this a couple of versions ago - but I also updated a number of plugins at the same time.

milo526 commented 2 years ago

I am having the same issue (on v 1.3.8). One report for every Tuya device, repeating about every 90 seconds. Interestingly, my PI 4 is showing CPU spikes each time it does this. All of the Tuya devices are also show as "No Response" in the Home App, and then come back on within 30 seconds or so. It wasn't doing this a couple of versions ago - but I also updated a number of plugins at the same time.

Since you are reporting you are using v1.3.8 and this plugin is on version 1.1.1 I assume you are using another plugin. Probably tuya-lan or tuya/tuya-homebridge. Please report your problem there.

milo526 commented 2 years ago

I've seen multiple reports of this problem being solved by the latest stable release. Please let me know if this problem is still present for you on the latest version. Please make sure to check that you are indeed using the homebridge-tuya-web plugin.

Homebridge Tuya Web plugin installed

MycroftVoodoo commented 2 years ago

I have had no problems since updating. Thank you for the fix! John J Biasi @.***

On Wed, Dec 22, 2021 at 8:48 AM Milo Cesar @.***> wrote:

I've seen multiple reports of this problem being solved by the latest stable release. Please let me know if this problem is still present for you on the latest version. Please make sure to check that you are indeed using the homebridge-tuya-web plugin.

[image: Homebridge Tuya Web plugin installed] https://user-images.githubusercontent.com/5261909/147102547-2befaf48-e3c4-4544-bd9b-5f93ac254662.png

— Reply to this email directly, view it on GitHub https://github.com/milo526/homebridge-tuya-web/issues/267#issuecomment-999589936, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACR4TQEG37OMOMETG4JXYY3USHJLNANCNFSM436LZ53A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>