Detalhes do pacote

webthing-iotjs

rzr31MPL-2.00.13.1

HTTP Web Thing implementation

iot, web, thing, webthing

readme (leia-me)

WEBTHING-IOTJS

GitHub forks license Build Status NPM pulls Automated Builds Build Status Codacy Badge FOSSA Status Fediverse IRC Channel

NPM

Presentation

DISCLAIMER

Webthing-iotjs is derived of webthing-node project (supporting Node.js) but adapted for IoT.js runtime (based on JerryScript engine for constrained devices).

This downstream project plans to keep aligned to upstream and only focus on IoT.js port.

New contributions should be submitted to webthing-node first and then should land here (once rebased on webthing-node's master branch).

BASIC USAGE

After installing IoT.js program on your system, you can get started by running example program

iotjs -h

iotjs example/multiple-things.js
# setting new humidity level: 18.207531485648474

curl T -H 'Content-Type: application/json'  http://localhost:8888/
# [{"name":"My Lamp","href":"/0", (...)  "href":"/1/properties/level"} .. (...) }]

curl T -H 'Content-Type: application/json'  http://$HOSTNAME:8888/1/properties/level
# {"level":42.666}

Then thing can be monitored once connected to WebThings IoT gateway using the WebThings URL adapter.

Also you can control a "Simplest Thing" which is just simulating an actuator (LED, switch, relay...).

iotjs example/simplest-thing.js
# Usage:
#
# iotjs example/simplest-thing.js [port]

curl -X PUT -H 'Content-Type: application/json' --data '{"on": true }' http://localhost:8888/properties/on
# {"on":true}

Then this thing can be connected to gateway, and rules configured to use the actuator.

GUIDE

For more insights and details please follow guide about setting up gateway, IoT.js and demos howtos:

Demo

REFERENCES

LICENSE

FOSSA Status

changelog (log de mudanças)

webthing Changelog

Unreleased

0.13.0 - 2020-09-23

Changed

  • Update author and URLs to indicate new project home.

0.12.3 - 2020-06-18

Changed

  • mDNS record now indicates TLS support.

0.12.2 - 2020-05-04

Changed

  • Invalid POST requests to action resources now generate an error status.

0.12.1 - 2020-03-27

Changed

  • Updated dependencies.

0.12.0 - 2019-07-12

Changed

  • Things now use title rather than name.
  • Things now require a unique ID in the form of a URI.

    Added

  • Support for id, base, security, and securityDefinitions keys in thing description.

0.11.1 - 2019-06-05

Added

  • Ability to set a base URL path on server.

0.11.0 - 2019-01-16

Changed

  • WebThingServer constructor can now take a list of additional API routes.

    Fixed

  • Properties could not include a custom links array at initialization.

0.10.0 - 2018-11-30

Changed

  • Property, Action, and Event description now use links rather than href. - Spec PR