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

@eove/his-node-client

v1.0.2

Published

Node.JS client to connect to an EOVE device exposing HIS features

Downloads

5

Readme

@eove/his-node-client

Node.JS client to connect to an EOVE device exposing HIS features node-client ci

Installation

npm install @eove/his-node-client --save

Usage

const { createHisClient } = require('@eove/his-node-client');

const client = createHisClient(/*...*/);
client.on(ClientEventType.messageReceived, onMessageReceived);
client.connect().then(/*...*/).catch(/*...*/);

Examples

There are some examples in examples directory.

You can run these examples from sources with following requirements:

git clone https://github.com/eove/his-api.git
cd node-client
nvm install # if you use nvm
npm install

For instance, to connect and watch server events (pings mostly):

npx ts-node examples/connect

Available examples are:

  • connect: simple connection with ping/pong exchanges and get information result
  • list: to print Android devices serial numbers
  • reset: to reset usb stack on both sides (android and host) without unplugging cable
  • subscribeToAll: to subscribe to all available channels
  • subscribeToWaveforms: to subscribe to waveforms channel
  • subscribeToMonitorings: to subscribe to monitorings channel
  • subscribeToSettings: to subscribe to settings channel
  • subscribeToAlarms: to subscribe to alarms channel
  • subscribeToVentilation: to subscribe to ventilation channel

Client events

HIS client is an event emitter and events are:

  • connected: we are connected to device in accessory mode
  • disconnected: we are disconnected from device
  • messageReceived: we have received a message (with a type and a payload maybe)
  • messageSent: we have sent a message (for debugging purpose)
  • error: on any error detected

Subscribing to channels

Available channels are:

  • waveforms: to receive a batch of waveforms
  • monitorings: to receive monitorings updates
  • settings: to receive settings updates for current ventilation mode
  • alarms: to receive alarms activations/deactivations
  • ventilation: to receive ventilation related information and updates

For contributors

Publishing

Package is published on both public npm registry and Eove private one hosted by Github.

Warning: you must have a fake and empty .git directory in node-client directory. There is a limitation in npm version script: https://github.com/npm/npm/issues/9111.

Just use npm version with something like major or specific version like 1.0.2. A commit/tag will be created and pushed on github then artifact will be published on npm registry.

Then you should publish the exact same version on Eove private registry with:

npm_config_registry=https://npm.pkg.github.com/eove npm publish