Jump to content

Network/server error logging into MyQ service


Xathros
Go to solution Solved by Goose66,

Recommended Posts

Posted

Hello,

 

I am having an issue with the MyQ Nodeserver this morning.  After upgrading PG3x to the latest version (3.2.9), the node server cannot log into the MyQ service.  I don't believe this is related to the PG3x update other than for the fact that the upgrade caused a restart and the node server needed to re authenticate with MyQ.  I'm guessing MyQ changed something on their end?  Here is an excerpt from my log:

Network/server error logging into MyQ service: 401 Client Error: Unauthorized for url: https://partner-identity.myq-cloud.com/connect/token

Any ideas?

 

Thanks in advance.

-Xathros

 

Posted (edited)

Everybody (including non Polyglot users) are dealing with this issue, but it usually only happens on reconnection (e.g., restart of the node server). Last three or four posts in this MyQ sub-forum all deal with this issue and it's evolution over the last month or so, so I won't repeat all that here. Suffice to say if you are running the latest version of MyQ (the one released to deal with this very issue), then shutdown the node server, wait 30 minutes or so, and start it back.

Edited by Goose66
Posted

I have had the same error after upgrading PG3x to 3.2.9 this morning.  I am running the latest version of the MyQ node server.  I stopped the nodeserver and waited 40 minutes and then started it.  Still getting the same error.  You said to shutdown the node server.  Is that the same as stopping it?

Posted
1 hour ago, Chris McKean said:

I have had the same error after upgrading PG3x to 3.2.9 this morning.  I am running the latest version of the MyQ node server.  I stopped the nodeserver and waited 40 minutes and then started it.  Still getting the same error.  You said to shutdown the node server.  Is that the same as stopping it?

@Goose66  same here. have been trying for almost 24 hours to get back in with 30 minute to several hours wait in between tries. Some of the errors fyi:

WARNING interface:_get_server_data: get_server_data: failed to read file server.json: [Errno 2] No such file or directory: 'server.json'

ARNING myqapi:_oAuthRequest: Network/server error logging into MyQ service: 401 Client Error: Unauthorized for url: https://partner-identity.myq-cloud.com/connect/token

myqapi:_oAuthRetrieveToken: Error in Step 4 of oAuth flow.

 

WARNING myqapi:_oAuthRequest: Network/server error logging into MyQ service: 429 Client Error: Too Many Requests for url: https://partner-identity.myq-cloud.com/connect/authorize?client_id=IOS_CGI_MYQ&code_challenge=atjbNDQAVDxGLhGc0dQ-FYmjUzN7ymMa2hDGTVlBdLQ&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fios&response_type=code&scope=MyQ_Residential+offline_access

Posted (edited)
22 hours ago, Goose66 said:

Everybody (including non Polyglot users) are dealing with this issue, but it usually only happens on reconnection (e.g., restart of the node server). Last three or four posts in this MyQ sub-forum all deal with this issue and it's evolution over the last month or so, so I won't repeat all that here. Suffice to say if you are running the latest version of MyQ (the one released to deal with this very issue), then shutdown the node server, wait 30 minutes or so, and start it back.

Like @Chris McKean@dbwarner5 and @glarsen above, a 30 minute shutdown did not solve the issue.  I left if shutdown overnight and still a problem on startup today.  For what its worth, the MyQ app on my iPhone is working just fine using the exact same credentials.

Any other ideas?

Thanks!

-Xathros

 

Edited by Xathros
  • Like 1
Posted
19 minutes ago, Xathros said:

Any other ideas?

Do you happen to have special characters in your password? If so, maybe remove those and try it. See this post from @Goose66

 

Posted

I am seeing this from users of the the arraylabs library as well (the library used by HomeAssistant integration). No solution yet from the developer of arraylabs. My node server in my production environment is running fine, but I haven't restarted it in the last several days (or weeks). I can bring production down tonight and then start it up in the development environment and play with the userAgent header and retry timing to see if I can get it working. 

  • Like 1
Posted

In regard to the question about whether I have special characters in the password, the MyQ app requires at least one symbol in the password.  What do you regard as a special character?  Are there symbols that you can use in the password that won't be a problem?

Posted
5 minutes ago, Chris McKean said:

In regard to the question about whether I have special characters in the password, the MyQ app requires at least one symbol in the password.  What do you regard as a special character?  Are there symbols that you can use in the password that won't be a problem?

The only special symbol I had was the @ sign.. I just removed it still no success.

Posted

Just so everyone knows, I believe this and most of the previous issues the past month or so have been done by Chamberlain to specifically thwart non-authorized access to their cloud service. Just so you all know what we're dealing with.

  • Like 1
Posted

I have both an ! and an @ in my PW but same without and they work in the MyQ app just fine.  I did see someone in the Home Assistant world claiming to have solved it by changing user agent  in the request to none. See below:

JGrantman commented last month
OK... this sure looks like an issue with Home Assistant. MyQ working via app without issue. Had been working in Home Assistant without issue for months or more... maybe 18 months? Update to Home Assistant 2023.9.1 and it broke. Same unauthorized error in logs.

Following steps fixed issue for several days (until update to Home Assistant 2023.9.2).

docker exec -it homeassistant bash
cd /usr/local/lib/python3.11/site-packages/pymyq/
cp request.py request_bup.py
vi request.py
i to enter insert mode
Modify line 34
Was self._useragent = None
Is self._useragent = str("none")
Esc key to exit insert mode
:w + enter to write the changes
:x + enter to exit VI
Restart Home Assistant
After update to Home Assistant 2023.9.2 after restart MyQ not working (again). Didn't even bother checking logs and just popped open ssh and executed the same steps (above) and restarted. MyQ now working as expected.

Line 34 in /usr/local/lib/python3.11/site-packages/pymyq/request.py appears to be the culprit. Did not check if it changed with Home Assistant 2023.9.1 or if something else changed resulting in line 34 becoming an issue? Does it matter?

There is enough discussion and detail confirming the change to line 34 fixes MyQ and persists (until Home Assistant update reverts the fix back to not working state).

What is the impact or risk to using the line 34 update going forward? Obviously someone closer to the code and with sufficient understanding of the entire code could weigh in on any non-obvious negative impact if line 34 in /usr/local/lib/python3.11/site-packages/pymyq/request.py is changed -- but it seems like low hanging fruit and easy fix to big impact issue. (Big impact if you use MyQ for garage door).

Dunno if this helps with the MyQ poly or not but figured I'd share what I found.

 

-Xathros

 

Posted

You’ll notice that was a month ago. That whole userAgent thing prompted the latest version of MyQ as discussed in the other posts for the past few weeks in this subforum. This 401 error is new - maybe less than3 or 4 days old. But as I said only seems to affect people who restart.

  • Like 1
Posted

Node server starts but won't connect to the MyQ Service and displays:

There was an error connecting to the MyQ service. Please check the log files and correct the issue before restarting the nodeserver.

To try to fix the error above I changed my password and removed special characters and waited 60 min. 

 

