ViSense API tools
npm install visense-tools
This set of tools can be used to facilitate the integration configuration/data API of a
ViSense system. It comprises of the following parts:
* Authentication module,
* WebSocket connection manager class,
* Configuration API ajax call adapter,
* Convenience class for retrieving basic system information.
This software is licensed under the MIT license.
This library runs a major version number identical to the version number of the API it is compatible with.
I.e. visense-tools v1.x and v2.x are to be used for ViSense v1.x and v2.x devices, respectively.
A set of command-line tools in the bin/ directory makes use of ViSense tools easy.
Use visense-authentication to acquire/free a session token.
``
Usage: visense-authentication [options]
Options:
-h, --help output usage information
-V, --version output the version number
--ip
--port
--command
--username
--password
--sessionToken
`
For example:
`
$ visense-authentication --ip '192.168.0.100' --command 'signIn' --username 'admin' --password 'MyPassword'
5e23e335-3689-47e8-9b58-f547bc8e84b0
`
``
$ visense-authentication --ip '192.168.0.100' --command 'signOut' --clientToken '5e23e335-3689-47e8-9b58-f547bc8e84b0'
Use visense-systeminfo to list some basic information of a ViSense system.
`
Usage: visense-systeminfo [options]
Options:
-h, --help output usage information
-V, --version output the version number
--ip
--port
--username
--password
`
For example:
`
$ visense-systeminfo --ip '192.168.0.100' --username 'admin' --password 'MyPassword'
ViSense system information:
---------------------------
ID : 192.168.0.100
Product name : ViSense CrowdDynamics
Service tag : D34DB33F
Connection status : Video connection established.
``
* Add example code for each utility class.
* Add unit tests for the check-utils.
* Add support for RFC-1123 host names in socket addresses.
* Improve error handling and propagation.
* Parsing of JSON formatted errors.
* Move static socket-addres-related tests from class tests to check-utils tests.
* Add generic library functions for WebSocket message / data parsing.
* Change all string-type errors to native 'Error' types.