Giter VIP home page Giter VIP logo

uvcclient's Introduction

Client for Ubiquiti's Unifi Camera NVR

https://travis-ci.org/kk7ds/uvcclient.svg?branch=master

This is extremely raw at the moment. Use at your own risk.

Hopefully this is enough to get you going:

Usage: uvc [options]

Options:
 -h, --help            show this help message and exit
 -H HOST, --host=HOST  UVC Hostname
 -P PORT, --port=PORT  UVC Port
 -K APIKEY, --apikey=APIKEY
                       UVC API Key
 -v, --verbose
 -d, --dump
 -u UUID, --uuid=UUID  Camera UUID
 --name=NAME           Camera name
 -l, --list
 --irsensitivity=IRSENSITIVITY
                       IR Camera Sensitivity (low,medium,high)
 --irledmode=IRLEDMODE
                       IR Led mode (none,full,motion)
 --externalirmode=EXTERNALIRMODE
                       Recording mode off, on)
 --recordmode=RECORDMODE
                       Recording mode (none,full,motion)
 --get-externalirmode  Show if an external IR emitter is on
 --get-irledmode       Show IR detection mode
 --get-irsensitivity   Show IR Camera sensitivity level
 --get-recordmode      Show recording mode
 --recordchannel=RECORDCHANNEL
                       Recording channel (high,medium,low)
 -p, --get-picture-settings
                       Return picture settings as a string
 --set-picture-settings=SET_PICTURE_SETTINGS
                       Set picture settings with a string like that returned
                       from --get-picture-settings
 --set-led=ENABLED     Enable/Disable front LED (on,off)
 --get-snapshot        Get a snapshot image and write to stdout
 --prune-zones         Prune all but the first motion zone
 --list-zones          List motion zones
 --set-password        Store camera password
 --test-login          Test if the given username/password can login to the
                       NVR
 --username=USERNAME   Username to attempt the login with
 --password=PASSWORD   Password to attempt the login with

For example:

$ export UVC="http://192.168.1.1:7080/?apiKey=XXXXXXXX"
$ uvc --name Porch --recordmode motion --recordchannel high

or:

$ export UVC="http://192.168.1.1:7080/?apiKey=XXXXXXXX"
$ uvc -l
fb9e6d48-6f5a-42b2-8cb4-e3705a99a0e2: Inside                   [    online]
f0579c60-e400-477e-8f89-f8861ef58f80: Parking                  [    online]
998b134e-13ea-4465-ad39-6ad27b067ac4: Spare                    [   offline]
5474242a-51d5-428e-97de-826675068e70: Front Porch              [    online]
715f0725-e7e1-4214-a551-41071c82bacd: Garage                   [    online]

In order to take actions on cameras directly (such as change the LED state on a UVC Micro or get a snapshot from the camera) you need to set the admin password for it. The NVR tells us the username, but we must store the password. To do this:

$ uvc --name Porch --set-password
This will store the administrator password for a camera
for later use. It will be stored on disk obscured, but
NOT ENCRYPTED! If this is not okay, cancel now.

Password:
Confirm:
Password set

Then you can do things like get a snapshot from the camera directly:

$ uvc --name Porch --get-snapshot > foo.jpg

Lastly you can use the apikey as a command line argument to access all commands:

python3 uvc --host 192.168.1.35 --port 7080 --apikey XXXXXXX --get-snapshot --name "Porch Eve" > porch.jpg

uvcclient's People

Contributors

carlos-sarmiento avatar kk7ds avatar mattgam avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.