home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.15k stars 29.18k forks source link

MyQ integration not working after upgrade to 2023.10.2, Error: : 403 - Forbidden #101912

Closed NukeThemTillTheyGlow closed 8 months ago

NukeThemTillTheyGlow commented 9 months ago

The problem

This issue existed prior to the update to 10.2, but 10.2 was supposed to fix the problem and appears to have done so for others. I did not apply any of the patches mentioned in the pre-update thread.

What version of Home Assistant Core has the issue?

core-2023.10.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

MyQ

Link to integration documentation on our website

https://www.home-assistant.io/integrations/myq/

Diagnostics information

home-assistant_myq_2023-10-12T19-36-26.955Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 9 months ago

Hey there @ehendrix23, @lash-l, mind taking a look at this issue as it has been labeled with an integration (myq) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `myq` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign myq` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


myq documentation myq source (message by IssueLinks)

drothenberger commented 9 months ago

I saw a few 429 errors in your log. I would try disabling the integration for 2 hours, then enabling it again to see if that gets past the 429 errors.

RyanAtTanagra commented 9 months ago

I was following the previous bug's thread, but never applied any of the patches. MyQ intergration was working until a week or so ago. 10.2 hasn't solved the issue, but also I'm getting 403, not 401 or 429, and was before 10.2 as well. MyQ app works from the same network.

Authentication failed: Error requesting data from https://partner-identity.myq-cloud.com/Account/LoginWithEmail?returnUrl=/connect/authorize/callback?client_id%3DIOS_CGI_MYQ%26code_challenge%3Didontknowifthisissecret%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fios%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access: 403 - Forbidden

I notice it still says IOS_CGI_MYQ. I caught some conversation in the other thread about switching to the android endpoint.

I deleted and re-added the integration, no luck.

ratsputin commented 9 months ago

Also having a similar issue with re-adding the integration even after upgrading to 10.2. Apparently, removing the integration was a mistake. There were a couple of 302 redirects prior to this but there was a ton of data involved.

Oct 12 18:14:23 ha hass[63106]: 2023-10-12 18:14:23.499 DEBUG (MainThread) [pymyq.request]     Body:
Oct 12 18:14:23 ha hass[63106]: 2023-10-12 18:14:23.499 DEBUG (MainThread) [pymyq.api] Getting token
Oct 12 18:14:23 ha hass[63106]: 2023-10-12 18:14:23.500 DEBUG (MainThread) [pymyq.request] Sending myq api request https://partner-identity.myq-cloud.com/connect/token and headers {'Content-Type': 'application/x-www-form-urlencoded'} with connection pooling
Oct 12 18:14:23 ha hass[63106]: 2023-10-12 18:14:23.575 DEBUG (MainThread) [pymyq.request] Attempt 1 request failed with exception : 401 - Unauthorized
Oct 12 18:14:23 ha hass[63106]: 2023-10-12 18:14:23.576 DEBUG (MainThread) [pymyq.api] Error requesting data from https://partner-identity.myq-cloud.com/connect/token: 401 - Unauthorized
Oct 12 18:14:23 ha hass[63106]: 2023-10-12 18:14:23.576 ERROR (MainThread) [pymyq.api] Authentication failed: Error requesting data from https://partner-identity.myq-cloud.com/connect/token: 401 - Unauthorized
Lash-L commented 9 months ago

If you did anything to manually try to fix the problem - you need to undo it. i.e. remove the pymyq from the config folder and/or do

pip uninstall python-myq

and pip uninstall pymyq

If you see 'IOS' anywhere in your logs relating to myq, you are stuck on an old version.

RyanAtTanagra commented 9 months ago

Ok, you're right, there were remnants. I had to do the following:

pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ clone the core repo and copy the core/homeassistant/components/myq/ into /usr/src/homeassistant/homeassistant/components/ Restart HA

re-added the integration and it's working.

Thanks for such a quick response on this MyQ-caused issue!

NukeThemTillTheyGlow commented 9 months ago

I saw a few 429 errors in your log. I would try disabling the integration for 2 hours, then enabling it again to see if that gets past the 429 errors.

ok, I'm back home now...will do that and report back.
home-assistant_myq_2023-10-13T00-19-48.765Z.log

Update: I realized that I had disabled the integration approx 2 hours ago and just enabled it. Log file attached. Same result, 403. Disabled it again and rebooted.

TonyMontuna commented 9 months ago

Ok, you're right, there were remnants. I had to do the following:

pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ clone the core repo and copy the core/homeassistant/components/myq/ into /usr/src/homeassistant/homeassistant/components/ Restart HA

re-added the integration and it's working.

Thanks for such a quick response on this MyQ-caused issue!

I’m sorry to ask this question, but can you help me understand what you mean by pip. And how you sent those commands?

I’m not technical by trade, but I’m trying to learn, I apologize.

calisro commented 9 months ago

pip uninstall python-myq

and pip uninstall pymyq

Wouldn't these get replaced anyway with the upgrade if using hassos? The config/pymyq wouldn't obviously.

ratsputin commented 9 months ago

If you did anything to manually try to fix the problem - you need to undo it. i.e. remove the pymyq from the config folder and/or do

pip uninstall python-myq

and pip uninstall pymyq

If you see 'IOS' anywhere in your logs relating to myq, you are stuck on an old version.

That was the issue!

(venv) homeassistant@ha:~$ pip uninstall python-myq
Found existing installation: python-myq 3.1.13
Uninstalling python-myq-3.1.13:
  Would remove:
    /srv/homeassistant/venv/lib/python3.11/site-packages/pymyq/*
    /srv/homeassistant/venv/lib/python3.11/site-packages/python_myq-3.1.13.dist-info/*
Proceed (Y/n)? Y
  Successfully uninstalled python-myq-3.1.13
(venv) homeassistant@ha:~$ pip uninstall pymyq
Found existing installation: pymyq 3.1.4
Uninstalling pymyq-3.1.4:
  Would remove:
    /srv/homeassistant/venv/lib/python3.11/site-packages/pymyq-3.1.4.dist-info/*
Proceed (Y/n)? Y
  Successfully uninstalled pymyq-3.1.4
(venv) homeassistant@ha:~$

I thought I had uninstalled everything the previous time.

Thank you again for supporting this functionality. I have a drive gate and there is no alternative for MyQ with it like there is with a garage door.

Alexithemia commented 9 months ago

If you did anything to manually try to fix the problem - you need to undo it. i.e. remove the pymyq from the config folder and/or do

pip uninstall python-myq

and pip uninstall pymyq

If you see 'IOS' anywhere in your logs relating to myq, you are stuck on an old version.

I am still getting 403 errors in my logs and they are saying they are coming from pymyq.api. When i try to run pip uninstall pymyq it says it is skipping it because it is not installed

image image

ratsputin commented 9 months ago

Ok, you're right, there were remnants. I had to do the following: pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ clone the core repo and copy the core/homeassistant/components/myq/ into /usr/src/homeassistant/homeassistant/components/ Restart HA re-added the integration and it's working. Thanks for such a quick response on this MyQ-caused issue!

I’m sorry to ask this question, but can you help me understand what you mean by pip. And how you sent those commands?

I’m not technical by trade, but I’m trying to learn, I apologize.

You only need to use those pip commands if you're trying to fix the issue manually.

Upgrading to HA v2023.10.2 should fix the issue for you without any other work.

Alexithemia commented 9 months ago

Ok, you're right, there were remnants. I had to do the following: pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ clone the core repo and copy the core/homeassistant/components/myq/ into /usr/src/homeassistant/homeassistant/components/ Restart HA re-added the integration and it's working. Thanks for such a quick response on this MyQ-caused issue!

I’m sorry to ask this question, but can you help me understand what you mean by pip. And how you sent those commands? I’m not technical by trade, but I’m trying to learn, I apologize.

You only need to use those pip commands if you're trying to fix the issue manually.

Upgrading to HA v2023.10.2 should fix the issue for you without any other work.

I updated earlier today, removed the integration from my home assistant and trying to add it again. Those are the error logs I am getting when logging in.

ErickWarden commented 9 months ago

Im still seeing the error on HA v2023.10.2, below is my logs, any ideas? I see the 403 auth error, but also some other things in there. I have tried disabling for a while, and deleting the integration and trying to reset it up.

Any ideas or thoughts would be greatly apprecitated!

2023-10-12 21:14:40.470 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry mycoolemail@gmail.com for myq
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 278, in request
    return await call_method(
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 244, in request_json
    resp = await self._send_request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 207, in _send_request
    raise resp_exc
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 141, in _send_request
    resp = await websession.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 669, in _request
    resp.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1011, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://accounts.myq-cloud.com/api/v6.0/accounts')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/myq/__init__.py", line 42, in async_setup_entry
    myq = await pymyq.login(conf[CONF_USERNAME], conf[CONF_PASSWORD], websession)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 643, in login
    await api.update_device_info()
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 584, in update_device_info
    accounts = await self._get_accounts()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 547, in _get_accounts
    _, accounts_resp = await self.request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 296, in request
    await self._refresh_token()
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 185, in _refresh_token
    self._myqrequests.clear_useragent()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MyQRequest' object has no attribute 'clear_useragent'
2023-10-12 21:15:02.771 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x2E18:11:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Request failed after 5 attempts: <Status.NWK_INVALID_REQUEST: 194>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_INVALID_REQUEST: 194>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_INVALID_REQUEST: 194>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_INVALID_REQUEST: 194>')]
2023-10-12 21:15:02.810 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x2E18:11:0x0300]: async_initialize: all attempts have failed: [DeliveryError('Request failed after 5 attempts: <Status.NWK_INVALID_REQUEST: 194>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_INVALID_REQUEST: 194>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_INVALID_REQUEST: 194>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_INVALID_REQUEST: 194>')]
2023-10-12 21:15:02.825 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x2E18:11:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Request failed after 5 attempts: <Status.NWK_INVALID_REQUEST: 194>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_INVALID_REQUEST: 194>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_INVALID_REQUEST: 194>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_INVALID_REQUEST: 194>')]
2023-10-12 21:15:04.142 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0AC3:11:0x0008]: async_initialize: all attempts have failed: [TimeoutError(), TimeoutError(), TimeoutError(), TimeoutError()]
2023-10-12 21:15:04.882 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x187F:11:0x0008]: async_initialize: all attempts have failed: [TimeoutError(), TimeoutError(), TimeoutError(), TimeoutError()]
2023-10-12 21:15:05.451 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x187F:11:0x0006]: async_initialize: all attempts have failed: [TimeoutError(), TimeoutError(), TimeoutError(), TimeoutError()]
2023-10-12 21:15:05.522 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0AC3:11:0x0300]: async_initialize: all attempts have failed: [TimeoutError(), TimeoutError(), TimeoutError(), TimeoutError()]
2023-10-12 21:15:05.590 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0AC3:11:0x0006]: async_initialize: all attempts have failed: [TimeoutError(), TimeoutError(), TimeoutError(), TimeoutError()]
2023-10-12 21:15:05.998 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x187F:11:0x0300]: async_initialize: all attempts have failed: [TimeoutError(), TimeoutError(), TimeoutError(), TimeoutError()]
2023-10-12 21:18:07.978 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 
mycoolemail@gmail.com for myq
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 278, in request
    return await call_method(
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 244, in request_json
    resp = await self._send_request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 207, in _send_request
    raise resp_exc
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 141, in _send_request
    resp = await websession.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 669, in _request
    resp.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1011, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://accounts.myq-cloud.com/api/v6.0/accounts')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/myq/__init__.py", line 42, in async_setup_entry
    myq = await pymyq.login(conf[CONF_USERNAME], conf[CONF_PASSWORD], websession)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 643, in login
    await api.update_device_info()
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 584, in update_device_info
    accounts = await self._get_accounts()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 547, in _get_accounts
    _, accounts_resp = await self.request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 296, in request
    await self._refresh_token()
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 185, in _refresh_token
    self._myqrequests.clear_useragent()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MyQRequest' object has no attribute 'clear_useragent'
2023-10-12 21:43:46.245 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 
mycoolemail@gmail.com for myq
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 278, in request
    return await call_method(
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 244, in request_json
    resp = await self._send_request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 207, in _send_request
    raise resp_exc
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 141, in _send_request
    resp = await websession.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 669, in _request
    resp.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1011, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://accounts.myq-cloud.com/api/v6.0/accounts')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/myq/__init__.py", line 42, in async_setup_entry
    myq = await pymyq.login(conf[CONF_USERNAME], conf[CONF_PASSWORD], websession)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 643, in login
    await api.update_device_info()
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 584, in update_device_info
    accounts = await self._get_accounts()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 547, in _get_accounts
    _, accounts_resp = await self.request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 296, in request
    await self._refresh_token()
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 185, in _refresh_token
    self._myqrequests.clear_useragent()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MyQRequest' object has no attribute 'clear_useragent'
2023-10-12 21:45:27.961 ERROR (MainThread) [pymyq.api] Username and/or password are invalid. Update username/password.
2023-10-12 21:46:09.218 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 
mycoolemail@gmail.com for myq
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 278, in request
    return await call_method(
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 244, in request_json
    resp = await self._send_request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 207, in _send_request
    raise resp_exc
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 141, in _send_request
    resp = await websession.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 669, in _request
    resp.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1011, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://accounts.myq-cloud.com/api/v6.0/accounts')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/myq/__init__.py", line 42, in async_setup_entry
    myq = await pymyq.login(conf[CONF_USERNAME], conf[CONF_PASSWORD], websession)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 643, in login
    await api.update_device_info()
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 584, in update_device_info
    accounts = await self._get_accounts()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 547, in _get_accounts
    _, accounts_resp = await self.request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 296, in request
    await self._refresh_token()
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 185, in _refresh_token
    self._myqrequests.clear_useragent()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MyQRequest' object has no attribute 'clear_useragent'
2023-10-12 21:46:33.743 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 
mycoolemail@gmail.com for myq
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 278, in request
    return await call_method(
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 244, in request_json
    resp = await self._send_request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 207, in _send_request
    raise resp_exc
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 141, in _send_request
    resp = await websession.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 669, in _request
    resp.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1011, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://accounts.myq-cloud.com/api/v6.0/accounts')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/myq/__init__.py", line 42, in async_setup_entry
    myq = await pymyq.login(conf[CONF_USERNAME], conf[CONF_PASSWORD], websession)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 643, in login
    await api.update_device_info()
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 584, in update_device_info
    accounts = await self._get_accounts()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 547, in _get_accounts
    _, accounts_resp = await self.request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 296, in request
    await self._refresh_token()
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 185, in _refresh_token
    self._myqrequests.clear_useragent()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MyQRequest' object has no attribute 'clear_useragent'
2023-10-12 21:46:52.435 DEBUG (MainThread) [pymyq.api] Performing initial authentication into MyQ
2023-10-12 21:46:52.435 DEBUG (MainThread) [pymyq.api] Scheduling token refresh, last refresh was None
2023-10-12 21:46:52.435 DEBUG (MainThread) [pymyq.api] Initiating OAuth authentication
2023-10-12 21:46:52.435 DEBUG (MainThread) [pymyq.api] Retrieving authentication page
2023-10-12 21:46:52.435 DEBUG (MainThread) [pymyq.request] Sending myq api request https://partner-identity.myq-cloud.com/connect/authorize and headers {'redirect': 'follow'} with connection pooling
2023-10-12 21:46:52.549 DEBUG (MainThread) [pymyq.request] Attempt 1 request failed with exception : 429 - Too Many Requests
2023-10-12 21:46:52.549 DEBUG (MainThread) [pymyq.request] Request failed with "429 Too Many Requests" (attempt #1/5)"; trying again in 2 seconds
2023-10-12 21:46:54.550 DEBUG (MainThread) [pymyq.request] Sending myq api request https://partner-identity.myq-cloud.com/connect/authorize and headers {'redirect': 'follow'} with connection pooling
2023-10-12 21:46:54.858 DEBUG (MainThread) [pymyq.request] Response:
2023-10-12 21:46:54.858 DEBUG (MainThread) [pymyq.request]     Response Code: 200
2023-10-12 21:46:54.858 DEBUG (MainThread) [pymyq.request]     Headers: ((b'Date', b'Fri, 13 Oct 2023 02:46:54 GMT'), (b'Content-Type', b'text/html; charset=utf-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Cache-Control', b'no-cache, no-store'), (b'pragma', b'no-cache'), (b'set-cookie', b'AntiForgery.MyQ.Identity=CfDJ8ON7dBOWWjJAuGokEvbbeTkgKOi2xQuY7l5kxayXFiXTV4LFkyWJZxGMqVZOhwRlNXgu8o24UW7mUzKspYVfwQxsPJfWrHFP_G0SMRbqrU1TMbdZoRfMqftkjk3Asr2d7NZmmBcUEQ5IErm3rFWdm8Q; path=/; samesite=strict; httponly'), (b'request-context', b'appId=cid-v1:0e843709-4fd8-4c8a-a52a-7eb45ba4930b'), (b'x-xss-protection', b'1; mode=block'), (b'x-content-type-options', b'nosniff'), (b'x-frame-options', b'SAMEORIGIN'), (b'referrer-policy', b'no-referrer'), (b'myq-correlationid', b'6c20d191-9d1a-4b72-9685-a3e8b566e610'), (b'strict-transport-security', b'max-age=15724800; includeSubDomains'), (b'strict-transport-security', b'max-age=63072000'), (b'CF-Cache-Status', b'DYNAMIC'), (b'Server', b'cloudflare'), (b'CF-RAY', b'815441406db54cbd-MSP'), (b'Content-Encoding', b'gzip'), (b'alt-svc', b'h3=":443"; ma=86400'))
2023-10-12 21:46:54.860 DEBUG (MainThread) [pymyq.request]     Body: <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
    <title>MyQ Security</title>
    <link rel="stylesheet" href="https://pr-myq-ids-cdn01.azureedge.net/Styles/dist/Reset.f87fa8395c0c42e6fe35.css" />
    <link rel="stylesheet" href="https://pr-myq-ids-cdn01.azureedge.net/Styles/dist/FontAwesome.1162091784c26021d3ea.css" />
    <link rel="stylesheet" href="https://pr-myq-ids-cdn01.azureedge.net/Styles/dist/SelectInput.0208c3fa53036fcad86f.css" />
    <link rel="stylesheet" href="https://pr-myq-ids-cdn01.azureedge.net/Styles/dist/Site.d6f241199f127b5122cb.css" />
    <link rel="stylesheet" href="https://pr-myq-ids-cdn01.azureedge.net/Styles/dist/automotiveConsent.1e7b12dce80bfae65ac4.css" />
    <link rel="icon" type="image/png" href="https://pr-myq-ids-cdn01.azureedge.net/favicon-32x32.png" />
    <link rel="apple-touch-icon" href="https://pr-myq-ids-cdn01.azureedge.net/apple-touch-icon.png">

</head>
<body>

<div class="container body-content">
    <div class="standard-page">
        <div class="logo"></div>
        <div class="title">Sign In</div>

<form action="/Account/LoginWithEmail?returnUrl=/connect/authorize/callback?client_id%3DANDROID_CGI_MYQ%26code_challenge%3De7H2qm3STJWrOxfpwVeuzLT5oURigPMMyPMf8T0BTbg%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fandroid%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access" method="post"><input id="ReturnUrl" name="ReturnUrl" type="hidden" value="/connect/authorize/callback?client_id=ANDROID_CGI_MYQ&amp;code_challenge=e7H2qm3STJWrOxfpwVeuzLT5oURigPMMyPMf8T0BTbg&amp;code_challenge_method=S256&amp;redirect_uri=com.myqops%3A%2F%2Fandroid&amp;response_type=code&amp;scope=MyQ_Residential%20offline_access" />            <div class="form-fields">
                <input type="email" class="form-control email" placeholder="Email" autofocus autocomplete="false" data-val="true" data-val-email="Email address is invalid." data-val-maxlength="The email field must be made up of 256 characters or less." data-val-maxlength-max="256" data-val-required="The email field is required." id="Email" maxlength="256" name="Email" value="" />
                <input type="password" class="form-control" placeholder="Password" autocomplete="false" data-val="true" data-val-required="The password is required." id="Password" name="Password" />

                <div class="validation-summary-valid" data-valmsg-summary="true" id="validation-errors"><ul><li style="display:none"></li>
</ul></div>
                <input type="submit" id="btn-signin" class="btn btn-default" value="Sign In" />
                <div class="forgot-password">
                    <a href="/Account/ForgotPassword?returnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DANDROID_CGI_MYQ%26code_challenge%3De7H2qm3STJWrOxfpwVeuzLT5oURigPMMyPMf8T0BTbg%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fandroid%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access" class="link">
                        <span>
                            Forgot Password
                        </span>
                        <i class="fa fa-angle-right" aria-hidden="true"></i>
                    </a>
                </div>
            </div>
<input name="__RequestVerificationToken" type="hidden" value="CfDJ8ON7dBOWWjJAuGokEvbbeTlkLw_gi5azNBl1XwVGVrO1IQKX3ZgQLkVFPcZyV9UH0YQwh1r8URUR93qwcuDut1sIbWuE5D9YoI0-Jisb_OfXBOrngCCk-4w4nF-a6yKVdIHm19zN9bwKvXKiYG8CJrQ" /></form>
    </div>
</div>

    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.6.0.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js"></script>
    <script src="https://ajax.aspnetcdn.com/ajax/jquery.validation.unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js"></script>
    <script src="https://pr-myq-ids-cdn01.azureedge.net/Scripts/dist/iPhoneXFix.41d1b1c65765f5972055.js"></script>

</body>
</html>
2023-10-12 21:46:54.860 DEBUG (MainThread) [pymyq.api] Scanning login page for fields to return
2023-10-12 21:46:54.862 DEBUG (MainThread) [pymyq.api] Missing one of the valid keys email: True, password: True, submit: True, verfication: True
2023-10-12 21:46:54.862 DEBUG (MainThread) [pymyq.api] Performing login to MyQ
2023-10-12 21:46:54.862 DEBUG (MainThread) [pymyq.request] Sending myq api request https://partner-identity.myq-cloud.com/Account/LoginWithEmail?returnUrl=/connect/authorize/callback?client_id%3DANDROID_CGI_MYQ%26code_challenge%3De7H2qm3STJWrOxfpwVeuzLT5oURigPMMyPMf8T0BTbg%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fandroid%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access and headers {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'} with connection pooling
2023-10-12 21:46:54.953 DEBUG (MainThread) [pymyq.request] Response:
2023-10-12 21:46:54.953 DEBUG (MainThread) [pymyq.request]     Response Code: 302
2023-10-12 21:46:54.953 DEBUG (MainThread) [pymyq.request]     Headers: ((b'Date', b'Fri, 13 Oct 2023 02:46:54 GMT'), (b'Content-Length', b'0'), (b'Connection', b'keep-alive'), (b'Cache-Control', b'no-cache'), (b'pragma', b'no-cache'), (b'expires', b'Thu, 01 Jan 1970 00:00:00 GMT'), (b'location', b'/connect/authorize/callback?client_id=ANDROID_CGI_MYQ&code_challenge=e7H2qm3STJWrOxfpwVeuzLT5oURigPMMyPMf8T0BTbg&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fandroid&response_type=code&scope=MyQ_Residential%20offline_access'), (b'set-cookie', b'idsrv.session=5572355FEE49207DFFAC416F629300D8; path=/; secure; samesite=none'), (b'set-cookie', b'idsrv=CfDJ8ON7dBOWWjJAuGokEvbbeTltmtPoItynw1CMOHYDfifbUh195ii167z3QiFA-quT_LsNYLLWLPFCcPJEmSYw42lWi3Gja_FfP2nsojYi2Fnu229CG_izNM626mF44EdzIYjnovjKpQRjNJ_Az7ZHXNsNmfs_3x04rJN9rfjSoQdvfR4AJQun4FS9SrbnPx-t6IjKhPzgPmikBIn3ojKtcOjemxzOGxPfK0tB7vdTl1SJjED5E_VxmQme11Zo46ba57nxdf5KGB-cBOfkP0ggRvpq3rWlugfs2HeAKmHM9APbe66accGQ5HbznAq2wXTXSK8z_uwxpgtYWBXfEjTRIJMdTpHiDqoOryIUa46rNqybpnC7m3lOBId8Qji-TEUYNUmxi0xy1FlzNKSMnIWvAlClGremhfZElqgGAqKx55USsAidrUOTzIU0QVYW1X9PBqhE2K-7tGTvF3_-KrEXaqV_mIyvinOXeEmiehMTLKyYfEmHQnGSlm5anykVDWSc4wEatVQh8vpvFVL7yIoipe4PX04cZ6Ot5VnDK1_ifCfw1dhJWXvJoNk55NVus5qXoA; path=/; secure; samesite=none; httponly'), (b'request-context', b'appId=cid-v1:0e843709-4fd8-4c8a-a52a-7eb45ba4930b'), (b'x-xss-protection', b'1; mode=block'), (b'myq-correlationid', b'fb994c9f-9cbc-404a-8ef8-d74297451a9f'), (b'strict-transport-security', b'max-age=15724800; includeSubDomains'), (b'strict-transport-security', b'max-age=63072000'), (b'CF-Cache-Status', b'DYNAMIC'), (b'Server', b'cloudflare'), (b'CF-RAY', b'81544140ff214cbd-MSP'), (b'alt-svc', b'h3=":443"; ma=86400'))
2023-10-12 21:46:54.953 DEBUG (MainThread) [pymyq.request]     Body: 
2023-10-12 21:46:54.953 DEBUG (MainThread) [pymyq.api] Calling redirect page
2023-10-12 21:46:54.953 DEBUG (MainThread) [pymyq.request] Sending myq api request https://partner-identity.myq-cloud.com/connect/authorize/callback?client_id=ANDROID_CGI_MYQ&code_challenge=e7H2qm3STJWrOxfpwVeuzLT5oURigPMMyPMf8T0BTbg&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fandroid&response_type=code&scope=MyQ_Residential%20offline_access and headers {'Cookie': 'Set-Cookie: idsrv=CfDJ8ON7dBOWWjJAuGokEvbbeTltmtPoItynw1CMOHYDfifbUh195ii167z3QiFA-quT_LsNYLLWLPFCcPJEmSYw42lWi3Gja_FfP2nsojYi2Fnu229CG_izNM626mF44EdzIYjnovjKpQRjNJ_Az7ZHXNsNmfs_3x04rJN9rfjSoQdvfR4AJQun4FS9SrbnPx-t6IjKhPzgPmikBIn3ojKtcOjemxzOGxPfK0tB7vdTl1SJjED5E_VxmQme11Zo46ba57nxdf5KGB-cBOfkP0ggRvpq3rWlugfs2HeAKmHM9APbe66accGQ5HbznAq2wXTXSK8z_uwxpgtYWBXfEjTRIJMdTpHiDqoOryIUa46rNqybpnC7m3lOBId8Qji-TEUYNUmxi0xy1FlzNKSMnIWvAlClGremhfZElqgGAqKx55USsAidrUOTzIU0QVYW1X9PBqhE2K-7tGTvF3_-KrEXaqV_mIyvinOXeEmiehMTLKyYfEmHQnGSlm5anykVDWSc4wEatVQh8vpvFVL7yIoipe4PX04cZ6Ot5VnDK1_ifCfw1dhJWXvJoNk55NVus5qXoA\r\nSet-Cookie: idsrv.session=5572355FEE49207DFFAC416F629300D8'} with connection pooling
2023-10-12 21:46:55.050 DEBUG (MainThread) [pymyq.request] Response:
2023-10-12 21:46:55.050 DEBUG (MainThread) [pymyq.request]     Response Code: 302
2023-10-12 21:46:55.050 DEBUG (MainThread) [pymyq.request]     Headers: ((b'Date', b'Fri, 13 Oct 2023 02:46:55 GMT'), (b'Content-Length', b'0'), (b'Connection', b'keep-alive'), (b'location', b'com.myqops://android?code=EC2A35D104FDA3C3D28C47AE7D62607B7DEBF2EC268F882A928A1A9BF8A33D01&scope=MyQ_Residential%20offline_access&iss=https%3A%2F%2Fpartner-identity.myq-cloud.com'), (b'Cache-Control', b'no-store, no-cache, max-age=0'), (b'pragma', b'no-cache'), (b'expires', b'Thu, 01 Jan 1970 00:00:00 GMT'), (b'set-cookie', b'idsrv=CfDJ8ON7dBOWWjJAuGokEvbbeTn4TiMKHwr0UU_01g8DjLjLWrOoPEP5tvuRthHgf2XeBzV_dqqP-iLhVChHXEjff4AIvMhYdKk8ksl1sDf8qV4lKHKvGzz8enAljRv1IDSDX_9Nm0eAe1dpyNXec4tQnGh6EMMiiCO-6bWR_2tAlQqLc9K5R8BhmDiPySsAwX-xWT9PbDmnJ0_hAIMBbHF-GG7R6s5DfL2qQUao23FSuGgHWVI3UkWVZIlsNiWI4ltXMHqaIJN12UiwyOm3ho09nXKuIb789hh1JOExhuiBV-a2R2oehOf77d0s4JHt8XeUUyVlLabr6J6xMo9ct5nKhbMx2PIFD5tmc0qKP_Z73JywTKEjNX05lY7FaGPsSdUaR8ssWw2YXgRnnf3pIWjlFMMQw76rF2kFQFvJgvHl3-fUjJEgm1eLvJ-d9oBB3MBV6e5Ax7vkzWi3HlhKL0xw3FEhM7QOhVDZUtbpFXxujVcC1im9WqHdfAGHSByVmgpsijdVYXyDjv9dM2jePFlQgowDuli3V35DRAdyqC7qEaVTsCjQp8fLtigvBp3-wMCK-dKmvZHYYi3MsEGJ2enGbjPM-ZmDbHygEdh_nf5YG6Cl; path=/; secure; samesite=none; httponly'), (b'request-context', b'appId=cid-v1:0e843709-4fd8-4c8a-a52a-7eb45ba4930b'), (b'x-xss-protection', b'1; mode=block'), (b'myq-correlationid', b'7238412c-133c-4c5a-80cc-18bf868a670e'), (b'strict-transport-security', b'max-age=15724800; includeSubDomains'), (b'strict-transport-security', b'max-age=63072000'), (b'CF-Cache-Status', b'DYNAMIC'), (b'Server', b'cloudflare'), (b'CF-RAY', b'81544141889e4cbd-MSP'), (b'alt-svc', b'h3=":443"; ma=86400'))
2023-10-12 21:46:55.050 DEBUG (MainThread) [pymyq.request]     Body: 
2023-10-12 21:46:55.050 DEBUG (MainThread) [pymyq.api] Getting token
2023-10-12 21:46:55.050 DEBUG (MainThread) [pymyq.request] Sending myq api request https://partner-identity.myq-cloud.com/connect/token and headers {'Authorization': 'Basic QU5EUk9JRF9DR0lfTVlROg==', 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} with connection pooling
2023-10-12 21:46:55.200 DEBUG (MainThread) [pymyq.request] Response:
2023-10-12 21:46:55.200 DEBUG (MainThread) [pymyq.request]     Response Code: 200
2023-10-12 21:46:55.200 DEBUG (MainThread) [pymyq.request]     Headers: ((b'Date', b'Fri, 13 Oct 2023 02:46:55 GMT'), (b'Content-Type', b'application/json; charset=UTF-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Cache-Control', b'no-store, no-cache, max-age=0'), (b'pragma', b'no-cache'), (b'request-context', b'appId=cid-v1:0e843709-4fd8-4c8a-a52a-7eb45ba4930b'), (b'x-xss-protection', b'1; mode=block'), (b'myq-correlationid', b'90837031-2380-40d4-bed8-32d88c1d6c31'), (b'strict-transport-security', b'max-age=15724800; includeSubDomains'), (b'strict-transport-security', b'max-age=63072000'), (b'CF-Cache-Status', b'DYNAMIC'), (b'Server', b'cloudflare'), (b'CF-RAY', b'8154414219ff4cbd-MSP'), (b'Content-Encoding', b'gzip'), (b'alt-svc', b'h3=":443"; ma=86400'))
2023-10-12 21:46:55.200 DEBUG (MainThread) [pymyq.request]     Body: {"access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjBDQzRGRENBNEY0MUZBNkMwOUVCN0U3REQ1RTFBODU2QzBERUU0RjMiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJETVQ5eWs5Qi1td0o2MzU5MWVHb1ZzRGU1UE0ifQ.eyJpc3MiOiJodHRwczovL3BhcnRuZXItaWRlbnRpdHkubXlxLWNsb3VkLmNvbSIsIm5iZiI6MTY5NzE2NTIxNSwiaWF0IjoxNjk3MTY1MjE1LCJleHAiOjE2OTcxNjcwMTUsImF1ZCI6WyJNeVFfUmVzaWRlbnRpYWwiLCJodHRwczovL3BhcnRuZXItaWRlbnRpdHkubXlxLWNsb3VkLmNvbS9yZXNvdXJjZXMiXSwic2NvcGUiOlsiTXlRX1Jlc2lkZW50aWFsIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbInB3ZCJdLCJjbGllbnRfaWQiOiJBTkRST0lEX0NHSV9NWVEiLCJjbGllbnRfQXBwbGljYXRpb25JZCI6ImM0YmUwZDQ5LWE3MTAtNDQ5MC1hNmRjLTdlOTAzYzVjM2I1OCIsInN1YiI6ImZkMGMzODM1LWYzZWEtNDk5Yy04YzYzLWU4MTU3MzY1YjFkYSIsImF1dGhfdGltZSI6MTY5NzE2NTIxNCwiaWRwIjoibG9jYWwiLCJBcHBJZCI6ImM0YmUwZDQ5LWE3MTAtNDQ5MC1hNmRjLTdlOTAzYzVjM2I1OCIsInNpZCI6IjU1NzIzNTVGRUU0OTIwN0RGRkFDNDE2RjYyOTMwMEQ4IiwianRpIjoiQTlBMDQ4REZFNjdCNTIxQTAyOUUxOTg3RDE3NDI5REUifQ.wOCncE_Wlg0tQ7441tocC-OUTEna8cSTiJdMesijqg5alSLh-T8WxeIjP6Os9Ke4nVOjh7Tmy5PTNz_AO6Ar8Xl3-fo3xQ-lcKOYgYDletYyNUVMM2byZ8urRF3aDDgjVawyH06unumu3Gt17Rzh_L2KeccWJ73813jDz-Zjo3ogu3U8u2jD3_CawtcGYzI35WnDzeBwUdh13l-fXLiHktTAcYz1CUlC5tsL5hZwK9UIY3bs0nOkqjw_yWkO2G9ls4D5V9Qduc7MFw_DewI6-RKUP5x2EteemPIjhcyVaM48yAPhru3BY_6QbqtjzXADNZEgghaYU9AHmJbvgE7g8w","expires_in":1800,"token_type":"Bearer","refresh_token":"C7281AB56E94F604BD86F8F6338053ACC8C4F5C83C82E9A2CC956ED949502741","scope":"MyQ_Residential offline_access"}
2023-10-12 21:46:55.201 DEBUG (MainThread) [pymyq.api] Received token that will expire in 1800 seconds
2023-10-12 21:46:55.201 DEBUG (MainThread) [pymyq.api] Retrieving MyQ information
2023-10-12 21:46:55.201 DEBUG (MainThread) [pymyq.api] Updating account information
2023-10-12 21:46:55.201 DEBUG (MainThread) [pymyq.api] Retrieving account information
2023-10-12 21:46:55.201 DEBUG (MainThread) [pymyq.api] Sending get request to https://accounts.myq-cloud.com/api/v6.0/accounts.
2023-10-12 21:46:55.201 DEBUG (MainThread) [pymyq.request] Sending myq api request https://accounts.myq-cloud.com/api/v6.0/accounts and headers {'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjBDQzRGRENBNEY0MUZBNkMwOUVCN0U3REQ1RTFBODU2QzBERUU0RjMiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJETVQ5eWs5Qi1td0o2MzU5MWVHb1ZzRGU1UE0ifQ.eyJpc3MiOiJodHRwczovL3BhcnRuZXItaWRlbnRpdHkubXlxLWNsb3VkLmNvbSIsIm5iZiI6MTY5NzE2NTIxNSwiaWF0IjoxNjk3MTY1MjE1LCJleHAiOjE2OTcxNjcwMTUsImF1ZCI6WyJNeVFfUmVzaWRlbnRpYWwiLCJodHRwczovL3BhcnRuZXItaWRlbnRpdHkubXlxLWNsb3VkLmNvbS9yZXNvdXJjZXMiXSwic2NvcGUiOlsiTXlRX1Jlc2lkZW50aWFsIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbInB3ZCJdLCJjbGllbnRfaWQiOiJBTkRST0lEX0NHSV9NWVEiLCJjbGllbnRfQXBwbGljYXRpb25JZCI6ImM0YmUwZDQ5LWE3MTAtNDQ5MC1hNmRjLTdlOTAzYzVjM2I1OCIsInN1YiI6ImZkMGMzODM1LWYzZWEtNDk5Yy04YzYzLWU4MTU3MzY1YjFkYSIsImF1dGhfdGltZSI6MTY5NzE2NTIxNCwiaWRwIjoibG9jYWwiLCJBcHBJZCI6ImM0YmUwZDQ5LWE3MTAtNDQ5MC1hNmRjLTdlOTAzYzVjM2I1OCIsInNpZCI6IjU1NzIzNTVGRUU0OTIwN0RGRkFDNDE2RjYyOTMwMEQ4IiwianRpIjoiQTlBMDQ4REZFNjdCNTIxQTAyOUUxOTg3RDE3NDI5REUifQ.wOCncE_Wlg0tQ7441tocC-OUTEna8cSTiJdMesijqg5alSLh-T8WxeIjP6Os9Ke4nVOjh7Tmy5PTNz_AO6Ar8Xl3-fo3xQ-lcKOYgYDletYyNUVMM2byZ8urRF3aDDgjVawyH06unumu3Gt17Rzh_L2KeccWJ73813jDz-Zjo3ogu3U8u2jD3_CawtcGYzI35WnDzeBwUdh13l-fXLiHktTAcYz1CUlC5tsL5hZwK9UIY3bs0nOkqjw_yWkO2G9ls4D5V9Qduc7MFw_DewI6-RKUP5x2EteemPIjhcyVaM48yAPhru3BY_6QbqtjzXADNZEgghaYU9AHmJbvgE7g8w'} with connection pooling
2023-10-12 21:46:55.299 DEBUG (MainThread) [pymyq.request] Attempt 1 request failed with exception : 403 - Forbidden
2023-10-12 21:46:55.299 DEBUG (MainThread) [pymyq.request] Request failed with "403 Forbidden" (attempt #1/5)"; trying again in 2 seconds
2023-10-12 21:46:57.301 DEBUG (MainThread) [pymyq.request] Sending myq api request https://accounts.myq-cloud.com/api/v6.0/accounts and headers {'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjBDQzRGRENBNEY0MUZBNkMwOUVCN0U3REQ1RTFBODU2QzBERUU0RjMiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJETVQ5eWs5Qi1td0o2MzU5MWVHb1ZzRGU1UE0ifQ.eyJpc3MiOiJodHRwczovL3BhcnRuZXItaWRlbnRpdHkubXlxLWNsb3VkLmNvbSIsIm5iZiI6MTY5NzE2NTIxNSwiaWF0IjoxNjk3MTY1MjE1LCJleHAiOjE2OTcxNjcwMTUsImF1ZCI6WyJNeVFfUmVzaWRlbnRpYWwiLCJodHRwczovL3BhcnRuZXItaWRlbnRpdHkubXlxLWNsb3VkLmNvbS9yZXNvdXJjZXMiXSwic2NvcGUiOlsiTXlRX1Jlc2lkZW50aWFsIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbInB3ZCJdLCJjbGllbnRfaWQiOiJBTkRST0lEX0NHSV9NWVEiLCJjbGllbnRfQXBwbGljYXRpb25JZCI6ImM0YmUwZDQ5LWE3MTAtNDQ5MC1hNmRjLTdlOTAzYzVjM2I1OCIsInN1YiI6ImZkMGMzODM1LWYzZWEtNDk5Yy04YzYzLWU4MTU3MzY1YjFkYSIsImF1dGhfdGltZSI6MTY5NzE2NTIxNCwiaWRwIjoibG9jYWwiLCJBcHBJZCI6ImM0YmUwZDQ5LWE3MTAtNDQ5MC1hNmRjLTdlOTAzYzVjM2I1OCIsInNpZCI6IjU1NzIzNTVGRUU0OTIwN0RGRkFDNDE2RjYyOTMwMEQ4IiwianRpIjoiQTlBMDQ4REZFNjdCNTIxQTAyOUUxOTg3RDE3NDI5REUifQ.wOCncE_Wlg0tQ7441tocC-OUTEna8cSTiJdMesijqg5alSLh-T8WxeIjP6Os9Ke4nVOjh7Tmy5PTNz_AO6Ar8Xl3-fo3xQ-lcKOYgYDletYyNUVMM2byZ8urRF3aDDgjVawyH06unumu3Gt17Rzh_L2KeccWJ73813jDz-Zjo3ogu3U8u2jD3_CawtcGYzI35WnDzeBwUdh13l-fXLiHktTAcYz1CUlC5tsL5hZwK9UIY3bs0nOkqjw_yWkO2G9ls4D5V9Qduc7MFw_DewI6-RKUP5x2EteemPIjhcyVaM48yAPhru3BY_6QbqtjzXADNZEgghaYU9AHmJbvgE7g8w'} with connection pooling
2023-10-12 21:46:57.326 DEBUG (MainThread) [pymyq.request] Attempt 2 request failed with exception : 403 - Forbidden
2023-10-12 21:46:57.326 DEBUG (MainThread) [pymyq.request] Request failed with "403 Forbidden" (attempt #2/5)"; trying again in 4 seconds
2023-10-12 21:47:01.327 DEBUG (MainThread) [pymyq.request] Sending myq api request https://accounts.myq-cloud.com/api/v6.0/accounts and headers {'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjBDQzRGRENBNEY0MUZBNkMwOUVCN0U3REQ1RTFBODU2QzBERUU0RjMiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJETVQ5eWs5Qi1td0o2MzU5MWVHb1ZzRGU1UE0ifQ.eyJpc3MiOiJodHRwczovL3BhcnRuZXItaWRlbnRpdHkubXlxLWNsb3VkLmNvbSIsIm5iZiI6MTY5NzE2NTIxNSwiaWF0IjoxNjk3MTY1MjE1LCJleHAiOjE2OTcxNjcwMTUsImF1ZCI6WyJNeVFfUmVzaWRlbnRpYWwiLCJodHRwczovL3BhcnRuZXItaWRlbnRpdHkubXlxLWNsb3VkLmNvbS9yZXNvdXJjZXMiXSwic2NvcGUiOlsiTXlRX1Jlc2lkZW50aWFsIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbInB3ZCJdLCJjbGllbnRfaWQiOiJBTkRST0lEX0NHSV9NWVEiLCJjbGllbnRfQXBwbGljYXRpb25JZCI6ImM0YmUwZDQ5LWE3MTAtNDQ5MC1hNmRjLTdlOTAzYzVjM2I1OCIsInN1YiI6ImZkMGMzODM1LWYzZWEtNDk5Yy04YzYzLWU4MTU3MzY1YjFkYSIsImF1dGhfdGltZSI6MTY5NzE2NTIxNCwiaWRwIjoibG9jYWwiLCJBcHBJZCI6ImM0YmUwZDQ5LWE3MTAtNDQ5MC1hNmRjLTdlOTAzYzVjM2I1OCIsInNpZCI6IjU1NzIzNTVGRUU0OTIwN0RGRkFDNDE2RjYyOTMwMEQ4IiwianRpIjoiQTlBMDQ4REZFNjdCNTIxQTAyOUUxOTg3RDE3NDI5REUifQ.wOCncE_Wlg0tQ7441tocC-OUTEna8cSTiJdMesijqg5alSLh-T8WxeIjP6Os9Ke4nVOjh7Tmy5PTNz_AO6Ar8Xl3-fo3xQ-lcKOYgYDletYyNUVMM2byZ8urRF3aDDgjVawyH06unumu3Gt17Rzh_L2KeccWJ73813jDz-Zjo3ogu3U8u2jD3_CawtcGYzI35WnDzeBwUdh13l-fXLiHktTAcYz1CUlC5tsL5hZwK9UIY3bs0nOkqjw_yWkO2G9ls4D5V9Qduc7MFw_DewI6-RKUP5x2EteemPIjhcyVaM48yAPhru3BY_6QbqtjzXADNZEgghaYU9AHmJbvgE7g8w'} with connection pooling
2023-10-12 21:47:01.439 DEBUG (MainThread) [pymyq.request] Attempt 3 request failed with exception : 403 - Forbidden
2023-10-12 21:47:01.439 DEBUG (MainThread) [pymyq.request] Request failed with "403 Forbidden" (attempt #3/5)"; trying again in 5 seconds
2023-10-12 21:47:06.441 DEBUG (MainThread) [pymyq.request] Sending myq api request https://accounts.myq-cloud.com/api/v6.0/accounts and headers {'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjBDQzRGRENBNEY0MUZBNkMwOUVCN0U3REQ1RTFBODU2QzBERUU0RjMiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJETVQ5eWs5Qi1td0o2MzU5MWVHb1ZzRGU1UE0ifQ.eyJpc3MiOiJodHRwczovL3BhcnRuZXItaWRlbnRpdHkubXlxLWNsb3VkLmNvbSIsIm5iZiI6MTY5NzE2NTIxNSwiaWF0IjoxNjk3MTY1MjE1LCJleHAiOjE2OTcxNjcwMTUsImF1ZCI6WyJNeVFfUmVzaWRlbnRpYWwiLCJodHRwczovL3BhcnRuZXItaWRlbnRpdHkubXlxLWNsb3VkLmNvbS9yZXNvdXJjZXMiXSwic2NvcGUiOlsiTXlRX1Jlc2lkZW50aWFsIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbInB3ZCJdLCJjbGllbnRfaWQiOiJBTkRST0lEX0NHSV9NWVEiLCJjbGllbnRfQXBwbGljYXRpb25JZCI6ImM0YmUwZDQ5LWE3MTAtNDQ5MC1hNmRjLTdlOTAzYzVjM2I1OCIsInN1YiI6ImZkMGMzODM1LWYzZWEtNDk5Yy04YzYzLWU4MTU3MzY1YjFkYSIsImF1dGhfdGltZSI6MTY5NzE2NTIxNCwiaWRwIjoibG9jYWwiLCJBcHBJZCI6ImM0YmUwZDQ5LWE3MTAtNDQ5MC1hNmRjLTdlOTAzYzVjM2I1OCIsInNpZCI6IjU1NzIzNTVGRUU0OTIwN0RGRkFDNDE2RjYyOTMwMEQ4IiwianRpIjoiQTlBMDQ4REZFNjdCNTIxQTAyOUUxOTg3RDE3NDI5REUifQ.wOCncE_Wlg0tQ7441tocC-OUTEna8cSTiJdMesijqg5alSLh-T8WxeIjP6Os9Ke4nVOjh7Tmy5PTNz_AO6Ar8Xl3-fo3xQ-lcKOYgYDletYyNUVMM2byZ8urRF3aDDgjVawyH06unumu3Gt17Rzh_L2KeccWJ73813jDz-Zjo3ogu3U8u2jD3_CawtcGYzI35WnDzeBwUdh13l-fXLiHktTAcYz1CUlC5tsL5hZwK9UIY3bs0nOkqjw_yWkO2G9ls4D5V9Qduc7MFw_DewI6-RKUP5x2EteemPIjhcyVaM48yAPhru3BY_6QbqtjzXADNZEgghaYU9AHmJbvgE7g8w'} with connection pooling
2023-10-12 21:47:06.468 DEBUG (MainThread) [pymyq.request] Attempt 4 request failed with exception : 403 - Forbidden
2023-10-12 21:47:06.468 DEBUG (MainThread) [pymyq.request] Request failed with "403 Forbidden" (attempt #4/5)"; trying again in 5 seconds
2023-10-12 21:47:11.469 DEBUG (MainThread) [pymyq.request] Sending myq api request https://accounts.myq-cloud.com/api/v6.0/accounts and headers {'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjBDQzRGRENBNEY0MUZBNkMwOUVCN0U3REQ1RTFBODU2QzBERUU0RjMiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJETVQ5eWs5Qi1td0o2MzU5MWVHb1ZzRGU1UE0ifQ.eyJpc3MiOiJodHRwczovL3BhcnRuZXItaWRlbnRpdHkubXlxLWNsb3VkLmNvbSIsIm5iZiI6MTY5NzE2NTIxNSwiaWF0IjoxNjk3MTY1MjE1LCJleHAiOjE2OTcxNjcwMTUsImF1ZCI6WyJNeVFfUmVzaWRlbnRpYWwiLCJodHRwczovL3BhcnRuZXItaWRlbnRpdHkubXlxLWNsb3VkLmNvbS9yZXNvdXJjZXMiXSwic2NvcGUiOlsiTXlRX1Jlc2lkZW50aWFsIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbInB3ZCJdLCJjbGllbnRfaWQiOiJBTkRST0lEX0NHSV9NWVEiLCJjbGllbnRfQXBwbGljYXRpb25JZCI6ImM0YmUwZDQ5LWE3MTAtNDQ5MC1hNmRjLTdlOTAzYzVjM2I1OCIsInN1YiI6ImZkMGMzODM1LWYzZWEtNDk5Yy04YzYzLWU4MTU3MzY1YjFkYSIsImF1dGhfdGltZSI6MTY5NzE2NTIxNCwiaWRwIjoibG9jYWwiLCJBcHBJZCI6ImM0YmUwZDQ5LWE3MTAtNDQ5MC1hNmRjLTdlOTAzYzVjM2I1OCIsInNpZCI6IjU1NzIzNTVGRUU0OTIwN0RGRkFDNDE2RjYyOTMwMEQ4IiwianRpIjoiQTlBMDQ4REZFNjdCNTIxQTAyOUUxOTg3RDE3NDI5REUifQ.wOCncE_Wlg0tQ7441tocC-OUTEna8cSTiJdMesijqg5alSLh-T8WxeIjP6Os9Ke4nVOjh7Tmy5PTNz_AO6Ar8Xl3-fo3xQ-lcKOYgYDletYyNUVMM2byZ8urRF3aDDgjVawyH06unumu3Gt17Rzh_L2KeccWJ73813jDz-Zjo3ogu3U8u2jD3_CawtcGYzI35WnDzeBwUdh13l-fXLiHktTAcYz1CUlC5tsL5hZwK9UIY3bs0nOkqjw_yWkO2G9ls4D5V9Qduc7MFw_DewI6-RKUP5x2EteemPIjhcyVaM48yAPhru3BY_6QbqtjzXADNZEgghaYU9AHmJbvgE7g8w'} with connection pooling
2023-10-12 21:47:11.566 DEBUG (MainThread) [pymyq.request] Attempt 5 request failed with exception : 403 - Forbidden
2023-10-12 21:47:11.566 DEBUG (MainThread) [pymyq.api] Status 401 received, re-authenticating.
2023-10-12 21:47:11.567 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 
mycoolemail@gmail.com for myq
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 278, in request
    return await call_method(
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 244, in request_json
    resp = await self._send_request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 207, in _send_request
    raise resp_exc
  File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 141, in _send_request
    resp = await websession.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 669, in _request
    resp.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1011, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://accounts.myq-cloud.com/api/v6.0/accounts')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/myq/__init__.py", line 42, in async_setup_entry
    myq = await pymyq.login(conf[CONF_USERNAME], conf[CONF_PASSWORD], websession)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 643, in login
    await api.update_device_info()
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 584, in update_device_info
    accounts = await self._get_accounts()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 547, in _get_accounts
    _, accounts_resp = await self.request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 296, in request
    await self._refresh_token()
  File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 185, in _refresh_token
    self._myqrequests.clear_useragent()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MyQRequest' object has no attribute 'clear_useragent'
fgonza2 commented 9 months ago

i see the same rproblem. I am running HA in docker. so i simply did a docker pull to 2023.10.2 and i see the following in the logs

Authentication failed: Error requesting data from https://partner-identity.myq-cloud.com/Account/LoginWithEmail?returnUrl=/connect/authorize/callback?client_id%3DIOS_CGI_MYQ%26code_challenge%

do i need to do anything to wipe out previous attempts?


UPdate: even with docekr container you have to shell into it and uninstall the previous myq that i tried before to see if it fixed it. After doing this it is now working. So i did a docker exec into my home assistnt container and pip unintall myq. Then reinstalled the integration and it is now working. Just in case someone has the same situation.

Lash-L commented 9 months ago

I am still getting 403 errors in my logs and they are saying they are coming from pymyq.api. When i try to run pip uninstall pymyq it says it is skipping it because it is not installed

@Alexithemia do pip uninstall python-myq and make sure config folder is empty/ any other changes you did are undone

Im still seeing the error on HA v2023.10.2, below is my logs, any ideas? I see the 403 auth error, but also some other things in there. I have tried disabling for a while, and deleting the integration and trying to reset it up.

@ErickWarden Did you do any manual changes when you were trying to fix the problem? function definitely exist which leads me to believe your code is wrong. I'd make sure your config folder is empty and you pip uninstall python-myq in your docker container

do i need to do anything to wipe out previous attempts?

@fgonza2 Yes, It is tricky because it depends on what you did to set it up, empty your config folder or do a pip uninstall python-myq and pip uninstall pymyq

ok, I'm back home now...will do that and report back. home-assistant_myq_2023-10-13T00-19-48.765Z.log Update: I realized that I had disabled the integration approx 2 hours ago and just enabled it. Log file attached. Same result, 403. Disabled it again and rebooted.

@NukeThemTillTheyGlow From what I can tell you also have a old version of the code, you need to wipe out any changes you made.

Seemingly no one is having any problems so long as they have the latest version - if you tried to fix the problem yourself or following someones instructions using commands, you need to undo it.

Alexithemia commented 9 months ago

I am still getting 403 errors in my logs and they are saying they are coming from pymyq.api. When i try to run pip uninstall pymyq it says it is skipping it because it is not installed

@Alexithemia do pip uninstall python-myq and make sure config folder is empty/ any other changes you did are undone

It says neither is installed. Adding the integration just now worked after trying it now hours later, guess I needed to wait out my lockout or something

scyto commented 9 months ago

It says neither is installed. Adding the integration just now worked after trying it now hours later, guess I needed to wait out my lockout or something

i needed to disable plugin, reboot (as doing that made the whole UI unstable) then delete it then re-addit then wait for lockout to expire(you can see if you are locked out by logging out of myq on the phone and loggin in, if your IP is blacklisted it will give a text json error) then re-add

skybasemonkeyha commented 9 months ago

i have two home assistant instances on my home automation network system on two servers. for identification purposes my primary Home Assistant will be referred to as HA1 and my secondary instance is referred to as HA3 the main reason for having two instances is a broken HomeKit Module affecting my FireTV Bridge on HA1 (likely due to HOOBS also running on HA1's OS) but works fine as a single instance on HA3.

Now I have actually manually tried to fix the issue using the zip and modifications to the PYMYQ module as suggested on other posts on HA1, no matter what i tried to do I keep getting the 403 forbidden error. I can login using the APP on my Android devices both wifi and mobile data so my ip isn't blacklisted. plus I am dynamic to begin with. I did follow the steps of removing pymyq and python-myq also cloning the repo and even downgrading to my 9.3 backup and back to 10.2 and no joy

on HA3 which never had the MyQ integration before it stalled on the login ui and came back with an unknown error result from a freshly upgraded 10.2 log from HA3

Log details (ERROR) Logger: homeassistant.config_entries Source: config_entries.py:399 First occurred: 3:51:47 AM (1 occurrences) Last logged: 3:51:47 AM

Error setting up entry cglmmyqs@home.mygeekintercept.com for myq Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/myq/init.py", line 42, in async_setup_entry myq = await pymyq.login(conf[CONF_USERNAME], conf[CONF_PASSWORD], websession) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 632, in login await api.authenticate(wait=True) File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 514, in authenticate await self._authentication_task File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 527, in _authenticate token, expires = await self._oauth_authenticate() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 322, in _oauth_authenticate resp, html = await self.request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymyq/api.py", line 235, in request return await call_method( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 316, in request_text resp = await self._send_request( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymyq/request.py", line 156, in _send_request resp = await websession.request( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 562, in _request conn = await self._connector.connect( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect proto = await self._create_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1178, in _create_direct_connection transp, proto = await self._wrap_create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection sock = await self._connect_sock( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect return await fut ^^^^^^^^^ asyncio.exceptions.CancelledError: aiohttp connection lost

from HA1 where manual fixes were applied then undone upgraded 10.2 downgraded to 9.3 and upgraded back to 10.2

Logger: pymyq.api Source: pymyq/api.py:606 First occurred: 3:20:56 AM (5 occurrences) Last logged: 3:24:49 AM

Authentication failed: Error requesting data from https://partner-identity.myq-cloud.com/Account/LoginWithEmail?returnUrl=/connect/authorize/callback?client_id%3DIOS_CGI_MYQ%26code_challenge%3Dw-pAvafKQbbCs0087cZ2zk3yOv5vV72h680iR4cbuhk%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fios%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access: 403 - Forbidden Authentication failed: Error requesting data from https://partner-identity.myq-cloud.com/Account/LoginWithEmail?returnUrl=/connect/authorize/callback?client_id%3DIOS_CGI_MYQ%26code_challenge%3Dxztl_5ceknQ_YMxKwbmWIBa_um-mmsqwvMMliElalN8%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fios%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access: 403 - Forbidden Authentication failed: Error requesting data from https://partner-identity.myq-cloud.com/Account/LoginWithEmail?returnUrl=/connect/authorize/callback?client_id%3DIOS_CGI_MYQ%26code_challenge%3DdZ4168qmhXV1rFoG3N3y6-bDSkavCyi6QYOBhZ0yDUg%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fios%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access: 403 - Forbidden Authentication failed: Error requesting data from https://partner-identity.myq-cloud.com/Account/LoginWithEmail?returnUrl=/connect/authorize/callback?client_id%3DIOS_CGI_MYQ%26code_challenge%3DJu6joQ-JWLWrkz8W6ca84VMRd0cOz96Bt7Atb10aOl0%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fios%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access: 403 - Forbidden Authentication failed: Error requesting data from https://partner-identity.myq-cloud.com/Account/LoginWithEmail?returnUrl=/connect/authorize/callback?client_id%3DIOS_CGI_MYQ%26code_challenge%3DwLDlLobzXh48xgnp0PtR9HXgRu47S8a2jlEV29up5d0%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fios%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access: 403 - Forbidden

any suggestions. I will next try a completely clean vmware hassio image, installation tomorrow, well later today since its 4am some time,

if anyone is wondering why my second install is HA3 its because i have an openhab server as HA2 a little background to my setup which might explain some of the issues with HA1 at least but not with HA3

my first installation originally had HOOBS, HomeBridge, SCRYPTED, and XAMPP and OpenHAB working in Harmony, but due to issues with Local Tuya and HomeKit resulting from updates over time, My OpenHAB and mDNS, the OpenHAB Server and was uninstalled and moved to HA2, since then my HomeBridge server was completed removed in favor of HOOBS and is used as new standalone instance HA4 for testing purposes only, HA3 was setup because my FireTV HomeKit Bridge kept on having to be reset constantly it was later discovered it was due to multiple HomeKit Bridge instances and a known issue with pyhomekit i have only had to reset the homekit bridge on HA3 only once since in the 3 weeks its been up and that was due to a reset of my FireTV.

Since some devices work better in OpenHAB, some work better in Home Assistant, and others work better with HomeBridge/HOOBS.

OpenHAB is being used Primary for TuyaLAN, Sonoff, Vizio and Sony bindings. HA1 via HomeKit HOOBS is being used for Blink, Google Nest, Sonoff, Ring, and Tuya Infrared. linked to HA1 via HomeKit XAMPP is being used specificially for Directed Viper Smart Start. linked to HA1 via rest command SCRYPTED is being used as a Google Assistant and Ring Bridge. and not linked to HA1 at all. HA3 is being used specificially for my 4 FireSticks using ADB Debugging and my FireTV using both ADB Debugging and HomeKit (ADB Debugging doesn't to the TV inputs well, but HomeKit does) linked to HA1 via Remote Home Assistant

My HA1 may be more problematic because of the previous installs of other ecosystems on the same host and i had already experienced some issues. all instances are bult on debian both HA instances are HA supervised installations. HA1 is not running in VMware but directly on the host system. the rest are running off a second box in seperate VMware Instances.

the last time I attempted to make HA1 into VMware i had issues with the bluetooth dongle, I will however try it again tomorrow as well, as I have newer bluetooth dongles. I think it was that particular dongle with VMware.

I only got into Home Automation during COVID stay at home period, I needed to keep busy at the end of 2019 i had only a Google Nest, MyQ one WiFi Outlet 3 WiFi Bulbs 3 Google Home Minis, and an Echo Input and one Linkable SmartTV, 4 Roku x1s.

Now I have 19 Light switchs, 3 dimmer switch 2 with fan controls, 25 single outlet Wifi Plugs 3 dual outlet wifi plugs, 5 Wifi Surges, 4, linkable smarttvs 4, Firesticks 5 Rokus, 7 Wifi Remotes, 4 linkable Thermostats, 4 AndroidTV Cable boxes, A Smart Start Upgrade to my car, 2 ring doorbells 1 ring stickup cam and 4 ring chime pros, I have approximately 170 linkable devices at this point. This has turned into a fun little hobby and with something always breaking and more and more ways to make things better It has been keeping me busy

UPDATE about 2 hours later though no other error on my logs about 7:20am EDT, the two device entities are now showing up on HA3 however it has not completed setup properly due to some type of time out and the integration is still uncontrollable and with a failed to setup.

skybasemonkeyha commented 9 months ago

thanks sunypla that fixed my issue with HA1 however HA3 still doesnt work, but as long as HA1 Works I dont care about HA3

NukeThemTillTheyGlow commented 9 months ago

I am still getting 403 errors in my logs and they are saying they are coming from pymyq.api. When i try to run pip uninstall pymyq it says it is skipping it because it is not installed

@Alexithemia do pip uninstall python-myq and make sure config folder is empty/ any other changes you did are undone

Im still seeing the error on HA v2023.10.2, below is my logs, any ideas? I see the 403 auth error, but also some other things in there. I have tried disabling for a while, and deleting the integration and trying to reset it up.

@ErickWarden Did you do any manual changes when you were trying to fix the problem? function definitely exist which leads me to believe your code is wrong. I'd make sure your config folder is empty and you pip uninstall python-myq in your docker container

do i need to do anything to wipe out previous attempts?

@fgonza2 Yes, It is tricky because it depends on what you did to set it up, empty your config folder or do a pip uninstall python-myq and pip uninstall pymyq

ok, I'm back home now...will do that and report back. home-assistant_myq_2023-10-13T00-19-48.765Z.log Update: I realized that I had disabled the integration approx 2 hours ago and just enabled it. Log file attached. Same result, 403. Disabled it again and rebooted.

@NukeThemTillTheyGlow From what I can tell you also have a old version of the code, you need to wipe out any changes you made.

Seemingly no one is having any problems so long as they have the latest version - if you tried to fix the problem yourself or following someones instructions using commands, you need to undo it. @Lash-L Thanks for taking the time to dig into this. At first after reading your comments I didn't think I had any code changes (i.e. I didn't make any of the fixes that have been talked about in the previous thread over the past few days), but then I remembered going back a month or more...yet another MyQ integration issues, I did make the patch type of code changes. But then, if I remember correctly, the commentary was apply the patch to get it working, wait for perm fix in new core update, apply and you should be fine. So that what I did. Do you think that is the legacy change that you have found? Most of all, what's the proper way to fix this? research the past changes and undo or can I remove the integration and reinstall? Seems like I've read issues from others uninstalling/reinstalling.

ETA: I just applied 10.3 to see if that made a difference and same results. MyQ is disabled until I figure out a way to get this properly resolved or find a reliable alternative.

skybasemonkeyha commented 9 months ago

i got ha3 working after upgrading to 10.3 maybe the downgrade of aiohttp helped on HA1 I thought i undone all the patches, however i was focusing on the issues since 10-11 and neglected that patch with the user-agent

TonyMontuna commented 9 months ago

I woke up this morning to MyQ no longer being listed in my integrations. I am lost.

When i try to setup the integration it says it's already installed but its not in my integrations dashboard

image
Logger: pymyq.api
Source: pymyq/api.py:606
First occurred: 10:40:54 AM (1 occurrences)
Last logged: 10:40:54 AM

Authentication failed: Error requesting data from https://partner-identity.myq-cloud.com/Account/LoginWithEmail?returnUrl=/connect/authorize/callback?client_id%3DIOS_CGI_MYQ%26code_challenge%3DrxEOHu_zptFV4iafATgf6q6LOQMwKLiLZ_fx7lDQZuo%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fios%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access: 403 - Forbidden
skybasemonkeyha commented 9 months ago

for those who are copy and pasters when there are fix commands ratsputin's listed commands should work but he didn't line them out removing the pymyq folder got missed i was working so i was multitasking at the same time and overlooked the combined line commands. ratsputin also didn't give the actual commands to clone the repo. since i barely use git-clone (yeah i know i don't usually use other people's code, but i'm somewhat new to this ecosystem so i haven't had time to build my own) and use wget i will give the wget option for you all.

to remove all patches on supervised as well as hassos and docker. I used putty a user after i originally was using the ssh addon so the docker command was not needed for that user

My Needed Commands docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz
cp -f core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3

TonyMontuna commented 9 months ago

for those who are copy and pasters when there are fix commands ratsputin's listed commands should work but he didn't line them out removing the pymyq folder got missed i was working so i was multitasking at the same time and overlooked the combined line commands. ratsputin also didn't give the actual commands to clone the repo. since i barely use git-clone (yeah i know i don't usually use other people's code, but i'm somewhat new to this ecosystem so i haven't had time to build my own) and use wget i will give the wget option for you all.

to remove all patches on supervised as well as hassos and docker.

My Needed Commands docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz cp -f core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3

image

this from logs

''' Config entry 'myemail' for myq integration not ready yet: Got 429 error - stopping request until 2023-10-13 15:57:37.282334. there were 1 request; Retrying in background '''

skybasemonkeyha commented 9 months ago

Y

for those who are copy and pasters when there are fix commands ratsputin's listed commands should work but he didn't line them out removing the pymyq folder got missed i was working so i was multitasking at the same time and overlooked the combined line commands. ratsputin also didn't give the actual commands to clone the repo. since i barely use git-clone (yeah i know i don't usually use other people's code, but i'm somewhat new to this ecosystem so i haven't had time to build my own) and use wget i will give the wget option for you all. to remove all patches on supervised as well as hassos and docker. My Needed Commands docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz cp -f core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3

image

this from logs

''' Config entry 'myemail' for myq integration not ready yet: Got 429 error - stopping request until 2023-10-13 15:57:37.282334. there were 1 request; Retrying in background '''

You got throttled disable the integration and try again in 2 hours by re-enabling

TonyMontuna commented 9 months ago

Y

for those who are copy and pasters when there are fix commands ratsputin's listed commands should work but he didn't line them out removing the pymyq folder got missed i was working so i was multitasking at the same time and overlooked the combined line commands. ratsputin also didn't give the actual commands to clone the repo. since i barely use git-clone (yeah i know i don't usually use other people's code, but i'm somewhat new to this ecosystem so i haven't had time to build my own) and use wget i will give the wget option for you all. to remove all patches on supervised as well as hassos and docker. My Needed Commands docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz cp -f core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3

image

this from logs ''' Config entry 'myemail' for myq integration not ready yet: Got 429 error - stopping request until 2023-10-13 15:57:37.282334. there were 1 request; Retrying in background '''

You got throttled disable the integration and try again in 2 hours by re-enabling

The integration isn't in my integrations page so I have no way of disabling it

skybasemonkeyha commented 9 months ago

update your core.

TonyMontuna commented 9 months ago

update your core.

There are no updates available, I've updated the os

NukeThemTillTheyGlow commented 9 months ago

for those who are copy and pasters when there are fix commands ratsputin's listed commands should work but he didn't line them out removing the pymyq folder got missed i was working so i was multitasking at the same time and overlooked the combined line commands. ratsputin also didn't give the actual commands to clone the repo. since i barely use git-clone (yeah i know i don't usually use other people's code, but i'm somewhat new to this ecosystem so i haven't had time to build my own) and use wget i will give the wget option for you all.

to remove all patches on supervised as well as hassos and docker. I used putty a user after i originally was using the ssh addon so the docker command was not needed for that user

My Needed Commands docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz cp -f core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3

@skybasemonkeyha

So just step through those commands via the terminal screen? I'm on HAOS (running as VM in Proxmox) and I assume the Docker commands just won't work? Just confirming so I don't wreck my HA install.

BillBlight commented 9 months ago

There were a couple of commands missing from skybasemonkeyha's list ..

docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz tar -xvf 2023.10.3.tar.gz cp -fr core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3 rm 2023.10.3.tar.gz

skybasemonkeyha commented 9 months ago

for those who are copy and pasters when there are fix commands ratsputin's listed commands should work but he didn't line them out removing the pymyq folder got missed i was working so i was multitasking at the same time and overlooked the combined line commands. ratsputin also didn't give the actual commands to clone the repo. since i barely use git-clone (yeah i know i don't usually use other people's code, but i'm somewhat new to this ecosystem so i haven't had time to build my own) and use wget i will give the wget option for you all. to remove all patches on supervised as well as hassos and docker. I used putty a user after i originally was using the ssh addon so the docker command was not needed for that user My Needed Commands docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz cp -f core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3

@skybasemonkeyha

So just step through those commands via the terminal screen? I'm on HAOS (running as VM in Proxmox) and I assume the Docker commands just won't work? Just confirming so I don't wreck my HA install.

Si Senor,

TonyMontuna commented 9 months ago

There were a couple of commands missing from skybasemonkeyha's list ..

docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz tar -xvf 2023.10.3.tar.gz cp -fr core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3 rm 2023.10.3.tar.gz

I tried all the reccomendations but when I try to setup the integration (put in email and pw) I get a failed to connect error. There is now nothing showing in my logs realted to myq

TonyMontuna commented 9 months ago

There were a couple of commands missing from skybasemonkeyha's list ..

docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz tar -xvf 2023.10.3.tar.gz cp -fr core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3 rm 2023.10.3.tar.gz

when I run this, I get errors

image
skybasemonkeyha commented 9 months ago

There were a couple of commands missing from skybasemonkeyha's list .. docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz tar -xvf 2023.10.3.tar.gz cp -fr core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3 rm 2023.10.3.tar.gz

when I run this, I get errors

image

Tony I got that too on my alternate installation (HA3), but after 4 hours it started to work intermittently it is likely because you were throttled

skybasemonkeyha commented 9 months ago

sorry i can't help you more but i do need to get going.

NukeThemTillTheyGlow commented 9 months ago

if I uninstall the MyQ integration, does that achieve the same result of removing the old patch fix?

skybasemonkeyha commented 9 months ago

There were a couple of commands missing from skybasemonkeyha's list ..

docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz tar -xvf 2023.10.3.tar.gz cp -fr core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3 rm 2023.10.3.tar.gz

thanks for fixing my command list bill your right i left things out and sorry tony i didn't see you updated the core. i am doing 6 things at once

TonyMontuna commented 9 months ago

There were a couple of commands missing from skybasemonkeyha's list .. docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz tar -xvf 2023.10.3.tar.gz cp -fr core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3 rm 2023.10.3.tar.gz

thanks for fixing my command list bill your right i left things out and sorry tony i didn't see you updated the core. i am doing 6 things at once

I appreciate your efforts ... I'm stuck though and probably just need to revisit this later cause I should be working too

ur7x commented 9 months ago

OK I'm confused.

I did the manual patch and it fixed MyQ. I did the HA Core upgrade to 10.2 MyQ continued to work. No errors I just did the HA Core upgrade 10.3. MyQ continued to work. Again, no errors I also upgraded the HASS OS to 11.0. MyQ is still happy.

Do i need to unload anything?

skybasemonkeyha commented 9 months ago

There were a couple of commands missing from skybasemonkeyha's list .. docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz tar -xvf 2023.10.3.tar.gz cp -fr core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3 rm 2023.10.3.tar.gz

thanks for fixing my command list bill your right i left things out and sorry tony i didn't see you updated the core. i am doing 6 things at once

I appreciate your efforts ... I'm stuck though and probably just need to revisit this later cause I should be working too

don't worry i was playing with this and the one for homebridge and openhab all day yesterday anyways good luck i hope you get it working.

drothenberger commented 9 months ago

I did the manual patch and it fixed MyQ. I did the HA Core upgrade to 10.2 MyQ continued to work. No errors I just did the HA Core upgrade 10.3. MyQ continued to work. Again, no errors I also upgraded the HASS OS to 11.0. MyQ is still happy.

Do i need to unload anything?

How did you manually patch HA? If you put a "pymyq" folder in your config folder, you should remove it. If you directly patched the installed library, the HA upgrades will have replaced them and you don't need to do anything more.

ur7x commented 9 months ago

I did the manual patch and it fixed MyQ. I did the HA Core upgrade to 10.2 MyQ continued to work. No errors I just did the HA Core upgrade 10.3. MyQ continued to work. Again, no errors I also upgraded the HASS OS to 11.0. MyQ is still happy. Do i need to unload anything?

How did you manually patch HA? If you put a "pymyq" folder in your config folder, you should remove it. If you directly patched the installed library, the HA upgrades will have replaced them and you don't need to do anything more.

Like this

  1. cd /root/config
  2. wget https://github.com/justinlindh/Python-MyQ/archive/refs/heads/fix-403-forbidden.zip
  3. unzip -o -j fix-403-forbidden.zip -d pymyq
  4. Restart HA

There is a pymyq folder under my Config folder, It was created Wednesday evening

drothenberger commented 9 months ago

I did the manual patch and it fixed MyQ. I did the HA Core upgrade to 10.2 MyQ continued to work. No errors I just did the HA Core upgrade 10.3. MyQ continued to work. Again, no errors I also upgraded the HASS OS to 11.0. MyQ is still happy. Do i need to unload anything?

How did you manually patch HA? If you put a "pymyq" folder in your config folder, you should remove it. If you directly patched the installed library, the HA upgrades will have replaced them and you don't need to do anything more.

Like this

  1. cd /root/config
  2. wget https://github.com/justinlindh/Python-MyQ/archive/refs/heads/fix-403-forbidden.zip
  3. unzip -o -j fix-403-forbidden.zip -d pymyq
  4. Restart HA

Then run rm -fr /root/config/pymyq and restart HA to remove the manual patch.

BillBlight commented 9 months ago

Updated core, no patches, waited the 2 hours for throttle to clear, now all working again ...

A 2 hour throttle clear really seems a bit much ...

NukeThemTillTheyGlow commented 9 months ago

I did the manual patch and it fixed MyQ. I did the HA Core upgrade to 10.2 MyQ continued to work. No errors I just did the HA Core upgrade 10.3. MyQ continued to work. Again, no errors I also upgraded the HASS OS to 11.0. MyQ is still happy. Do i need to unload anything?

How did you manually patch HA? If you put a "pymyq" folder in your config folder, you should remove it. If you directly patched the installed library, the HA upgrades will have replaced them and you don't need to do anything more.

Like this

  1. cd /root/config
  2. wget https://github.com/justinlindh/Python-MyQ/archive/refs/heads/fix-403-forbidden.zip
  3. unzip -o -j fix-403-forbidden.zip -d pymyq
  4. Restart HA

Then run rm -fr /root/config/pymyq and restart HA to remove the manual patch.

I need to go back a month or so, but this seems very reminiscent of the "patch" I made, like others did, to get back up and running. I totally forgot about it other than assumed it was overwritten a while ago. I'll give this a try soon.

shiftylilbastrd commented 9 months ago

for those who are copy and pasters when there are fix commands ratsputin's listed commands should work but he didn't line them out removing the pymyq folder got missed i was working so i was multitasking at the same time and overlooked the combined line commands. ratsputin also didn't give the actual commands to clone the repo. since i barely use git-clone (yeah i know i don't usually use other people's code, but i'm somewhat new to this ecosystem so i haven't had time to build my own) and use wget i will give the wget option for you all.

to remove all patches on supervised as well as hassos and docker. I used putty a user after i originally was using the ssh addon so the docker command was not needed for that user

My Needed Commands docker exec -it homeassistant /bin/bash pip uninstall python-myq rm -rf config/pymyq rm -rf /usr/src/homeassistant/homeassistant/components/myq/ wget https://github.com/home-assistant/core/archive/refs/tags/2023.10.3.tar.gz cp -f core-2023.10.3/homeassistant/components/myq /usr/src/homeassistant/homeassistant/components/ rm -rf core-2023.10.3

I'm trying to do this via the terminal add-on and am getting pip uninstall python-myq bash: pip: command not found

drothenberger commented 9 months ago

I'm trying to do this via the terminal add-on and am getting pip uninstall python-myq bash: pip: command not found

What kind of install do you have? If Hass OS, did you run the docker exec -it homeassistant /bin/bash command before running the pip command?

It might be best if you copy-and-paste the entire terminal session here, with all the commands you ran and all the output. (If you do so, please put the output in a code block, or put it in a text file and attach it.)

shiftylilbastrd commented 9 months ago

I'm trying to do this via the terminal add-on and am getting pip uninstall python-myq bash: pip: command not found

What kind of install do you have? If Hass OS, did you run the docker exec -it homeassistant /bin/bash command before running the pip command?

It might be best if you copy-and-paste the entire terminal session here, with all the commands you ran and all the output. (If you do so, please put the output in a code block, or put it in a text file and attach it.)

Home Assistant 2023.10.3 Supervisor 2023.10.0 Operating System 11.0 Frontend 20231005.0 - latest and I'm using Terminal & SSH Current version: 9.7.1 it won't let me copy the entire session but here's what I get [core-ssh ~]$ docker exec -it homeassistant /bin/bash bash: docker: command not found

BillBlight commented 9 months ago

Home Assistant 2023.10.3 Supervisor 2023.10.0 Operating System 11.0 Frontend 20231005.0 - latest and I'm using Terminal & SSH Current version: 9.7.1 it won't let me copy the entire session but here's what I get [core-ssh ~]$ docker exec -it homeassistant /bin/bash bash: docker: command not found

You can't run the docker command from inside the ssh addon as you are already inside a docker container ...

That command should be run directly from the shell of the system you are running hass on, that is if you are running a docker version of hass ..