Skip to content

Add password parameter to uvc component#7499

Merged
balloob merged 1 commit into
home-assistant:devfrom
nunofgs:bugfix/add-password-parameter-to-uvc-component
May 10, 2017
Merged

Add password parameter to uvc component#7499
balloob merged 1 commit into
home-assistant:devfrom
nunofgs:bugfix/add-password-parameter-to-uvc-component

Conversation

@nunofgs
Copy link
Copy Markdown
Contributor

@nunofgs nunofgs commented May 8, 2017

Description:

Fixes an issue where the UVC component would not properly authenticate.

The uvcclient requires that the camera password is stored in a JSON file in ~/.uvcclient by default.

The current integration Home Assistant is defaulting to the ubnt password but does not work for users that are using another password.

I really don't see how this ever worked for users that changed the default ubnt password. It probably never did which is why so many users are reporting problems.

This PR removes the "store" codepath and simply allows a password argument to be passed for the component.

Related issues:

Fixes #2979.
Fixes #7151.
Fixes #3810. (in my opinion)

Related community issues:

Pull request in home-assistant.github.io with documentation: home-assistant/home-assistant.io#2600

Example entry for configuration.yaml:

camera:
  - platform: uvc
    nvr: IP_ADDRESS
    key: API_KEY
    password: PASSWORD

Checklist:

@mention-bot
Copy link
Copy Markdown

@nunofgs, thanks for your PR! By analyzing the history of the files in this pull request, we identified @kk7ds, @fabaff and @balloob to be potential reviewers.

Comment thread tests/components/camera/test_uvc.py Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (86 > 79 characters)

Comment thread tests/components/camera/test_uvc.py Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuation line under-indented for visual indent

@nunofgs nunofgs force-pushed the bugfix/add-password-parameter-to-uvc-component branch from 7f4602d to ad75cb2 Compare May 8, 2017 20:28
@nunofgs nunofgs force-pushed the bugfix/add-password-parameter-to-uvc-component branch from ad75cb2 to d4e03f3 Compare May 8, 2017 20:30
@JshWright
Copy link
Copy Markdown
Contributor

JshWright commented May 9, 2017

This looks good to me. If ~/.uvcclient is a standard convention, is it worth looking there as well? (Password resolution order would be: HA config -> ~/.uvcclient -> default)

@nunofgs
Copy link
Copy Markdown
Contributor Author

nunofgs commented May 9, 2017

If ~/.uvcclient is a standard convention, is it worth looking there as well?

It doesn't appear to be. It is specific to this python library and a google search reveals that is is largely undiscovered.

In my opinion there is little benefit in supporting this file.

@balloob balloob merged commit 89d950c into home-assistant:dev May 10, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Aug 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants