Node.JS client to connect to an EOVE device exposing HIS features
npm install @eove/his-node-clientNode.JS client to connect to an EOVE device exposing HIS features

```
npm install @eove/his-node-client --save
`js
const { createHisClient } = require('@eove/his-node-client');
const client = createHisClient(/.../);
client.on(ClientEventType.messageReceived, onMessageReceived);
client.connect().then(/.../).catch(/.../);
`
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 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
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
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
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.npm version
There is a limitation in 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