Giter VIP home page Giter VIP logo

homebridge-wyze-connected-home's People

Contributors

misenhower avatar pjotal 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

Watchers

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

homebridge-wyze-connected-home's Issues

Instal Issues

Hi guys,

On install I get the follow reply from terminal

EAS:~ eas$ npm i homebridge-wyze-connected-home
npm WARN saveError ENOENT: no such file or directory, open '/Users/eas/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/eas/package.json'
npm WARN eas No description
npm WARN eas No repository field.
npm WARN eas No README data
npm WARN eas No license field.

  • [email protected]
    updated 1 package and audited 14 packages in 2.726s
    found 0 vulnerabilities

┌────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /Users/eas/.config

on hombridge I get the following message:

[6/24/2020, 3:31:11 PM] Error loading platform requested in your config.json at position 2
[6/24/2020, 3:31:11 PM] Error: The requested platform 'WyzeConnectedHome' was not registered by any plugin.
at PluginManager.getPluginForPlatform (/usr/local/lib/node_modules/homebridge/src/pluginManager.ts:224:15)
at /usr/local/lib/node_modules/homebridge/src/server.ts:386:37
at Array.forEach ()
at Server.loadPlatforms (/usr/local/lib/node_modules/homebridge/src/server.ts:373:27)
at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:152:29)
at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)

Can you anyone help? It is the first time that I add a second plataform to home bridge, not sure if that is the issue.

Request failed: Error with Wyze API / Access Tokens

Hello, there seems to be a timeout with my access token becoming invalid every day, multiple times a day. Rebooting the HomeBridge instance fixes the error, but it eventually comes up again. Any tips?

Here's my log:
[11/3/2020, 02:00:32] [Wyze] Request failed: Error: getaddrinfo EAI_AGAIN api.wyzecam.com
[11/3/2020, 02:00:32] [Wyze] Error, refreshing access token and trying again

Running:
RaspPi 3B+ with official HomeBridgeOS v.1.1.6

Thanks!

Request failed: Error: Request failed with status code 403

The plugin has been working on an iMac. I installed it on a Beaglebone Black yesterday and get this error continuously.

[5/28/2021, 3:29:08 PM] [Wyze] Request failed: Error: Request failed with status code 403
[5/28/2021, 3:29:08 PM] [Wyze] Response (Forbidden): {"description":"Request forbidden."}
[5/28/2021, 3:29:08 PM] [Wyze] Error getting devices: Error: Request failed with status code 403

Wyze Smart Home error

Hello,
I'been trying to install Wyze Smart Home plugin in the Hoobs system but always got the following error:
Error getting devices: Error: ApiKey Required, Please provide the "apiKey" parameter in config.json
I already added this configuration file with the Wyze API key:
{
"platforms": [
{
"platform": "WyzeSmartHome",
"name": "Wyze",
"username": "YOUR_EMAIL",
"password": "YOUR_PASSWORD",
"keyId": "",
"apiKey": "",
"lowBatteryPercentage": 30,
"filterDeviceTypeList": ["OutdoorPlug","Plug"],
"filterByMacAddressList": ["MAC_ADDRESS_1","MAC_ADDRESS_2"],
"garageDoorAccessory": ["MAC_ADDRESS_1","MAC_ADDRESS_2"],
"spotLightAccessory": ["MAC_ADDRESS_1","MAC_ADDRESS_2"],
"alarmAccessory": ["MAC_ADDRESS_1","MAC_ADDRESS_2"],
"notificationAccessory": ["MAC_ADDRESS_1","MAC_ADDRESS_2"]}
]
}
Any clue?
Thanks

Request forbidden (403) despite correct credentials

This is a rather unique scenario that I can't seem to figure out.

I keep getting a Request forbidden despite the credentials being 100% correct. There is no MFA enabled.

I tried packet sniffing. The email and password are correct.

I tried enabling debug mode to see. The password and email (and API Key) match what was shown in my packet sniffing.

I tried performing the request manually in postman using only the x-api-key header and the payload from the packet sniffing. It works fine.

I tried using CURL on the Homebridge server. It works fine.

curl --location --request POST 'https://auth-prod.api.wyze.com/user/login' \
--header 'x-api-key: WMXHYf79Nr5gIlt3r0r7p9Tcw5bvs6BB4U8O8nGJ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "account email",
    "password": "md5 3 times (why, wyze?) password"
}'

Why is it specifically not working through Homebridge? Any advice or tips would be greatly appreciated.

I messed around with the config but in most cases, it doesn't seem to be affecting anything:

{
    "name": "Wyze",
    "username": "account email",
    "password": "account password",
    "refreshInterval": 10000,
    "platform": "WyzeConnectedHome",
    "authApiKey": "WMXHYf79Nr5gIlt3r0r7p9Tcw5bvs6BB4U8O8nGJ",
    "appVersion": "2.19.24",
    "phoneId": "my phone ID via packet sniffing"
}

Debug output:

[5/6/2021, 5:40:15 AM] [Wyze] Refreshing devices...
[5/6/2021, 5:40:15 AM] [Wyze] Performing request: user/login
[5/6/2021, 5:40:15 AM] [Wyze] Request config: {"method":"POST","url":"user/login","data":{"email":"account email","password":"account password"},"baseURL":"https://auth-prod.api.wyze.com","headers":{"x-api-key":"WMXHYf79Nr5gIlt3r0r7p9Tcw5bvs6BB4U8O8nGJ"}}
[5/6/2021, 5:40:16 AM] [Wyze] Request failed: Error: Request failed with status code 403
[5/6/2021, 5:40:16 AM] [Wyze] Response (Forbidden): {"description":"Request forbidden."}
[5/6/2021, 5:40:16 AM] [Wyze] Error getting devices: Error: Request failed with status code 403

The email and password found in the request config are identical to my prior instances of packet sniffing and manual testing.

I've not had this issue with any other plugins.

On Raspberry Pi, long restart processes causes 2FA code to expire

Hi,

This plugin works pretty awesome, so thank you. I don't know what a good polling interval should be since 5 seconds seems way too long for motion sensors for automation tasks.

When I first tried setting up the Wyze plugin when I have 2FA turned on, the homebridge on raspberry pi 1 restarts really slow, almost 2 minutes before I see the log and my 2FA is expired by then. This causes my login to get locked due to failed attempts because the pin is now no longer valid.

I suppose a solution would be to get a CPU cooler for the raspberry PI and overclock it.

[6/17/2020, 9:28:44 AM] [HB Supervisor] Sending SIGTERM to Homebridge
[6/17/2020, 9:28:44 AM] Got SIGTERM, shutting down Homebridge...
[6/17/2020, 9:28:50 AM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[6/17/2020, 9:28:55 AM] [HB Supervisor] Restarting Homebridge...
[6/17/2020, 9:28:55 AM] [HB Supervisor] Starting Homebridge with extra flags: -I
[6/17/2020, 9:28:55 AM] [HB Supervisor] Started Homebridge v1.1.0 with PID: 3311
[6/17/2020, 9:29:27 AM] Loaded config.json with 0 accessories and 3 platforms.
[6/17/2020, 9:29:28 AM] ---
[6/17/2020, 9:30:01 AM] Loaded plugin: [email protected]
[6/17/2020, 9:30:01 AM] Registering platform 'homebridge-config-ui-x.config'
[6/17/2020, 9:30:01 AM] ---
[6/17/2020, 9:30:01 AM] Loaded plugin: [email protected]
[6/17/2020, 9:30:01 AM] Registering accessory 'homebridge-delay-switch.DelaySwitch'
[6/17/2020, 9:30:01 AM] ---
[6/17/2020, 9:30:07 AM] Loaded plugin: [email protected]
[6/17/2020, 9:30:07 AM] Registering platform 'homebridge-platform-wemo.BelkinWeMo'
[6/17/2020, 9:30:07 AM] ---
[6/17/2020, 9:30:07 AM] Loaded plugin: [email protected]
[6/17/2020, 9:30:08 AM] Registering platform 'homebridge-wyze-connected-home.WyzeConnectedHome'
[6/17/2020, 9:30:08 AM] ---
[6/17/2020, 9:30:08 AM] Loading 3 platforms...
[6/17/2020, 9:30:08 AM] [Config] Initializing config platform...
[6/17/2020, 9:30:09 AM] [Config] Running in Service Mode
[6/17/2020, 9:30:09 AM] [Wyze] Initializing WyzeConnectedHome platform...

Request failed: Error: read ETIMEDOUT

Getting these occasionally. Unsure if this is related to some other Issue entries, but wanted to at least report. Is this related to a timeout query of the API from Wyze or the local device itself?

Cannot change color temperature through Siri

Home app works great (thank you!) for setting brightness and color temperature, but I cannot drive the color temperature through Siri. I've tried the following:

"Turn on/off Master Bedroom lights" - this works

but if I try any of the following, the color temperature doesn't change.

"Set Master Bedroom lights to candle light" - Siri says "the master bedroom lights do not support that action"
"Set Master Bedroom lights to 6000k" - this changes brightness to 100%
"Set Master Bedroom lights to 500" (HOMEKIT_COLOR_TEMP_MIN) - this sets brightness to 100%

If i ask "What temperature/color are the master bedroom lights", Siri replies "the master bedroom lights do not support that action".

This could be user error, but I cannot find any way to drive the Wyze bulb color through Siri. Am I missing something, or is this a bug?

403 Error

Keep getting this error out of no where. Uninstalled and reinstalled plugin. No accessories will add. Confirms password twice. No two factor turned on

BridgeWARNINGunhandled rejection: Error: ENOENT: no such file or directory, open '/var/lib/hoobs/wyzesmarthomebridge/persist/wyze-51298708-78cf-4d01-8ccb-9d057574d999.json'
7/21/2023, 10:44:41 PMWyze Smart Home BridgeWyzeERRORRequest failed: Error: Request failed with status code 403
7/21/2023, 10:44:41 PMWyze Smart Home BridgeWyzeERRORResponse (Forbidden): ""
7/21/2023, 10:44:41 PMWyze Smart Home BridgeWyzeERRORError getting devices: Error: Request failed with status code 403
7/21/2023, 10:45:41 PMWyze Smart Home BridgeWyzeERRORRequest failed: Error: Request failed with status code 403
7/21/2023, 10:45:41 PMWyze Smart Home BridgeWyzeERRORResponse (Forbidden): ""
7/21/2023, 10:45:41 PMWyze Smart Home BridgeWyzeERRORError getting devices: Error: Request failed with status code 403
7/21/2023, 10:46:41 PMWyze Smart Home BridgeWyzeERRORRequest failed: Error: Request failed with status code 403
7/21/2023, 10:46:41 PMWyze Smart Home BridgeWyzeERRORResponse (Forbidden): ""
7/21/2023, 10:46:41 PMWyze Smart Home BridgeWyzeERRORError getting devices: Error: Request failed with status code 403
7/21/2023, 10:47:18 PMWyze Smart Home BridgeWARNINGunhandled rejection: Error: ENOENT: no such file or directory, open '/var/lib/hoobs/wyzesmarthomebridge/persist/wyze-51298708-78cf-4d01-8ccb-9d057574d999.json'

Fails to light up entire group

I installed the SmartThings plugin and I now have a sensor that triggers a group of 4 lights. When the automated request goes through Homebridge, it sets color, brightness and state properties for all bulbs in the group (4). The Homebridge logging reflects this request seems to be sent to the Wyze Sense bridge. However, pretty consistently, not all bulbs turn on. I think the Wyze bridge might not be able to handle all these request so quickly.

I'm going to try and debug a little bit. Perhaps I'll start by adding a small delay between when the requests get sent from the plugin to the Wyze Bridge. I haven't looked at this plugin code much so I hope I can do that for troubleshooting and proving my hypothesis.

Error getting devices: TypeError: Cannot read property 'app_id' of undefined

  • using homebridge 1.1.7 (still waiting for the dust to settle on 1.3.0 before i upgrade)
  • running on raspberry pi zero, Buster
  • homebridge is working OK with my existing plugins
  • installed this plugin
  • i have 2FA set up on my Wyze account (text message)
  • added section to config.json with my username and password. was ready to add the MFA code...
  • restarted homebridge

however, i never got the text message with the MFA code.
I see these messages in the log. the error message repeats every 10 seconds:

[2/20/2021, 3:52:47 PM] Registering platform 'homebridge-wyze-connected-home.WyzeConnectedHome'
[2/20/2021, 3:52:47 PM] [Wyze] Initializing WyzeConnectedHome platform...
[2/20/2021, 3:52:50 PM] [Wyze] Error getting devices: TypeError: Cannot read property 'app_id' of undefined
[2/20/2021, 3:53:00 PM] [Wyze] Error getting devices: TypeError: Cannot read property 'app_id' of undefined
[2/20/2021, 3:53:11 PM] [Wyze] Error getting devices: TypeError: Cannot read property 'app_id' of undefined
[2/20/2021, 3:53:21 PM] [Wyze] Error getting devices: TypeError: Cannot read property 'app_id' of undefined
[2/20/2021, 3:53:31 PM] [Wyze] Error getting devices: TypeError: Cannot read property 'app_id' of undefined
[2/20/2021, 3:53:42 PM] [Wyze] Error getting devices: TypeError: Cannot read property 'app_id' of undefined
[2/20/2021, 3:53:52 PM] [Wyze] Error getting devices: TypeError: Cannot read property 'app_id' of undefined

Am i missing something or doing something wrong? I assumed that the plugin would try to log in, and i'd get a text message with the MFA code.

thanks

Hoobs Wyze error 400

I installed the newest Wyze plugin for the motion sensors and door sensors but i can’t get it to Work. I get error: [Wyze] Error getting devices: Error: Request failed with status code 400

Request failed: Error: getaddrinfo EAI_AGAIN api.wyzecam.com

I'm seeing the following errors in the logs over and over again.

[7/16/2020, 02:04:12] [Wyze] Successfully logged into Wyze API
[7/16/2020, 05:00:38] [Wyze] Request failed: Error: getaddrinfo EAI_AGAIN api.wyzecam.com
[7/16/2020, 05:00:38] [Wyze] Error, refreshing access token and trying again

Has anyone else experienced this issue?

Unable to Control Wyze Plug

I am unable to control my Wyze plug using Homebridge and your code. The devices show up in my Home app, but I am unable to control them. At first, they show as available for use in the Home app, but when I try to toggle them on or off, they are not controllable and then the Home app reports them as No Response. I have tried with and without 2FA, and each time I have had the same issue.

Here is a sample log snippet:

[5/28/2020, 15:28:15] [Wyze] Error getting devices: Error: Request failed with status code 400
[5/28/2020, 15:28:26] [Wyze] Error, refreshing access token and trying again
[5/28/2020, 15:28:26] [Wyze] Error, logging in and trying again
[5/28/2020, 15:28:26] [Wyze] Request failed: Error: Request failed with status code 400
[5/28/2020, 15:28:26] [Wyze] Response (Bad Request): {"errorCode":1000,"description":"Too many failed attempts. Please try again later.","requestId":"---omitted---"}

Can you please let me know what I am doing wrong?

Thanks!!

app_id undefined error - Failure to pull in any Wyze Devices

I am current running homebridge Version 1.2.3 and plugin homebridge-wyze-connected-home v0.5.1. I also have MF2A enabled within my configuration. Upon startup I see the following in my logs:

`
[9/23/2020, 10:00:23 PM] [Wyze-Smart-Home] Initializing WyzeConnectedHome platform...

...

[9/23/2020, 10:00:40 PM] [Wyze-Smart-Home] Error getting devices: TypeError: Cannot read property 'app_id' of undefined`

The app_id error is found multiple times as the plugin attempts to "run" within my logs. I don't see any indication that MF2A is not working but am open to suggestions.

Thanks.

Cannot find the bridged Accessory to remove.

I consistently receive an error the moment setup the plugin. It goes through a loop like

[6/10/2020, 1:54:24 PM] [Wyze] Configuring accessory: Hallway Sensor
[6/10/2020, 1:54:24 PM] [Wyze] [MotionSensor] Fetching status of Hallway Sensor"
[6/10/2020, 1:54:24 PM] [Wyze] [MotionSensor] Retrieving previous service for Hallway Sensor"
[6/10/2020, 1:54:24 PM] [Wyze] Configuring accessory: Front Window Sensor
[6/10/2020, 1:54:24 PM] [Wyze] [ContactSensor] Fetching status of Front Window Sensor"
[6/10/2020, 1:54:24 PM] [Wyze] [ContactSensor] Retrieving previous service for "Front Window Sensor"
[6/10/2020, 1:54:24 PM] [Wyze] Unrecognized accessory, removing: Glass door
[6/10/2020, 1:54:24 PM] Error: Cannot find the bridged Accessory to remove.
    at Bridge.Accessory._this.removeBridgedAccessory (C:\Users\micha\AppData\Roaming\npm\node_modules\homebridge\node_modules\hap-nodejs\src\lib\Accessory.ts:470:13)
    at Bridge.Accessory._this.removeBridgedAccessories (C:\Users\micha\AppData\Roaming\npm\node_modules\homebridge\node_modules\hap-nodejs\src\lib\Accessory.ts:482:12)
    at Server.handleUnregisterPlatformAccessories (C:\Users\micha\AppData\Roaming\npm\node_modules\homebridge\src\server.ts:547:17)
    at HomebridgeAPI.emit (events.js:210:5)
    at HomebridgeAPI.unregisterPlatformAccessories (C:\Users\micha\AppData\Roaming\npm\node_modules\homebridge\src\api.ts:331:10)
    at WyzeConnectedHome.configureAccessory (C:\Users\micha\AppData\Roaming\npm\node_modules\homebridge-wyze-connected-home\src\WyzeConnectedHome.js:150:16)
    at C:\Users\micha\AppData\Roaming\npm\node_modules\homebridge\src\server.ts:306:25
    at Array.filter (<anonymous>)
    at Server.restoreCachedPlatformAccessories (C:\Users\micha\AppData\Roaming\npm\node_modules\homebridge\src\server.ts:269:69)
    at Server.start (C:\Users\micha\AppData\Roaming\npm\node_modules\homebridge\src\server.ts:157:10)
    at cli (C:\Users\micha\AppData\Roaming\npm\node_modules\homebridge\src\cli.ts:80:10)
    at Object.<anonymous> (C:\Users\micha\AppData\Roaming\npm\node_modules\homebridge\bin\homebridge:17:22)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
[6/10/2020, 1:54:24 PM] [HB Supervisor] Homebridge Process Ended. Code: 1, Signal: null

Choose Which Device to hide

this is actually a request:
Would be nice if we can specify which device shows up on which home bridge incident. this plugin works gr8 but it shows all devices in the account whether it is in the same home or not.
it would help a lot if the plugin populates the devices and we could choose which device shows up in which home bridge incident.

Can't see cameras or sensors

Just installed this plugin and put in the credentials and restarted right after putting in the MDA token. I cannot get it to show up in Homekit and in home bridge logs I see no mention of Wyze. Anything I'm missing?

Error getting devices: Error: UserOpenTwoFactorAuth

Provided all necessary information in config.json but it's not working due to failing on two factor authentication.

here is the error message captured from the logs:

5/14/2020, 9:38:59 AM > [5/14/2020, 9:38:59 AM] [Wyze] Refreshing devices...
5/14/2020, 9:38:59 AM > [5/14/2020, 9:38:59 AM] [Wyze] Performing request: app/user/login
5/14/2020, 9:38:59 AM > [5/14/2020, 9:38:59 AM] [Wyze] API response: {"ts":<long-number-here>,"code":"<4-digits-here>","msg":"UserOpenTwoFactorAuth","data":{}}
5/14/2020, 9:38:59 AM > [5/14/2020, 9:38:59 AM] [Wyze] Error getting devices: Error: UserOpenTwoFactorAuth

Supports Core Starter Kit ?

Have gone thru the plugins description and would like to know if it supports the Wyze Sense Hub together with the keypad and sensors.

would appreciate the feedback.

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.