home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.69k stars 30.82k forks source link

2024.11.2 - Reolink cameras cannot be added #130718

Closed william-sy closed 2 hours ago

william-sy commented 2 hours ago

The problem

The GUI for the integration gives you a uknown error:

This is from the log:

2024-11-15 21:56:38.078 ERROR (MainThread) [homeassistant.components.reolink.config_flow] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/reolink/config_flow.py", line 231, in async_step_user
    await host.async_init()
  File "/usr/src/homeassistant/homeassistant/components/reolink/host.py", line 149, in async_init
    await self._api.get_host_data()
  File "/usr/local/lib/python3.12/site-packages/reolink_aio/api.py", line 2300, in get_host_data
    await self.baichuan.get_info(channel)
  File "/usr/local/lib/python3.12/site-packages/reolink_aio/baichuan/baichuan.py", line 522, in get_info
    mess = await self.send(cmd_id=318, channel=channel)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/reolink_aio/baichuan/baichuan.py", line 93, in send
    await self.login()
  File "/usr/local/lib/python3.12/site-packages/reolink_aio/baichuan/baichuan.py", line 432, in login
    nonce = await self._get_nonce()
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/reolink_aio/baichuan/baichuan.py", line 309, in _get_nonce
    mess = await self.send(cmd_id=1, enc_type=EncType.BC, message_class="1465")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/reolink_aio/baichuan/baichuan.py", line 163, in send
    self._protocol.receive_futures[cmd_id].cancel()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 1

What version of Home Assistant Core has the issue?

2024.11.2

What was the last working version of Home Assistant Core?

2024.10.*

What type of installation are you running?

Home Assistant Container

Integration causing the issue

reolink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/reolink/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 hours ago

Hey there @starkillerog, mind taking a look at this issue as it has been labeled with an integration (reolink) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `reolink` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign reolink` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


reolink documentation reolink source (message by IssueLinks)

william-sy commented 2 hours ago

Think I found the reason for this.. Ill get back on this!

william-sy commented 2 hours ago

Ok I confirmed the problem.

Password character limit seems to be 10 characters max for the user.. that solves the problem.