Web of Things Japanese Community Group

website·Indexed 29 days ago

https://wot-jp-cg.netlify.app/

Documentation and resources from the WoT-JP CG focused on the W3C Web of Things (WoT) standard. It provides guides on Thing Descriptions, interaction patterns (Property, Action, Event), and practical examples for integrating devices like Philips Hue, SwitchBot, and Raspberry Pi using Node-RED and the Node Generator for Node-RED.

Tokens
11.4K
Snippets
43
Records
77
Agent score
75%

What's inside WoT-JP CG

  1. Overview of Web of Things Japanese Community Group (WoT-JP CG)

    The Web of Things Japanese Community Group (WoT-JP CG), established in January 2021, focuses on promoting the awareness and utilization of Web of Things (WoT) standard technologies, supporting standardization efforts, assisting in the creation of new businesses using WoT, and fostering a sustainable community primarily communicating in Japanese.
  2. Overview of W3C Web of Things (WoT) Standard

    The W3C Web of Things (WoT) is a standard designed to achieve interoperability between different IoT platforms using Web technologies. Instead of defining a new platform to implement, WoT enables interconnection by describing existing IoT platforms using machine-readable documents called 'Thing Descriptions'. Its primary goal is to standardize the description of 'things' at the Web level to ensure interoperability across IoT platforms and application domains.
  3. Overview of Node Generator for Node-RED

    Node Generator is a helper tool for Node-RED that allows developers to convert a Web of Things (WoT) Thing Description into Node-RED nodes. These generated nodes enable a Node-RED flow to interact with a WoT Thing (performing properties, actions, or events) by receiving messages and sending the results of those interactions to subsequent nodes in the flow.
  4. Overview of Web of Things (WoT) Specification Components

    The Web of Things (WoT) framework consists of eight primary specifications divided into Normative and Informative deliverables. The foundation is built upon the WoT Architecture and Thing Description, supplemented by Discovery and Profile specifications.
  5. Overview of WoT Thing Description components

    A WoT Thing Description (TD) is a JSON-LD based model that acts as the entry point for a physical or virtual device. It consists of four primary components:

    1. Interaction Affordances: Definitions of how to interact with the Thing (Properties, Actions, and Events).
    2. Metadata: Textual information about the Thing.
    3. Schemas: Machine-understandable definitions of the data exchanged.
    4. Web Links: Formal or informal relationships to other Things or documents on the web.
  6. Understand Web of Things (WoT) and Thing Descriptions

    Web of Things (WoT) is a standardization of how 'Things' are described at the Web level to enable interoperability across different IoT platforms and applications. The central component is the Thing Description (TD), a protocol-independent meta-framework (similar to an index.html for a website) that describes what a thing is and how to access it.
  7. Reference the WoT Normative Specifications

    The normative specifications define the core standards for the Web of Things. These include:

    • Web of Things (WoT) Architecture: Describes the overall architecture of IoT systems using WoT.
    • Web of Things (WoT) Thing Description (TD): Explains how to write TD documents to describe IoT devices.
    • Web of Things (WoT) Discovery: Defines methods for discovering the URLs of Thing Descriptions using existing mechanisms and directory APIs.
    • Web of Things (WoT) Profile: Defines constraints (profiles) to clarify the functional scope that Things and Consumers must support.
  8. Prerequisites for Sensirion SHT3x sensor integration

    To use the Sensirion SHT3x series temperature and humidity sensor with Node-RED, the following hardware and software are required:

    Hardware:

    • Raspberry Pi 3 or later
    • Sensirion SHT3x series sensor
    • Jumper wires and breadboard

    Software:

    • Node-RED v2.0 or later
    • node-red-contrib-sht31 node module (for SHT3x control)
    • node-red-nodegen (Node Generator)
  9. Generate and install Node-RED nodes from a Thing Description

    To create Node-RED nodes from a WoT Thing Description (TD), follow these steps:

    1. Generate the node source: Run the node-red-nodegen command pointing to your TD JSON-LD file. Ensure the hostnames in the TD are updated to the correct IP address or hostname of your Thing.
    2. Install the generated node: Navigate to the Node-RED user directory (typically ~/.node-red) and install the generated package using npm.
    3. Restart: Restart Node-RED to load the new nodes.
    # Step 1: Generate source files
    node-red-nodegen /path/to/thing/description.jsonld
    
    # Step 2: Install into Node-RED user directory
    cd ~/.node-red
    npm install /path/to/node-red-contrib-wotmyfirstledlamp
  10. Describe Properties in a Thing Description

    Properties are defined within the properties object. Each property includes metadata (title, type) and a forms array that specifies how to interact with the property via a URI (href), the supported operations (op such as readproperty or writeproperty), and the contentType.
    "properties": {
        "led": {
            "title": "LED status",
            "titles": {
                "en": "LED status",
                "ja": "LEDの状態"
            },
            "type": "object",
            "properties": {
                "value": {
                    "type":"number"
                }
            },
            "forms": [
                {
                    "href": "http://example.com:1880/led",
                    "op": [
                        "readproperty",
                        "writeproperty"
                    ],
                    "contentType": "application/json"
                }
            ]
        }
    }
  11. Consume a WoT Thing

    Consuming a Thing means reading its Thing Description to understand how to interact with it. This can be done programmatically or via tools:

    • Node-RED: Use the Node-RED Node Generator to automatically create nodes in Node-RED based on a Thing Description, allowing for graphical orchestration of IoT solutions.
    • TypeScript: Use node-wot to interact with Things as TypeScript objects.