npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

everetptz

v2025.11.8

Published

Rest API wrapper for Everet PTZ cameras with 0 dependencies.

Readme

EveretPTZ

A TypeScript REST API wrapper for Everet EVP212N PTZ cameras with zero dependencies.

Overview

EveretPTZ is a lightweight TypeScript library for controlling Everet EVP212N professional PTZ cameras over HTTP. It provides a simple, promise-based API for camera control, image settings, and configuration management.

Supported Camera: Everet EVP212N Professional Grade FHD NDI PTZ Camera

Features

  • Zero Dependencies - Pure TypeScript implementation
  • Complete PTZ Control - Pan, tilt, zoom, and focus operations
  • Image Settings - Exposure, white balance, iris, shutter control
  • Advanced Features - WDR, noise reduction, gamma correction
  • Type Safety - Full TypeScript support with type definitions
  • Promise-based - Modern async/await API

Installation

npm install everetptz

Basic example

import { EveretPTZ } from 'everetptz';

// Initialize camera connection
const camera = new EveretPTZ('192.168.1.100', 'admin', 'password');

// Wait for authentication
await camera.whenReady();

// Get streaming URL
const streamUrl = await camera.getRTSPUrl('main');
console.log('Stream URL:', streamUrl);

// Move camera up for 2 seconds
await camera.move('up', true, 15);
setTimeout(() => {
	//Stop moving up
	await camera.move('up', false);

	// Save current position as preset 1
	await camera.setPreset(1);
}, 2000);

API Reference

Constructor

Return values

Camera

Movement

Presets

Focus

Exposure

White Balance

Image

Image Quality

Noise Reduction

Streaming


Constructor

new EveretPTZ(ip: string, username: string, password: string)
  • ip - Camera IP address
  • username - Camera login username
  • password - Camera login password

Return Values

Important: All set methods return a Promise<boolean>:

  • true - Command executed successfully
  • false - Command failed or something went wrong

Note: get methods return the actual values, while control methods (move, zoom, focus) return boolean success indicators.

Camera

whenReady

await camera.whenReady(): Promise<void>

Wait for authentication to complete before sending commands.

onError

camera.onError(callback: (error: Error) => void): void

Set error handler for authentication and request failures.

getInfo

await camera.getInfo(): Promise<{
	app_version: string;
	bootloader_version: string;
	device_name: string;
	serial_number: string;
	system_version: string;
}>

Get camera system information including firmware versions and device details.

Movement

home

await camera.home(): Promise<boolean>

Returns the camera to the home position.

move

await camera.move(
  direction: 'up' | 'down' | 'left' | 'right',
  active: boolean,
  speed?: number // 0-24, default: 10
): Promise<boolean>

Start or stop pan/tilt movement in the specified direction.

zoom

await camera.zoom(
  direction: 'in' | 'out',
  active: boolean,
  speed?: number // 0-7, default: 7
): Promise<boolean>

Control zoom operation.

focus

await camera.focus(
  direction: 'near' | 'far',
  active: boolean,
  speed?: number // 0-7, default: 7
): Promise<boolean>

Only applicable when focus mode is set to manual

Manual focus control.

Presets

setPreset

await camera.setPreset(presetNumber: number): Promise<boolean> // 0-127

Save current camera position to preset slot.

recallPreset

await camera.recallPreset(presetNumber: number): Promise<boolean> // 0-127

Recall saved preset position.

clearPreset

await camera.clearPreset(presetNumber: number): Promise<boolean> // 0-127

Clear preset from slot.

Focus

setFocusMode

await camera.setFocusMode(mode: 'auto' | 'manual'): Promise<boolean>

Set focus mode.

getFocusMode

await camera.getFocusMode(): Promise<'auto' | 'manual'>

Get current focus mode.

Exposure

setExposureMode

await camera.setExposureMode(
  mode: 'auto' | 'manual' | 'iris priority' | 'shutter priority' | 'brightness priority'
): Promise<boolean>

Set exposure mode.

getExposureMode

await camera.getExposureMode(): Promise<string>

Get current exposure mode.

setShutter

await camera.setShutter(speed: string): Promise<boolean>

Only applicable when exposure mode is set to manual or shutter priority

Set shutter speed.

Available shutter speeds: '1/25', '1/50', '1/75', '1/100', '1/120', '1/150', '1/215', '1/300', '1/425', '1/600', '1/1000', '1/1250', '1/1750', '1/2500', '1/3500', '1/6000', '1/10000'

getShutter

await camera.getShutter(): Promise<string>

Get current shutter speed.

setExposureGain

await camera.setExposureGain(gain: string): Promise<boolean>

Only applicable when exposure mode is set to manual

Set exposure gain.

Available gain values: '0dB' to '30dB' in 2dB increments

getExposureGain

await camera.getExposureGain(): Promise<string>

Get current exposure gain.

setIris

await camera.setIris(aperture: string): Promise<boolean>

Only applicable when exposure mode is set to manual or iris priority

Set iris aperture.

Available apertures: 'Close', 'F14.0', 'F11.0', 'F9.6', 'F8.0', 'F6.8', 'F5.6', 'F4.8', 'F4.0', 'F3.4', 'F2.8', 'F2.4', 'F2.0', 'F1.8'

getIris

await camera.getIris(): Promise<string>

Get current iris aperture.

setExposureBrightness

