Web Of Twins

Philippe Coval http://purl.org/rzr/ #FOSDEM 2020

Sorry, your browser does not support SVG.

$ whois Phil Coval

  • Software Engineer from Rennes, France
  • Contributed to libre communities:
    • Debian, Qt, MeeGo, Mozilla-IoT, Node…
  • Involved in industry's OSS:
    • Tizen (Intel), Yocto, IoTivity (Samsung)
  • Currently available for cooperation:

Digital Twin

  • In 2000, I hacked a "VRML Puppet on the web"
  • Dr M.Grieves (FIT 2002) conceptualized DT
    • Digital replica of physical entity
      • Real time (or deferred) connectivity
  • "Device as Service" concept:
    • Design, Simulation, playback
    • Product Life Management
    • Impact analysis, Improve decision making
  • Generic solution for Industry (4.0), (Smart) City

Ethical considerations

  • Challenge: Digital Twins with IoT
    • User and user's data centric
    • Decentralized and resilient
  • GDPR Article 25 conveys the key principles
    • privacy by design (& by default)
  • Opportunity for FLOSS community
    • Privacy is part of our DNA

The Web as a MetaVerse ?

  • Designed for interoperability
    • So it's Transversal
  • Native 3D support (WebGL/XR >>> VRML97+)
  • Provide privacy facilities (and concerns)
    • Runtime isolation in browser context
  • Applies to IoT: W3C "Web Of Things" (WoT)

…of WebThings

  • Mozilla's SmartHome platform
    • gives control back to users
  • Devices and gateway work standalone in LAN
    • UI Dashboard, automation using rules
    • Optional features:
      • Secure remote access, sharing. logging
      • Addons for new protocols or services…

WebThing API:

  • Standalone devices:
    • Servers talking HTTP REST/CRUD (+WS)
    • Simplified WoT Description (in JSON)
      • Properties: Boolean, Numbers, Strings
      • Actions (to) & Events (from)
  • Security is handled by gateway:
    • LAN's devices can be shared using JWT

Smart Home example

$ npm install aframe-smart-home
$ cd node_modules/aframe-smart-home/
$ npm install && npm start
$ curl http://localhost:8888/
{ "id": "urn:dev:ops:smarthome-1234", (...)
  "properties": {
    "level": {
      "description": "Solar sensor level",
      "links": [ {
          "rel": "property",
          "href": "/properties/level" (...)
$ curl http://localhost:8888/properties
{"level":42}

Modeling for Immersive Web

  • WebGL: Direct GPU Access
  • WebXR: Adds AR to WebVR, unified UX
  • A-Frame: design using web components:
    • <script…><a-scene><a-sphere></a-scene>
  • glTF format specified by Khronos

Bind model to thing

$ cd aframe-smart-home/aframe
$ npm install && PORT=42080 npm start
$ x-www-browser http://localhost:42080/aframe/
// Register "solor" components, handler:
// When WoT "level" updates change color (DOM) 
<script src="..."> 

<a-asset-item id="house"
 src="../assets/smart-home/smart-home.glb" >

<a-entity solar=""
 gltf-part="src: #house; part: solar"
 webthing="properties:solar; url:https://localhost:8888;">

Sensing reality

Sensing reality

  • "Mini Solar Panel" (Garden floor lamp, ~1V)
    • Powered by JerryScript's IoT.js on NuttX
    • webthing-iotjs to handle HTTP and ADC
    • Deployed to STM32 board Nucleo F767ZI
  • Hint: Use generic-sensors-lite NPM module
    • Temperature, light, color, humidity

Web of Twins Robot

.

Immersive Web

More WoTxR demos

Resources

  • Thanks FOSDEM !
    • + Samsung-OSG, Mozilla, ST, @Utopiah…
  • License: CC-BY-SA-4.0 ~RzR 2020
  • Copyrights belong to their respective owners

Sorry, your browser does not support SVG.

Video playback

Created by Philippe Coval