Linked Data devices
Linked Data/RDF would be an elegant way to achieve semantic interoperability for the Internet of Things. The data of existing devices and software can be mapped, but that process is often lossy. Using Linked Data already on the lowest interfaces would avoid this problem. A prototype sensor device, bridge and software should be designed, which is easy to build, deploy and adapt. Also the hardware costs should be low.
Components
Sensor board
The sensor board contains a Arduino compatible board, a sensor and a low power wireless chip. A USB port is required to do the initial linking of the devices. A small HTTP server on the serial port takes care of that. Many new official Arduino boards use the Atmel SAMD21 MCU. It would have enough resources, but the cheapest boards start above 10 Euro. STM32 boards are much cheaper and provide enough flash memory and RAM. STM32F103C8T6 boards are available for less than 5 Euro from Germany and less than 2 Euro from China. The type of the sensor is not important, because the software should be easy to adapt to new sensors and sensor types. A temperature sensor should be fine for testing. RFM69 or RFM95 wireless chips are cheap and are supported by RadioHead. The RFM95 chip could be also used for LoRaWAN networks.
Bridge
The bridge must have an ethernet or WiFi interface and must be compatible with the low power wireless chip of the sensor board. It can be the same machine as the gateway or a separate one. Because RadioHead is much simpler and requires less resources than LoRaWAN, it would be a good library to start with. RadioHead has no support for the Raspberry Pi, therefore the bridge can be built based on an ESP8266 initially. For push sensors the MQTT protocol should be used. Optional support for actuators can be implemented with HTTP or CoAP.
Gateway
The gateway should run a MQTT server and bridge the messages to a HTTP application and/or a SPARQL server. The initial linking of the sensor devices is done via USB. A serial to TCP/IP HTTP proxy forwards the sensor device communication to the Web application. Also all other services, like the MQTT to HTTP bridge or the MQTT to SPARQL bridge must offer a HTTP API. The application should be implemented as a Node.js Web application.
APIs
All APIs must be hypermedia driven Web APIs with Hydra API description and RDF payload data. Media type based content negotiation may require to map the payload to a different RDF serialization.
Libraries and existing code
The following libraries should be used:
- Arduino for the MCUs.
- rdf-ext to process RDF data.
- hydra-middleware to implement Hydra APIs
- hydra-fetch to communicate with the Hydra APIs
There is already initial code for many parts on GitHub:
-
LinkedIoT is a framework for Arduino which handles:
- wirless data transfer
- setup mode with serial port HTTP server
- power management
There is an example code for the SHT31 temperature sensor with RFM69 data transfer.
-
Dark Horse Linked IoT bridge provides a proxy for the serial port HTTP communication.
-
ESP Radiohead Gateway is a very simple gateway to bridge Radiohead wireless data to MQTT messages.
-
MQTT to RDF forwards MQTT messages to a SPARQL store or any other RDFJS store implementation.