Frequently asked questions

How do I use it with an untested version of UniFi Video?

Use the keyword argument check_ufv_version when creating an API instance:

from unifi_video import UnifiVideoAPI
uva = UnifiVideoAPI(api_key='xxxxxx', addr='10.3.2.1', check_ufv_version=False)

How to skip cert verification?

Use the keyword argument verify_cert when creating an API instance:

from unifi_video import UnifiVideoAPI
uva = UnifiVideoAPI(api_key='xxxxxx', addr='10.3.2.1', verify_cert=False)

How do I use an open file descriptor, or another file-like object to save a snapshot with?

The filename param of snapshot() can be set to True to force the method to return the raw response body. You can then do with it as you please.

from unifi_video import UnifiVideoAPI

uva = UnifiVideoAPI(api_key='xxxxxx', addr='10.3.2.1')
camera = uva.get_camera('Garage')

some_file_like_object.write(camera.snapshot(filename=True))

This goes for all the download methods:

unifi-video-api, unifi-video, unifi_video: which is it?

unifi-video-api is the name of the Github repository, unifi_video is the name of the python package, and unifi-video is the name of the PyPI package that contains the unifi_video python package.