@eove/his-node-client v1.0.2
@eove/his-node-client
Node.JS client to connect to an EOVE device exposing HIS features
Installation
npm install @eove/his-node-client --saveUsage
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 installFor instance, to connect and watch server events (pings mostly):
npx ts-node examples/connectAvailable examples are:
connect: simple connection with ping/pong exchanges and get information resultlist: to print Android devices serial numbersreset: to reset usb stack on both sides (android and host) without unplugging cablesubscribeToAll: to subscribe to all available channelssubscribeToWaveforms: to subscribe to waveforms channelsubscribeToMonitorings: to subscribe to monitorings channelsubscribeToSettings: to subscribe to settings channelsubscribeToAlarms: to subscribe to alarms channelsubscribeToVentilation: to subscribe to ventilation channel
Client events
HIS client is an event emitter and events are:
connected: we are connected to device in accessory modedisconnected: we are disconnected from devicemessageReceived: 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 waveformsmonitorings: to receive monitorings updatessettings: to receive settings updates for current ventilation modealarms: to receive alarms activations/deactivationsventilation: 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 publish3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago