jfarmer08 / homebridge-wyze-smart-home

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

Homebridge is forced to exit #185

Closed identd113 closed 8 months ago

identd113 commented 8 months ago

Describe The Bug: When initially loaded, this works as expected. After sometime, Homebridge exits.

To Reproduce: Add a camera, and turn it off via the Wyze app or via the newly added HomeKit switch

Expected behavior: Any error should return a failed message to HomeKit, and not force Homebridge to exit

Logs:

[10/24/2023, 12:37:29 PM] [Wyze] Error: DeviceIsOffline
    at WyzeAPI._performRequest (/opt/homebrew/lib/node_modules/homebridge-wyze-smart-home/src/wyze-api/src/index.js:130:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at WyzeAPI.request (/opt/homebrew/lib/node_modules/homebridge-wyze-smart-home/src/wyze-api/src/index.js:79:14)
    at WyzeAPI.runAction (/opt/homebrew/lib/node_modules/homebridge-wyze-smart-home/src/wyze-api/src/index.js:274:20)
    at WyzeAPI.cameraPrivacy (/opt/homebrew/lib/node_modules/homebridge-wyze-smart-home/src/wyze-api/src/index.js:782:56)
[10/24/2023, 12:37:29 PM] [Wyze] Error, refreshing access token and trying again
[10/24/2023, 12:37:29 PM] [Wyze] Error, logLevel in and trying again
[10/24/2023, 12:37:30 PM] Error: DeviceIsOffline
    at WyzeAPI._performRequest (/opt/homebrew/lib/node_modules/homebridge-wyze-smart-home/src/wyze-api/src/index.js:130:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at WyzeAPI.runAction (/opt/homebrew/lib/node_modules/homebridge-wyze-smart-home/src/wyze-api/src/index.js:274:20)
    at WyzeAPI.cameraPrivacy (/opt/homebrew/lib/node_modules/homebridge-wyze-smart-home/src/wyze-api/src/index.js:782:56)
plexserver@woodflix .homebridge %    

Plugin Config:

        {
           "platform": "WyzeSmartHome",
            "name": "Wyze",
            "username": "XXX@gmail.com",
            "password": "XXXXXXXX",
            "keyId": "xxxxxx-xxxx-xxxx-xxx-xxxxxxxx",
            "apiKey": "xxxxxxxxxxxxxx",
            "refreshInterval": 60000
        }

Screenshots:

Environment:

github-actions[bot] commented 8 months ago

Message that will be displayed on users' first issue

jfarmer08 commented 8 months ago

@identd113 Can you check to make sure your camera is online before you try to turn it on?

jfarmer08 commented 8 months ago

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

identd113 commented 8 months ago

I believe the cameras were all online, but I do have one that is added to the account, but not currently powered on. I installed alpha-6, and will report back with any issues.

jfarmer08 commented 8 months ago

The latest release should help.

identd113 commented 8 months ago

I have installed this, and it seems to resolve the issues as reported.