Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unifi Protect stopped working after updating protect to 2.1.1 #75296

Closed
zodracom opened this issue Jul 16, 2022 · 4 comments · Fixed by #75269
Closed

Unifi Protect stopped working after updating protect to 2.1.1 #75296

zodracom opened this issue Jul 16, 2022 · 4 comments · Fixed by #75269

Comments

@zodracom
Copy link

zodracom commented Jul 16, 2022

The problem

I had protect working for a few weeks, until the protect update to 2.1.1.

What version of Home Assistant Core has the issue?

2022.6.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Unifi protect

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: components/unifiprotect/data.py:94
First occurred: 14 juli 2022 om 18:26:55 (2 occurrences)
Last logged: 09:52:09

Error setting up entry ivdk Electronics for unifiprotect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 339, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/unifiprotect/__init__.py", line 139, in async_setup_entry
    await data_service.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 74, in async_setup
    await self.async_refresh()
  File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 94, in async_refresh
    updates = await self.api.update(force=force)
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/api.py", line 508, in update
    self._bootstrap = await self.get_bootstrap()
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/api.py", line 677, in get_bootstrap
    return Bootstrap.from_unifi_dict(**data, api=self)
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/data/base.py", line 111, in from_unifi_dict
    data = cls.unifi_dict_to_dict(data)
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/data/bootstrap.py", line 160, in unifi_dict_to_dict
    return super().unifi_dict_to_dict(data)
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/data/base.py", line 343, in unifi_dict_to_dict
    data[key] = cls._clean_protect_obj_dict(data[key], unifi_dicts[key], api)
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/data/base.py", line 288, in _clean_protect_obj_dict
    items[key] = cls._clean_protect_obj(value, klass, api)
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/data/base.py", line 272, in _clean_protect_obj
    return klass.unifi_dict_to_dict(data=data)
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/data/devices.py", line 699, in unifi_dict_to_dict
    return super().unifi_dict_to_dict(data)
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/data/base.py", line 617, in unifi_dict_to_dict
    return super().unifi_dict_to_dict(data)
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/data/base.py", line 333, in unifi_dict_to_dict
    data[key] = cls._clean_protect_obj(data[key], unifi_objs[key], api)
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/data/base.py", line 272, in _clean_protect_obj
    return klass.unifi_dict_to_dict(data=data)
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/data/base.py", line 326, in unifi_dict_to_dict
    data[key] = convert_unifi_data(data[key], cls.__fields__[key])
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/utils.py", line 160, in convert_unifi_data
    value = [convert_unifi_data(v, field) for v in value]
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/utils.py", line 160, in <listcomp>
    value = [convert_unifi_data(v, field) for v in value]
  File "/usr/local/lib/python3.9/site-packages/pyunifiprotect/utils.py", line 176, in convert_unifi_data
    value = field.type_(value)
  File "/usr/local/lib/python3.9/enum.py", line 384, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.9/enum.py", line 702, in __new__
    raise ve_exc
ValueError: 'homekit' is not a valid VideoMode

Additional information

No response

@probot-home-assistant
Copy link

unifiprotect documentation
unifiprotect source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @briis, @AngellusMortis, @bdraco, mind taking a look at this issue as it has been labeled with an integration (unifiprotect) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@zee-shany
Copy link

I'm not sure if this is similar issue. for me its asking to reconfigure the integration again and again in an interval of 8-12 hours. after i put in the user-id and pw for protect user, its ok. but reconfigure error msg comes again. noticed this happen twice since i upgraded to protect 2.1.1

@zodracom
Copy link
Author

wow. update core to 2022.7.5 did the job! stupid me :-)

@github-actions github-actions bot locked and limited conversation to collaborators Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants