Closed aerie91 closed 1 year ago
Here are the last 10 records in the event log from SmartThings. You can see how often it's happening.
What do your Docker bridge server logs show? Does it show Version 1.0.4 on startup?
Hi Brian,
Thanks, I never used Docker before this and didn't know it keeps logs. But this morning I am seeing a different error, it shows the login failed, while yesterday it was saying it's offline. Checking the docker logs today as you suggested, I found the following messages repeating every couple of minutes, which seems to reinforce the authentication problem:
myQ API: https://partner-identity.myq-cloud.com/connect/authorize?client_id=IOS_CGI_MYQ&code_challenge=nMJga0srj5qWqQjCVIQ27ESKjgr7ZSUyVx9M2fm1hT0&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fios&response_type=code&scope=MyQ_Residential+offline_access Error: 403 Forbidden myQ API: Unable to access the OAuth authorization endpoint. 9/12/2023, 3:38:34 PM | Refresh failed 9/12/2023, 3:39:15 PM | Refresh failed 9/12/2023, 3:39:58 PM | Refresh failed myQ API: https://partner-identity.myq-cloud.com/connect/authorize?client_id=IOS_CGI_MYQ&code_challenge=MEs6rBw2tx1cHzelkRNA1MznyOU5l4EMUq8xlbOBGns&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fios&response_type=code&scope=MyQ_Residential+offline_access Error: 403 Forbidden myQ API: Unable to access the OAuth authorization endpoint. 9/12/2023, 3:40:40 PM | Refresh failed 9/12/2023, 3:41:22 PM | Refresh failed 9/12/2023, 3:42:04 PM | Refresh failed myQ API: Successfully connected to the myQ API. myQ API: https://devices.myq-cloud.com/api/v5.2/Accounts/a5b1c15f-969b-48f3-966a-e49a3537264b/Devices Error: 403 Forbidden myQ API: Unable to update device status from the myQ API. Acquiring a new access token. 9/12/2023, 3:43:07 PM | Refresh failed 9/12/2023, 3:43:49 PM | Refresh failed
I actually had a similar issue shortly after upgrading to the Edge version where it started showing bad password even though the password hadn't changed. Back then I reset my password with MyQ and updated the bridge to use the new password, and then it worked fine. I thought it was a fluke so I didn't think too much about it, but now a similar issue is happening. The MyQ app on my phone is still working fine using the same password, and I even logged out and back in, it works.
Regarding the version, I restarted the container to see what it shows in the log at startup. It shows some startup messages but not the version. Where do I find that?
9/12/2023, 3:46:40 PM | HTTP server listening on port 8090 9/12/2023, 3:46:40 PM | SSDP server up and listening for broadcasts: urn:SmartThingsCommunity:device:MyQController 9/12/2023, 3:47:19 PM | Got new username/password from hub. Initializing connection. myQ API: https://partner-identity.myq-cloud.com/connect/authorize?client_id=IOS_CGI_MYQ&code_challenge=sO7aubxPefRS-ACtRA0JMpZ55dfqyp8NREjaKIRQtLY&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fios&response_type=code&scope=MyQ_Residential+offline_access Error: 403 Forbidden myQ API: Unable to access the OAuth authorization endpoint. 9/12/2023, 3:47:19 PM | Refresh failed
I tried resetting the MyQ password and updated the controller with the new one. It is still showing login failed. Here is the log since then:
9/12/2023, 7:23:05 PM | Got new username/password from hub. Initializing connection. myQ API: Successfully connected to the myQ API. myQ API: Discovered device family gateway: Home [Chamberlain WiFi Hub] (serial number: GW030004C5A8). myQ API: Discovered device family garagedoor: Large Garage Door (serial number: CG0843098B50, gateway: GW030004C5A8). myQ API: Discovered device family garagedoor: Small Garage Door (serial number: CG0843098B51, gateway: GW030004C5A8). myQ API: https://accounts.myq-cloud.com/api/v6.0/accounts Error: 403 Forbidden myQ API: Unable to retrieve account information. 9/12/2023, 7:23:40 PM | Refresh failed 9/12/2023, 7:24:22 PM | Refresh failed 9/12/2023, 7:24:57 PM | Refresh failed myQ API: https://partner-identity.myq-cloud.com/connect/authorize?client_id=IOS_CGI_MYQ&code_challenge=1RY9GG5kJjL8r1H7UKRh4F2yfUxCA4sihMiPRAaFuLw&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fios&response_type=code&scope=MyQ_Residential+offline_access Error: 403 Forbidden myQ API: Unable to access the OAuth authorization endpoint. 9/12/2023, 7:25:39 PM | Refresh failed
If you're running the latest docker image, the first message you will see in the logs is
SmartThings MyQ Bridge server: Version: 1.0.4
From your screenshots, I am not seeing that, which means you need to kill your existing Docker container and pull down and start a new instance. Something like this:
docker stop smartthings-myq-edge (or whatever you have it named)
docker rm smartthings-myq-edge (or whatever you have it named)
docker pull brbeaird/smartthings-myq-edge
docker run -d --name='smartthings-myq-edge' -e 'MYQ_SERVER_PORT'='8090' -p '8090:8090/tcp' -p '1900:1900/udp' 'brbeaird/smartthings-myq-edge:latest
Thank you! After doing that, it now shows 1.0.4 and the controller is online! I'll monitor but hopefully it means it's fixed, and the cause was that I missed an update :disappointed: Sorry for wasting your time, but thanks a lot for your help!
Hi Brian, sorry to say I think it's not fully solved. After running mostly fine for a few days, overnight last night a similar issue started happening. I'm seeing this in the logs every few minutes.
9/16/2023, 2:30:50 PM | Initializing connection to MyQ-east. myQ API error: API call returned error: 429. 9/16/2023, 2:30:50 PM | MyQ login failed
It alternates with MyQ-west, but both fail. I restarted the docker container but same error on startup. I googled error 429 but didn't find anything specific on what it means. Any ideas?
Mine is down, too. This is something new. 429 is a throttling error. Will need to see what hjd thinks if his implementation is seeing it.
On Sat, Sep 16, 2023 at 9:35 AM aerie91 @.***> wrote:
Reopened #37 https://github.com/brbeaird/SmartThings-MyQ-Edge/issues/37.
— Reply to this email directly, view it on GitHub https://github.com/brbeaird/SmartThings-MyQ-Edge/issues/37#event-10389803054, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXHM2FTWSRND2N7NXEZO2DX2W2MNANCNFSM6AAAAAA4T74WSE . You are receiving this because you commented.Message ID: @.*** com>
I am back up now. I stopped my bridge server for about 10 minutes and then started it back. I also changed the refresh interval up to 60 seconds. This is a setting in the SmartThings app on the MyQ-Controller device.
On Sat, Sep 16, 2023 at 9:40 AM Brian Beaird @.***> wrote:
Mine is down, too. This is something new. 429 is a throttling error. Will need to see what hjd thinks if his implementation is seeing it.
On Sat, Sep 16, 2023 at 9:35 AM aerie91 @.***> wrote:
Reopened #37 https://github.com/brbeaird/SmartThings-MyQ-Edge/issues/37 .
— Reply to this email directly, view it on GitHub https://github.com/brbeaird/SmartThings-MyQ-Edge/issues/37#event-10389803054, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXHM2FTWSRND2N7NXEZO2DX2W2MNANCNFSM6AAAAAA4T74WSE . You are receiving this because you commented.Message ID: @.*** com>
Thanks. It solved itself on its own in my case, I left for the day and when I came back it was working fine.
Hello! First, thanks for your work developing this awesome tool. It's made my home automations much better!
I've upgraded to the new Edge driver. For some time it seemed to be working fine. In the last few days though, I noticed that sometimes it works fine and other times the status of a garage door doesn't change. I looked in SmartThings, and found that the status of the MyQ Controller (and the doors) is Offline pretty frequently. Sometimes it will be online, but a few minutes later offline again. I am running the bridge on an Ubuntu 22.04 machine that I use as a Plex server as well. It is on the same network and subnet as the SmartThings hub. I tried restarting the Docker container, rebooting the server, power-cycling the SmartThings hub but the issue persists. I found your comment on another thread about making a request to the bridge by entering the IP and port into a browser: http://192.168.1.18:8090/status . This returns a good result consistently, as tested from various devices on different ports and switches on the LAN.
So my question is, what would cause the SmartThings hub to indicate the MyQ devices are offline even though the server is accessible? Are there any logs or further troubleshooting you can recommend? I'm pasting below the response from the server when I hit the URL above. It shows Online = True.