py-smart-gardena / hass-gardena-smart-system

Home Assistant custom component integration for Gardena Smart System
Apache License 2.0
213 stars 53 forks source link

api.authentication.husqvarnagroup.dev' does not appear to be an IPv4 or IPv6 #132

Open Dielee opened 2 years ago

Dielee commented 2 years ago

I'm getting this error using the gardena smart system integration. Component Version: 1.0.0-0b903 Homeassistant Version: 2022.7.5

Any advice ?

Traceback (most recent call last):
  File "/srv/homeassistant_39/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 149, in connect_tcp
    addr_obj = ip_address(remote_host)
  File "/usr/local/lib/python3.9/ipaddress.py", line 53, in ip_address
    raise ValueError('%r does not appear to be an IPv4 or IPv6 address' %
ValueError: 'api.authentication.husqvarnagroup.dev' does not appear to be an IPv4 or IPv6 address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp
    stream: anyio.abc.ByteStream = await anyio.connect_tcp(
  File "/srv/homeassistant_39/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 152, in connect_tcp
    gai_res = await getaddrinfo(target_host, remote_port, family=family,
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpcore/_exceptions.py", line 8, in map_exceptions
    yield
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp
    stream: anyio.abc.ByteStream = await anyio.connect_tcp(
  File "/srv/homeassistant_39/lib/python3.9/site-packages/anyio/_core/_tasks.py", line 103, in __exit__
    raise TimeoutError
TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
    yield
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
    raise exc
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(request)
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpcore/_async/connection.py", line 86, in handle_async_request
    raise exc
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request
    stream = await self._connect(request)
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpcore/_async/connection.py", line 111, in _connect
    stream = await self._network_backend.connect_tcp(**kwargs)
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp
    return await self._backend.connect_tcp(
File "/srv/homeassistant_39/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp
    stream: anyio.abc.ByteStream = await anyio.connect_tcp(
  File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
    raise to_exc(exc)
httpcore.ConnectTimeout
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/srv/homeassistant_39/lib/python3.9/site-packages/homeassistant/config_entries.py", line 353, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/home/home-assistant/custom_components/gardena_smart_system/__init__.py", line 49, in async_setup_entry
    await gardena_system.start()
  File "/home/home-assistant/custom_components/gardena_smart_system/__init__.py", line 85, in start
    await self.smart_system.authenticate()
  File "/srv/homeassistant_39/lib/python3.9/site-packages/gardena/smart_system.py", line 69, in authenticate
    self.token_manager.load_from_oauth2_token(await self.client.fetch_token(
  File "/srv/homeassistant_39/lib/python3.9/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 124, in _fetch_token
    resp = await self.post(
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpx/_client.py", line 1842, in post
    return await self.request(
  File "/srv/homeassistant_39/lib/python3.9/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 91, in request
    return await super(AsyncOAuth2Client, self).request(
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpx/_client.py", line 1527, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpx/_client.py", line 1614, in send
    response = await self._send_handling_auth(
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpx/_client.py", line 1642, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpx/_client.py", line 1679, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpx/_client.py", line 1716, in _send_single_request
    response = await transport.handle_async_request(request)
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/srv/homeassistant_39/lib/python3.9/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectTimeout
grm commented 2 years ago

Hello,

Could you try to do a :

host api.authentication.husqvarnagroup.dev

from a terminal and paste the response here please ?

clipse2004 commented 2 years ago

Hello,

Could you try to do a :

host api.authentication.husqvarnagroup.dev

from a terminal and paste the response here please ?

ive I put youre text into terminal I got this:

api.authentication.husqvarnagroup.dev has address 143.204.89.29 api.authentication.husqvarnagroup.dev has address 143.204.89.93 api.authentication.husqvarnagroup.dev has address 143.204.89.40 api.authentication.husqvarnagroup.dev has address 143.204.89.26