Skip to content

arces-wot/WOT-Demo

Repository files navigation

Demo for the WoT PlugFest (10 July 2017 in Dusseldorf)

Things list

  1. RFID Reader
  2. 32 Chars LCD Display
  3. Reed sensor
  4. RGB blinking LED
  5. PIR sensor

Web Things - Templates and Thing Descriptions

RFID Reader

ID Card (according to W3C template)

  • Logo:
  • Hardware: LabID RFID Reader 13,56 MHz (ISO 14443, ISO 15693)
  • Software: Java
  • WoT Functions
    • Role: client
    • Protocols: HTTP
    • Encodings: UTF-8
    • Discovery: can be discovered both locally or remotely through the discovery mechanism provided by SEPA
    • Application Logic: communicates the reading of tags in the reader range
  • Textual description: This Web Thing performs updates on changes of the RFID tags within the RF field of the reader.

Thing Description

{
  "@context": {
    "wot": "http://wot.arces.unibo.it/sepa#",
    "td": "http://www.w3.org/ns/td#"
  },
  "@type": "td:Thing",
  "name": "RFID Reader",
  "interactions": [
    {
      "@type": [
        "td:Event",
        "wot:Ping"
      ],
      "name": "RFID Reader is alive even"
    },
    {
      "@type": [
        "td:Event",
        "wot:RFIDReading"
      ],
      "name": "RFID Reading",
      "outputData": {
        "valueType": {
          "type": "string"
        }
      }
    }
  ]
}

32 Chars LCD Display

ID Card (according to W3C template)

  • Logo:
  • Hardware: RaspberryPi3 + HD44780 Display
  • Software: C
  • WoT Functions
    • Role: server
    • Protocols: HTTP/Websocket
    • Encodings: UTF-8
    • Discovery: discovery through SPARQL query/subscription on SEPA
    • Application Logic: clients may program this display according to its Thing Description
  • Textual description: This is a programmable display that can be discovered and programmed through its Thing Description mapped into a SPARQL Event Processing Architecture (SEPA).

Thing Description

{
  "@context": {
    "wot": "http://wot.arces.unibo.it/sepa#",
    "td": "http://www.w3.org/ns/td#"
  },
  "@type": "td:Thing",
  "name": "ARCES_32char",
  "interactions": [
    {
      "@type": [
        "td:Event",
        "wot:Ping"
      ],
      "name": "Raspi16x2LCDAlive"
    },
    {
      "@type": [
        "td:Action",
        "wot:LCDWriteAction"
      ],
      "name": "Raspi16x2LCD_Write",
      "inputData": {
        "valueType": {
          "type": "string"
        }
      }
    }
  ]
}

RGB blinking led

ID Card (according to W3C template)

  • Name: ARCES_RGB_Led
  • Picture:

  • Logo:
  • Hardware: RaspberryPi3 + RGB Led Ky-009
  • Software: C
  • WoT Functions
    • Role: servient
    • Protocols: HTTP/Websocket
    • Encodings: UTF-8
    • Discovery: discovery through SPARQL query/subscription on SEPA
    • Application Logic: clients may program this LED according to its Thing Description to set colour and blinking frequency
  • Textual description: This is a programmable RGB Led. It can be discovered and programmed through its Thing Description mapped into a SPARQL Event Processing Architecture (SEPA). Colour and blinking frequency are its programmable parameters.

Thing Description

