AlexxIT / YandexStation

Управление Яндекс.Станцией и другими устройствами умного дома с Алисой из Home Assistant
https://t.me/AlexxIT_SmartHome
MIT License
1.34k stars 124 forks source link

Нет возможности пройти аутентификацию (captcha) #417

Closed Xoma163 closed 5 months ago

Xoma163 commented 10 months ago

При попытке пройти аутентификацию через QR/Email

Логи
2023-12-01 14:04:54.962 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/opt/homeassistant/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/headers.py", line 31, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/view.py", line 148, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/decorators.py", line 63, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/config/config_entries.py", line 177, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/data_entry_flow.py", line 293, in async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/data_entry_flow.py", line 389, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.homeassistant/custom_components/yandex_station/config_flow.py", line 69, in async_step_user
    description_placeholders={"qr_url": await self.yandex.get_qr()},
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.homeassistant/custom_components/yandex_station/core/yandex_session.py", line 205, in get_qr
    assert m, resp
AssertionError: 



    400
    







    
400


    

Bad Request

If you come across any problems, please do not hesitate to contact our Support service.

Xoma163 commented 10 months ago

Попытка войти по токену:

Логи
2023-12-01 14:10:32.739 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ***for yandex_station
Traceback (most recent call last):
  File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/config_entries.py", line 402, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.homeassistant/custom_components/yandex_station/__init__.py", line 137, in async_setup_entry
    await quasar.init()
  File "/home/homeassistant/.homeassistant/custom_components/yandex_station/core/yandex_quasar.py", line 82, in init
    r = await self.session.get(f"{URL_V3_USER}/devices")
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.homeassistant/custom_components/yandex_station/core/yandex_session.py", line 467, in get
    return await self._request("get", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.homeassistant/custom_components/yandex_station/core/yandex_session.py", line 516, in _request
    return await self._request(method, url, retry - 1, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.homeassistant/custom_components/yandex_station/core/yandex_session.py", line 516, in _request
    return await self._request(method, url, retry - 1, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.homeassistant/custom_components/yandex_station/core/yandex_session.py", line 518, in _request
    raise Exception(f"{url} return {r.status} status")
Exception: https://iot.quasar.yandex.ru/m/v3/user/devices return 401 status

IgorBurkovAlmaty commented 9 months ago

Не могу войти при всех вариантах

Xoma163 commented 9 months ago

Не могу войти при всех вариантах

Решил проблему впном. Включил, зашёл в аккаунт и отключил, потому что дальше общение идёт с api и там каптчи в принципе быть не может

Xoma163 commented 9 months ago

Возможно дубль #386

AlexxIT commented 5 months ago

Да, дубль