OpenVoiceOS / ovos-PHAL-plugin-homeassistant

HomeAssistant PHAL Plugin for OpenVoice OS
Apache License 2.0
10 stars 3 forks source link

Connection error #14

Closed andlo closed 1 year ago

andlo commented 1 year ago

Got errors when accessing homeassistant throu UI

2023-04-16 11:10:11.007 - OVOS - ovos_PHAL.service:load_plugins:77 - ERROR - failed to load PHAL plugin: ovos-PHAL-plugin-homeassistant Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/usr/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/usr/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/usr/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn conn.connect() File "/usr/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect self.sock = conn = self._new_conn() File "/usr/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f7c223e50>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/requests/adapters.py", line 440, in send resp = conn.urlopen( File "/usr/lib/python3.10/site-packages/urllib3/connectionpool.py", line 785, in urlopen retries = retries.increment( File "/usr/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='lergravsvej14b.duckdns.org', port=8123): Max retries exceeded with url: /api/states (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f7c223e50>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/ovos_PHAL/service.py", line 74, in load_plugins self.drivers[name] = plug(bus=self.bus, config=config) File "/home/mycroft/.local/lib/python3.10/site-packages/ovos_PHAL_plugin_homeassistant/init.py", line 94, in init self.init_configuration() File "/home/mycroft/.local/lib/python3.10/site-packages/ovos_PHAL_plugin_homeassistant/init.py", line 173, in init_configuration self.devices = self.connector.get_all_devices() File "/home/mycroft/.local/lib/python3.10/site-packages/ovos_PHAL_plugin_homeassistant/logic/connector.py", line 141, in get_all_devices response = requests.get(url, headers=self.headers) File "/usr/lib/python3.10/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, kwargs) File "/usr/lib/python3.10/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "/usr/lib/python3.10/site-packages/requests/sessions.py", line 529, in request resp = self.send(prep, send_kwargs) File "/usr/lib/python3.10/site-packages/requests/sessions.py", line 645, in send r = adapter.send(request, kwargs) File "/usr/lib/python3.10/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='lergravsvej14b.duckdns.org', port=8123): Max retries exceeded with url: /api/states (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f7c223e50>: Failed to establish a new connection: [Errno -2] Name or service not known'))

mikejgray commented 1 year ago

@andlo This is looking like your device can't reach the URL. Are you still seeing this issue on the latest version of the plugin?

andlo commented 1 year ago

@mikejgray NO - but that is because my MK2 isnt running ;)

some day I get it running - waiting for at bildroot image that is easy to setup and have latest plugins avaible :)

So this could be closed for now I think.