Hi folks, I was trying to turn the Unified Remote integration to async, I also made a new connection module to use aiohttp instead of requests one, but I’m having to much troubles and for now I just gave away. If some can give me a light…
This was the last error I had: object UUID can't be used in 'await' expression
For this one, I tried many ways to run uuid4() in event loop but it keeps throwing this error.
I tested the service just like that and got another error
2020-06-07 01:57:43 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/unified_remote/__init__.py", line 123, in call_keep_alive
await async_keep_alive(call, host, port)
File "/config/custom_components/unified_remote/__init__.py", line 165, in async_keep_alive
response = await CONNECTION.exe_remote("", "")
File "/config/custom_components/unified_remote/cli/async_connection.py", line 102, in exe_remote
self.__url + "request", headers=self.__headers, data=dumps(payload)
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 473, in _request
ssl=ssl, proxy_headers=proxy_headers, traces=traces)
File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 285, in __init__
self.update_host(url)
File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 339, in update_host
raise InvalidURL(url)
aiohttp.client_exceptions.InvalidURL: request
2020-06-07 01:58:01 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1867643856] request
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1253, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1288, in _execute_service
await handler.func(service_call)
File "/config/custom_components/unified_remote/__init__.py", line 154, in handle_call
await call_remote(remote_id, action)
File "/config/custom_components/unified_remote/__init__.py", line 84, in call_remote
await CONNECTION.exe_remote(id, action)
File "/config/custom_components/unified_remote/cli/async_connection.py", line 102, in exe_remote
self.__url + "request", headers=self.__headers, data=dumps(payload)
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 473, in _request
ssl=ssl, proxy_headers=proxy_headers, traces=traces)
File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 285, in __init__
self.update_host(url)
File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 339, in update_host
raise InvalidURL(url)
aiohttp.client_exceptions.InvalidURL: request
These error tells me that the url is not being setted, so I really don’t know what to do anymore.