Slide 1

Slide 1 text

Hands On Intro to Rapid Prototyping with Node-RED

Slide 2

Slide 2 text

Have you ever had a day when …. You have an idea You want to build out this idea You’re not sure where to get started

Slide 3

Slide 3 text

Wouldn’t it be handy if, when X happens over there, it can alert the team, kick-off that business process or just go ping! How do I get the data from that API to give me the info I need to build out that service and have that service connect to my phone Wish there was an easy way to build out a front end and test out these API integrations without building out a whole end to end stack Is there an easier way to test this works!

Slide 4

Slide 4 text

The Problem When building out applications ( Webservices or IoT ) there is not one size fits all solution Applications can often require pulling together different device APIs and online services in new and interesting ways. Time spent figuring out how to access a Serial port, or to complete an OAuth flow against Twitter is not time spent on creating the real value of a solution, and is not easy for anyone but dedicated programmers. Building things can require you to be an expert programmer and you can often find yourself reinventing the wheel

Slide 5

Slide 5 text

We need tools that make it easier for developers at all levels to bring together the different streams of events, both physical and digital, that make up the any application: both webservice and Internet of Things.

Slide 6

Slide 6 text

Introducing Node-RED Node-RED provides a fast and easy way to create flow based programs to get your ideas running on either web applications, dashboards and IoT devices in minutes. It provides a browser-based drag-drop UI for creating flows of events and deploying them to the runtime. The light-weight runtime, built in node.js, is ideal for edge-of-network environments or running in the cloud. It can be easily expanded to take add new nodes to the palette – taking full advantage of the node package manager (npm) ecosystem

Slide 7

Slide 7 text

Node-RED is… An application composition tool experience A lightweight proof of concept runtime Easy to use for simple tasks • Simple to extend to add new capabilities and types of integration • Capable of creating the back-end glue between social applications • A great way to try... • “can I just get this data from here to there?” • “and maybe change it just slightly along the way...” • Incredibly Adaptable

Slide 8

Slide 8 text

History of Node-RED Node-RED has been more open and popular as open source software for both edge and cloud environments. • March 2014: Invented by IBMers Nock O’Leary and Dave Conway-Jones and Released in QCon London • June 2014: Included in the catalog on IBM Cloud • November 2015: Pre-installed in Raspberry Pi • October 2016: Moved to Linux Foundation • As of March 2018: Downloaded 50,000 times a month

Slide 9

Slide 9 text

What is a Node-RED Node

Slide 10

Slide 10 text

Basic Node-RED Nodes Inject node • Allows manual triggering of flows • Can inject events at scheduled intervals Debug node • Show message content; either payload or entire object Template Node • Modifies the output based on a Mustache Template Function node • Run user-defined node.js code on the data inputs

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Other Input Nodes HTTP – Act as an HTTP endpoint; great for building RESTful services IBMIOT – Receive messages from an attached IOT Foundation account Also can receive from Websockets, MQTT (pick your own broker), TCP and MQ Light

Slide 13

Slide 13 text

Other Output Nodes HTTP Response; required as the final node when the input comes from an HTTP Request IBMIOT – send events out to the attached IOT Foundation account Twilio – send SMS messages via the Twilio service IBM Push – Send Push notifications to mobile devices Also can send requests through TCP, UDP, MQLight, WebSockets.

Slide 14

Slide 14 text

Social Nodes Storage Nodes Watson Services Nodes

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Lets Build something Together git repo: https://github.com/pmmistry/Intro-to-Node-RED

Slide 17

Slide 17 text

Sign up for IBM-Cloud Get a head start with IBM Cloud, sign up via: https://ibm.biz/BdzMZG

Slide 18

Slide 18 text

Find Node-RED on Catalog

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

Lets create an application that tells you the Weather in a different language Insert Inject Node à Connect it to Weather Insights API Node à Connect to Debug Output

Slide 22

Slide 22 text

Add function to get forecast for Berlin on Friday

Slide 23

Slide 23 text

Connect Language Translator node to Function Nodeà Connect Text to speech to language translator Nodeà Connect change node to change payload to speech à Connect Play Audio to hear output

Slide 24

Slide 24 text

So many more things to do with Node-RED Install it locally and get wiring

Slide 25

Slide 25 text

flows.nodered.org Index of all available nodes - Collection of user contributed flows and over 3000 + nodes and flows available

Slide 26

Slide 26 text

IBM developerWorks Recipes https://developer.ibm.com/recipes/ Lots of contributed recipes for connecting things to Watson IOT platform – many using Node-RED

Slide 27

Slide 27 text

More Node-RED Resources Node Red nodes and Flows: https://flows.nodered.org Find new nodes, share your flows and see what other people have done with Node-RED Node Red official documentation: https://nodered.org/docs/ Getting Started - User Guide - Cookbook Watson Node Red nodes: https://github.com/watson-developer-cloud/node-red-labs A collection of examples on how to use the Watson nodes in Node-Red Community Hosted Node Red Guide : http://noderedguide.com/ “ The node red guide is a series of lectures designed to get you stared with Node-Red” Pooja’s Node-RED Demo: https://github.com/pmmistry/Intro-to- Node-RED John Waliki Node-RED Examples: https://github.com/johnwalicki

Slide 28

Slide 28 text

Thank You Find me on Twitter : @poojamakes Connect with me on LinkedIn – https://www.linkedin.com/in/ pmmistry/ Follow my Node-RED Blogs on dev.to : https://dev.to/poojamakes