ICP 5 - Nyaikamba/IOT-Node-Red GitHub Wiki

EXPLORING NODES & MESSAGE PROTOCOLS ON NodeRED

IOT Continuation of Node Red Learning

During the lesson, we covered in detail about, basic input nodes, basic output nodes, social nodes and basic function nodes. We covered in detail what each of their functions were and their intended use.

IMPORTANT NODES. Some in class activities covered more in depth function of several nodes as listed below.

# 1. Switch Node Function - Used to switch or route messages depending on the incoming message properties.

Random Number Generator - (Using Switch Node) Using the switch node, I created a random number generator that based on the random number produced, would split the results in the categories listed. The switch node ensured that we could switch between the categories set up

Below is a demonstration of the random number generator in use and the output through the debug.

2. Change Node **Function ** - Allows you to change a message payload or add new properties.

Change Node Demo Using the change mode, I created a message that said "Hello World" and on the change node, I first set the rule to replace the entire message. For the second part, I created a message that said "Hello"and on the change node set a rule to add another word to the message.

Below is a demonstration of the change node demo in use and the output through the debug pane.

3. Range Node Function - This node supports scaling and allows you to apply a linear scale on a given input value.

Range Node Demo Using the range mode, I created 3 values to display the range node. I set the range from 0 - 5 using values from 0 - 1024. With 1024 as one of my values, this using the scale gets the value 5 as shown.

Below is a demonstration of the change node demo in use and the output through the debug pane.

**4. RBE (Report By Exception Node) ** Function - This node passes on data if it has changed or according to set rules. Can block a message until a message changes to the specified one.

RBE Node Demo Using the RBE node, I used a random number generator to create numbers from 0-100, I then set a rule to block any numbers that were more than 10 from the first initial value generated.

Below is a demonstration of the change node demo in use and the output through the debug pane.

4. Extra Also worked on http input and output nodes as shown in the sample flow from the lecture notes. Below is a demonstration of the nodes in use and the output displayed to the URL created.

5. ICP 5 - Sensor Tag Sensor Tag is an IOT demo kit that combines sensor data with cloud connectivity. The ICP was to create a use case on sensor tag.

The flow diagram was easy to recreate but I encountered problems trying to get sensor tag to work on my computer. Upon further review it was noted that sensor tag was not supported on windows as shown below.

Despite various attempts to fix this problem or find a solution, it was not possible to do so. Currently searching for a way to facilitate sensor tag on windows. This was the biggest problem encountered.

Below is a flow diagram of the ICP that was put together for this section

GOALS

  1. Find solution to sensor tag windows problem
  2. Find alternative way to use sensor tag to display data eg using the app and uploading data to cloud.
  3. Complete ICP 5 fully