Git Product home page Git Product logo

homebridge-wyze-smart-home's People

Contributors

cartloyal123 avatar dependabot[bot] avatar fumbles avatar hochen97 avatar jfarmer08 avatar matthewstyler avatar mrlt8 avatar ritwikgupta avatar zswuwing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-wyze-smart-home's Issues

Thermostat Support

Is your feature request related to a problem? Please describe:

It looks like there is some basic low level support for adding Thermostat support to this library. Is it possible to go ahead and add full support?
Describe the solution you'd like:

Full Homekit support for Wyze Thermostat.
Describe alternatives you've considered:

I am interested in writing my own plugin for Thermostat support but I think it makes more sense to build on this plugin to keep everything in one place. I will try to add a PR if I have time.

Let me know if this is possible and if help would be needed, thanks!

SMS MFA support

Is your feature request related to a problem? Please describe:

  • There is MFA support, but only for "authenticator app"

Describe the solution you'd like:

  • Would like MFA support for "Text (SMS)"

Additional context:

  • Currently MFA for SMS works until you log into the mobile app using SMS MFA and homebridge no longer has access

Illegal Value

I am getting this constant error that I think is from my color bulbs.

This plugin generated a warning from the characteristic 'Color Temperature': characteristic was supplied illegal value: number 638 exceeded maximum of 500. See https://homebridge.io/w/JtMGR for more info.

Child bridge icon was flashing red/yellow

I installed the plugin a few days ago and it was working fine after I turned off 2 Factor. Yesterday all was well but I woke up to see that my child bridge icon was flashing red/yellow. Looking at the logs I see this:

[10/23/2022, 12:06:35 PM] Loaded 17 cached accessories from cachedAccessories.0E56DD166B87.
Error: Cannot find the bridged Accessory to remove.
at Bridge.Accessory.removeBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:640:13)
at Bridge.Accessory.removeBridgedAccessories (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:654:12)
at BridgeService.handleUnregisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:404:17)
at HomebridgeAPI.emit (node:events:527:28)
at HomebridgeAPI.unregisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/api.ts:355:10)
at WyzeSmartHome.configureAccessory (/usr/local/lib/node_modules/homebridge-wyze-smart-home/src/WyzeSmartHome.js:171:16)
at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:328:25
at Array.filter ()
at BridgeService.restoreCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:288:69)
at ChildBridgeFork.startBridge (/usr/local/lib/node_modules/homebridge/src/childBridgeFork.ts:186:24)

I have not added or removed any devices. Certainly not in my sleep :) Looking in the Wyze app I see all of my devices are online and working fine. I tried restarting the plugin and I restarted homebridge to no avail. What I finally had to do is disable this plugin and switch back to homebridge-wyze-connected-home-op v0.5.9

I would certainly prefer to use this plugin as it is verified and has support for the cameras which is pretty cool.

Any ideas how to fix this?

[homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.

Describe Your Problem:
I have installed your plugin after setting up my wyze account username and password and 2fa the plugin starts but an error is shown. I am not sure why this is happening or how to fix it.

[08/04/2023, 06:36:24] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.

Logs:

[08/04/2023, 06:37:08] Homebridge v2.0.0-beta.0 (HAP v1.0.0-beta.5) (Homebridge 0955) is running on port 51980.
[08/04/2023, 06:37:10] [Wyze] Launched child bridge with PID 6255
[08/04/2023, 06:37:11] Registering platform 'homebridge-wyze-smart-home.WyzeSmartHome'
[08/04/2023, 06:37:11] [Wyze] Loaded homebridge-wyze-smart-home v0.5.26 child bridge successfully
[08/04/2023, 06:37:11] Loaded 5 cached accessories from cachedAccessories.0EF4323DBD81.
[08/04/2023, 06:37:11] Homebridge v2.0.0-beta.0 (HAP v1.0.0-beta.5) (Wyze) is running on port 52743.
[08/04/2023, 06:37:11] [Ring] Found the following locations:
[08/04/2023, 06:37:11] [Ring] locationId: r1r0m1-26624-0 - xxxxxxxxx
[08/04/2023, 06:37:12] [Ring] Configuring 1 cameras and 3 devices for location "Gold Coast home" - locationId: r1r0m1-26624-0
[08/04/2023, 06:37:12] [Ring] Configured camera ee295bc5-43ee-4ce9-b891-afcd6168a979 doorbell_scallop_lite Front Door
[08/04/2023, 06:37:12] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:37:12] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:37:12] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:37:13] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:37:13] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:37:13] Front Door 07F1 is running on port 37707.
[08/04/2023, 06:37:13] Please add [Front Door 07F1] manually in Home app. Setup Code: 898-08-123
[08/04/2023, 06:38:14] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:38:14] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:38:14] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:38:14] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:38:14] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:39:15] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:39:15] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:39:15] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:39:15] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.
[08/04/2023, 06:39:15] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.

Plugin Config:

{
"name": "Wyze",
"username": "[email protected]",
"password": "xxxxxxxx!",
"refreshInterval": 60000,
"entryExitDelay": 30,
"mfaCode": "xxxxxx",
"showAdvancedOptions": false,
"excludeMacAddress": false,
"excludedeviceType": false,
"_bridge": {
"username": "0E:F4:32:3D:BD:81",
"port": 52743
},
"platform": "WyzeSmartHome"
}

Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version:homebridge-config-ui-x v4.50.2
  • Node.js Version:
  • NPM Version:
  • Operating System: Raspbian GNU/Linux Bullseye (11)

Error status code 400

Homebridge showing the following every 5s or so...

/usr/local/lib/node_modules/homebridge-wyze-smart-home/node_modules/axios/lib/core/createError.js:16
var error = new Error(message);
^
Error: Request failed with status code 400
at createError (/usr/local/lib/node_modules/homebridge-wyze-smart-home/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/local/lib/node_modules/homebridge-wyze-smart-home/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/homebridge-wyze-smart-home/node_modules/axios/lib/adapters/http.js:269:11)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
[4/12/2023, 8:51:04 AM] [Wyze] Child bridge process ended
[4/12/2023, 8:51:04 AM] [Wyze] Process Ended. Code: 1, Signal: null

