https://github.com/rzr/webthing-iotjs
IoT.js implementation of WebThing API (based on webthing-node)
https://github.com/rzr/webthing-iotjs
iotjs webthing
Last synced: about 1 year ago
JSON representation
IoT.js implementation of WebThing API (based on webthing-node)
- Host: GitHub
- URL: https://github.com/rzr/webthing-iotjs
- Owner: rzr
- License: mpl-2.0
- Created: 2018-08-22T09:08:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T21:18:08.000Z (almost 3 years ago)
- Last Synced: 2025-03-27T18:59:17.795Z (about 1 year ago)
- Topics: iotjs, webthing
- Language: JavaScript
- Homepage: https://mastodon.social/@rzr/103580872382220227#:WebThingIotJs
- Size: 1.16 MB
- Stars: 58
- Watchers: 9
- Forks: 14
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-web-of-things - IoT.js - by rzr (Section / Libraries)
README
# WEBTHING-IOTJS #
[](
https://GitHub.com/rzr/webthing-iotjs/network/
)
[](LICENSE)
[](
https://travis-ci.org/rzr/webthing-iotjs
)
[](
https://www.npmjs.com/package/webthing-iotjs
)
[](
https://cloud.docker.com/repository/docker/rzrfreefr/webthing-iotjs
)
[](
https://cloud.docker.com/repository/docker/rzrfreefr/webthing-iotjs/timeline
)
[](
https://cloud.docker.com/repository/docker/rzrfreefr/webthing-iotjs/builds
)
[](
https://app.codacy.com/app/rzr/webthing-iotjs?utm_source=github.com&utm_medium=referral&utm_content=rzr/webthing-iotjs&utm_campaign=Badge_Grade_Dashboard
)
[](
https://app.fossa.io/projects/git%2Bgithub.com%2Frzr%2Fwebthing-iotjs?ref=badge_shield
)
[](
https://mastodon.social/@rzr/103580872382220227#:WebThingIotJs
)
[](
https://kiwiirc.com/client/irc.freenode.net/#tizen
)
[](
https://npmjs.org/package/webthing-iotjs
)
[](
https://www.slideshare.net/slideshow/embed_code/key/BGdKOn9HHRF4Oa#webthing-iotjs#
"WebThingIotJs")
## 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:
*
[](
https://www.slideshare.net/rzrfreefr/webthingiotjs20181022rzr-120959360/19
"webthing-iotjs-20181027rzr")
## REFERENCES ##
*
*
*
*
*
*
## LICENSE ##
[](https://app.fossa.io/projects/git%2Bgithub.com%2Frzr%2Fwebthing-iotjs?ref=badge_large)