jfarmer08 / homebridge-wyze-smart-home

Wyze Smart Home plugin for Homebridge.
MIT License
93 stars 14 forks source link

Exception Infinite loop... #174

Closed chris001 closed 8 months ago

chris001 commented 9 months ago

Describe The Bug:

At startup it's giving an exception, it restarts, and gives the same exception, in an infinite loop...

To Reproduce:

While installing a microSD card, I accidentally hit the "Reset" button on one of my Wyze Cam v3 which was already paired and visible in my Wyze app. I let the camera/app pairing process time out, and the camera went back to how it was, it appeared in the Wyze app normally, all settings same as before.

Not sure if that accidental Reset caused this startup error in homebridge but it seems likely.

I login to homebridge, and it shows this exception "Error: Cannot find the bridged Accessory to remove.".

Side effect: now the Accessories screen is empty.

Expected behavior:

Should Homebridge detect when the Reset request was expired/cancelled, the Accessory is still installed, and not try to remove the particular Wyze Cam v3 Accessory? The pending removal does not exist now?

Logs:

[10/6/2023, 11:23:55 AM] [Wyze] Restarting Process...
[10/6/2023, 11:23:56 AM] [Wyze] Launched child bridge with PID 258746
[10/6/2023, 11:23:56 AM] Registering platform 'homebridge-wyze-smart-home.WyzeSmartHome'
[10/6/2023, 11:23:56 AM] [Wyze] Loaded homebridge-wyze-smart-home v0.5.37-alpha.2 child bridge successfully
[10/6/2023, 11:23:56 AM] Loaded 24 cached accessories from cachedAccessories.0EC6D2E02054.
[10/6/2023, 11:23:56 AM] [Wyze] Camera (Model: WYZEDB3 (Mac: undefined (Name: undefined) not supported submit a request to https://github.com/jfarmer08/homebridge-wyze-smart-home/issues to have it added. If no issues are found
Error: Cannot find the bridged Accessory to remove.
    at Bridge.Accessory.removeBridgedAccessory (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:717:13)
    at Bridge.Accessory.removeBridgedAccessories (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:733:12)
    at BridgeService.handleUnregisterPlatformAccessories (/homebridge/node_modules/homebridge/src/bridgeService.ts:404:17)
    at HomebridgeAPI.emit (node:events:517:28)
    at HomebridgeAPI.unregisterPlatformAccessories (/homebridge/node_modules/homebridge/src/api.ts:355:10)
    at WyzeSmartHome.configureAccessory (/homebridge/node_modules/homebridge-wyze-smart-home/src/WyzeSmartHome.js:248:16)
    at /homebridge/node_modules/homebridge/src/bridgeService.ts:328:25
    at Array.filter (<anonymous>)
    at BridgeService.restoreCachedPlatformAccessories (/homebridge/node_modules/homebridge/src/bridgeService.ts:288:69)
    at ChildBridgeFork.startBridge (/homebridge/node_modules/homebridge/src/childBridgeFork.ts:186:24)
[10/6/2023, 11:23:56 AM] [Wyze] Child bridge process ended
[10/6/2023, 11:23:56 AM] [Wyze] Process Ended. Code: 1, Signal: null
[10/6/2023, 11:24:03 AM] [Wyze] Restarting Process...

Plugin Config: Configured as a child bridge to homebridge.

Normal config, no change.

Screenshots:

Environment:

chris001 commented 9 months ago

Update: Added API key and Key ID to Homebridge Wyze Robovac plugin.
EDIT: Infinite loop continues. The Accessories now appear in Accessories page. Yet now these Error messages appear in status homebridge log:

getLockCurrentState1
getLockCurrentState0
[10/6/2023, 11:51:21 AM] [Wyze] Camera (Model: WYZEDB3 (Mac: 2CAAxxyyzzaa (Name: Front Doorbell) not supported submit a request to https://github.com/jfarmer08/homebridge-wyze-smart-home/issues to have it added. If no issues are found
[10/6/2023, 11:51:21 AM] [Wyze] Camera (Model: WYZEDB3 (Mac: 2CAxxyyzzbb (Name: Back Doorbell) not supported submit a request to https://github.com/jfarmer08/homebridge-wyze-smart-home/issues to have it added. If no issues are found

This same log entries about the 2 doorbells, repeat every minute, ad infinitum.....

jfarmer08 commented 9 months ago

That is fine. The addon does not support the doorbell

On Fri, Oct 6, 2023 at 10:55 AM Chris Coleman @.***> wrote:

Update: Added API key and Key ID to Homebridge Wyze Robovac plugin. Now getting this message:

[10/6/2023, 11:51:21 AM] [Wyze] Camera (Model: WYZEDB3 (Mac: 2CAAxxyyzzaa (Name: Front Doorbell) not supported submit a request to https://github.com/jfarmer08/homebridge-wyze-smart-home/issues to have it added. If no issues are found [10/6/2023, 11:51:21 AM] [Wyze] Camera (Model: WYZEDB3 (Mac: 2CAxxyyzzbb (Name: Back Doorbell) not supported submit a request to https://github.com/jfarmer08/homebridge-wyze-smart-home/issues to have it added. If no issues are found

— Reply to this email directly, view it on GitHub https://github.com/jfarmer08/homebridge-wyze-smart-home/issues/174#issuecomment-1750976125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKHFBZRFEBJBLY3WH7X4SLX6ASYVAVCNFSM6AAAAAA5WAJE7GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQHE3TMMJSGU . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>

chris001 commented 9 months ago

Could support be added for the doorbell ?

tcatlas commented 9 months ago

@chris001 do you have the 0.5.37-alpha.3 version installed? Try downgrading to alpha1 or the latest normal release and report back. I had this issue as well after upgrading to alpha3 but I haven't had a chance to try any testing to confirm. If you are also having this issue on alpha3 I would hazard a guess there is a bug with it.

Also, there are a couple open issues for the doorbell, if you would like support I suggest searching for your model in the open issues and weighing in.

jfarmer08 commented 8 months ago

https://github.com/jfarmer08/homebridge-wyze-smart-home/releases/tag/v0.5.37-alpha.4

chris001 commented 8 months ago

https://github.com/jfarmer08/homebridge-wyze-smart-home/releases/tag/v0.5.37-alpha.4

Thanks., the log line about WYZEDB3 is not appearing. I guess it'd be hard to support the this Wyze doorbell?

jfarmer08 commented 8 months ago

👍