YeonV / ledfxrm

Custom Integration for Home Assistant to control a any (local/remote) LedFX-server - State: beta
MIT License
32 stars 6 forks source link

Unknown error occurred #1

Closed Errurion closed 3 years ago

Errurion commented 3 years ago

Logger: aiohttp.server Source: custom_components/ledfxrm/config_flow.py:73 First occurred: 2:10:55 (45 occurrences) Last logged: 13:51:54

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start resp = await task File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle resp = await handler(request) File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 169, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper result = await method(view, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 106, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 153, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 201, in _async_handle_step result: Dict = await getattr(flow, method)(user_input) File "/config/custom_components/ledfxrm/config_flow.py", line 37, in async_step_user name, version = await self.get_rest_status(user_input[CONF_HOST], user_input[CONF_PORT]) File "/config/custom_components/ledfxrm/config_flow.py", line 73, in get_rest_status rest_info = await resp.json() File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1026, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain', url=URL('http://localhost:5333/api/info')

YeonV commented 3 years ago

Is http://localhost:5333/api/info the correct URL, where your LedFX-Server is running? Is it on the same machine as HomeAssistant? Is your ledfx config yaml maybe defining host to "127.0.0.1" ? If so, change it to your IP or maybe 0.0.0.0 will also work

Errurion commented 3 years ago

ok my fault... My ledfx version was too old😅 I installed dev version 8.4 and now it works