Ubiquiti Unifi Camera Snapshot issues

I have been having issues getting snapshot from Unifi Cams.
After some digging I found what looks like (3) issues.:

-Unifi API to retreive Camera ID has changed
BEFORE: contact http://192.168.0.1:7080/api/2.0/camera to get camera UUID
NOW: contact http://192.168.0.1:7080/api/2.0/camera to get camera ID
SOLUTION: /.homeassistant/deps/uvcclient/nvr.py must reflect that change.

-When contact http://192.168.0.1:7080/api/2.0/camera it seems Unifi NVR is expecting login. This seems to cause “NVR refuses to talk to me” in HA
SOLUTION: not sure. maybe need to send login, then attempt connection (if fail, try login,)

-API to retrieve snapshot from camera has changed
BEFORE: contact http://192.168.0.1:7080/api/2.0/camera/?force=true&apiKey=
NOW: contact http://192.168.0.1:7080/api/2.0/snapshot/camera/?force=true&apiKey=
SOLUTION: /.homeassistant/deps/uvcclient/nvr.py must reflect that change.

refer to unifi forum

1 Like

I’m getting the following error and not using an aircam, it is a UVC Micro:

ERROR:homeassistant.components.camera:Error while setting up platform uvc
Traceback (most recent call last):
File “/home/base/home-assistant/homeassistant/helpers/entity_component.py”, line 98, in _setup_platform
discovery_info)
File “/home/base/home-assistant/homeassistant/components/camera/uvc.py”, line 50, in setup_platform
cameras = [camera for camera in cameras
File “/home/base/home-assistant/homeassistant/components/camera/uvc.py”, line 51, in
if ‘airCam’ not in nvrconn.get_camera(camera[‘uuid’])[‘model’]]
File “/home/base/.local/lib/python3.5/site-packages/uvcclient/nvr.py”, line 204, in get_camera
return self._uvc_request(’/api/2.0/camera/%s’ % uuid)[‘data’][0]
File “/home/base/.local/lib/python3.5/site-packages/uvcclient/nvr.py”, line 76, in _uvc_request
return self._uvc_request_safe(*args, **kwargs)
File “/home/base/.local/lib/python3.5/site-packages/uvcclient/nvr.py”, line 105, in _uvc_request_safe
raise NvrError(‘Request failed: %s’ % resp.status)
uvcclient.nvr.NvrError: Request failed: 404

I received same.
Decided to add as generic cam. This works great.

Thanks. That was still a little more complicated than it needed to be.