hjdhjd / homebridge-myq

:car: myQ Liftmaster and Chamberlain Plugin for Homebridge https://github.com/nfarina/homebridge
Other
568 stars 43 forks source link

Error: 400 Bad Request #489

Closed jlg89 closed 2 years ago

jlg89 commented 2 years ago

Describe The Problem: HOOBS tries and fails, every minute, to connect to the myQ server, but receives a "400 Bad Request" error every time.

To Reproduce: Use my setup. It's been doing this for at least a week or so.

Logs:

8/26/2021, 3:37:55 PMHOOBSmyQERRORmyQ API: https://partner-identity.myq-cloud.com/connect/authorize?client_id=IOS_CGI_MYQ&code_challenge=<challenge_string_here>&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fios&response_type=code&scope=MyQ_Residential+offline_access Error: 400 Bad Request
8/26/2021, 3:37:55 PMHOOBSmyQERRORmyQ API: Unable to access the OAuth authorization endpoint. Will retry later.
(repeats every minute)

Homebridge Configuration:

{
    "accessories": [],
    "platforms": [
        {
            "platform": "Camera-ffmpeg",
            "name": "Camera FFmpeg",
            "cameras": [
                {
                    "name": "GarageCam",
                    "manufacturer": "Wyze",
                    "model": "Wyzecam Pan",
                    "motion": true,
                    "motionTimeout": 0,
                    "videoConfig": {
                        "source": "-i rtsp://192.168.77.5:8554/unicast",
                        "stillImageSource": "-i rtsp://192.168.77.5:8554/unicast -vframes 1 -r 1",
                        "vcodec": "copy",
                        "audio": true,
                        "debug": false
                    },
                    "mqtt": {
                        "motionTopic": "yonder-alerts/garagecam/motion",
                        "motionMessage": "ON",
                        "motionResetTopic": "yonder-alerts/garagecam/motion",
                        "motionResetMessage": "OFF"
                    }
                },
                {
                    "name": "DoorbellCam",
                    "manufacturer": "August Home",
                    "model": "Doorbell Cam Pro",
                    "serialNumber": "D2GWS0013U",
                    "motion": true,
                    "motionTimeout": 15,
                    "videoConfig": {
                        "source": "-f video4linux2 -i /dev/video0",
                        "stillImageSource": "-i http://127.0.0.1:8081",
                        "maxStreams": 2,
                        "maxWidth": 480,
                        "maxHeight": 640,
                        "maxFPS": 10,
                        "audio": false,
                        "debug": false
                    },
                    "mqtt": {
                        "motionTopic": "yonder-alerts/doorbellcam/motion",
                        "motionMessage": "ON",
                        "motionResetTopic": "yonder-alerts/doorbellcam/motion",
                        "motionResetMessage": "OFF"
                    }
                },
                {
                    "name": "StudyCam",
                    "manufacturer": "Wyze",
                    "model": "Wyzecam Pan",
                    "motion": true,
                    "motionTimeout": 0,
                    "videoConfig": {
                        "source": "-i rtsp://192.168.77.12:8554/unicast",
                        "stillImageSource": "-i rtsp://192.168.77.12:8554/unicast -vframes 1 -r 1",
                        "vcodec": "copy",
                        "audio": true,
                        "debug": false
                    },
                    "mqtt": {
                        "motionTopic": "yonder-alerts/studycam/motion",
                        "motionMessage": "ON",
                        "motionResetTopic": "yonder-alerts/studycam/motion",
                        "motionResetMessage": "OFF"
                    }
                }
            ],
            "mqtt": "127.0.0.1",
            "portmqtt": 1883,
            "usermqtt": "mqtt-user",
            "passmqtt": "mqtt-password",
            "topic": "yonder-alerts",
            "porthttp": 8089,
            "interfaceName": "eth0",
            "tlsmqtt": false,
            "localhttp": false
        },
        {
            "platform": "dafangMqtt",
            "name": "Dafang MQTT",
            "server": "127.0.0.1",
            "port": 1883,
            "homebridge_topic": "yonder-alerts",
            "cameras": [
                {
                    "name": "GarageCam",
                    "dafang_topic": "yonder-alerts/garagecam",
                    "cooldown": 15,
                    "accessories": {
                        "recording": true,
                        "snapshot": true,
                        "reboot": true,
                        "motorsVertical": true,
                        "motorsHorizontal": true,
                        "motorsCalibrate": true
                    }
                },
                {
                    "name": "DoorbellCam",
                    "dafang_topic": "yonder-alerts/doorbellcam",
                    "cooldown": 15
                },
                {
                    "name": "StudyCam",
                    "dafang_topic": "yonder-alerts/studycam",
                    "cooldown": 15,
                    "debug": true,
                    "accessories": {
                        "recording": true,
                        "snapshot": true,
                        "reboot": true,
                        "motorsVertical": true,
                        "motorsHorizontal": true,
                        "motorsCalibrate": true
                    }
                }
            ]
        },
        {
            "platform": "HarmonyHubWebSocket",
            "name": "Harmony Hub",
            "hubIP": "192.168.77.9",
            "hubName": "Harmony Hub",
            "publishAllTVAsExternalAccessory": true,
            "TVAccessory": false,
            "mainActivity": "Watch Apple TV",
            "switchAccessories": true,
            "publishGeneralMuteSwitch": true,
            "publishGeneralVolumeSlider": true,
            "linkVolumeControlToTV": true,
            "publishSwitchActivitiesAsIndividualAccessories": true,
            "publishDevicesAsIndividualAccessories": true,
            "publishSequencesAsIndividualAccessories": true,
            "publishHomeControlsAsIndividualAccessories": true,
            "showCommandsAtStartup": false,
            "addAllActivitiesToSkippedIfSameStateActivitiesList": false,
            "playPauseBehavior": false,
            "cleanCache": false,
            "configureAccesscontrol": false
        },
        {
            "platform": "NeatoVacuumRobot",
            "email": "my_email",
            "password": "my_password",
            "hidden": [
                "spot"
            ]
        },
        {
            "platform": "TplinkSmarthome",
            "name": "TplinkSmarthome",
            "addCustomCharacteristics": false,
            "deviceTypes": [
                "plug",
                "bulb"
            ]
        },
        {
            "platform": "myQ",
            "email": "my_email",
            "password": "my_password"
        }
    ]
}

Screenshots:

Environment:

hjdhjd commented 2 years ago

Intermittent myQ server API issues happen. Not much to do here I'm afraid unless there's been a core API change...and there hasn't been. Good luck!

hjdhjd commented 2 years ago

@jlg89 One more thing you might want to try is to reset your account or account credentials, given the length / duration of your issues. You could well have gotten your account locked. It's definitely a risk if myQ thinks you're overusing / abusing the API and querying it too frequently.

jlg89 commented 2 years ago
8/27/2021, 12:14:13 PMHOOBSmyQERRORmyQ API: https://partner-identity.myq-cloud.com/connect/authorize?client_id=IOS_CGI_MYQ&code_challenge=4MSnCQzYkfh8Po7HVUL9BPZ5ahbA0qH3rNF9qTJVoOI&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fios&response_type=code&scope=MyQ_Residential+offline_access Error: 400 Bad Request
8/27/2021, 12:14:13 PMHOOBSmyQERRORmyQ API: Unable to access the OAuth authorization endpoint. Will retry later.

8/27/2021, 12:16:10 PMHOOBSmyQDebug logging on. Expect a lot of data.

8/27/2021, 12:16:12 PMHOOBSmyQERRORmyQ API: https://partner-identity.myq-cloud.com/connect/authorize?client_id=IOS_CGI_MYQ&code_challenge=Qv4wFxkern-z5AJaQdvfpvXQW6BTTk7-B--85_1TUvA&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fios&response_type=code&scope=MyQ_Residential+offline_access Error: 400 Bad Request
8/27/2021, 12:16:12 PMHOOBSmyQERRORmyQ API: Unable to access the OAuth authorization endpoint. Will retry later.

8/27/2021, 12:18:12 PMHOOBSmyQERRORmyQ API: https://partner-identity.myq-cloud.com/connect/authorize?client_id=IOS_CGI_MYQ&code_challenge=zGRq2JhCzlAmVYB9cg8vEebZx1Awf0d7wJB3rCdPCA0&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fios&response_type=code&scope=MyQ_Residential+offline_access Error: 400 Bad Request
8/27/2021, 12:18:12 PMHOOBSmyQERRORmyQ API: Unable to access the OAuth authorization endpoint. Will retry later.

New config:

{
            "platform": "myQ",
            "email": "jlg@mac.com",
            "password": "new_password_that_works_in_the_mobile_app",
            "refreshInterval": 30,
            "activeRefreshInterval": 5,
            "debug": true
}        
jlg89 commented 2 years ago

Here's the deal. At some point, my home router's public IP was (and still is) blocked by something in the myQ system. I can control my garage door with the myQ app as long as my iPhone isn't on my home network (or is on my home network using a VPN), so the opener itself is able to phone home from my home network, but I can't hit any Chamberlain or myQ websites from home. I can traceroute from my home, and the packets get all the way to the myQ server farm, where they are dropped or blocked. So it's clearly a blacklist, at least for web traffic, which unfortunately includes the homebridge-myq API.

Here's the real kicker: Chamberlain tech support has NO IDEA what's going on. I spent an hour on the phone with them, explained the whole situation, at length, even provided the traceroutes with commentary, proving that the issue is at the myQ server farm end of things. Not in my network, not in my ISP's network, but in myQ's network. Their response: "We determined that there's no sign of a myQ server issue as you are able to log into the account through mobile data and VPN. We'll send an inquiry to Field Services to double-check. We advise you to contact your ISP to check the IP address out because it seems your home network's IP address is blacklisted."

I know I'm not the only one who has had this happen: https://www.reddit.com/r/eero/comments/ll7zt8/chamberlain_myq_app_wont_connect_only_when_using/

I say all this because the only thing I've done to get blacklisted by myQ is run the homebridge-myq plugin with all the defaults, and other recent issue reports in this forum seem to suggest that perhaps the "hidden blacklist" feature is starting to bite even more people. So there is definitely a risk of this happening, and it's virtually impossible to fix because Chamberlain refuses to even acknowledge what their system is clearly doing. The only way around it, that I can see, is to have my ISP push an address change to my router. Thankfully it's a DHCP system, but static IPs are fairly common, and if that were my situation I'd simply be SOL.

I plan to continue following up with Chamberlain tech support to try to get a definitive answer from them. I really want them to complain about my use of the API so I can give them a piece of my mind about the privacy and security implications of making their tech completely dependent upon a working internet connection, even from the local network. In fact, if Chamberlain is implementing a stricter blacklist function that's going to break things like homebridge-myq, it may take a bunch of phone calls and emails from a bunch of irritated customers to make them change their minds. So feel free to start making those calls & emails...

jlg89 commented 2 years ago

May be same issue as #490 #470 #469 #468

github-actions[bot] commented 1 year ago

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.