0.1.88 • Published 4 years ago

@recharge/iot-agent v0.1.88

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Recharge IoT Agent

Product vision

Instalation

sudo npm install @recharge/iot-agent -g

# If you encounter permission error
# sudo npm install @recharge/iot-agent -g --unsafe-perm

Provisioning

Device belum punya certificate dan belum terdaftar di IoT Core:

# Get temporary claim
iot-agent get-claim

# Create thing and save its cert+key
iot-agent register-thing --thingType xxxx --serialNumber 8888

Device sudah terdaftar dan sudah punya thingName:

# Login as field engineer
iot-agent login

# Replace existing certificate with a new one
iot-agent renew-cert --thingType xxxx --serialNumber 8888

Run as daemon

# Run this on boot from systemd
iot-agent daemon

Snippets

Successful getcred

Then you will see the following output. Restart the device agent so it will use the new credentials.

pi@raspberrypi:~ $ sudo iot-agent getcred --type nagomi --serial 812161207
✔ loading claim
Device connected
Claim removed
clientId and credentials saved into /root/.config/@recharge/iot-agent-nodejs/config.json
Success
thingName: 812161207
clientId: a3c775dc-1e82-431b-9e3c-ee17d0924f37
message: {
  "deviceConfiguration": {},
  "thingName": "812161207"
}

If Temporary Claim Expired or Invalid

Then you will see the following output. Just do another getclaim and then getcred.

pi@raspberrypi:~ $ sudo iot-agent getcred --type nagomi --serial 812161207
✔ loading claim
error: Error: write EPROTO 1995594192:error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 46

offline
error: Error: write EPROTO 1995594192:error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 46

close
reconnect
error: Error: write EPROTO 1995594192:error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 46

error: Error: write EPROTO 1995594192:error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 46

close
reconnect
error: Error: write EPROTO 1995594192:error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 46

error: Error: write EPROTO 1995594192:error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 46

close
^C

CONTRIBUTING

Publish to npm: yarn publish

0.1.86

4 years ago

0.1.88

4 years ago

0.1.85

4 years ago

0.1.83

4 years ago

0.1.81

4 years ago

0.1.80

4 years ago

0.1.79

4 years ago

0.1.78

4 years ago

0.1.77

4 years ago

0.1.76

4 years ago

0.1.74

4 years ago

0.1.73

4 years ago

0.1.72

4 years ago

0.1.71

4 years ago

0.1.70

4 years ago

0.1.65

4 years ago

0.1.55

4 years ago

0.1.50

4 years ago

0.1.45

4 years ago

0.1.46

4 years ago

0.1.60

4 years ago

0.1.35

4 years ago

0.1.36

4 years ago

0.1.37

4 years ago

0.1.39

4 years ago

0.1.31

4 years ago

0.1.30

4 years ago

0.1.25

4 years ago

0.1.20

4 years ago

0.1.18

4 years ago

0.1.12

4 years ago

0.1.14

4 years ago

0.1.10

4 years ago

0.1.11

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.9

4 years ago

0.1.3

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.0.20

4 years ago

0.1.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.0.16

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago