HelpfulScripts / libhttpcam

Accessing webcams via REST API
MIT License
4 stars 1 forks source link
foscam home-assistant http-camera wansview

Web Cam Access via HTTP REST-API

A Python3 library that unified acess to various web cams with integrated HTTP servers. The intended use is for connecting cameras with built-in REST servers to the home-assistant platform.

Installation

libhttpcam

pip3 install libhttpcam

or as update:

pip3 install --upgrade libhttpcam 

Usage

Use createCam to create a camera instance.

from libhttpcam import createCam

model = 'foscam'
ip = '10.0.0.30'
cam, port = createCam('foscam', ip)  # use model's default port

Next, you might want to set credentials for the camera:

user = 'me'
password = 'youllneverguess'
cam.set_credentials(user, password)

Support

Currently, only Foscam and Wansview cameras are supported.

API

returns the camera instance and the port used as a tuple

Device Properties

Device Configuration

Sets the sensitivities for motion detection and audio detection. Both take values between 0 (off) and 100 (sensitive).

Device Queries

Device Actions