Skip to content
forked from tum-esi/wade

WoT API Development Environment based on thingweb.node-wot

License

Notifications You must be signed in to change notification settings

FadySalama/wade

 
 

Repository files navigation

W-ADE

Table of Contents

  1. Web of Things API Development Environment
  2. What can you do with W-ADE
  3. Prerequisites
  4. How to Install the Application
  5. How to Get Started with Development (open in dev mode)
  6. Interaction Timing Vocabulary
  7. A-MaGe
  8. Errors and Known Problems
  9. Adding or Working on Issues

Web of Things API Development Environment

Wade is an API development environment for Web of Things that was designed for the W3C WoT building blocks. It enables users to interact with IoT devices over various protocols. At the moment the following protocolls are supported: HTTP/HTTPS, CoAP/CoAPS, MQTT.
It is based on node-wot, the reference implementation of W3C's Scripting API. It is an Electron application.

See the related paper WADE: Timing Performance Benchmarking in Web of Things.

@inproceedings{skks:2020,    
	  author           = {Verena Eileen Schlott and Ege Korkan and Sebastian Kaebisch and Sebastian Steinhorst},
    title            = {W-ADE: Timing Performance Benchmarking in Web of Things},
    booktitle        = {International Conference on Web Engineering (ICWE 2020)},
    location         = {Helsinki, Finland},
    year             = {2020},
    month            = {6},
    doi				       = {https://doi.org/10.1007/978-3-030-50578-3_6},
    url              = {https://s-steinhorst.github.io/PDF/2020-ICWE-W-ADE%20Timing%20Performance%20Benchmarking%20in%20Web%20of%20Things.pdf},
}

What can you do with W-ADE

  • Send requests and interact with your IoT device based on its TD alt text
  • Test and play around with your Thing Description (TD)
  • Save and organize your Thing Descriptions
  • Get insights on the timing performance behaviour of interactions alt text
  • Retrieve timing performance benchmarks of your requests
  • Spin up a Virtual Thing / Shadow Thing based on your TD alt text

Prerequisites

You need to have Node.js version >= 12.9 installed. It is highly recommended to also have Yarn installed


How to install the application

Step 1: Clone the repository to your local machine.

git clone https://github.com/tum-esi/wade.git

Step 2: Navigate into the main folder and install all dependencies.

cd wade
yarn install 

Step 3: Build the electron application. (If you run into any errors, check here: Errors and Known Problems)

yarn run electron:build

Step 4: Navigate into the folder 'dist_electron' and install the application. After installing it you can start the application on your machine.


How to get started with development

(To be able to easily work and develop functionalities in W-ADE, please read the architecture documentation first!)

After cloning the repository and installing all node dependencies (see step 1 & 2 in How to Install the Application) do not build the app (step 3) but run it in development mode instead:

yarn run electron:serve

This allows for hot-reloads and shows you all potential errors.
If you have problems performing this step or run into an error, check the Errors and Known Problems section for help.

If you want to add your changes to W-ADE, please fork the repository and create a pull request.
Also checkout the Adding or Working on Issues section.


Interaction Timing Vocabulary

To be able to add measured timing performance benchmarks to a Thing Description, a vocabulary set that is aligned with the current Thing Description was developed.
It is called Interaction Timing Vocabulary.
It's schema can be found in '/interaction-timing-vocabulary'.

A-MaGe


Atomic Mashup Generator for the Web of Things

A-MaGe is a mashup generator for the Web of Things designed to take advantage of the Atomic Mashup abstraction proposed by the System Description. See the related paper A-MaGe: Atomic Mashup Generation for the Web of Things

@inproceedings{amage:2021,    
    author           = {Ege Korkan and Fady Salama and Sebastian Kaebisch and Sebastian Steinhorst},
    title            = {A-MaGe: Atomic Mashup Generator for the Web of Things},
    booktitle        = {2021 International Conference on Web Engineering (ICWE)},
    location         = {Biarritz, France},
    year             = {in press}
}

demonstration


Prerequisites

For NLP:
Latest version of Python and the following packages

  1. gensim
  2. Flask
  3. Flask-RESTful

To run the NLP-Sever, run the Python script ./NLP/word2vec-api.py


Errors and Known Problems

  • If you already downloaded the W-ADE repository earlier and have problems with either installing the node dependencies or building the application. Delete the node_modules folder and install/ build the application again.

  • cd wade 
    rm -r -f node_modules
    yarn install 
    yarn run electron:build
    
  • Install node-aead-crypto to avoid failing dev build and build, because coap-binding seems to need it might be necessary (it isn't installed with current node version because it shouldn't be needed anymore). To solve this, a script was added to comment out the part that caused the failure, as it is not needed for Node.js version >= 10. If issue persists, please check if lines 52-55 in ./node_modules/node-dtls-client/build/lib/AEADCrypto.js are commented out.

  • If the W-ADE builds but shows a white screen, it is probably an issue caused by vm2 that is used by node-wot servient. The postinstall script comments the problematic parts out but if the issue persists, please check first that lines 3, 15-68 in ./node_modules/@node-wot/core/dist/servient.js are commented out.

  • The Shadow Thing package needs to be installed locally (not just a symlink in ./node_modules/) in order to work in the production build, and it has to be installed manually anyway if you want to make Virtual Thing work in WADE. The reason therefore is, that automatic installation of shadow thing fails under windows and so would the installation of WADE if Shadow Thing was added to the package.json.

  • Vuex version 3.1.2 leads to build problems -> Issue 10


Adding or Working on Issues

Adding Issues

When adding a new issue, please...

  1. Use the following title style:

    [<Topic>] <short description of issue>
    

    E.g.: [Sidebar] Improve UX of sidebar

  2. Add a priority label to indicate the importance of the issue.

    Existing priority labels are:

    • prio-low
    • prio-mid
    • prio-high.
  3. Add a label indicating the type of the issue.

    Existing type labels are:

    • Bug
    • Enhancement (A new feature or functionality)
    • Improvement (Improvement of existing features/ functionality)
  4. Add it to an Overview-Ticket (that fits best)
    Existing overview-tickets are:

Working on Issues

When you want to work on an issue, please ...

  1. Assign issue to yourself: So that multiple persons aren't working on the same issue.

  2. Create a new branch, and use the following naming convention:

    <type-of-issue>-<topic>-<short-description>
    

    type-of-issue refers to this:
    E.g. bugfix-sidebar-click-error or improvement-ui-better-zooming

  3. Link the according issue in the pull request: When finishing the issue and when creating a pull-request to master, link the issue. The person who merges the pull-request to master can then close the issue.

  4. Closed issue also needs to be striked-through on the according overview-issue.

About

WoT API Development Environment based on thingweb.node-wot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 61.0%
  • Vue 36.2%
  • JavaScript 2.2%
  • Other 0.6%