Socket
Socket
Sign inDemoInstall

webthing-iotjs

Package Overview
Dependencies
3
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    webthing-iotjs

HTTP Web Thing implementation


Version published
Maintainers
1
Install size
234 kB
Created

Readme

Source

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

Keywords

FAQs

Last updated on 30 Nov 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc