'Login to the camera.'

def _login(self):

    from uvcclient import camera as uvc_camera
    caminfo = self._nvr.get_camera(self._uuid)
    if self._connect_addr:
        addrs = [self._connect_addr]
    else:
        addrs = [caminfo['host'], caminfo['internalHost']]
    if (self._nvr.server_version >= (3, 2, 0)):
        client_cls = uvc_camera.UVCCameraClientV320
    else:
        client_cls = uvc_camera.UVCCameraClient
    camera = None
    for addr in addrs:
        try:
            camera = client_cls(addr, caminfo['username'], self._password)
            camera.login()
            _LOGGER.debug('Logged    into    UVC    camera    %(name)s    via    %(addr)s', dict(name=self._name, addr=addr))
            self._connect_addr = addr
            break
        except socket.error:
            pass
        except uvc_camera.CameraConnectError:
            pass
        except uvc_camera.CameraAuthError:
            pass
    if (not self._connect_addr):
        _LOGGER.error('Unable    to    login    to    camera')
        return None
    self._camera = camera
    return True
