node red for sensemakers meetup
TRANSCRIPT
![Page 1: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/1.jpg)
For sensemakers IoT meetup on 16
Sep 2015
Presenter : Jonathan Carter
@jonathanrcarter
the gateway to an IoT economyAmsterdam iBeacon Living Lab
Node Red demonstration
![Page 2: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/2.jpg)
• Developed by IBM as an open source project
• Based on NODEJS, designed for IoT
• Visual interface similar to Yahoo Pipes (web port 1880)
• Program is called a FLOW step is called a NODE
• Deployable on multiple platforms e.g. local computer,
linux server , rip, beagle bone
• Includes a web server and a rest server out of the box
the gateway to an IoT economyAmsterdam iBeacon Living Lab
Node-Red - key facts
![Page 3: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/3.jpg)
Node-Red - flows
Input node
• Starting point of a flow
• Often takes its input from an external source
• In this example a twitter feed looking for the
search term “appcelerator”
![Page 4: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/4.jpg)
Node-Red - flows
Process node
• Has an input and one (or many) outputs
• Takes its input from a node and passes its output
to a node (or nodes)
• In this example it adds a sentiment score to a
twitter message
![Page 5: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/5.jpg)
Node-Red - flows
Output node
• Typically ends a flow
• Takes its input from a node and passes its output
to an external system or to “debug”
• In this example it outputs the tweet to “debug”
![Page 6: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/6.jpg)
Node-Red - flows
• The format which is passed from node to node is called a Message
• It is in JSON format and almost always contains a Payload and sometimes a Topic but is very flexible
Message {
topic : “”, payload : “”
}
![Page 7: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/7.jpg)
Node-Red - flows
Message {
"topic": "tweets/farahburn_", "payload": "RT @adnan04ar01: #SyrianRefugees brought his cat on the boat to #Greece. 😼 😿 😻 http://t.co/52rYsXWeg1", "lang": "en", "tweet": {
"created_at": "Wed Sep 16 05:03:43 +0000 2015", “id": 644013774723113000, "text": "RT @adnan04ar01: #SyrianRefugees brought his cat on the boat to #Greece. 😼 😿 😻 http://t.co/52rYsXWeg1", "source": "<a href=\"http://twitter.com/download/android\" rel=\"nofollow\">Twitter for Android</a>", "user": {
"id": 244947493, "name": "Farah dot dot", "screen_name": "farahburn_", "location": "", "followers_count": 1098, "friends_count": 843, "listed_count": 2
} }
}
![Page 8: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/8.jpg)
Node-Red - Visual interface
Debug console
Available nodes
Deploy button
![Page 9: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/9.jpg)
Node-Red - export and import
Export and import via clipboard
![Page 10: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/10.jpg)
Node-Red - Code
Each node is an HTML file and a .JS file - you can make your own quite quickly
flows are stored in a JSON file - you can easily github them
![Page 11: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/11.jpg)
Node-Red - Extending
control a Hue with a twitter hashtag
![Page 12: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/12.jpg)
Node-Red - pratical session
• Put it online in a nice graph at thingspeak
• Get data from LoRa IoT beacon on the beacon mile
![Page 13: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/13.jpg)
Node-Red - practical session
• Put it online in a nice graph at thingspeak
• Get data from LoRa IoT beacon on the beacon mile
• Save it in a mysql database
• make a nice rest interface
• tweet if it goes above 20c
![Page 14: Node red for sensemakers meetup](https://reader033.vdocuments.us/reader033/viewer/2022051123/5a6d25a77f8b9a16428b4dfd/html5/thumbnails/14.jpg)
• becoming the deficit standard for IoT
• very “lightweight”
• can connect arduino, Rpi, linux, embedded chips all together and pass on messages to each other
• Security, persistence built in
Node-Red - practical session