twins
v0.0.7
Published
Digital twin PoC demo
Downloads
56
Maintainers
Readme
TWINS
INTRODUCTION:
Web Of Twins proof of concept
USAGE:
USING IOT.JS:
make start
#| iotjs index.js
#| Listening:
#| http://localhost:8888/
url=http://localhost:8888
curl $url/properties
#| {"torso":0,"shoulder":0,"arm":0,"hand":0}
curl -X PUT -H "Content-type: application/json" -d '{ "hand": 10 }' $url/properties/hand
#| {"hand":10}
make demo
Then twin can be visualized using:
- A-frame (./aframe/index.html) rendering page
- http://rzr.github.io/twins/aframe/?url=http://localhost:8888
USING NODE.JS:
Usage is straightforward:
npm install
npm start 8042
#| > node index
#| Listening:
#| http://localhost:8842/
USING GLITCH:
USING MOZILLA WEBTHING GATEWAY:
- Issue token
cd aframe
npm install && PORT=42088 npm start
url='http://localhost:42088/?'
httpUrl='https://rzr.mozilla-iot.org/things/http---192.100.0.13-888'
useWs="false"
bearer='eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjI0YWZiMGI4LTdlMDktNDgzYy1iMTc4LTkyNDBjMjQxMWMxNiJ9.eyJjbGllbnRfaWQiOiJsb2NhbC10b2tlbiIsInJvbGUiOiJhY2Nlc3NfdG9rZW4iLCJzY29wZSI6Ii90aGluZ3M6cmVhZHdyaXRlIiwiaWF0IjoxNTgwNDA1NDkyLCJpc3MiOiJodHRwczovL3J6ci5tb3ppbGxhLWlvdC5vcmcifQ.9OoC503xdppFBEKMKQoXBnK5RbamLuWo0hZg2evdImRUXwVEovfbhAqHFCwCFGyADYKpT8mTWOzlMKZ_ahddoA'
url="$url&url=$httpUrl"
url="$url&useWs=$useWs"
url="$url&bearer=$bearer"
www-browser "$url"
GUIDE:
Demo Howto and more insights at:
DEMO:
RESOURCES:
- http://purl.org/rzr/presentations#
- https://fosdem.org/2020/schedule/event/iotnuttx/#
- https://fosdem.org/2020/schedule/event/web_of_twins/
- https://purl.org/rzr/digitaltwins-webthings-iotjs-20190512rzr#
- https://purl.org/aframe-webthing#
- https://github.com/rzr/aframe-webthing#
- https://github.com/sponsors/rzr/#
- https://hacks.mozilla.org/2019/03/connecting-real-things-to-virtual-worlds-using-web/
- https://github.com/jerryscript-project/iotjs-modules/pull/5