SlideShare a Scribd company logo
Introduction to Node-RED
Paul Withers, Intec Systems Ltd
Fredrik Malmborg, PSK Syd
1#engageug
Paul Withers
• ICS and Watson Developer
• Lifetime IBM Champion
• OpenNTF Board Member
• Node.js Developer
2#engageug
Fredrik Malmborg
• Navigating between Scylla and Charybdis
• Hard-necked Domino Developer and Administrator
• Yes, we can!
3#engageug
Demo Time
4#engageug
What Is Node-RED?
5#engageug
What is Node-RED?
• Wires together hardware devices, APIs and online
services.
• Flows and authentication held in JSON
• Event-driven
• Browser-based flow editor
6#engageug
Facts
• Origins from IBM Emerging Technologies (Nick O'Leary
and Dave Conway-Jones)
• On GitHub 2013
• Founding project of JS Foundation in 2016
• 1 million downloads
• 1700 third-party add-on nodes
• Currently version 0.20. Version 1.0 in beta during Engage.
7#engageug
Why Node-RED?
• Low code
• Easy install and run
• Open-source project on GitHub (Apache 2 license)
• You probably already know how to code it
• Easy to share solutions
• Library with ready made integrations points
8#engageug
Values for Domino
• Lots of third-party add-ons.
• Simplifies integration
• Dashboards
• Easy scheduling of JavaScript functions.
• node-red-contrib-dominodb
A simple-to-use NodeRED interface to the the dominodb nodeJS package
9#engageug
Collaboration Nodes
• Thanks Stefano Pogliani
• https://flows.nodered.org/node/node-red-contrib-dominodb
• https://flows.nodered.org/node/node-red-contrib-
ibmconnections
10#engageug
How and where
• Runs on Node.js
• Where Node.js runs. Linux preferred but Windows is
supported.
• AWS, IBM Cloud, MS Azure
• Devices like Raspberry Pi, Android, Arduino
11#engageug
What Are Nodes
• Nodes are asynchronous black boxes
• Can use flow, sub-flow, global and configuration object
• Passes data in a msg object
• Flows and authentication held in JSON
• Nodes coded with HTML and JavaScript
12#engageug
Standalone Installation
13#engageug
Local installation
• Getting started: https://nodered.org/docs/getting-
started/installation
• Installing on Windows: Getting started:
https://nodered.org/docs/getting-started/installation
14#engageug
Install Node.js
• Get Node.js from https://nodejs.org/en/
• Run installation as administrator
• Accept defaults
15#engageug
Install Node-RED
• Run cmd
• Execute: npm install -g --unsafe-perm node-red
• Run “node-red”
• Node-RED will create a new folder in your
%HOMEPATH% folder called .node-red
• Point a local browser at http://localhost:1880
16#engageug
Demo Time
17#engageug
Fundamentals
18#engageug
Fundamentals - Nodes
• Input nodes
- one output endpoint *
- button to actuate
• Output nodes
- one input endpoint *
- button to enable/disable
• Processing nodes
- one input and one or more output endpoints
* One endpoint can have many wires connected
19#engageug
Fundamentals – msg.payload
• Node-RED nodes consume input messages and produce
output messages.
• Messages are JavaScript objects that contain at least a
“payload” parameter
msg = {
payload:”message payload”
};
20#engageug
Fundamentals – input nodes
• Inject: injects a message on clicking the button, or by
schedule.
• HTTP: acts as a basic web server
• Websocket
• MQTT
• TCP
• UDP
• Serial in
21#engageug
Fundamentals – output nodes
• The input nodes has a corresponding output node of
same type.
• Debug: used to catch and display messages.
22#engageug
Fundamentals – function node
• A function node uses the input message to produce one or
more output messages.
if (msg.payload === “Domino”) {
msg.payload = “You should visit Engage!”
} else {
msg.payload = “You should panic!”
}
return msg;
23#engageug
Demo Time
24#engageug
Fundamentals – some processing nodes
• Switch: easily route messages depending on properties of
the input.
• HTTP request: a request to an URL with the method you
choose (GET, PUT, etc).
• Change: configurable rules for manipulating message,
including search and replace.
• CSV: converting to and from CSV.
• JSON: converting to and from JSON.
• XML: converting to and from XML.
25#engageug
Fundamentals – catch node
• If you get an error in the flow it will simply halt. By adding
a catch node you can instead take care of the error and
then continue the flow from a suitable point.
26#engageug
Fundamentals – storage nodes
• The default set of storage nodes works with simple files,
like a CSV-file.
• Third party storage nodes
- mongodb
- mysql
- S3
- dropbox
- Box
27#engageug
Fundamentals – social and other nodes
• Twitter
• Slack
• Instagram
• Google Calendar
• Fitbit / Strava
• Weather
• Salesforce
• Domino
28#engageug
Some Useful Nodes
29#engageug
Demo Time
30#engageug
Where to Look
• Website – https://nodered.org
• Documentation – https://nodered.org/docs/
• Flows – https://flows.nodered.org
• Slack – https://nodered.org/slack
• Default port: 1880
31#engageug
To get you started
https://cookbook.nodered.org/
http://noderedguide.com/
https://developer.ibm.com/blogs/top-5-reasons-to-use-node-
red-right-now/
https://www.youtube.com/user/stevecope/videos
32#engageug
Docker Installation
33#engageug
Installation on Docker
• Container allows standard setup
• For Docker images, see
https://nodered.org/docs/platforms/docker
• Node.js v10 versions available now, see
https://github.com/node-red/node-red-docker#images
• Use Docker volumes to persist data
• Upgrade with docker pull nodered/node-red-
docker
34#engageug
Docker Useful Info
• Use docker cp to copy files into / out of container
• Container needs to be running to copy in / out
• Use volume to separate data from container
• Use –v SRC:DEST when creating container
• To bind to current folder for data use:
• ${pwd} (Linux and MacOS)
• %cd% Windows cmd prompt
• ${PWD} Windows Powershell
• Use docker network create and docker network
connect to link containers
• host.docker.internal is special DNS to host machine
35#engageug
Visual Studio Code Plugin
• Official Docker plugin for VS Code adds functionality
• Linting for Dockerfiles
• Easily see images, containers, registries
• Easily inspect images
• Easily create new container (run) with default options
• Easily see status of, start, stop and restart containers
• Easily attach shell to running containers
36#engageug
Projects
• New since 0.18
• Manages flow files, backed by Git repo
• Enabled in settings.js and needs git and ssh-keygen
• Encrypting credentials file with secret recommended
• Project stored in /.node-red/projects/project-name
• Each project has its own package.json with dependencies
37#engageug
Configuration
38#engageug
Security
• Always secure Node-RED!
• Known malware attacks on unsecured
https://discourse.nodered.org/t/malware
-infecting-unsecured-node-red-servers/3460
• Enable adminAuth setting to restrict access to editor and
admin API
• Can define usernames and passwords or map to custom
JS authenticate function (e.g. → Domino)
• Enable TLS or use proxy (e.g. NGINX)
• Secure HTTP nodes accordingly
39#engageug
Authentication
• adminAuth: require(‘PATH_TO_JS’)
40#engageug
Configuration
• Use editorTheme in settings.js to customise editor
• Change titles, images, reference css files
• Amend settings.js also for
• Changing logging settings
• Modifying root paths
• Storing context variables elsewhere (e.g. Domino)
• Add nodes via Manage Palette
• Flows can be imported / exported
• Remember to “Deploy” to save / see changes!
41#engageug
Understanding Node
Structure, Developing and
Testing
42#engageug
Anatomy of a Node
• See https://nodered.org/docs/creating-nodes/
• Name and JS file referenced in package.json
• HTML file defines how it appears in editor. Three parts, each
wrapped in a <script> tag
• Node definition, how it appears in palette and editor event code
• RED.nodes.registerType name must map to JS file
• Edit dialog template, HTML the user interacts with
• Help text dialog, HTML that appears in info panel
• JavaScript file
• JS function for runtime action
• RED.nodes.registerType maps function to HTML file node’s name
43#engageug
Development and Testing
• Best to test against locally installed Node-RED instance
• See https://nodered.org/docs/creating-nodes/packaging
• Use npm link to create symbolic link between Node-
RED and the folder containing package.json
• Debug from VS Code using Launch Profile
• Debug > Add Configuration…, creates launch.json
• Then add debug point and VS Code will stop, allowing
debugging
44#engageug
Debug Configurations
45#engageug
Roadmap to 1.0
46#engageug
Thank You
47#engageug
Paul Withers
Intec Systems Ltd & OpenNTF
pwithers@intec.co.uk
@paulswithers
https://www.intec.co.uk/blog
https://www.dominonextstep.com/
take-the-quiz/
Fredrik Malmborg
PSK Syd AB
fm@psksyd.com
@replikera
Ad

