Skip to content

Commit

Permalink
0.5.30
Browse files Browse the repository at this point in the history
Update for Authentication and Leak Sensor
  • Loading branch information
jfarmer08 committed Jul 5, 2023
1 parent 8394fcd commit 0c1131f
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 8 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# homebridge-wyze-smart-home
## Releases

### v0.5.30
- HMS Code Clean up
- Update ReadME
- Update WyzeLeakSensor

### v0.5.29
- Support for API Key and Key ID
- Support for WYZECP1_JEF
- Support for WYZECP1_JEF

### v0.5.28
- Correction for No-Response

### v0.5.26
- Release of Beta

### v0.5.25-beta.5
- Support for Thermostat
- Support for Wall Switch
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Use the settings UI in Homebridge Config UI X to configure your Wyze account, or
"name": "Wyze",
"username": "YOUR_EMAIL",
"password": "YOUR_PASSWORD",
"keyId": "",
"apiKey": "",
"mfaCode": "YOUR_2FA_AUTHENTICATION_PIN",
"filterDeviceTypeList": ["OutdoorPlug","Plug"],
"filterByMacAddressList": ["MAC_ADDRESS_1","MAC_ADDRESS_2"]}
Expand All @@ -57,6 +59,13 @@ Supported devices will be discovered and added to Homebridge automatically.
* **`mfaCode`** – Only required for the initial login if you have two-factor authentication enabled for your account. This is typically a 6-digit code provided by your authenticator app.
* **`refreshInterval`** – Defines how often the status of the devices will be polled in milliseconds (e.g., `"refreshInterval": 5000` will check the status of your devices' status every 5 seconds). Defaults to 10 seconds.
* **`phoneId`** – The phone id used by the Wyze App. This value is just found by intercepting your phone's traffic. If no `phoneId` is specified, a default value will be used.
* **`API key`** – Navigate to [this portal](https://developer-api-console.wyze.com/), and click Login to sign in to your Wyze account.
Note: Ensure that the login info you are using matches the info you use when logging into the Wyze app.
Once you’ve signed in, you’ll be automatically redirected back to the developer page.
Click Create an API key for your API key to be created.
Once created, you can click view to see the entire key.
You should receive an email that a new API key has been generated.
Once you have the API key, you can use it in your script to get the access token and refresh token.

## Other Info

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-wyze-smart-home",
"version": "0.5.29",
"version": "0.5.30",
"description": "Wyze Smart Home plugin for Homebridge",
"license": "MIT",
"main": "src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/WyzeSmartHome.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ module.exports = class WyzeSmartHome {
case 'LeakSensor':
return WyzeLeakSensor
case 'Camera':
if (model === 'WYZEDB3') return
//if (model === 'WYZEDB3') return
return WyzeCamera
case 'Common':
if (model === 'JA_HP') return
Expand Down
20 changes: 20 additions & 0 deletions src/accessories/WyzeAccessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,26 @@ module.exports = class WyzeAccessory {
}
break
}
/*
Wyze Cam v1 [HD only] | WYZEC1 |
Wyze Cam V2 | WYZEC1-JZ |
Wyze Cam V3 | WYZE_CAKP2JFUS |
Wyze Cam V3 Pro [2K] | HL_CAM3P |
Wyze Cam Floodlight | WYZE_CAKP2JFUS |
Wyze Cam Pan | WYZECP1_JEF |
Wyze Cam Pan v2 | HL_PAN2 |
Wyze Cam Pan v3 | HL_PAN3 |
Wyze Cam Pan Pro [2K] | HL_PANP |
Wyze Cam Outdoor | WVOD1 |
Wyze Cam Outdoor v2 | HL_WCO2 |
Wyze Cam Doorbell | WYZEDB3 |
Wyze Battery Cam Pro | AN_RSCW |
Wyze Cam Doorbell Pro 2 | AN_RDB1 |
Wyze Cam Flood Light Pro [2K] | LD_CFP |
Wyze Cam Doorbell Pro | GW_BE1 |
Wyze Cam OG | GW_GC1 |
Wyze Cam OG Telephoto 3x | GW_GC2
*/
case "Camera":
if(productModel == "WYZEC1-JZ" || productModel == "WYZEDB3" || productModel == "WYZE_CAKP2JFUS" || productModel == "WYZECP1_JEF") {
this.homeKitAccessory.context = {
Expand Down
10 changes: 5 additions & 5 deletions src/wyz-api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ module.exports = class WyzeAPI {

// App emulation constants
this.authApiKey = options.authApiKey || 'WMXHYf79Nr5gIlt3r0r7p9Tcw5bvs6BB4U8O8nGJ'
this.phoneId = options.phoneId || 'bc151f39-787b-4871-be27-5a20fd0a1937'
this.phoneId = options.phoneId || 'wyze_developer_api'
this.appName = options.appName || 'com.hualai.WyzeCam'
this.appVer = options.appVer || 'com.hualai.WyzeCam___2.18.44'
this.appVersion = options.appVersion || '2.18.44'
this.appVer = options.appVer || 'wyze_developer_api'
this.appVersion = options.appVersion || 'wyze_developer_api'
this.appInfo = 'wyze_android_2.19.14' // Required for the thermostat
this.sc = '9f275790cab94a72bd206c8876429f3c'
this.sv = '9d74946e652647e9b6c9d59326aef104'
this.sc = 'wyze_developer_api'
this.sv = 'wyze_developer_api'
this.userAgent = options.userAgent || 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Safari/605.1.15'

// Login tokens
Expand Down

0 comments on commit 0c1131f

Please sign in to comment.