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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@2bad/onvif-management

v2.3.0

Published

ONVIF device management for @2bad/onvif: users, NTP, network settings, IP filter and relay outputs

Readme

@2bad/onvif-management

ONVIF users, NTP, network settings, IP filter and relay outputs for @2bad/onvif.

Install

npm install @2bad/onvif @2bad/onvif-management

Quick start

import { Device } from '@2bad/onvif'
import { management } from '@2bad/onvif-management'

const device = await Device.connect({ hostname: '192.0.2.10', username: 'admin', password: 'secret' })
const camera = device.use(management)

const { user = [] } = await camera.management.getUsers()
console.log(user.map(({ username, userLevel }) => `${username} ${userLevel}`)) // [ 'admin Administrator' ]

await camera.management.setNTP({ fromDHCP: false, ntpManual: [{ type: 'DNS', dnsName: 'pool.ntp.org' }] })

Operations

camera.management.getUsers()
camera.management.createUsers(request)
camera.management.setUser(request)
camera.management.deleteUsers(request)

camera.management.getNTP()
camera.management.setNTP(request)

camera.management.setNetworkInterfaces(request) // device.getNetworkInterfaces() reads them
camera.management.getNetworkDefaultGateway()
camera.management.setNetworkDefaultGateway(request)
camera.management.getDynamicDNS()
camera.management.setDynamicDNS(request)
camera.management.getZeroConfiguration()
camera.management.setZeroConfiguration(request)

camera.management.getIPAddressFilter()
camera.management.setIPAddressFilter(request)
camera.management.addIPAddressFilter(request)
camera.management.removeIPAddressFilter(request)

camera.management.getRelayOutputs()
camera.management.setRelayOutputSettings(request)
camera.management.setRelayOutputState(request)

Each method has TypeScript types for its request and response. Each one takes call options as second argument, such as { timeoutMs: 2_000 }.

Users

await camera.management.createUsers({ user: [{ username: 'viewer', password: 'secret', userLevel: 'User' }] })
await camera.management.setUser({ user: [{ username: 'viewer', password: 'changed', userLevel: 'User' }] })
await camera.management.deleteUsers({ username: ['viewer'] })

After changing the password of the user you are connected as, connect again with the new password.

Relays

const { relayOutputs: [relay] = [] } = await camera.management.getRelayOutputs()
if (relay) await camera.management.setRelayOutputState({ relayOutputToken: relay.token, logicalState: 'active' })

A relay in Monostable mode returns to idle after its delayTime.

Errors

A camera that rejects a setting throws a SoapFaultError. Its subcodes say why, such as ['OperationProhibited', 'PasswordTooWeak'].

Network changes can move the camera to another address. Connect again at the new address.

License

MIT