2023-10-12 15:20:02,940 Thread-11  udi_interface      DEBUG    nodes:start: In start() for MyQ Service node...
2023-10-12 15:20:02,940 Command    udi_interface.interface DEBUG    interface:_handleResult: add node response: {'id': '11a7c7c2-f463-4afb-bd8d-fd05f117393e', 'uuid': '00:21:b9:02:5f:c4', 'profileNum': 8, 'address': 'service', 'name': 'MyQ Service', 'nodeDefId': 'SERVICE', 'nls': None, 'hint': '0x00000000', 'controller': 1, 'primaryNode': 'service', 'private': None, 'isPrimary': 1, 'enabled': 1, 'timeAdded': 1672797294115, 'timeModified': 1697138402526, 'dbVersion': 1}
2023-10-12 15:20:02,940 Thread-11  udi_interface      INFO     nodes:start: Establishing initial MyQ connection...
2023-10-12 15:20:02,941 Thread-11  udi_interface      DEBUG    myqapi:loginToService: in API loginToService()...
2023-10-12 15:20:02,941 Thread-11  udi_interface      INFO     myqapi:_oAuthRetrieveToken: Logging in and retrieving access token via oAuth...
2023-10-12 15:20:02,991 MQTT       udi_interface.interface DEBUG    interface:_message: QUEUING incoming message addnode
2023-10-12 15:20:02,991 Command    udi_interface.interface DEBUG    interface:_parseInput: DEQUEING addnode
2023-10-12 15:20:02,992 Command    udi_interface.interface DEBUG    interface:_handleResult: add node response: {'id': 'c43cc620-7f8a-4d8a-baf2-a38d01051edb', 'uuid': '00:21:b9:02:5f:c4', 'profileNum': 8, 'address': 'gw270009f38a', 'name': 'Garage Door', 'nodeDefId': 'GATEWAY', 'nls': None, 'hint': '0x0101000', 'controller': 0, 'primaryNode': 'gw270009f38a', 'private': None, 'isPrimary': 1, 'enabled': 1, 'timeAdded': 1672797984735, 'timeModified': 1672797984735, 'dbVersion': 1}
2023-10-12 15:20:03,040 MQTT       udi_interface.interface DEBUG    interface:_message: QUEUING incoming message addnode
2023-10-12 15:20:03,041 Command    udi_interface.interface DEBUG    interface:_parseInput: DEQUEING addnode
2023-10-12 15:20:03,041 Command    udi_interface.interface DEBUG    interface:_handleResult: add node response: {'id': '248ff01c-a060-4750-96a4-4fb3f5a31a81', 'uuid': '00:21:b9:02:5f:c4', 'profileNum': 8, 'address': 'cg08200e7aba', 'name': 'Garage Door', 'nodeDefId': 'GARAGE_DOOR_OPENER', 'nls': None, 'hint': '0x01120100', 'controller': 0, 'primaryNode': 'gw270009f38a', 'private': None, 'isPrimary': 0, 'enabled': 1, 'timeAdded': 1672797984935, 'timeModified': 1672797984935, 'dbVersion': 1}
2023-10-12 15:20:03,090 MQTT       udi_interface.interface DEBUG    interface:_message: QUEUING incoming message addnode
2023-10-12 15:20:03,091 Command    udi_interface.interface DEBUG    interface:_parseInput: DEQUEING addnode
2023-10-12 15:20:03,091 Command    udi_interface.interface DEBUG    interface:_handleResult: add node response: {'id': 'cea8c107-4340-46ca-a5ae-acbc93ef9da0', 'uuid': '00:21:b9:02:5f:c4', 'profileNum': 8, 'address': 'tc00019507633', 'name': 'Garage-camera', 'nodeDefId': 'MYQ_DEVICE', 'nls': None, 'hint': '0x00000000', 'controller': 0, 'primaryNode': 'service', 'private': None, 'isPrimary': 0, 'enabled': 1, 'timeAdded': 1672797984835, 'timeModified': 1672797984835, 'dbVersion': 1}
2023-10-12 15:20:03,954 Thread-11  udi_interface      WARNING  myqapi:_oAuthRequest: Network/server error logging into MyQ service: 429 Client Error: Too Many Requests for url: https://partner-identity.myq-cloud.com/connect/authorize?client_id=#########
2023-10-12 15:20:03,954 Thread-11  udi_interface      DEBUG    myqapi:_oAuthRetrieveToken: Error in Step 1 of oAuth flow.
2023-10-12 15:20:03,954 Thread-11  udi_interface.custom DEBUG    custom:__setitem__: CUSTOM: login_error = There was an error connecting to the MyQ service. Please check the log files and correct the issue before restarting the nodeserver. ...saving
2023-10-12 15:20:03,954 Thread-11  udi_interface.custom INFO     custom:_save: Sending data notices to Polyglot.
2023-10-12 15:20:03,954 Thread-11  udi_interface.interface DEBUG    interface:send: PUBLISHING {'set': [{'key': 'notices', 'value': {'login_error': 'There was an error connecting to the MyQ service. Please check the log files and correct the issue before restarting the nodeserver.'}}]}
2023-10-12 15:20:03,956 Thread-11  udi_interface.node DEBUG    node:setDriver: service:MyQ Service Reporting set ST to 0 to Polyglot
2023-10-12 15:20:03,956 Thread-11  udi_interface.node DEBUG    node:reportDriver: Updating value to 0
2023-10-12 15:20:03,956 Thread-11  udi_interface.interface DEBUG    interface:send: PUBLISHING {'set': [{'address': 'service', 'driver': 'ST', 'value': '0', 'uom': 2, 'text': None}]}
2023-10-12 15:20:03,970 MQTT       udi_interface.interface DEBUG    interface:_message: QUEUING incoming message notices
2023-10-12 15:20:03,970 Command    udi_interface.interface DEBUG    interface:_parseInput: DEQUEING notices
2023-10-12 15:20:03,970 MQTT       udi_interface.interface INFO     interface:_message: Successfully set key = notices
2023-10-12 15:20:03,971 Command    udi_interface.custom DEBUG    custom:load: CUSTOM: load {'login_error': 'There was an error connecting to the MyQ service. Please check the log files and correct the issue before restarting the nodeserver.'}
2023-10-12 15:20:03,971 Command    udi_interface.custom DEBUG    custom:load: CUSTOM:  -- checking login_error / There was an error connecting to the MyQ service. Please check the log files and correct the issue before restarting the nodeserver.
2023-10-12 15:20:04,012 MQTT       udi_interface.interface INFO     interface:_message: Successfully set service :: ST to 0 UOM 2
2023-10-12 15:20:18,574 MQTT       udi_interface.interface DEBUG    interface:_message: QUEUING incoming message shortPoll
2023-10-12 15:20:18,574 Command    udi_interface.interface DEBUG    interface:_parseInput: DEQUEING shortPoll
2023-10-12 15:20:18,575 Thread-18  udi_interface      DEBUG    myqns:shortPoll: In shortPoll()...
 

Posted

I am having the same issue and also removed special characters from my password.  Login credentials are working fine in the MyQ app so I know they are valid.

 

PG3x MyQ Screenshot.png

Posted
Just now, hawk4974 said:

I am having the same issue and also removed special characters from my password.  Login credentials are working fine in the MyQ app so I know they are valid.

 

PG3x MyQ Screenshot.png

Same exact

Posted

Homebridge also went down. Then get 429 errors for too many logins (not sure how long that takes to reset).  Moved my devices to use my backup wan connection and it started working (homebridge).  still can't get pg3 nodeserver to login

 

Posted

This is not specific to the MyQ Nodeserver. Home Assistant has the same issue and apparently same with Homebridge. It appears that MyQ deliberately blocks 3rd party applications to connect.  My assumption is that MyQ wants to develop/promote their own paid  ecosystem.

  • Like 1
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.1k
    • Total Posts
      371.5k
×
×
  • Create New...