Upload
jonathan-carter
View
379
Download
0
Embed Size (px)
Citation preview
For sensemakers IoT meetup on 16
Sep 2015
Presenter : Jonathan Carter
@jonathanrcarter
the gateway to an IoT economyAmsterdam iBeacon Living Lab
Node Red demonstration
• 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
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”
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
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”
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 : “”
}
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
} }
}
Node-Red - Visual interface
Debug console
Available nodes
Deploy button
Node-Red - export and import
Export and import via clipboard
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
Node-Red - Extending
control a Hue with a twitter hashtag
Node-Red - pratical session
• Put it online in a nice graph at thingspeak
• Get data from LoRa IoT beacon on the beacon mile
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
• 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