jfarmer08 / homebridge-wyze-smart-home

Wyze Smart Home plugin for Homebridge.
MIT License
103 stars 17 forks source link

Request failed: Error: Request failed with status code 400 #103

Closed WelshMcSpicy closed 1 year ago

WelshMcSpicy commented 1 year ago

Describe The Bug: REquest failed with status code 400

To Reproduce: Error repeats every 6s or so. Added current OTP to config before rebooting.

Expected behavior: No failed attempts.

Logs:

Request failed: Error: Request failed with status code 400
[6/8/2023, 3:25:19 PM] [Wyze] Response (Bad Request): {"description":"Too many failed attempts. Please try again later.","requestId":"35bb4e58-ab10-4589-9717-bbbd8354a5de","errorCode":1000}

Plugin Config:

json
{
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "auth": "form",
            "theme": "dark-mode",
            "tempUnits": "c",
            "lang": "auto",
            "platform": "config"
        },
        {
            "refreshToken": "eyJhbGciOiJSUzI1NiIsImprdSI6Ii9vYXV0aC9pbnRlcm5hbC9qd2tzIiwia2lkIjoiNGRjODQyZGIiLCJ0eXAiOiJKV1QifQ.eyJpYXQiOjE2ODYyNjMwNjQsImlzcyI6IlJpbmdPYXV0aFNlcnZpY2UtcHJvZDp1cy1lYXN0LTE6Nzg5ZGExMzQiLCJyZWZyZXNoX2NpZCI6InJpbmdfb2ZmaWNpYWxfYW5kcm9pZCIsInJlZnJlc2hfc2NvcGVzIjpbImNsaWVudCJdLCJyZWZyZXNoX3VzZXJfaWQiOjcyNTUxMDk0LCJybmQiOiJ4U0d4cG9OUEpOIiwic2Vzc2lvbl9pZCI6IjM1YzE1Y2I3LTAwNzgtNDliYi1iNDcwLTNiOWE2NDk4MWNmNCIsInR5cGUiOiJyZWZyZXNoLXRva2VuIn0.ilI2rrZFVuWOmJOZuRv1tp8XX20z4wg07ufhr4wOPSnbpTWaABu4FPHB1Pz-1CZunbfKlG1F381jjSmc2PQSf7UKjQHMP_dzkFCCu9eGjwYmL-ZcIcS7QBoG0D_E11OnArTiCWuFUphMvnKnlmpA-ubxN7grUdUxAa2iuoJUF_tMRRDKEwhjMelUgtl5lbase__ZZEDxupavyCPNwGQOjC9T2RRokAgDUaEayENwtOv4eiDlGbrI_nzEvkYvWw-OOK--KIU1WJbtYIt1jdfsXN0lHR48uJ4IFlaY-X4hBWXSTdsfwPemHM3wp_yjnnqllnWNJC02zOMVST1YYy7cjA",
            "alarmOnEntryDelay": true,
            "platform": "Ring"
        },
        {
            "_bridge": {
                "username": "XX",
                "port": 32735
            },
            "password": "XX",
            "platform": "myQ",
            "email": "XX"
        },
        {
            "platform": "Wemo",
            "name": "Wemo",
            "mode": "auto"
        },
        {
            "name": "Wyze",
            "username": "XX",
            "password": "XX",
            "refreshInterval": 120000,
            "entryExitDelay": 30,
            "mfaCode": "825365",
            "showAdvancedOptions": true,
            "excludeMacAddress": false,
            "excludedeviceType": false,
            "_bridge": {
                "username": "XX",
                "port": 44118
            },
            "platform": "WyzeSmartHome"
        },
        {
            "credentials": {
                "notice": "Keep your Token & Secret a secret!",
                "token": "XX",
                "secret": "XX"
            },
            "name": "SwitchBot",
            "platform": "SwitchBot"
        },
        {
            "devices": [
                {
                    "name": "XBOX SERIES X",
                    "host": "192.168.1.47",
                    "xboxLiveId": "XX",
                    "webApiControl": true,
                    "getInputsFromDevice": true,
                    "filterGames": false,
                    "filterApps": false,
                    "filterSystemApps": false,
                    "filterDlc": false,
                    "sensorPower": false,
                    "sensorInput": false,
                    "sensorScreenSaver": false,
                    "xboxWebApiToken": "XX",
                    "enableDebugMode": false,
                    "disableLogInfo": false,
                    "disableLogDeviceInfo": false,
                    "enableMqtt": false,
                    "mqttDebug": false,
                    "mqttAuth": false
                }
            ],
            "_bridge": {
                "username": "XX",
                "port": 32903
            },
            "platform": "XboxTv"
        }
    ],
    "disabledPlugins": [],
    "bridge": {
        "port": 51319,
        "advertiser": "ciao",
        "name": "Homebridge C917",
        "username": "0E:E3:58:A8:C9:17",
        "pin": "711-90-466",
        "bind": [
            "en0"
        ]
    }
}

Screenshots:

Environment:

jfarmer08 commented 1 year ago

To correct this you will need to stop the addon for 24hours and then try again.

WelshMcSpicy commented 1 year ago

To correct this you will need to stop the addon for 24hours and then try again.

Thanks. I disabled the plugin yesterday morning and just enabled it (> 24 hrs later). It's still throwing the error, unfortunately. I'll disable it again and leave it for a longer period.

jfarmer08 commented 1 year ago

If your using 2fa try turning that off and check your password.

On Fri, Jun 30, 2023 at 2:04 PM WelshMcSpicy @.***> wrote:

To correct this you will need to stop the addon for 24hours and then try again.

Thanks. I disabled the plugin yesterday morning and just enabled it (> 24 hrs later). It's still throwing the error, unfortunately. I'll disable it again and leave it for a longer period.

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

-- Thanks Allen :)

WelshMcSpicy commented 1 year ago

If your using 2fa try turning that off and check your password. -- Thanks Allen :)

Allen - that worked. Odd thing - it was working before with 2FA enabled. Earlier today, I entered the current/valid OTP into the Wyze plugin settings (30s refresh was enough to get the plugin restarted) but it didn't help.

Now that it's working, am I ok to re-enable 2FA on my Wyze account or will that break it?

Thanks Tony.

jfarmer08 commented 1 year ago

2fa should work with this plugin. You will have to restart homebridge after adding your code back.

On Fri, Jun 30, 2023 at 2:45 PM WelshMcSpicy @.***> wrote:

If your using 2fa try turning that off and check your password. -- Thanks Allen :)

Allen - that worked. Odd thing - it was working before with 2FA enabled. Earlier today, I entered the current/valid OTP into the Wyze plugin settings (30s refresh was enough to get the plugin restarted) but it didn't help.

Now that it's working, am I ok to re-enable 2FA on my Wyze account or will that break it?

Thanks Tony.

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

-- Thanks Allen :)