Wyze Cam Pan v3 is not recognized properly

Describe The Bug:
The Wyze Cam Pan v3 is not properly recognized and generates the following error in the HB logs:
[homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.

The switch accessory is always off after refresh. Turning the camera off and on works, but the switch does not reflect the current state.

To Reproduce:
Have a Pan v3 on the Wyze account.

Expected behavior:
Pan v3 should be properly recognized as a camera and the power_switch device param handled

src/accessories/WyzeAccessory.js line 149 should be:
if(productModel == "WYZEC1-JZ" || productModel == "HL_PAN3" || productModel == "WYZEDB3" || productModel == "WYZE_CAKP2JFUS") {
There are probably other product_model strings that need to be included here (v2 Pan, Outdoor, etc..) but I do not know what they are.

Environment:

  • Plugin Version: 0.5.25.1
  • Homebridge Version: 1.6.0
  • Node.js Version: 18.13.0
  • Operating System: Docker

Warning for characteristic 'On'

Describe The Bug:
Error recieved every minute after installing 0.5.2.x plugin

To Reproduce:
Install plugin, reboot homebridge

Expected behavior:
Did not recieve error in version 0.5.24, so do not expect error. Might be related to new code for switches?

Logs:
[homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.

version 0.5.24 also posts a message to the log every minute regarding loading cached devices.

Both plugin versions seem to slow my Homebridge instance down and cause HomeKit to be slow to respond/display device statuses for all Homebridge plugins, not just Wyze. Switching to back version 0.5.18 resolves performance issues.

Plugin Config:
"name": "Wyze",
"username": "@gmail.com",
"password": "",
"refreshInterval": 60000,
"entryExitDelay": 30,
"mfaCode": "",
"showAdvancedOptions": false,
"excludeMacAddress": false,
"excludedeviceType": false,
"platform": "WyzeSmartHome",
"_bridge": {
"username": "0E:69:5A:D2:DD:33",
"port": 31224

Environment:

  • Plugin Version: 0.5.2-5.1
  • Homebridge Version: 1.6.0
  • Node.js Version: 16.18.0
  • NPM Version:
  • Operating System: Docker

Wyze Bridge started crrashing 0.5.26

Describe The Bug:
0.5.24 Bridge started crashing. I had just installed Homebridge for the first time, Just installed this plugin the day before, it was running fine, could GET and SET status of devices. Next day bridge stopped working (error message below).

I have since downgraded to version 0.5.24 and the bridge is running. I can GET status of Wyze devices, but I cannot SET status anymore.

To Reproduce:
not really that kind of error.

Expected behavior:
Bridge not crash, SET status device (where allowed by Wyze parent permissions e.g. allowed to lock doors but not unlock doors with Siri)

Logs:

[5/8/2023, 12:09:25 PM] [Wyze] Launched child bridge with PID 18498
[5/8/2023, 12:09:25 PM] Registering platform 'homebridge-wyze-smart-home.WyzeSmartHome'
[5/8/2023, 12:09:25 PM] [Wyze] Loaded homebridge-wyze-smart-home v0.5.26 child bridge successfully
[5/8/2023, 12:09:25 PM] Loaded 4 cached accessories from cachedAccessories.0ECAE4E9E45A.
[5/8/2023, 12:09:25 PM] Homebridge v1.6.1 (HAP v0.11.1) (Wyze) is running on port 53516.

/var/lib/homebridge/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:384
const prop_key = Object.keys(lockProperties)
^
TypeError: Cannot convert undefined or null to object
at Function.keys ()
at WyzeLock.lockGetProperty (/var/lib/homebridge/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:384:29)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
[5/8/2023, 12:09:26 PM] [Wyze] Child bridge process ended
[5/8/2023, 12:09:26 PM] [Wyze] Process Ended. Code: 1, Signal: null
[5/8/2023, 12:09:33 PM] [Wyze] Restarting Process...
Plugin Config:

        {
            "name": "Wyze",
            "username": "[email redacted]",
            "password": "[pw redacted]",
            "refreshInterval": 60000,
            "entryExitDelay": 30,
            "showAdvancedOptions": false,
            "excludeMacAddress": false,
            "excludedeviceType": false,
            "platform": "WyzeSmartHome",
            "_bridge": {
                "username": "[coded username redacted]",
                "port": 53516
            }

Screenshots:

Environment:

  • Plugin Version:
  • was 0.5.26
  • now 0.5.24
  • Homebridge Version: 1.6.1
  • Node.js Version: 14.12.3
  • NPM Version: 6.14.18
  • Operating System: Raspbian

Add variable to ignore selected devices

Add ability to whitelist desired devices or blacklist to ignore selected devices. I’d like to ignore all my cam on/off toggles since I never use them. I also have a spare plug that I’m not currently using that would be nice to ignore. Optionally, I have only a few active devices so in my case it would be easier to just whitelist the devices I want to use in homebridge. If ability exists, I’m not finding it.

Loop after server restart

Describe The Bug:
Every time I restart the homebridge server the wyze plugin gets stuck in a loop and won't load. The only way I've been able to get it working again is to uninstall the plugin and then reinstall it? It's done the same thing on two different computers; Windows 10 and 11? If there's something I can change in the config etc please let me know. I love the plugin just not having to reinstall it every time the server reboots. Thanks.

To Reproduce:
Restart the homebridge server.
Expected behavior:
To load the plugin as normal

Logs:
[11/12/2022, 7:22:17 PM] [Wyze] Child bridge process ended
[11/12/2022, 7:22:17 PM] [Wyze] Process Ended. Code: 1, Signal: null
[11/12/2022, 7:22:21 PM] [eWeLink] [Printer Plug] current power [2.76W] current voltage [127.55V] current current [0.06A].
[11/12/2022, 7:22:21 PM] [eWeLink] [Printer Plug] current power [2.76W] current voltage [127.55V] current current [0.06A].
[11/12/2022, 7:22:24 PM] [Wyze] Restarting Process...
[11/12/2022, 7:22:26 PM] [eWeLink] [Plug Dehumidifier ] current power [483.14W] current voltage [120.64V] current current [4.13A].
[11/12/2022, 7:22:26 PM] [eWeLink] [Plug Dehumidifier ] current power [483.14W] current voltage [120.64V] current current [4.13A].
[11/12/2022, 7:22:27 PM] [eWeLink] [Foyer V3 Plug] current power [2.5W] current voltage [124.65V] current current [0.05A].
[11/12/2022, 7:22:27 PM] [eWeLink] [Foyer V3 Plug] current power [2.50W] current voltage [124.65V] current current [0.05A].
[11/12/2022, 7:22:30 PM] [Wyze] Launched child bridge with PID 34224
[11/12/2022, 7:22:31 PM] Registering platform 'homebridge-wyze-smart-home.WyzeSmartHome'
[11/12/2022, 7:22:31 PM] [Wyze] Loaded homebridge-wyze-smart-home v0.5.23 child bridge successfully
[11/12/2022, 7:22:31 PM] Loaded 57 cached accessories from cachedAccessories.0E349189F49A.
Error: Cannot find the bridged Accessory to remove.
at Bridge.Accessory.removeBridgedAccessory (C:\Users\Jeff\AppData\Roaming\npm\node_modules\homebridge\node_modules\hap-nodejs\src\lib\Accessory.ts:640:13)
at Bridge.Accessory.removeBridgedAccessories (C:\Users\Jeff\AppData\Roaming\npm\node_modules\homebridge\node_modules\hap-nodejs\src\lib\Accessory.ts:654:12)
at BridgeService.handleUnregisterPlatformAccessories (C:\Users\Jeff\AppData\Roaming\npm\node_modules\homebridge\src\bridgeService.ts:404:17)
at HomebridgeAPI.emit (node:events:513:28)
at HomebridgeAPI.unregisterPlatformAccessories (C:\Users\Jeff\AppData\Roaming\npm\node_modules\homebridge\src\api.ts:355:10)
at WyzeSmartHome.configureAccessory (C:\Users\Jeff\AppData\Roaming\npm\node_modules\homebridge-wyze-smart-home\src\WyzeSmartHome.js:171:16)
at C:\Users\Jeff\AppData\Roaming\npm\node_modules\homebridge\src\bridgeService.ts:328:25
at Array.filter ()
at BridgeService.restoreCachedPlatformAccessories (C:\Users\Jeff\AppData\Roaming\npm\node_modules\homebridge\src\bridgeService.ts:288:69)
at ChildBridgeFork.startBridge (C:\Users\Jeff\AppData\Roaming\npm\node_modules\homebridge\src\childBridgeFork.ts:186:24)
[11/12/2022, 7:22:32 PM] [Wyze] Child bridge process ended
[11/12/2022, 7:22:32 PM] [Wyze] Process Ended. Code: 1, Signal: null
[11/12/2022, 7:22:39 PM] [Wyze] Restarting Process...

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

{
"name": "Wyze",
"username": "[email protected]",
"password": "xxxxxxxxxx",
"refreshInterval": 60000,
"platform": "WyzeSmartHome",
"_bridge": {
"username": "xxxxxxxxxxxxxxx",
"port": 56893
}
}

Screenshots:

Environment:
Windows 10 nodes.

  • Plugin Version: [v0.5.23] Running as a child bridge.
  • Homebridge Version: [v1.5.1]
  • Node.js Version:
  • NPM Version:
  • Operating System: Windows 10 or 11

Lock Status Reversed

Describe The Bug:
I currently have the fingerprint sensor lock which is picked up properly in Homebridge, but the lock status is reversed. That is, it is reporting the lock is open, when it in fact is not, and vice versa.

Also seeing this in the logs if it applies - This plugin generated a warning from the characteristic 'Current Door State': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.

Logs:

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

"name": "Wyze",
"username": "XXXX",
"password": "XXXX",
"refreshInterval": 60000,
"platform": "WyzeSmartHome"

Screenshots:

Environment:

  • Plugin Version:0.5.24
  • Homebridge Version: v1.6
  • Node.js Version: v16.16
  • NPM Version:
  • Operating System: Raspian

Error causing HB to restart

Seeing the below error and causing Homebridge service to restart. HMS was working without error prior to updating to 0.5.26

TypeError: this.getCharacteristic is not a function
at WyzeHMS.updateCharacteristics (/homebridge/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeHMS.js:24:12)
at WyzeHMS.update (/homebridge/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:351:18)
at WyzeSmartHome.loadDevice (/homebridge/node_modules/homebridge-wyze-smart-home/src/WyzeSmartHome.js:126:17)
at WyzeSmartHome.loadDevices (/homebridge/node_modules/homebridge-wyze-smart-home/src/WyzeSmartHome.js:86:36)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at WyzeSmartHome.refreshDevices (/homebridge/node_modules/homebridge-wyze-smart-home/src/WyzeSmartHome.js:75:7)
at WyzeSmartHome.runLoop (/homebridge/node_modules/homebridge-wyze-smart-home/src/WyzeSmartHome.js:59:9)

Light switch support

It’d be great if you were able to add support for the light switch. It’s such a great product but utilizing IFTT is super slow and usually unresponsive, because you can program each press to be a specific command to the WYZE app, it’d be great to utilize apples automations to control specific lights in your house while maintaining constant power to the smart bulbs.

Adaptive Lighting support

It'd be great if bulbs (Wyze color bulbs in my case) supported Homekit's Adaptive Lighting feature that adjusts color temperature throughout the day. From what I've read there are other homebridge plugins that enable this for other bulb brands.

Light Switch not added

Describe The Bug:
I added a new Light switch on the Wyze up and it looks like the switch is not being added to the bridge. I have checked the logs but I'm not seeing much there.

To Reproduce:

  1. Add a switch to the Wyze App
  2. Restart Wyze Bridge
  3. I have also tried to clear the cache and then restart

Expected behavior:

I would expect for the new light switch to be added once it's added to the Wyze app.

Logs:

unhandled rejection: Error: ENOENT: no such file or directory, open '/var/lib/hoobs/wyzesmarthomebridge/persist/wyze-e2ffce36-4efc-47a4-8ef6-6fee6d508c62.json'

Plugin Config:

{
    "platform": "WyzeSmartHome",
    "name": "Wyze",
    "username": ",
    "password": "",
    "refreshInterval": 60000
}

Screenshots:

IMG_0983

IMG_0982

Environment:

  • Plugin Version: 0.5.24.1
  • Homebridge Version: I'm using Hoob the version is 4.3.0
  • Node.js Version: 16.19.1
  • NPM Version:
  • Operating System: Hoobs

Wyze Plug does not work as an accessory on automations.

Describe The Bug:
The Wyze Plug (v1, no BT setup) does not turn on or off as an accessory on a location-based automation. It will turn on or off as part of a scene, even when that scene is run by an automation.

To Reproduce:
Add the Wyze Plug on/off to an automation triggered by "someone arrives/leaves home" If you test the automation it will work, but it will not when the automation triggers, even though other accessories behave as expected.

Expected behavior:
The Plug should turn on or off as commanded by the automation.

Logs:

Nothing to show here, when the automation runs no Wyze device action is logged. Only when device is manually controlled or automation is tested.

Plugin Config:

{
            "name": "Wyze",
            "username": "******",
            "password": "*******",
            "refreshInterval": 10000,
            "mfaCode": "******",
            "platform": "WyzeSmartHome"

Screenshots:

Environment:

  • Plugin Version: 0.5.23
  • Homebridge Version: 1.5.0
  • Node.js Version: 16.16.0
  • Operating System: docker

Wyze Probe Leak Detection Error

I receive the following error when a leak was detected on one of my wyze leak detectors. From the app, I can tell that the leak is on the attached probe, not the leak detector itself. I assume that is what the '2' means. The error repeats on every update of the plugin.

Wyze BridgeERROR[Wyze Bridge xxxx@Furnace@@Leak Detected] characteristic was supplied illegal value: number 2 exceeded maximum of 1

Reduce cached accessory logspam

Line 122 of WyzeSmartHome.js is logging all accessories at every refresh interval.

The logging could be moved to

this.log.info(`Loading accessory from cache ${homeKitAccessory.context.nickname} (MAC: ${homeKitAccessory.context.mac})`)

in configureAccessory at line 184 of WyzeSmartHome.js. This would log cached accessories once at plug-in startup.

Reloading accessories every 4 minutes

I was just browsing around and saw homebridge restart which seemed odd. right after that restart I saw this plugin reload all of my devices as expected. I then scrolled up through the log and sas that it was reloading all of my accessories from cache every 4 minutes. Is this normal behavior? Everything is working well but the log is kinda crazy and has so much noise. I have 24 Wyze devices. Just wanted to see if there are any thoughts on this.

Thanks

TypeError: Cannot convert undefined or null to object when reading lockKeypadProperties

Describe The Bug:

I have the newer Wyze Lock that has a built-in keypad. I'm not sure if that's significant, but that's the only lock in my Wyze account, and it uses Bluetooth to actually connect to the lock.

When I set this plugin up in Homebridge, and don't exclude the Lock type, the Wyze plugin container keeps restarting indefinitely with the following error:

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at WyzeLock.lockGetProperty (/homebridge/node_modules/.pnpm/[email protected]/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:422:32)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

If I uninstall the plugin, then reinstall it and exclude the "lock" type, it seems to work OK.

To Reproduce:

  1. Set up a Wyze Lock (the model with a built-in keypad that uses Bluetooth)
  2. Install this plugin in Homebridge and don't exclude the "lock" type

Expected behavior:

The plugin should fully load instead of crashing and restarting from this error.

Logs:

[3/12/2023, 4:34:26 PM] [Wyze] Launched child bridge with PID 2776
[3/12/2023, 4:34:26 PM] Registering platform 'homebridge-wyze-smart-home.WyzeSmartHome'
[3/12/2023, 4:34:26 PM] [Wyze] Loaded homebridge-wyze-smart-home v0.5.25.1 child bridge successfully
[3/12/2023, 4:34:26 PM] Loaded 34 cached accessories from cachedAccessories.0E3A31761B28.
[3/12/2023, 4:34:27 PM] Homebridge v1.6.0 (HAP v0.11.0) (Wyze) is running on port 30351.

/homebridge/node_modules/.pnpm/[email protected]/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:422
    const prop_keypad = Object.keys(lockKeypadProperties)
                               ^
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at WyzeLock.lockGetProperty (/homebridge/node_modules/.pnpm/[email protected]/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:422:32)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[3/12/2023, 4:34:27 PM] [Wyze] Child bridge process ended
[3/12/2023, 4:34:27 PM] [Wyze] Process Ended. Code: 1, Signal: null

Plugin Config:

{
    "name": "Wyze",
    "username": "",
    "password": "",
    "refreshInterval": 60000,
    "entryExitDelay": 30,
    "mfaCode": "",
    "showAdvancedOptions": false,
    "excludeMacAddress": false,
    "excludedeviceType": false,
    "_bridge": {
        "username": "",
        "port": 30351
    },
    "platform": "WyzeSmartHome"
}

Screenshots:

Environment:

  • Plugin Version: v0.5.25.1
  • Homebridge Version: v1.6.0
  • Node.js Version: v16.15.1
  • NPM Version:
  • Operating System: Ubuntu

TypeError: Cannot convert undefined or nul 1 to object at Function.keys (<anonymous>) at WyzeLock.lockGetProperty

Error with Wyze lock and version V0.5.26 causing homebridge to repeatedly restart.

I have two wyze locks, one Bluetooth keypad version, the other is wifi model. The plug-in seems to have issues with the Bluetooth, instead of ignoring its lack communication it is complaining endlessly.

[29/03/2023, 21:31:40] Homebridge v1. 6.0 (
HAP v0.11.0) (Wyze) is running on port 372
71・
/usr/local/lib/node modules /homebridge-wyz e-smart-home/src/accessories/WyzeAccessory .js: 384
const prop_key = Object.keys (lockPrope
rties)
TypeError: Cannot convert undefined or nul
1 to object
at Function.keys ()
at WyzeLock.lockGetProperty (/usr/loca
1/lib/node modules/homebridge-wyze-smart-h ome/src/accessories/wyzeAccessory.js:384:2
9)
at processTicksAndRejections (node: int ernal/process/task queues:96:5)
[29/03/2023, 21:31:40] [Wyze] Child bridge process ended
[29/03/2023, 21:31:40] [Wyze] Process Ende
d. Code: 1, Signal: null

Plugin Config:

{
"bridge": {
"name": "Homebridge 7469",
"username": "0E:FC:FA:DB:C2:A2",
"port": 51478,
"pin": "530-05-629"
},
"accessories": [],
"platforms": [
{
"name": "Config",
"port": 8581,
"auth": "none",
"theme": "auto",
"tempUnits": "f",
"lang": "auto",
"platform": "config"
},
{
"name": "Wyze",
"username": "",
"password": “",
"refreshInterval": 60000,
"mfaCode": "",
"_bridge": {
"username": "0E:5D:5C:82:12:B4",
"port": 37271
},
"platform": "WyzeSmartHome"
}
]
}

Dev branch dependencies not loading correctly in Homebridge

Describe The Bug:

When installing the dev branch in Homebridge the dependencies try to load "@typescript-eslint/parserr" which is not installed by default since it is supposed to be for dev only.
To Reproduce:

Install dev release of homebridge-wyze-smart-home and launch Homebridge.

Expected behavior:

Expected to install all dependencies correctly whether dev or production.

Logs:

[05/01/2023, 09:06:52] Error: Cannot find module '@typescript-eslint/parser'
Require stack:
- /var/lib/homebridge/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeThermostat.js
- /var/lib/homebridge/node_modules/homebridge-wyze-smart-home/src/WyzeSmartHome.js
- /var/lib/homebridge/node_modules/homebridge-wyze-smart-home/src/index.js
- /var/lib/homebridge/node_modules/homebridge/lib/plugin.js
- /var/lib/homebridge/node_modules/homebridge/lib/pluginManager.js
- /var/lib/homebridge/node_modules/homebridge/lib/server.js
- /var/lib/homebridge/node_modules/homebridge/lib/cli.js
- /var/lib/homebridge/node_modules/homebridge/bin/homebridge
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/var/lib/homebridge/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeThermostat.js:1:25)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
[05/01/2023, 09:06:52] ====================

Plugin Config:

 {
            "name": "Wyze",
            "refreshInterval": 60000,
            "entryExitDelay": 30,
            "showAdvancedOptions": true,
            "excludeMacAddress": false,
            "excludedeviceType": true,
            "filterDeviceTypeList": [
                "OutdoorPlug",
                "Plug",
                "Light",
                "MeshLight",
                "LightStrip",
                "ContactSensor",
                "MotionSensor",
                "Lock",
                "TemperatureHumidity",
                "LeakSensor",
                "Camera",
                "Common",
                "S1Gateway"
            ],
            "platform": "WyzeSmartHome"
}

Environment:

  • Plugin Version: v0.5.25-dev.0
  • Homebridge Version: 1.6.0
  • Node.js Version: v18.12.1
  • NPM Version: 8.19.2
  • Operating System: HB Raspberry Pi Image

Error in Homebridge logs I haven't seen before

Been using this plugin for some time...just noticed the following error that repeats every minute or so. Note my plugin and the Homebridge are both current and nothing material has changed in my network re: Wyze accessories:

[1/31/2023, 1:06:02 PM] [homebridge-wyze-smart-home] This plugin threw an error from the characteristic 'Battery Level': Unhandled error thrown inside read handler for characteristic: Request failed with status code 400. See https://homebridge.io/w/JtMGR for more info.
[1/31/2023, 1:06:02 PM] [Wyze] Request failed: Error: Request failed with status code 400
[1/31/2023, 1:06:02 PM] [Wyze] Response (Bad Request): {"description":"Too many failed attempts. Please try again later.","requestId":"bb44782b-496e-49ed-830f-685f8b557277","errorCode":1000}

TypeError issue causing service to restart

Starting about a week or so ago, this error started showing up:
"[Wyze] Error getting devices: TypeError: Cannot read properties of null (reading 'r')"

I have Homebridge installed on an Unraid box in docker running version v1.6.0 of Homebridge. I also have a sandbox homebridge container running on a separate device that's running v1.5.0 that's also receiving this error.

Running the current version of the wyze plugin, v0.5.24, I removed the container and the config folder, reinstalled and reconfigured.....same results. Installed beta version of Wyze Smart Home, v0.5.2-5 Beta 3....same results.

However, if I install the older version, 0.5.22, the error still occurs, but it doesn't force the service to restart.....just fills up my logs with "[Wyze] Error getting devices: TypeError: Cannot read properties of null (reading 'r')". Though the app stays functional, and the service remains stable and usable.

Stop login attempts if HTTP 400/401 returned.

Is your feature request related to a problem? Please describe:
If for some reason the refresh token is invalid and a new login is required, the user will have to provide a new MFA code. The plug-in currently retries login every refresh interval, eventually causing the account to be perpetually locked out until the plug-in is stopped and the 15 minute lockout is allowed to expire.

Login will return a 401 if the MFA code is wrong. If account lockout has already occurred, login will return a 400. If either of these conditions occur, an error should be thrown as if MFA was required but missing. The plug-in should not make any more requests until restarted to avoid perpetual lockout.

Generally speaking, if login fails for any reason, the plug-in should consider the failure permanent and not retry every refresh interval as the user is going to have to fix something.

Support for DoorBell

Is your feature request related to a problem? Please describe:
I would like to view my Wyze doorbell Pro with HomeKit.

Describe the solution you'd like:
Add support with this plugin for both the Wyze Video DoorBell/Pro.

Cameras are coming through as Plugs, not Cameras

Describe Your Problem:
Wyze cameras are displaying as Plugs, not cameras in accessories.

Logs:

[1/31/2023, 10:16:18 AM] [Wyze] Loading accessory from cache Living Room Cam (MAC:)
[1/31/2023, 10:16:18 AM] [Wyze] Loading accessory from cache Bedroom Cam (MAC:)
[1/31/2023, 10:16:18 AM] [Wyze] Loading accessory from cache xxxxxxx’s Room (MAC:)

Plugin Config:

{
"bridge": {
"name": "Homebridge 2D7D",
"username": "0E:1D:A9:23:2D:7D",
"port": 51217,
"pin": "",
"advertiser": "bonjour-hap"

        "name": "Wyze",
        "username": "[email protected]",
        "password": "",
        "refreshInterval": 60000,
        "entryExitDelay": 30,
        "mfaCode": "xxxxxx",
        "showAdvancedOptions": false,
        "excludeMacAddress": false,
        "excludedeviceType": false,
        "platform": "WyzeSmartHome"

Screenshots:

Environment:

V2 Contact sensors battery levels wrong

Describe The Bug:
The V2 contact sensors always report somewhere around half the battery level

To Reproduce:
I have the homebridge paired with Home Assistant. Motion V2's report the correct battery levels, but the V2 contact sensors always show somewhere around half the correct battery level.

Expected behavior:
Show the correct battery level.

Logs:

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

            "name": "Wyze",
            "username": "",
            "password": "",
            "refreshInterval": 60000,
            "showAdvancedOptions": true,
            "excludeMacAdress": false,
            "excludedeviceType": false,
            "platform": "WyzeSmartHome"

Screenshots:

Environment:

  • Plugin Version: v0.5.24
  • Homebridge Version:
  • Node.js Version; v18.12.1
    --
  • NPM Version:
  • Operating System: macOS

Might be Mfa but not sure.

Describe Your Problem:
Just upgraded to this plugin since it is verified and supports more devices. Thanks for that :) All of my devices vanished from HomeKit so I thought it was Mia and upgraded at the same time. I am getting an m4a error but that seem to resolve and then I get this:

Logs:

[09/10/2022, 13:16:23] [Wyze] Error, refreshing access token and trying again
[09/10/2022, 13:16:24] [Wyze] Error, logging in and trying again
[09/10/2022, 13:16:24] [Wyze] Error getting devices: TypeError: Cannot read properties of undefined (reading 'app_id')

This could be Mfa related of course. What I did was log out of the app on my phone. Logged in again with my account and when I got my mfa code I updated it in the config ands restarted.

Plugin Config:

My json looks like this:

 {
        "name": "Wyze",
        "username": "xxxxxx",
        "password": "xxxxx",
        "refreshInterval": 60000,
        "mfaCode": "038772",
        "platform": "WyzeSmartHome"
    }

Screenshots:

Environment:

homebridge-wyze-smart-home v0.5.23

  • Homebridge Version: 1.4.1
  • Node.js Version: v16.15.0
  • NPM Version: 8.5.5
  • Operating System: Raspbian GNU/Linux Buster (10)

Cannot use plugin with 2FA enabled on my Wyze Account

Describe Your Problem:
I am unable to use Homebridge with my Wyze account with 2FA turned on. Even though I set the code in the config, by the time Homebridge restarts with the new configs loaded, the code has expired. Before I can disable it, I end up getting a response from the Wyze server that there have been too many attempts and my account is locked.

Logs:

[9/11/2022, 8:46:10 PM] [Wyze] Error, refreshing access token and trying again
[9/11/2022, 8:46:10 PM] [Wyze] Error, logging in and trying again
[9/11/2022, 8:46:11 PM] [Wyze] Request failed: Error: Request failed with status code 400
[9/11/2022, 8:46:11 PM] [Wyze] Response (Bad Request): {"description":"Too many failed attempts. Please try again later.","requestId":"e23a784a-4f10-4f1d-b2e1-4c8ed7f2ddd8","errorCode":1000}

Plugin Config:

        {
            "name": "Wyze",
            "username": "[email protected]",
            "password": "-----------------------------",
            "refreshInterval": 60000,
            "mfaCode": "XXXXXX",
            "platform": "WyzeSmartHome"
        }

Screenshots:
N/A

Environment:

  • Plugin Version: 0.5.23
  • Homebridge Version: v1.5.0
  • Node.js Version: v14.19.0
  • NPM Version: 6.14.16
  • Operating System: Raspbian

Robot Vacuum Support

I'd love basic vacuum support. A switch for vacuum or return to charge would be sufficient, individual rooms would be nice but not a big deal for me. I've troubleshot other plugins for hours with no success, so it would be great to have it included in this one that's always worked well.

Wall switches

Describe The Bug:

To Reproduce:

Expected behavior:

Logs:

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version:
  • Node.js Version:
  • NPM Version:
  • Operating System:

Just updated to v0.5.25.1 and it is crashing homebridge

Describe Your Problem:
I just updated the the most recent version of the plugin since I saw it supported wall switches now. Once I installed i did not see the wall switches so decided to restart Homebridge. It would start and crash. Then proceeded to loop through starting/crashing.

I thought I would revert to the previous version but the link to do that no longer shows. Screenshot attached. I have no upgraded to v1.6.0 because my install has been stable. Do I need that version to use the latest plugin?

Prior to upgrading I was using version 5.24

Logs:

Show the Homebridge logs here, remove any sensitive information.
[07/03/2023, 22:53:42] TypeError: Cannot read properties of undefined (reading 'device_id')
    at WyzeHMS.getHmsID (/usr/local/lib/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:598:92)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at WyzeHMS.updateCharacteristics (/usr/local/lib/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeHMS.js:27:9)
    at WyzeHMS.update (/usr/local/lib/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:351:7)

**Plugin Config:**

```json
Show your Homebridge config.json here, remove any sensitive information.
Config.json attached

Screenshots:

Environment:

  • v0.5.25.1:
  • *1.5.0:
  • *v16.15.0:
  • 8.5.5*:
  • *Raspbian GNU/Linux Buster (10):

config-3.json.txt
Screen Shot 2023-03-07 at 11 18 00 PM

Camera Toggle Doesn't Work for the OutDoor Cam

It shows on, properly detects devices, sends this:

[07/07/2022, 12:47:53] [Wyze Smart Home] API response: {"ts":XXXXXXXXXXX,"code":"1","msg":"","data":{"session_id":"XXXXXXXXXXXXXX","result":2}}

But doesn't actually toggle off

Child bridge will not start.

Describe Your Problem:
Unable to start my child bridge. I am seeing the same issue with homebridge-wyze-connected-home-op v0.5.9 I am not using 2 factor with my Wyze account

Logs:
[27/11/2022, 18:04:40] [wyze-smart-home] Restarting Process...
[27/11/2022, 18:04:42] [wyze-smart-home] Launched child bridge with PID 29108
[11/27/2022, 6:04:42 PM] Registering platform 'homebridge-wyze-smart-home.WyzeSmartHome'
[27/11/2022, 18:04:42] [wyze-smart-home] Loaded homebridge-wyze-smart-home v0.5.24 child bridge successfully
[11/27/2022, 6:04:42 PM] Loaded 17 cached accessories from cachedAccessories.0E56DD166B87.
Error: Cannot find the bridged Accessory to remove.
at Bridge.Accessory.removeBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:640:13)
at Bridge.Accessory.removeBridgedAccessories (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:654:12)
at BridgeService.handleUnregisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:404:17)
at HomebridgeAPI.emit (node:events:527:28)
at HomebridgeAPI.unregisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/api.ts:355:10)
at WyzeSmartHome.configureAccessory (/usr/local/lib/node_modules/homebridge-wyze-smart-home/src/WyzeSmartHome.js:186:16)
at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:328:25
at Array.filter ()
at BridgeService.restoreCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:288:69)
at ChildBridgeFork.startBridge (/usr/local/lib/node_modules/homebridge/src/childBridgeFork.ts:186:24)
[27/11/2022, 18:04:42] [wyze-smart-home] Child bridge process ended
[27/11/2022, 18:04:42] [wyze-smart-home] Process Ended. Code: 1, Signal: null

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

 {
        "name": "Wyze",
        "username": "xxxxxx",
        "password": "xxxxx",
        "refreshInterval": 60000,
        "mfaCode": "038772",
        "platform": "WyzeSmartHome"
    }

Screenshots:

Environment:

homebridge-wyze-smart-home v0.5.23
• Homebridge Version: 1.5.0
• Node.js Version: v16.15.0
• NPM Version: 8.5.5
• Operating System: Raspbian GNU/Linux Buster (10)

Contributing to reverse engineering camera webview?

Hi @ jfarmer08 - I'd like to contribute to getting the camera functionality to extend beyond the switch on/off capability and enable viewing of the stream. I'm not sure if it is going to work, but I have been looking at the new Wyze Webview as a starting point.

Admittedly, I am a bit new to homebridge, but wonder if you have some tips/guidance that you would suggest or at least want someone contributing to follow. In lieu of a CONTRIBUTING file, I figured I would ask.

Cheers!

Delete the refresh cache?

After updating the plug-in to the latest version I am still not seeing wall switches. I was wondering if deleting the cache and have it reload might resolve the issue? Is there another fix?

Thanks!

Issue Due to Wyze Bolt I Believe

This is the error I am getting and the reason I think I am getting it is because I have a Wyze Bolt installed which is Bluetooth only and does not connect to wifi. How Can i go about fixing this?

TypeError: Cannot convert undefined or null to object
at Function.keys ()
at WyzeLock.lockGetProperty (/volume1/homebridge/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:422:32)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[4/13/2023, 7:34:01 AM] [Wyze] Child bridge process ended
[4/13/2023, 7:34:01 AM] [Wyze] Process Ended. Code: 1, Signal: null
[4/13/2023, 7:34:08 AM] [Wyze] Restarting Process...
[4/13/2023, 7:34:08 AM] [Wyze] Launched child bridge with PID 25144
[4/13/2023, 7:34:08 AM] Registering platform 'homebridge-wyze-smart-home.WyzeSmartHome'
[4/13/2023, 7:34:08 AM] [Wyze] Loaded homebridge-wyze-smart-home v0.5.26 child bridge successfully
[4/13/2023, 7:34:08 AM] Loaded 5 cached accessories from cachedAccessories.0ED47E47B76E.
[4/13/2023, 7:34:08 AM] [homebridge-wyze-smart-home] This plugin generated a warning from the characteristic 'Current Door State': Characteristic not in required or optional characteristic section for service ContactSensor. Adding anyway.. See https://homebridge.io/w/JtMGR for more info.
[4/13/2023, 7:34:09 AM] Homebridge v1.6.0 (HAP v0.11.0) (Wyze) is running on port 35760.

/volume1/homebridge/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:422
const prop_keypad = Object.keys(lockKeypadProperties)

Will not boot up

Describe Your Problem:

Cannot get this plug in to boot up or run at all.
Logs:

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

{
"name": "Wyze",
"username": "my email here",
"password": "mypassword here",
"refreshInterval": 60000,
"_bridge": {
"username": "",
"port": 40753
},
"platform": "WyzeSmartHome"
Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version: 1.5.0
  • Node.js Version:
  • NPM Version:
  • Operating System: win 10 pro

[9/21/2022, 7:57:49 PM] [Wyze] Restarting Process...
[9/21/2022, 7:57:49 PM] [Wyze] Launched child bridge with PID 12112
[9/21/2022, 7:57:49 PM] Registering platform 'homebridge-wyze-smart-home.WyzeSmartHome'
[9/21/2022, 7:57:50 PM] [Wyze] Loaded homebridge-wyze-smart-home v0.5.24-beta.0 child bridge successfully
[9/21/2022, 7:57:50 PM] Loaded 6 cached accessories from cachedAccessories.0EABE9524898.
Error: Cannot find the bridged Accessory to remove.
at Bridge.Accessory.removeBridgedAccessory (C:\Users\rj_ke\AppData\Roaming\npm\node_modules\homebridge\node_modules\hap-nodejs\src\lib\Accessory.ts:640:13)
at Bridge.Accessory.removeBridgedAccessories (C:\Users\rj_ke\AppData\Roaming\npm\node_modules\homebridge\node_modules\hap-nodejs\src\lib\Accessory.ts:654:12)
at BridgeService.handleUnregisterPlatformAccessories (C:\Users\rj_ke\AppData\Roaming\npm\node_modules\homebridge\src\bridgeService.ts:404:17)
at HomebridgeAPI.emit (node:events:513:28)
at HomebridgeAPI.unregisterPlatformAccessories (C:\Users\rj_ke\AppData\Roaming\npm\node_modules\homebridge\src\api.ts:355:10)
at WyzeSmartHome.configureAccessory (C:\Users\rj_ke\AppData\Roaming\npm\node_modules\homebridge-wyze-smart-home\src\WyzeSmartHome.js:184:16)
at C:\Users\rj_ke\AppData\Roaming\npm\node_modules\homebridge\src\bridgeService.ts:328:25
at Array.filter ()
at BridgeService.restoreCachedPlatformAccessories (C:\Users\rj_ke\AppData\Roaming\npm\node_modules\homebridge\src\bridgeService.ts:288:69)
at ChildBridgeFork.startBridge (C:\Users\rj_ke\AppData\Roaming\npm\node_modules\homebridge\src\childBridgeFork.ts:186:24)
[9/21/2022, 7:57:50 PM] [Wyze] Child bridge process ended
[9/21/2022, 7:57:50 PM] [Wyze] Process Ended. Code: 1, Signal: null

Wyze Connection Times out Every Few Weeks

Describe Your Problem:
I am using 2FA with my wyze account, and after the initial configuration setup my token does not refresh and I lose my connection with Wyze. I have to stop the bridge wait a few hours and reconnect with a new 2FA code, which will eventually time out after a few weeks and lock me out of the account again. I do get an error when first connecting about a missing persist folder, which i think is causing the problem. This plugin worked flawlessly until upgrading to Hoobs 4. I understand this plugin was created for Homebridge, but I worked with HOOBS support and they pointed me back to you. I know other Hoobs users have this same issue.

Logs:

9/11/2022, 7:53:57 PM Wyze Connected Home Bridge Wyze [ ERROR ] Response (Bad Request): {"description":"Too many failed attempts. Please try again later.","requestId":"8d4c3721-068d-4325-9ae2-7f83cfe26263","errorCode":1000}
9/11/2022, 7:53:57 PM Wyze Connected Home Bridge Wyze [ ERROR ] Error getting devices: Error: Request failed with status code 400
9/11/2022, 7:54:02 PM Wyze Connected Home Bridge Wyze [ ERROR ] Request failed: Error: Request failed with status code 400
9/11/2022, 7:54:02 PM Wyze Connected Home Bridge Wyze [ ERROR ] Response (Bad Request): {"description":"Too many failed attempts. Please try again later.","requestId":"4963f785-148f-4530-a0a6-b5e619ea05eb","errorCode":1000}
9/11/2022, 7:54:02 PM Wyze Connected Home Bridge Wyze [ ERROR ] Error getting devices: Error: Request failed with status code 400
9/11/2022, 7:54:08 PM Wyze Connected Home Bridge Wyze [ ERROR ] Request failed: Error: Request failed with status code 400
9/11/2022, 7:54:08 PM Wyze Connected Home Bridge Wyze [ ERROR ] Response (Bad Request): {"description":"Too many failed attempts. Please try again later.","requestId":"409561df-1ded-475f-a915-fc2487e51588","errorCode":1000}
9/11/2022, 7:54:08 PM Wyze Connected Home Bridge Wyze [ ERROR ] Error getting devices: Error: Request failed with status code 400
9/11/2022, 7:54:13 PM Wyze Connected Home Bridge Wyze [ ERROR ] Request failed: Error: Request failed with status code 400
9/11/2022, 7:54:13 PM Wyze Connected Home Bridge Wyze [ ERROR ] Response (Bad Request): {"description":"Too many failed attempts. Please try again later.","requestId":"2e32e62e-e8d3-4be4-9129-ebab7d627f01","errorCode":1000}
9/11/2022, 7:54:13 PM Wyze Connected Home Bridge Wyze [ ERROR ] Error getting devices: Error: Request failed with status code 400
9/11/2022, 7:54:18 PM Wyze Connected Home Bridge Wyze [ ERROR ] Request failed: Error: Request failed with status code 400
9/11/2022, 8:21:34 PMWyze Connected Home BridgeWyzeERRORError getting devices: Error: Request failed with status code 429
9/11/2022, 8:21:39 PMWyze Connected Home BridgeWyzeERRORRequest failed: Error: Request failed with status code 429
9/11/2022, 8:21:39 PMWyze Connected Home BridgeWyzeERRORResponse (Too Many Requests): ""
9/11/2022, 8:21:39 PMWyze Connected Home BridgeWyzeERRORError getting devices: Error: Request failed with status code 429
9/11/2022, 8:21:44 PMWyze Connected Home BridgeWyzeERRORRequest failed: Error: Request failed with status code 429
9/11/2022, 8:21:44 PMWyze Connected Home BridgeWyzeERRORResponse (Too Many Requests): ""

9/12/2022, 8:27:52 AMWyze Connected Home BridgeWyzeERRORError getting devices: Error: ENOENT: no such file or directory, open '/var/lib/hoobs/wyzeconnectedhomebridge/persist/wyze-a09252c9-15a4-4866-a3d2-ae3c332aaf5d.json'

Plugin Config:

   "platform": "WyzeSmartHome",
    "name": "Wyze",
    "username": "***********",
    "password": "***********",
    "refreshInterval": 5000,
    "mfaCode": "******"

Screenshots:

Environment:

  • Plugin Version: 0.5.23
  • Homebridge Version: 1.4.1
  • Node.js Version: 16.15.1
  • NPM Version: 4.2.5
  • Operating System: Raspbian-HOOBS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.