Commit Graph

14 Commits (5bba9a63a5b6de101858a2537835aabf63417faf)

Author SHA1 Message Date
Dan Smith 6ed3c69604 Bump uvcclient to 0.10.0 (#5175)
This brings fixes for newer versions of unifi-video and a few
fixes.
2017-01-04 19:55:16 +01:00
Paulus Schoutsen da8994e4b5 Migrate camera.uvc to voluptuous (#3440) 2016-09-18 14:22:32 -07:00
Dan Smith 49de55e75b Add support for UniFi Video >= 3.2.0
Unfortunately, Ubiquiti changed their (supposedly versioned) API in
3.2.0 which causes us to have to refer to cameras by id instead of
UUID. The firmware for 3.2.x also changed the on-camera login procedures
and snapshot functionality significantly.

This bumps the requirement for uvcclient to 0.9.0, which supports the
newer API and makes the tweaks necessary to interact properly.
2016-06-06 20:28:52 -07:00
Fabian Affolter cd5b5c55e2 Fix PEP257 issues 2016-03-07 20:29:54 +01:00
Fabian Affolter 032f06e015 Modify docstrings to match PEP257 2016-03-07 18:50:30 +01:00
Dan Smith 05a1e11db2 Filter out AirCam models in UVC camera platform
The older (unsupported AirCam) models behave differently and also apparently
suffer some under the last release of the NVR that supported them. Since they
are EOL and not supported by current software, filter them out so we don't
break while trying to extract an image from them.
2016-02-23 12:01:51 -08:00
Dan Smith 590512916a Add tests for camera.uvc and fix bugs found in the process
This adds tests for the uvc camera module. It's a good thing too,
because I found a few bugs which are fixed here as well:

 - Graceful handling of non-integer port
 - Failure to take the first host that works when probing host,internalHost
 - Failure to detect if neither of them actually work

This also converts the code to only call add_devices once with a listcomp.
2016-02-22 14:37:57 -08:00
Dan Smith d398832112 Make UVC cameras honor the local camera password store, if set
The NVR tells us the admin username, but not the password for the
camera. Right now, we assume the default password, which obviously
doesn't work for people that have changed it. The uvcclient library
provides a way to set the cached admin password for a camera, which
is stored in a client-specific location. We can utilize that to
grab the password, falling back to the default if it's unset. With
this, people just need to run a command per camera to set the
admin password on their systems, if it has changed.
2016-02-22 13:17:53 -08:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Dan Smith 885b61a750 Implement brand and model for UVC cameras 2016-02-14 17:27:29 +00:00
Dan Smith 0ba7fb40a4 Improve UVC performance by not logging in on each image fetch
This makes the UVC camera_image() method not log into the camera on
every single image fetch, which reduces load on hass and the camera,
and lowers the latency to get an actual image fetched.
2016-02-14 17:27:29 +00:00
Dan Smith 263839a336 Handle connection errors talking to UVC cameras during image fetch
This requires uvcclient==0.6 which breaks out exceptions for us.

Fixes #1244
2016-02-14 17:27:26 +00:00
Fabian Affolter 757946293e Move configuration details to docs 2016-02-07 11:52:17 +01:00
Dan Smith cab1100a51 Add Ubiquiti Unifi Video Camera support
This adds support for Ubiquiti's UniFi Video cameras via their
NVR device (or service). By configuring just the address of the
NVR and a valid API key, all cameras are discovered and enabled,
including direct-to-camera image snapshot-based video support.
2016-02-06 22:57:44 +00:00