This is an adapter add-on for the Mozilla WebThings Gateway that allows a user to add W3C Web of Things devices. This is a fork of original thing-url-adapter.
⚠️ W3C Web of Things (WoT) describes API in very generic way. There is not possible to implement every protocol that can be used with WoT.
This project aims to implement basic HTTP binding covered in W3C WoT Specification: HTTP binding assertions Example interations
Whats more, project aims to cover other protocols (like MQTT) with similar API as HTTP one (communication with same JSONs as in HTTP)
Finally, with this project, there should be possible to create new devices using some WoT implementations (like Eclipse Thingweb) and expose them easily in Mozilla Gateway.
- HTTP
- MQTT
- Make sure your devices are available via url, for example:
- Go to addon configuration page and add url where addon should search for device that you want to add:
- Go back to Things page on WebThings Gateway page and add new thing:
- Now you can use your W3C Web of Things devices via Mozilla WebThings Gateway.
- Make sure your devices are available via mqtt protocol, for example (screen from MQTTfx):
- Go to addon configuration page and add url where addon should search for device that you want to add (remember about protocol):
- Go back to Things page on WebThings Gateway page and add new thing:
- Now you can use your W3C Web of Things devices via Mozilla WebThings Gateway.
If you want to test adapter without having actual devices, you can check our prove of concept project available here: W3C Web of Things adapter POC.
We have prepared short video presenting real life usage of our project:
We recommend using Eclipse Thingweb for developing in WoT API. This implementation of WoT is based on bindings and examples from W3C's documents.
- Create file
handler-<protocol_name>.js
with implementation method fromhandlers-skeleleton.js
- Import new handler to
handlers-default.js
This project was started as a project for Internet of Things AGH UST university course.