https://github.com/namib-project/node-red-contrib-wot-discovery
Experimental Node-RED package for discovery in the Web of Things (WoT).
https://github.com/namib-project/node-red-contrib-wot-discovery
node-red node-red-contrib nodejs web-of-things
Last synced: about 2 months ago
JSON representation
Experimental Node-RED package for discovery in the Web of Things (WoT).
- Host: GitHub
- URL: https://github.com/namib-project/node-red-contrib-wot-discovery
- Owner: namib-project
- License: mit
- Created: 2021-03-20T14:18:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-13T02:49:52.000Z (almost 2 years ago)
- Last Synced: 2024-10-24T10:07:12.414Z (8 months ago)
- Topics: node-red, node-red-contrib, nodejs, web-of-things
- Language: JavaScript
- Homepage:
- Size: 3.21 MB
- Stars: 4
- Watchers: 3
- Forks: 4
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
node-red-contrib-wot-discovery
=====================
[](https://github.com/namib-project/node-red-contrib-wot-discovery/actions/workflows/npm-test.yml)
[](https://flows.nodered.org/node/node-red-contrib-wot-discovery)
[](https://www.npmjs.com/package/node-red-contrib-wot-discovery)
[](https://coveralls.io/github/namib-project/node-red-contrib-wot-discovery?branch=main)
[](https://standardjs.com)Experimental Node-RED package for discovery in the Web of Things (WoT).
It provides a `wot-discovery` node that can be used for discovering and storing WoT Thing Descriptions (TDs) as well as a `wot-scripting` node that serves as an interface to [`node-wot`](https://github.com/eclipse/thingweb.node-wot) for triggering interaction affordances.
As a latest addition, a `wot-fetch` node provides a way to retrieve TDs directly from URLs using HTTP(S) or CoAP(S).
## `wot-fetch` Node
The fetch node can retrieve TDs from URLs which can either be specified in the node itself or as a message property (using the field `msg.tdUrl`).
It supports the URL schemes `http(s)` and `coap(s)`.## `wot-discovery` Node
The discovery node can obtain TDs from the local network (using CoAP) or from a MQTT broker and save them either in the context or in the original message object that was passed to the node.
When using CoAP, you can choose between a number of different methods for obtaining TDs, all of which use IP multicast (both IPv4 and IPv6).
You can choose between the multicast addresses for all IPv4/IPv6 nodes or the respective addresses for "All CoAP Nodes".Supported methods for CoAP so far include:
- Discovery from `/.well-known/wot`.
- Discovery using the CoRE Link Format and `/.well-known/core` (the correct content type and resource type has to be set in the list of links).
- Discovery from CoRE Resource Directories. For this method, available Resource Directories are discovered first which are then queried for links pointing to TDs.For MQTT, WoT producers have to publish their TDs to a topic with the prefix `wot/td` which can then be queried by the discovery node.
## `wot-scripting` Node
The scripting node consumes TDs that are passed in inside a message object (in the field `thingDescription`).
You can choose which kind of affordance type should be triggered and define a filter (either by affordance name or by the semantic `@type`).
If an affordance returns an output, you can choose where this output should be saved (either in the message or the context) and which field should be used.