https://github.com/thelogicmaster/netwave-camera
An API for NetWave IP Cameras
https://github.com/thelogicmaster/netwave-camera
airsight api-wrapper cli command-line netwave netwave-ip-cameras python python3
Last synced: 4 months ago
JSON representation
An API for NetWave IP Cameras
- Host: GitHub
- URL: https://github.com/thelogicmaster/netwave-camera
- Owner: TheLogicMaster
- License: wtfpl
- Created: 2020-05-18T12:03:10.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-23T06:33:57.000Z (about 6 years ago)
- Last Synced: 2025-07-31T21:11:01.890Z (11 months ago)
- Topics: airsight, api-wrapper, cli, command-line, netwave, netwave-ip-cameras, python, python3
- Language: Python
- Homepage:
- Size: 254 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NetWave Camera API
A simple Python API for interacting with an old NetWave compatible camera you have lying around
somewhere or cheaply acquire.

## 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
[Home Assistant documentation page](https://www.home-assistant.io/integrations/netwave)
####Lovelace card example:
An example Lovelace yaml config file is included in the docs directory. This Lovelace card demonstrates an element
overlay for the camera feed that hooks into all of the camera command functionality, aside from a factory
reset button.

## Manual Installation
```shell script
pip3 install netwave-camera
```
## CLI Usage
All commands and parameters are accessible from the CLI program
```shell script
# 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
```python
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](https://thelogicmaster.github.io/Netwave-Camera/documentation.html)
[Reverse Engineering Notes](https://thelogicmaster.github.io/Netwave-Camera/camera-reverse-engineering.html)
