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.2.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.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netwave-camera-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 64c4ccb54e79773db431cdbd4476f6d95fe5e3d8095ae67be35b56ea3fba5f8f
MD5 b019e16f9e688e3534b2afc2a2cc5b27
BLAKE2b-256 4c8f3b57bee62dfd6d76568f81573f3c8d6582aea88d89c2740789c437ef32af

See more details on using hashes here.

File details

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

File metadata

  • Download URL: netwave_camera-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 556c5b7374543f02cefd6b5dba4b232c7b3e8a67b41e5eb2fe64a63bae1560ac
MD5 462815ca2dd20101a7996699cbd4e65f
BLAKE2b-256 03dda961ef8ae469af229794c2fb39a2db01416cc0e7b95e35dba65cad110cbe

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