twins

Digital twin PoC demo


Keywords
aframe-component, arm, digitaltwin, digitaltwins, iotjs-module, mearm, motor, robot, robotic, servo
License
MPL-2.0
Install
npm install twins@0.0.5

Documentation

TWINS

GitHub forks license NPM IRC Channel

NPM

INTRODUCTION:

Web Of Twins proof of concept

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:

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:

PoC

RESOURCES: