ICP 6 - Abdullah-otb/IOT GitHub Wiki

Introduction

There are a lot of useful and important nodes in Node-RED. We explored Change node, Switch node, Range node, HTTP node and MQTT node in ICP6.

Objectives

Use the switch node to check the node property and decide to route a message to one of the switch node’s outputs. Change a message payload or add new properties using a change node. Use the range node to scale an input value. Build a website using HTTP nodes. publish/subscribe message using MQTT broker and MQTT node.

Workflow & Approaches & Methods

Create a switch node to check the number generated by a random number generator node and decide to route a message to one of the switch node’s outputs. Create a change node to add a new property to the node. Create a range node to linearly scale an input value(From 0-1023 to 0-5). Create an Http Input & Output nodes to build a website. Set up an MQTT broker and create an MQTT node to subscribe to that topic.

Flow Diagram

Switch Change

Range HTTP MQTT

Video

Change Switch Range HTTP

https://youtu.be/EPOv5EWiF0c

MQTT

https://youtu.be/aR49fIwE3LI

Evaluation & Discussion

Sensor Tag is a very powerful node.We spend a lot of time to install this node. But we can not make it work properly even in a Linux environment.

Conclusion

we are able to control the message flow through Change, Switch, Range, HTTP and MQTT ndes.