fwestenberg / reolink_dev

Home Assistant Reolink addon
MIT License
550 stars 102 forks source link

Not able to import RLC-823A #567

Closed rdalbenzio closed 2 years ago

rdalbenzio commented 2 years ago

Get this error in the logs:

Need to specify host and port (others just need username and password) if I use discovery.

Error: 2022-09-13 17:47:13.205 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 178, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper result = await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 280, in async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/config/custom_components/reolink_rest/config_flow.py", line 317, in async_step_connection self.data.update(user_input) ValueError: dictionary update sequence element #0 has length 3; 2 is required

Homeassistant 2009.9.2 on x86_64 hardware RLC-823A with Firmware v3.1.0.956_22041511_v1.0.0.30

Any more info I can collect let me know.

Thanks.

rdalbenzio commented 2 years ago

Updated to the last version and the error changed.

Now I'm able to import adding username/password (admin), but once imported I get this error (on the web page as well)

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/async_reolink/rest/connection.py", line 331, in __execute _cleanup() File "/usr/local/lib/python3.10/site-packages/async_reolink/rest/connection.py", line 222, in _cleanup response.close() AttributeError: 'LoginResponse' object has no attribute 'close' 2022-09-14 22:54:19.689 ERROR (MainThread) [custom_components.reolink_rest] Unexpected error fetching reolink_rest-Borghetto Ingresso data: 'list' object is not an iterator Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data return await self.update_method() File "/config/custom_components/reolink_rest/init.py", line 77, in _update_data return await entity_data.async_update() File "/config/custom_components/reolink_rest/entity.py", line 454, in async_update result = await self._execute_commands(commands, command_channel=command_channel) File "/config/custom_components/reolink_rest/entity.py", line 314, in _execute_commands or self._process_ptz_responses( File "/config/custom_components/reolink_rest/entity.py", line 660, in _process_ptz_responses channel = response.channel_id File "/usr/local/lib/python3.10/site-packages/async_reolink/rest/commands/ptz.py", line 227, in channel_id if (value := next(_list, None)) is None: TypeError: 'list' object is not an iterator

Screenshot 2022-09-14 at 22 56 11
rdalbenzio commented 2 years ago

Another change after last upgrade.

This is what I get from the web-ui of HA.

Retrying setup: Subscripted generics cannot be used with class and instance checks

rdalbenzio commented 2 years ago

Fixed after last update (0.57(.