More Related Content

What's hot (20)

Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
sanskriti agarwal
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Rob O'Doherty
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
Cere Labs Pvt. Ltd
 
Getting started with Jenkins
Getting started with JenkinsGetting started with Jenkins
Getting started with Jenkins
Edureka!
 
Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
Erik van Appeldoorn
 
Node red with Arduino
Node red with ArduinoNode red with Arduino
Node red with Arduino
Anshu Pandey
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
AMD Developer Central
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
Dinesh U
 
Node js for beginners
Node js for beginnersNode js for beginners
Node js for beginners
Arjun Sreekumar
 
The Enterprise Case for Node.js
The Enterprise Case for Node.jsThe Enterprise Case for Node.js
The Enterprise Case for Node.js
NodejsFoundation
 
Nodejs Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with Examples
Gabriele Lana
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
Arvind Devaraj
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
Apaichon Punopas
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
Joseph de Castelnau
 
Jenkins
JenkinsJenkins
Jenkins
Roger Xia
 
React Native
React NativeReact Native
React Native
ASIMYILDIZ
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
React native
React nativeReact native
React native
Mohammed El Rafie Tarabay
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
Akshay Mathur
 
Quick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico LinQuick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico Lin
Vietnam Open Infrastructure User Group
 

Similar to Engage 2019: Introduction to Node-Red (20)

Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
Kevin Webber
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Indrajit Poddar
 
