Skip to main content

A Netwave IP camera API

Project description

NetWave Camera API

A simple Python API for interacting with an old NetWave compatible camera you have lying around somewhere or cheaply acquire.

Streaming dashboard

Purpose

This is ideal for getting a little more life out of some perfectly good, though probably insecure IP cameras. Using a combination of Home Assistant and MotionEye, you can get fully automated Pan-Tilt IP cameras up and working securely with a beautiful and modern web interface and fully integrated with your existing home automation system.

Background

This is a small package for controlling NetWave type IP cameras. This was created by reverse engineering the web interface for an Airsight XC36A IP camera, but should work for a wide range of devices. The camera identifies itself as a NetWave device in HTTP requests, but mentions Pelco dome cameras in JavaScript, so it can be assumed that the use of the firmware is widespread. This does not intend to replace the admin dashboard, so configuring the network and user settings needs to be done from the original dashboard. All of the functionality of the main video streaming dashboard is recreated in this API. The command line interface for this package is primarily intended for debugging since it re-creates the camera object for every command, but it could also be used with some form of automation if not using Home Assistant.

Features

  • Pan tilt functionality
  • Brightness and contrast adjustment
  • Resolution and refresh rate configuration
  • IO enabling and disabling for X10/Alarm functionality
  • Horizontal and vertical patrolling control
  • Preset location setting and recalling with 15 slots
  • Auto-centering
  • Multi-camera support

Home Assistant Integration

Coming soon

Manual Installation

pip3 install netwave-camera

CLI Usage

All commands and parameters are accessible from the CLI program

# Set brightness from command line (integer from 0 to 15)
python3 -m netwave http://url:port/ --user=admin password set brightness 10

# Enable vertical patrolling
python3 -m netwave http://url:port/ --user=admin password command patrol_vertical

# View general help info
python3 -m netwave -h

# View all commands
python3 -m netwave http://url:port/ password command -h

Python Usage

from netwave import NetwaveCamera

# Create camera object
cam = NetwaveCamera('http://url:port/', 'username', 'password', timeout=5)

# Update local camera object with IP camera data
cam.update_full()

# Turn left for ~2 seconds
import time
cam.move_left()
time.sleep(2)
cam.stop_movement()

Documentation

pydoc API Documentation

Reverse Engineering Notes

Streaming dashboard

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netwave-camera-0.0.3.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netwave_camera-0.0.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file netwave-camera-0.0.3.tar.gz.

File metadata

  • Download URL: netwave-camera-0.0.3.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for netwave-camera-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c0b707175fc13e87c30b7eef5ae7d38f8ba6714e59fae7fd139d02a69029c520
MD5 852dda3fbce3680de0a1909fec3047db
BLAKE2b-256 8f40e36b27c395a2b9b15100fc4c5f639da8b1cf127b221bacff92e590426265

See more details on using hashes here.

File details

Details for the file netwave_camera-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: netwave_camera-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for netwave_camera-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2bf07abcc6401b60962a6e04ff0c8faa22cf0f91271a1dbaf24442ab2907c315
MD5 e738eac7eb556da238244c856910cfb6
BLAKE2b-256 540458386d63103f5abcf10e90767a0c64bbcd037547e803fc207cffe00d540a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page