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 🙏

© 2024 – Pkg Stats / Ryan Hefner

onvif-rx

v9.0.2

Published

Interact with ONVIF cameras and devices using RXJS

Downloads

124

Readme

0930282e-7f18-11e6-948a-00546393fd93

About

This library aims to provide an easy way to interact with ONVIF devices from within Node. It is built with TypeScript to provide IDE's easy access to documentation and typing information.

The API is generated dynamically by reading ONVIF WSDL and XSD files.

This library is very early and not garaunteed to work for evey camera. Feel free to create a Github issue if it's not working for you.

This library does not "discover" devices on the network - for that try onvif-probe-rx

Docs

For more information about the TypeScript API checkout the generated API docs.

Roadmap

  • [x] Generate API with typings and docs from WSDL's and XSD's
  • [x] Execute simple (parameter-less) requests
  • [x] Execute requests with paremeters

Node Installation

This package is designed to be run in both the browser and node environments.

npm i onvif-rx

Browser Installation (expiremental)

<head>
 <!-- simplest method, gets the latest version, but not minifed -->
 <script src="https://unpkg.com/onvif-rx"></script>
 
 <!-- RECOMMENDED: use a specific version to avoid a redirect and get a minified version --> 
 <script src="https://unpkg.com/[email protected]/dist/onvif-rx-umd.min.js"></script>
</head>

Usage

The library is designed to be used in 2 distinct ways.

  • Managed - you construct a manged device using service URL and username/password combo. This makes running commands painless.
  • Ad Hoc - you can call methods individually with different username/passwords if needed.

Managed Usage

import { createManagedDeviceInNode } from 'onvif-rx'

const device = createManagedDeviceInNode({
  deviceUrl: 'http://192.168.1.11/onvif/device_service',
  password: 'admin',
  username: '1234'
})

device.api.Device.GetUsers()
  .toPromise()
  .then(res=> {
    res.match({ // results are wrapped in a managed object for safer processing
      ok: success => console.log(success.json), // successful response object
      fail: railure => console.log(railure.status, railure.statusMessage) // request failure object
    })
  }) 

Ad Hoc Usage

import { Device } from 'onvif-rx'
import { maybe } from 'typescript-monads'

Device.GetUsers()
  .run({
    system: DEFAULT_NODE_ENV,
    deviceUrl: 'http://192.168.1.11/onvif/device_service',
    user: maybe({ // currently requires a wrapper object, will improve in the future
      username: 'admin',
      password: '1234'
    })
  })
  .toPromise()
  .then(res=> {
    res.match({
      ok: success => console.log(success.json), // successful response object
      fail: railure => console.log(railure.status, railure.statusMessage) // request failure object
    })
  })