Road to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoopsRoad to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoops
Gianluca Varisco
 
Don’t turn your logs into cuneiform
Don’t turn your logs into cuneiformDon’t turn your logs into cuneiform
Don’t turn your logs into cuneiform
Andrey Rebrov
 
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UKStorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
StorageOS
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
Michael Lange
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
Derek Jacoby
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Codemotion
 
Node and Azure
Node and AzureNode and Azure
Node and Azure
Jason Gerard
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
orkaplan
 
Container Monitoring with Sysdig
Container Monitoring with SysdigContainer Monitoring with Sysdig
Container Monitoring with Sysdig
Sreenivas Makam
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage Systems
SATOSHI TAGOMORI
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
async_io
 
[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo
Nuxeo
 
On the Edge Systems Administration with Golang
On the Edge Systems Administration with GolangOn the Edge Systems Administration with Golang
On the Edge Systems Administration with Golang
Chris McEniry
 
Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015
Kurt Madel
 
Everything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventure
QAware GmbH
 
Everything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPLEverything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPL
Mario-Leander Reimer
 
Managing Your Security Logs with Elasticsearch
Managing Your Security Logs with ElasticsearchManaging Your Security Logs with Elasticsearch
Managing Your Security Logs with Elasticsearch
Vic Hargrave
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
Kevin Webber
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Indrajit Poddar
 
Road to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoopsRoad to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoops
Gianluca Varisco
 
Don’t turn your logs into cuneiform
Don’t turn your logs into cuneiformDon’t turn your logs into cuneiform
Don’t turn your logs into cuneiform
Andrey Rebrov
 
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UKStorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
StorageOS
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
Michael Lange
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
Derek Jacoby
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Codemotion
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
orkaplan
 
Container Monitoring with Sysdig
Container Monitoring with SysdigContainer Monitoring with Sysdig
Container Monitoring with Sysdig
Sreenivas Makam
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage Systems
SATOSHI TAGOMORI
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
async_io
 
[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo
Nuxeo
 
On the Edge Systems Administration with Golang
On the Edge Systems Administration with GolangOn the Edge Systems Administration with Golang
On the Edge Systems Administration with Golang
Chris McEniry
 
Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015
Kurt Madel
 
Everything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventure
QAware GmbH
 
Everything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPLEverything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPL
Mario-Leander Reimer
 
Managing Your Security Logs with Elasticsearch
Managing Your Security Logs with ElasticsearchManaging Your Security Logs with Elasticsearch
Managing Your Security Logs with Elasticsearch
Vic Hargrave
 
Ad

More from Paul Withers (20)

Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications
Paul Withers
 
Engage 2019: AI What Is It Good For
Engage 2019: AI What Is It Good ForEngage 2019: AI What Is It Good For
Engage 2019: AI What Is It Good For
Paul Withers
 
Social Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open SourceSocial Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open Source
Paul Withers
 
ICONUK 2018 - Do You Wanna Build a Chatbot
ICONUK 2018 - Do You Wanna Build a ChatbotICONUK 2018 - Do You Wanna Build a Chatbot
ICONUK 2018 - Do You Wanna Build a Chatbot
Paul Withers
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
Paul Withers
 
IBM Think Session 3249 Watson Work Services Java SDK
IBM Think Session 3249 Watson Work Services Java SDKIBM Think Session 3249 Watson Work Services Java SDK
IBM Think Session 3249 Watson Work Services Java SDK
Paul Withers
 
GraphQL 101
GraphQL 101GraphQL 101
GraphQL 101
Paul Withers
 
GraphQL 101
GraphQL 101GraphQL 101
GraphQL 101
Paul Withers
 
OpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentOpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino Development
Paul Withers
 
AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...
AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...
AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...
Paul Withers
 
Social Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and DominoSocial Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and Domino
Paul Withers
 
ICON UK 2015 - ODA and CrossWorlds
ICON UK 2015 - ODA and CrossWorldsICON UK 2015 - ODA and CrossWorlds
ICON UK 2015 - ODA and CrossWorlds
Paul Withers
 
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
Paul Withers
 
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and ScalabilityIBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
Paul Withers
 
OpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview IntroductionOpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview Introduction
Paul Withers
 
What's New and Next in OpenNTF Domino API (ICON UK 2014)
What's New and Next in OpenNTF Domino API (ICON UK 2014)What's New and Next in OpenNTF Domino API (ICON UK 2014)
What's New and Next in OpenNTF Domino API (ICON UK 2014)
Paul Withers
 
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
Paul Withers
 
Engage 2014 OpenNTF Domino API Slides
Engage 2014 OpenNTF Domino API SlidesEngage 2014 OpenNTF Domino API Slides
Engage 2014 OpenNTF Domino API Slides
Paul Withers
 
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages HeavenIBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
Paul Withers
 
Embracing the power of the notes client
Embracing the power of the notes clientEmbracing the power of the notes client
Embracing the power of the notes client
Paul Withers
 
Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications
Paul Withers
 
Engage 2019: AI What Is It Good For
Engage 2019: AI What Is It Good ForEngage 2019: AI What Is It Good For
Engage 2019: AI What Is It Good For
Paul Withers
 
Social Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open SourceSocial Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open Source
Paul Withers
 
ICONUK 2018 - Do You Wanna Build a Chatbot
ICONUK 2018 - Do You Wanna Build a ChatbotICONUK 2018 - Do You Wanna Build a Chatbot
ICONUK 2018 - Do You Wanna Build a Chatbot
Paul Withers
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
Paul Withers
 
IBM Think Session 3249 Watson Work Services Java SDK
IBM Think Session 3249 Watson Work Services Java SDKIBM Think Session 3249 Watson Work Services Java SDK
IBM Think Session 3249 Watson Work Services Java SDK
Paul Withers
 
OpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentOpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino Development
Paul Withers
 
AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...
AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...
AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...
Paul Withers
 
Social Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and DominoSocial Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and Domino
Paul Withers
 
ICON UK 2015 - ODA and CrossWorlds
ICON UK 2015 - ODA and CrossWorldsICON UK 2015 - ODA and CrossWorlds
ICON UK 2015 - ODA and CrossWorlds
Paul Withers
 
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
Paul Withers
 
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and ScalabilityIBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
Paul Withers
 
OpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview IntroductionOpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview Introduction
Paul Withers
 
What's New and Next in OpenNTF Domino API (ICON UK 2014)
What's New and Next in OpenNTF Domino API (ICON UK 2014)What's New and Next in OpenNTF Domino API (ICON UK 2014)
What's New and Next in OpenNTF Domino API (ICON UK 2014)
Paul Withers
 
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
Paul Withers
 
Engage 2014 OpenNTF Domino API Slides
Engage 2014 OpenNTF Domino API SlidesEngage 2014 OpenNTF Domino API Slides
Engage 2014 OpenNTF Domino API Slides
Paul Withers
 
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages HeavenIBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
Paul Withers
 
Embracing the power of the notes client
Embracing the power of the notes clientEmbracing the power of the notes client
Embracing the power of the notes client
Paul Withers
 
Ad

Recently uploaded (20)

Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 

Engage 2019: Introduction to Node-Red

  • 1. Introduction to Node-RED Paul Withers, Intec Systems Ltd Fredrik Malmborg, PSK Syd 1#engageug
  • 2. Paul Withers • ICS and Watson Developer • Lifetime IBM Champion • OpenNTF Board Member • Node.js Developer 2#engageug
  • 3. Fredrik Malmborg • Navigating between Scylla and Charybdis • Hard-necked Domino Developer and Administrator • Yes, we can! 3#engageug
  • 6. What is Node-RED? • Wires together hardware devices, APIs and online services. • Flows and authentication held in JSON • Event-driven • Browser-based flow editor 6#engageug
  • 7. Facts • Origins from IBM Emerging Technologies (Nick O'Leary and Dave Conway-Jones) • On GitHub 2013 • Founding project of JS Foundation in 2016 • 1 million downloads • 1700 third-party add-on nodes • Currently version 0.20. Version 1.0 in beta during Engage. 7#engageug
  • 8. Why Node-RED? • Low code • Easy install and run • Open-source project on GitHub (Apache 2 license) • You probably already know how to code it • Easy to share solutions • Library with ready made integrations points 8#engageug
  • 9. Values for Domino • Lots of third-party add-ons. • Simplifies integration • Dashboards • Easy scheduling of JavaScript functions. • node-red-contrib-dominodb A simple-to-use NodeRED interface to the the dominodb nodeJS package 9#engageug
  • 10. Collaboration Nodes • Thanks Stefano Pogliani • https://flows.nodered.org/node/node-red-contrib-dominodb • https://flows.nodered.org/node/node-red-contrib- ibmconnections 10#engageug
  • 11. How and where • Runs on Node.js • Where Node.js runs. Linux preferred but Windows is supported. • AWS, IBM Cloud, MS Azure • Devices like Raspberry Pi, Android, Arduino 11#engageug
  • 12. What Are Nodes • Nodes are asynchronous black boxes • Can use flow, sub-flow, global and configuration object • Passes data in a msg object • Flows and authentication held in JSON • Nodes coded with HTML and JavaScript 12#engageug
  • 14. Local installation • Getting started: https://nodered.org/docs/getting- started/installation • Installing on Windows: Getting started: https://nodered.org/docs/getting-started/installation 14#engageug
  • 15. Install Node.js • Get Node.js from https://nodejs.org/en/ • Run installation as administrator • Accept defaults 15#engageug
  • 16. Install Node-RED • Run cmd • Execute: npm install -g --unsafe-perm node-red • Run “node-red” • Node-RED will create a new folder in your %HOMEPATH% folder called .node-red • Point a local browser at http://localhost:1880 16#engageug
  • 19. Fundamentals - Nodes • Input nodes - one output endpoint * - button to actuate • Output nodes - one input endpoint * - button to enable/disable • Processing nodes - one input and one or more output endpoints * One endpoint can have many wires connected 19#engageug
  • 20. Fundamentals – msg.payload • Node-RED nodes consume input messages and produce output messages. • Messages are JavaScript objects that contain at least a “payload” parameter msg = { payload:”message payload” }; 20#engageug
  • 21. Fundamentals – input nodes • Inject: injects a message on clicking the button, or by schedule. • HTTP: acts as a basic web server • Websocket • MQTT • TCP • UDP • Serial in 21#engageug
  • 22. Fundamentals – output nodes • The input nodes has a corresponding output node of same type. • Debug: used to catch and display messages. 22#engageug
  • 23. Fundamentals – function node • A function node uses the input message to produce one or more output messages. if (msg.payload === “Domino”) { msg.payload = “You should visit Engage!” } else { msg.payload = “You should panic!” } return msg; 23#engageug
  • 25. Fundamentals – some processing nodes • Switch: easily route messages depending on properties of the input. • HTTP request: a request to an URL with the method you choose (GET, PUT, etc). • Change: configurable rules for manipulating message, including search and replace. • CSV: converting to and from CSV. • JSON: converting to and from JSON. • XML: converting to and from XML. 25#engageug
  • 26. Fundamentals – catch node • If you get an error in the flow it will simply halt. By adding a catch node you can instead take care of the error and then continue the flow from a suitable point. 26#engageug
  • 27. Fundamentals – storage nodes • The default set of storage nodes works with simple files, like a CSV-file. • Third party storage nodes - mongodb - mysql - S3 - dropbox - Box 27#engageug
  • 28. Fundamentals – social and other nodes • Twitter • Slack • Instagram • Google Calendar • Fitbit / Strava • Weather • Salesforce • Domino 28#engageug
  • 31. Where to Look • Website – https://nodered.org • Documentation – https://nodered.org/docs/ • Flows – https://flows.nodered.org • Slack – https://nodered.org/slack • Default port: 1880 31#engageug
  • 32. To get you started https://cookbook.nodered.org/ http://noderedguide.com/ https://developer.ibm.com/blogs/top-5-reasons-to-use-node- red-right-now/ https://www.youtube.com/user/stevecope/videos 32#engageug
  • 34. Installation on Docker • Container allows standard setup • For Docker images, see https://nodered.org/docs/platforms/docker • Node.js v10 versions available now, see https://github.com/node-red/node-red-docker#images • Use Docker volumes to persist data • Upgrade with docker pull nodered/node-red- docker 34#engageug
  • 35. Docker Useful Info • Use docker cp to copy files into / out of container • Container needs to be running to copy in / out • Use volume to separate data from container • Use –v SRC:DEST when creating container • To bind to current folder for data use: • ${pwd} (Linux and MacOS) • %cd% Windows cmd prompt • ${PWD} Windows Powershell • Use docker network create and docker network connect to link containers • host.docker.internal is special DNS to host machine 35#engageug
  • 36. Visual Studio Code Plugin • Official Docker plugin for VS Code adds functionality • Linting for Dockerfiles • Easily see images, containers, registries • Easily inspect images • Easily create new container (run) with default options • Easily see status of, start, stop and restart containers • Easily attach shell to running containers 36#engageug
  • 37. Projects • New since 0.18 • Manages flow files, backed by Git repo • Enabled in settings.js and needs git and ssh-keygen • Encrypting credentials file with secret recommended • Project stored in /.node-red/projects/project-name • Each project has its own package.json with dependencies 37#engageug
  • 39. Security • Always secure Node-RED! • Known malware attacks on unsecured https://discourse.nodered.org/t/malware -infecting-unsecured-node-red-servers/3460 • Enable adminAuth setting to restrict access to editor and admin API • Can define usernames and passwords or map to custom JS authenticate function (e.g. → Domino) • Enable TLS or use proxy (e.g. NGINX) • Secure HTTP nodes accordingly 39#engageug
  • 41. Configuration • Use editorTheme in settings.js to customise editor • Change titles, images, reference css files • Amend settings.js also for • Changing logging settings • Modifying root paths • Storing context variables elsewhere (e.g. Domino) • Add nodes via Manage Palette • Flows can be imported / exported • Remember to “Deploy” to save / see changes! 41#engageug
  • 42. Understanding Node Structure, Developing and Testing 42#engageug
  • 43. Anatomy of a Node • See https://nodered.org/docs/creating-nodes/ • Name and JS file referenced in package.json • HTML file defines how it appears in editor. Three parts, each wrapped in a <script> tag • Node definition, how it appears in palette and editor event code • RED.nodes.registerType name must map to JS file • Edit dialog template, HTML the user interacts with • Help text dialog, HTML that appears in info panel • JavaScript file • JS function for runtime action • RED.nodes.registerType maps function to HTML file node’s name 43#engageug
  • 44. Development and Testing • Best to test against locally installed Node-RED instance • See https://nodered.org/docs/creating-nodes/packaging • Use npm link to create symbolic link between Node- RED and the folder containing package.json • Debug from VS Code using Launch Profile • Debug > Add Configuration…, creates launch.json • Then add debug point and VS Code will stop, allowing debugging 44#engageug
  • 47. Thank You 47#engageug Paul Withers Intec Systems Ltd & OpenNTF [email protected] @paulswithers https://www.intec.co.uk/blog https://www.dominonextstep.com/ take-the-quiz/ Fredrik Malmborg PSK Syd AB [email protected] @replikera