{
  "@context": {
    "wot": "http://wot.arces.unibo.it/sepa#",
    "td": "http://www.w3.org/ns/td#"
  },
  "@type": "td:Thing",
  "name": "ARCES_RGB_Led",
  "interactions": [
    {
      "@type": [
        "td:Event",
        "wot:Ping"
      ],
      "name": "Raspi3ColourAlive"
    },
    {
      "@type": [
        "td:Action",
        "wot:ChangeColourAction"
      ],
      "name": "ChangeRGBLedColour",
      "inputData": {
        "valueType": {
          "type": "object",
          "properties": {
            "r": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1
            },
            "g": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1
            },
            "b": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1
            }
          },
          "required": [
            "r",
            "g",
            "b"
          ]
        }
      }
    },
    {
      "@type": [
        "td:Action",
        "wot:ChangeFrequencyAction"
      ],
      "name": "ChangeRGBBlinkFrequency",
      "inputData": {
        "valueType": {
          "type": "object",
          "properties": {
            "frequency": {
              "type": "integer",
              "minimum": 0
            }
          },
          "required": [
            "frequency"
          ]
        }
      }
    },
    {
      "@type": [
        "td:Property",
        "wot:RGBcolourProperty"
      ],
      "name": "Raspi3ColourProperty",
      "outputData": {
        "valueType": {
          "type": "object",
          "properties": {
            "r": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1
            },
            "g": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1
            },
            "b": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1
            }
          }
        }
      },
      "writable": true,
      "stability": -1
    },
    {
      "@type": [
        "td:Property",
        "wot:RGBfreqProperty"
      ],
      "name": "Raspi3FreqProperty",
      "outputData": {
        "valueType": {
          "type": "object",
          "properties": {
            "frequency": {
              "type": "integer",
              "minimum": 0
            }
          },
          "required": [
            "frequency"
          ]
        }
      },
      "writable": true,
      "stability": -1
    }
  ]
}

Reed Sensor

ID Card (according to W3C template)

  • Name: ARCES Reed Sensor
  • Picture:

  • Logo:
  • Hardware: LoLin V3 (ESP8266) + Reed Sensor KY-025
  • Software: C firmware
  • WoT Functions
    • Role: client
    • Protocols: HTTP
    • Encodings: UTF-8
    • Discovery: discovery through SPARQL query/subscription on SEPA
    • Application Logic: communicates the reading of its reed sensor
  • Textual description: This Web Thing is discoverable through a SPARQL Event Processing Architecture (SEPA) and exploits it to communicate the value sensed by its reed sensor (true/false).

Thing Description

{
    "@context": {
	"wot": "http://wot.arces.unibo.it/sepa#",
	"td": "http://www.w3.org/ns/td#"
    },
    "@type": "td:Thing",
    "name": "Reed Sensor",
    "interactions": [
	{
	    "@type": [
		"td:Event",
		"wot:Ping"
	    ],
	    "name": "Reed Sensor Heartbeat"
	},
	{
	    "@type": [
		"td:Event",
		"wot:ReedSensorValueChangedEvent"
	    ],
	    "name": "Reed Sensor Value Changed",
	    "outputData": {
		"valueType": {
		    "type": "boolean"
		}
	    }
	},
      	{
	    "@type": [
		"td:Property",
		"wot:ReedSensorValueProperty"
	    ],
	    "name": "Reed Sensor Value Property",
	    "outputData": {
		"valueType": {
		    "type": "boolean",
		}
	    },
	    "writable": false,
	    "stability": -1
	}
    ]
}

PIR Sensor

ID Card (according to W3C template)

  • Name: ARCES Pir Sensor
  • Picture:

  • Logo:
  • Hardware: LoLin V3 (ESP8266) + PIR Sensor HR-501
  • Software: C firmware
  • WoT Functions
    • Role: client
    • Protocols: HTTP
    • Encodings: UTF-8
    • Discovery: discovery through SPARQL query/subscription on SEPA
    • Application Logic: communicates the reading of its pir sensor
  • Textual description: This Web Thing is discoverable through a SPARQL Event Processing Architecture (SEPA) and exploits it to communicate the value sensed by its PIR sensor (true/false).

Thing Description

{
    "@context": {
	"wot": "http://wot.arces.unibo.it/sepa#",
	"td": "http://www.w3.org/ns/td#"
    },
    "@type": "td:Thing",
    "name": "Pir Sensor",
    "interactions": [
	{
	    "@type": [
		"td:Event",
		"wot:Ping"
	    ],
	    "name": "Pir Sensor Heartbeat"
	},
	{
	    "@type": [
		"td:Event",
		"wot:PirSensorValueChangedEvent"
	    ],
	    "name": "Pir Sensor Value Changed",
	    "outputData": {
		"valueType": {
		    "type": "boolean"
		}
	    }
	},
      	{
	    "@type": [
		"td:Property",
		"wot:PirSensorValueProperty"
	    ],
	    "name": "Pir Sensor Value Property",
	    "outputData": {
		"valueType": {
		    "type": "boolean",
		}
	    },
	    "writable": false,
	    "stability": -1
	}
    ]
}

About

Demo for the Web Of Things

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •