1.4.0 • Published 8 months ago

@corvina/device-example v1.4.0

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
8 months ago

Corvina device example

This is an example of the usage of @corvina/device-client.

The device client can be configured with environment variables (or .env file).

In addition, this example exposes a web interface to post arbitrary JSON data or to simulate device data.

Quick Start

At least the following environment variables must be configured:

ACTIVATION_KEY=<your_device_activation_key>
PAIRING_ENDPOINT=https://pairing.corvina.io/api/v1/ 

The device can be started:

  • via package manager:
npm install @corvina/device-example

chande directory to ./app/apps/example and run:

npx @corvina/device-example
  • via npx (version >= 8)
npx @corvina/device-example@latest
  • from sources:

chande directory to ./app/apps/example and run:

yarn install
yarn start:dev

A web interface will be available at http://localhost:3000/swagger-ui.

Environment variables

This example device provides the environment variable WRITE_CALLBACK to configure a webhook for written data:

In addition, the full list of environment variables used by @corvina/device-client can be used.

Using the example rest interface

It is possible to send generic JSON posting to the /device/json endpoint.

Each of the JSON properties posted will be advertised to the cloud with the corresponding JSON paths.

1.4.0

8 months ago

1.3.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.23

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.20

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago