node-red-contrib-taha-demo 1.0.0

A simple Node-RED node for the IoT TP

npm install node-red-contrib-taha-demo

node-red-contrib-taha-demo

A minimal custom Node-RED node created for an IoT practical (TP) at ISIMM. It demonstrates the full lifecycle of a node: development, local testing with npm link, packaging, and publishing.

Educational node. It has no practical use and is not intended for production flows.

Overview

The node receives a message and replaces msg.payload with the constant string "Taha", whatever the input was (string, number, object, etc.). The message is then forwarded to the next node in the flow.

Node type tahademo
Category function
Inputs 1
Outputs 1

Prerequisites

Installation

From the Node-RED editor

  1. Open the menu (top right) and choose Manage palette.
  2. Go to the Install tab.
  3. Search for node-red-contrib-taha-demo and click install.

From the command line

Run this in your Node-RED user directory (usually ~/.node-red, or C:\Users\<you>\.node-red on Windows):

npm install node-red-contrib-taha-demo

Restart Node-RED afterwards.

Local development (npm link)

# inside the node's folder
npm link

# inside your Node-RED user directory
npm link node-red-contrib-taha-demo

Restart Node-RED. Do not run npm install in the user directory afterwards, as it removes the link.

Usage

  1. Drag the tahademo node from the function category onto the canvas.
  2. Wire it between a source node (for example inject) and a debug node.
  3. Deploy the flow and click the button on the inject node.
  4. The debug panel shows "Taha".
Input msg.payload Output msg.payload
"MY NAME IS TAHA" "Taha"
42 "Taha"
{ "a": 1 } "Taha"

Example flow

Import this flow with Menu → Import → Clipboard:

[
  {
    "id": "inject1",
    "type": "inject",
    "z": "flow1",
    "name": "",
    "props": [{ "p": "payload" }],
    "payload": "Hello Node-RED!",
    "payloadType": "str",
    "x": 150,
    "y": 100,
    "wires": [["taha1"]]
  },
  {
    "id": "taha1",
    "type": "tahademo",
    "z": "flow1",
    "name": "",
    "x": 340,
    "y": 100,
    "wires": [["debug1"]]
  },
  {
    "id": "debug1",
    "type": "debug",
    "z": "flow1",
    "name": "",
    "active": true,
    "tosidebar": true,
    "complete": "payload",
    "targetType": "msg",
    "x": 530,
    "y": 100,
    "wires": []
  }
]

Screenshots

Project structure

node-red-contrib-taha-demo/
├── node.js        # runtime logic (what the node does)
├── node.html      # editor UI: appearance, edit dialog, help text
├── package.json   # npm metadata and the "node-red" registration block
├── README.md
└── LICENSE

Change log

Version Changes
1.0.0 Initial release: node outputs the constant string "Taha".

License

Apache License 2.0

Author

Taha, Software Engineering student at ISIMM, Monastir, Tunisia.

Node Info

Version: 1.0.0
Updated 2 days ago
License: Apache-2.0
Rating: not yet rated

Categories

Actions

Rate:

Downloads

0 in the last week

Nodes

  • tahademo

Keywords

  • node-red

Maintainers