| title | Viewtron IP Camera HTTP API | |||||||
|---|---|---|---|---|---|---|---|---|
| sidebar_label | Overview | |||||||
| sidebar_position | 0 | |||||||
| description | Complete HTTP API documentation for Viewtron AI security cameras and NVRs. Control PTZ, configure AI detection, receive real-time webhooks — no cloud required. | |||||||
| keywords |
|
|||||||
| slug | / |
Viewtron IP cameras and NVRs expose an HTTP API for programmatic access to device configuration, live video, PTZ control, AI detection settings, alarm management, and real-time event webhooks. The API uses XML payloads over HTTP POST requests with Basic Authentication.
All AI inference runs on the camera hardware — no cloud service, external software, or per-device licensing required. All Viewtron products are NDAA compliant.
- Receive real-time AI detection webhooks — HTTP POST events when cameras detect humans, vehicles, faces, or license plates, with snapshot images and bounding box coordinates
- Control PTZ cameras — pan, tilt, zoom, focus, presets, cruise tours
- Track objects continuously — real-time target position data via
trajectstreaming at ~7 updates/sec - Read and capture license plates — LPR with plate database management and gate access control via Wiegand
- Detect and recognize faces — face detection with attributes (age, sex, glasses, mask) and face matching
- Count people and vehicles — entrance/exit counting by line or area with statistics
- Configure AI detection zones — intrusion zones, line crossing, region entry/exit, loitering, parking violations
- Capture snapshots — live JPEG snapshots and time-based recording search via RTSP
- Control alarm outputs — trigger relays, sirens, and strobe lights programmatically
- Query device status — model info, firmware version, disk capacity, channel configuration
This documentation is organized in four layers, from low-level protocol to ready-made integrations:
The API Reference documents every HTTP endpoint exposed by Viewtron cameras and NVRs. All requests use HTTP POST with XML payloads and Basic Authentication. This is language-agnostic — any HTTP client in any language can use it directly.
The SDKs wrap the raw API with typed objects, built-in HTTP servers for receiving webhook events, and automatic IPC/NVR version handling.
- Python SDK Reference —
pip install viewtron— ViewtronServer receives events, ViewtronEvent parses them, ViewtronCamera manages plate databases - Node.js SDK Reference —
npm install viewtron-sdk— EventEmitter-based server with the same event model
Developers who don't use our SDKs need to build their own HTTP servers and XML parsing.
Application guides show how to build real solutions using the API and SDKs — human detection, LPR gate access, face detection, PTZ control, people counting, and more. Each guide includes working code in both Python and Node.js.
Pre-built integrations for Home Assistant (MQTT auto-discovery) and Node-RED (direct HTTP POST) — no coding required.
import requests
from requests.auth import HTTPBasicAuth
# Query camera info
response = requests.get(
"http://192.168.0.50/GetDeviceInfo",
auth=HTTPBasicAuth("admin", "password123")
)
print(response.text)
# Move a PTZ camera
requests.get(
"http://192.168.0.50/PtzControl/1/ZoomIn",
auth=HTTPBasicAuth("admin", "password123")
)All Viewtron IP cameras and Viewtron NVRs support this API. See Supported Products for a complete list with per-product API capabilities.
- Authenticate — all requests use Basic Authentication
- Install an SDK —
pip install viewtron(Python) ornpm install viewtron-sdk(Node.js) - Test connectivity — send a
GetDeviceInforequest to verify access - Explore Applications — browse solution guides to see what you can build
- Connect to Home Assistant — set up the Home Assistant integration for smart home automations
- Reference endpoints — find detailed request/response docs in the API Reference
- Python SDK —
pip install viewtron— receive AI detection events and manage plate databases from Python - Node.js SDK —
npm install viewtron-sdk— EventEmitter-based server for receiving camera events in Node.js - Home Assistant Integration — connect Viewtron cameras to Home Assistant via MQTT auto-discovery
- API Server & Examples — github.com/mikehaldas/IP-Camera-API — working webhook receiver examples
- Markdown Documentation — all documentation pages are available as Markdown files in the GitHub docs directory for easy integration with AI coding assistants and automated tools
- Single-File Reference — the complete API documentation in one searchable file for quick reference and AI assistant ingestion
- Support Forum — NVR Webhook Setup Guide
These blog posts and video walkthroughs cover camera setup, installation best practices, and live demos of the API in action.
- LPR Camera API Setup and Live Demo — configuring webhooks, receiving plate reads, and viewing event data in real time
- AI Security Camera System Overview — human detection, vehicle detection, and the different AI event types
- ANPR / LPR Camera System — installation, plate capture zones, and system design for license plate recognition
- Best License Plate Recognition Cameras — buyer's guide comparing Viewtron LPR cameras
- IP Camera Alarm Relay Control — triggering relays and alarm outputs via the API
- Email: mike@viewtron.com
- Phone: 561-433-8488
Mike Haldas is available for questions, consultation, and custom software development for Viewtron API related projects. Email details about your project to mike@viewtron.com.