2.1.22 • Published 1 year ago

visense-tools v2.1.22

Weekly downloads
112
License
MIT
Repository
github
Last release
1 year ago

ViSense API tools

Documentation

Introduction

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.

License

This software is licensed under the MIT license.

Version information

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.

Command-line utilities

A set of command-line tools in the bin/ directory makes use of ViSense tools easy.

visense-authentication

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 <ip>                      IP-address
    --port <port>                  Port number (default: 80)
    --command <signIn|signOut>     Authentication command to be executed.
    --username <username>          Username (mandatory for command signIn)
    --password <password>          Password (mandatory for command signIn)
    --sessionToken <sessionToken>  Session token (mandatory for command signOut)

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'

visense-systeminfo

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 <ip>              IP-address
    --port <port>          Port number (default: 80)
    --username <username>  Username
    --password <password>  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.

ToDo

  • 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.
2.1.21

1 year ago

2.1.22

1 year ago

2.1.19

1 year ago

2.1.20

1 year ago

2.1.18

2 years ago

2.1.17

2 years ago

2.1.16

2 years ago

2.1.14

2 years ago

2.1.15

2 years ago

2.1.13

3 years ago

2.1.12

3 years ago

2.1.11

3 years ago

2.1.10

3 years ago

2.1.9

3 years ago

2.1.8

3 years ago

2.1.7

3 years ago

2.1.6

3 years ago

2.1.5

3 years ago

2.1.4

4 years ago

2.1.3

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.2.0

5 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.1

7 years ago