await camera.setExposureBrightness(brightness: number): Promise<boolean> // 0-27

Only applicable when exposure mode is set to brightness priority

Set exposure brightness.

getExposureBrightness

await camera.getExposureBrightness(): Promise<number>

Get current exposure brightness.

setAntiFlicker

await camera.setAntiFlicker(frequency: 'Off' | '50Hz' | '60Hz'): Promise<boolean>

Only applicable when exposure mode is set to auto or iris priority

Set anti-flicker frequency.

getAntiFlicker

await camera.getAntiFlicker(): Promise<string>

Get current anti-flicker setting.

White Balance

setWhiteBalanceMode

await camera.setWhiteBalanceMode(
  mode: 'auto' | 'indoor' | 'outdoor' | 'one push' | 'auto tracking' | 'manual' | 'temperature'
): Promise<boolean>

Set white balance mode.

getWhiteBalanceMode

await camera.getWhiteBalanceMode(): Promise<'auto' | 'indoor' | 'outdoor' | 'one push' | 'auto tracking' | 'manual' | 'temperature'>

Get current white balance mode.

setRedGain

await camera.setRedGain(value: number): Promise<boolean> // 0-255

Only applicable when white balance mode is set to manual

Set red gain.

getRedGain

await camera.getRedGain(): Promise<number>

Get current red gain.

setBlueGain

await camera.setBlueGain(value: number): Promise<boolean> // 0-255

Only applicable when white balance mode is set to manual

Set blue gain.

getBlueGain

await camera.getBlueGain(): Promise<number>

Get current blue gain.

setColorTemperature

await camera.setColorTemperature(value: number): Promise<boolean> // 1800-10000K

Only applicable when white balance mode is set to temperature

Set color temperature.

getColorTemperature

await camera.getColorTemperature(): Promise<number>

Get current color temperature.

Image

setMirror

await camera.setMirror(enabled: boolean): Promise<boolean>

Enable or disable image mirroring.

getMirror

await camera.getMirror(): Promise<boolean>

Get current mirror setting.

setFlip

await camera.setFlip(enabled: boolean): Promise<boolean>

Enable or disable image flipping.

getFlip

await camera.getFlip(): Promise<boolean>

Get current flip setting.

setBacklightCompensation

await camera.setBacklightCompensation(enabled: boolean): Promise<boolean>

Enable or disable backlight compensation.

getBacklightCompensation

await camera.getBacklightCompensation(): Promise<boolean>

Get current backlight compensation setting.

setGamma

await camera.setGamma(value: number): Promise<boolean> // 0-4

Set gamma correction value.

getGamma

await camera.getGamma(): Promise<number>

Get current gamma correction value.

setWideDynamicRange

await camera.setWideDynamicRange(mode: 'Off' | 1 | 2 | 3 | 4 | 5 | 6): Promise<boolean>

Set wide dynamic range mode.

getWideDynamicRange

await camera.getWideDynamicRange(): Promise<string | number>

Get current wide dynamic range setting.

Image Quality

setBrightness

await camera.setBrightness(value: number): Promise<boolean> // 0-15

Only applicable when exposure mode is set to auto, iris priority or shutter priority

Set image brightness.

getBrightness

await camera.getBrightness(): Promise<number>

Get current brightness value.

setSharpness

await camera.setSharpness(value: number): Promise<boolean> // 0-15

Set image sharpness.

getSharpness

await camera.getSharpness(): Promise<number>

Get current sharpness value.

setContrast

await camera.setContrast(value: number): Promise<boolean> // 0-15

Set image contrast.

getContrast

await camera.getContrast(): Promise<number>

Get current contrast value.

setSaturation

await camera.setSaturation(value: number): Promise<boolean> // 0-15

Set image saturation.

getSaturation

await camera.getSaturation(): Promise<number>

Get current saturation value.

Noise Reduction

set2dNoiseReduction

await camera.set2dNoiseReduction(enabled: boolean): Promise<boolean>

Enable or disable 2D noise reduction.

get2dNoiseReduction

await camera.get2dNoiseReduction(): Promise<boolean>

Get current 2D noise reduction setting.

set3dNoiseReduction

await camera.set3dNoiseReduction(mode: 'Off' | 'Auto' | '1' | '2' | '3' | '4'): Promise<boolean>

Set 3D noise reduction mode.

get3dNoiseReduction

await camera.get3dNoiseReduction(): Promise<string>

Get current 3D noise reduction setting.

Streaming

getRTSPUrl

await camera.getRTSPUrl(type?: 'main' | 'sub'): Promise<string>

Get RTSP streaming URL. Defaults to 'main' stream if type not specified.

getRTMPUrl

await camera.getRTMPUrl(type?: 'main' | 'sub'): Promise<string>

Get RTMP streaming URL. Defaults to 'main' stream if type not specified.

getFLVUrl

await camera.getFLVUrl(type?: 'main' | 'sub'): Promise<string>

Get FLV streaming URL. Defaults to 'main' stream if type not specified.

getWebRTCUrl

await camera.getWebRTCUrl(type?: 'main' | 'sub'): Promise<string>

Get WebRTC streaming URL. Defaults to 'main' stream if type not specified.

Stream Types:

  • 'main' - High quality stream (default) - 1920×1080 up to 60fps
  • 'sub' - Lower quality stream - Various resolutions up to 1280×720