SlideShare una empresa de Scribd logo
1 de 8
Descargar para leer sin conexión
Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED
	
   - 1 -
	
  
	
  
	
  
http://nodered.org
	
  
An	
  introduction	
  to	
  flow-­based	
  
programming	
  using	
  Node-­RED	
  
	
  
! Node-­RED	
   is	
   a	
   visual	
   tool	
   for	
   wiring	
   the	
   Internet	
   of	
   Things	
   (IoT).	
   Node-­‐RED	
   is	
  
platform-­‐independent,	
   but	
   has	
   been	
   developed	
   with	
   small	
   computers	
   such	
   as	
   the	
  
Raspberry	
  Pi	
  in	
  mind.	
  
	
  
! Traditional	
   IoT	
   development	
   can	
   be	
   very	
   technical:	
   Access	
   to	
   the	
   GPIO	
   and	
   other	
  
hardware	
  requires	
  skills	
  in	
  C	
  or	
  assembler,	
  output	
  of	
  data	
  to	
  web	
  services	
  or	
  sending	
  
tweets	
   and	
   emails	
   requires	
   the	
   use	
   of	
   complex	
   APIs.	
   Node-­RED	
   takes	
   care	
   of	
   the	
  
technicalities	
  and	
  lets	
  you	
  concentrate	
  on	
  the	
  logic	
  of	
  your	
  workflow	
  
	
  
! While	
   most	
   programming	
   in	
   Node-­‐RED	
   is	
   done	
   visually	
   using	
   pre-­‐defined	
   functions	
  
(“nodes”),	
  any	
  additional	
  functionality	
  can	
  be	
  added	
  in	
  JavaScript.	
  
	
  
! Node-­RED	
  is	
  a	
  multi-­purpose	
  jackknife	
  –	
  use	
  it	
  for	
  any	
  prototyping!	
  
	
  
	
  
WORKSHOP	
  CONTENT:	
  In	
  this	
  workshop,	
  we’re	
  going	
  to	
  use	
  Node-­‐RED	
  to	
  build	
  a	
  basic	
  web	
  
server.	
   We	
   are	
   going	
   to	
   build	
   a	
   web	
   site	
   that	
   provides	
   the	
   functionality	
   of	
   an	
   online	
   chat	
  
application,	
  i.e.	
  you	
  are	
  going	
  to	
  learn	
  about	
  communication	
  between	
  a	
  web	
  browser	
  and	
  the	
  
underlying	
  service.	
  
Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED
	
   - 2 -
Technical	
  background:	
  For	
  this	
  workshop,	
  you	
  will	
  find	
  a	
  Raspberry	
  Pi	
  with	
  Node-­‐RED	
  already	
  installed.	
  While	
  the	
  installation	
  of	
  Node-­‐RED	
  
software	
  is	
  relatively	
  easy,	
  it	
  would	
  be	
  difficult	
  to	
  include	
  this	
  step	
  within	
  the	
  time	
  constraints	
  of	
  the	
  exercise.	
  For	
  completeness,	
  this	
  is	
  
what’s	
  happened	
  to	
  a	
  fresh	
  and	
  up-­‐to-­‐date	
  Raspian	
  installation	
  on	
  your	
  SD	
  card:	
  
1. Install	
  node.js	
  and	
  npm	
  as	
  per:	
  http://nodered.org/docs/hardware/raspberrypi.html	
  
2. Clone	
  Node-­‐RED	
  from	
  Github	
  and	
  install	
  as	
  described	
  here:	
  http://nodered.org/docs/getting-­started/installation.html	
  
Note:	
   To	
   leverage	
   the	
   power	
   of	
   Node-­‐RED,	
   consider	
   installing	
   nodes	
   for	
   email	
   or	
   raw	
   GPIO	
   access	
   as	
   well.	
   The	
   latter	
   is	
   described	
   here:	
  
http://nodered.org/docs/hardware/raspberrypi.html	
  
	
  
1)	
  Exercise:	
  Starting	
  Node-­RED	
  as	
  Raspberry	
  Pi	
  user	
  
Node-­‐RED	
  can	
  be	
  installed	
  as	
  a	
  service	
  on	
  the	
  Raspberry	
  Pi,	
  i.e.	
  as	
  a	
  program	
  that’s	
  always	
  
executed	
  when	
  your	
  Pi	
  is	
  running.	
  However,	
  this	
  is	
  only	
  useful	
  if	
  you	
  want	
  to	
  commit	
  your	
  Pi	
  
for	
   this	
   particular	
   use	
   as	
   it	
   can	
   consume	
   considerable	
   resources.	
   For	
   everyone	
   else,	
   it’s	
  
recommended	
  to	
  start	
  Node-­‐RED	
  only	
  when	
  needed:	
  
1. Open	
  the	
  LXTerminal	
   	
  to	
  see	
  a	
  console	
  that	
  allows	
  you	
  to	
  enter	
  Linux	
  commands.	
  
2. Change	
  into	
  the	
  Node-­‐RED	
  directory	
  by	
  issuing	
  “cd	
  node-­‐red”.	
  
3. Start	
  Node-­‐RED	
  by	
  typing	
  “node	
  red.js”.	
  
	
  
You	
  should	
  now	
  see	
  Node-­‐RED	
  starting	
  up	
  –	
  that	
  may	
  take	
  a	
  few	
  seconds:	
  
	
  
Congratulations.	
  You’re	
  now	
  ready	
  for	
  the	
  exercises.	
  
Node-­‐RED	
  represents	
  a	
  server	
  on	
  the	
  basis	
  of	
  node.js	
  and	
  interacts	
  with	
  the	
  user	
  through	
  a	
  
graphical	
   user	
   interface.	
   It	
   can	
   be	
   reached	
   on	
   port	
   1880.	
   To	
   use	
   Node-­RED,	
   open	
   a	
   web	
  
browser	
  and	
  direct	
  it	
  to	
  http://localhost:1880	
  
It’s	
  useful	
  to	
  remember	
  that	
  Node-­‐RED	
  acts	
  as	
  a	
  server	
  in	
  your	
  entire	
  network.	
  That	
  is,	
  if	
  your	
  Raspberry	
  Pi’s	
  internal	
  IP	
  address	
  is	
  something	
  
like	
  192.x.x.x,	
  every	
  computer	
  in	
  your	
  network	
  can	
  open	
  the	
  Node-­‐RED	
  GUI	
  through	
  http://192.x.x.x:1880.	
  You	
  can	
  make	
  your	
  system	
  more	
  
restricted/secure	
  by	
  following	
  the	
  configuration	
  advice	
  on	
  http://nodered.org/docs/configuration.html.	
  
	
  
Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED
	
   - 3 -
2)	
  Exercise:	
  Your	
  first	
  flow	
  –	
  this	
  is	
  a	
  recap	
  for	
  those	
  who	
  attended	
  the	
  last	
  course	
  
The	
  best	
  way	
  to	
  explain	
  “a	
  flow”	
  is	
  by	
  creating	
  one.	
  In	
  this	
  mini	
  flow,	
  we’re	
  going	
  to	
  inject	
  a	
  
value	
  into	
  our	
  debug	
  window	
  (refer	
  to	
  page	
  1	
  for	
  what	
  the	
  GUI	
  elements	
  are	
  called).	
  
1. Open	
  the	
  Epiphany	
  Web	
  Browser.	
  (It	
  supports	
  JavaScript	
  better	
  than	
  Midori).	
  
2. In	
  the	
  address	
  line,	
  enter	
  localhost:1880.	
  You	
  will	
  then	
  see	
  the	
  Node-­‐RED	
  GUI.	
  
3. Drag	
   and	
   drop	
   an	
   “inject”	
   node	
   from	
   the	
   nodes	
   library	
   into	
   the	
   flow	
   editor	
   (once	
  
you’ve	
   chosen	
   the	
   inject	
   node,	
   you	
   should	
   see	
   some	
   general	
   explanation	
   about	
   its	
  
functionality	
  in	
  the	
  info	
  pane	
  –	
  no	
  need	
  to	
  read	
  that	
  now).	
  
4. Drag	
  and	
  drop	
  a	
  “debug”	
  node	
  from	
  the	
  nodes	
  library	
  into	
  the	
  flow	
  editor.	
  
5. Create	
  a	
  pipe	
  between	
  the	
  inject	
  and	
  debug	
  nodes	
  by	
  drawing	
  a	
  connection	
  between	
  
their	
  small	
  grey	
  rounded	
  rectangles.	
  
6. Change	
  from	
  the	
  info	
  pane	
  to	
  the	
  debug	
  pane	
  (upper	
  right).	
  
7. Deploy	
  (=start)	
  your	
  flow.	
  
8. Once	
  deployed,	
  press	
  the	
  left	
  blue	
  rectangle	
  that’s	
  attached	
  to	
  the	
  inject	
  node.	
  Check	
  
what’s	
  happening	
  in	
  the	
  debug	
  pane.	
  
	
  
3)	
  Exercise:	
  Setting	
  up	
  a	
  static	
  website	
  
It	
  is	
  very	
  easy	
  to	
  set	
  up	
  a	
  very	
  basic	
  web	
  server	
  in	
  Node-­‐RED.	
  
1. From	
  the	
  input	
  panel,	
  chose	
  a	
  “http”	
  node.	
  
2. Change	
  the	
  properties	
  of	
  your	
  http	
  node	
  so	
  that	
  it	
  
will	
   respond	
   to	
   GET	
   requests	
   to	
   /mypage	
   from	
   a	
  
browser.	
  
3. Add	
  a	
  “template”	
  node	
  (from	
  the	
  function	
  panel),	
  
and	
  a	
  “http	
  response”	
  node	
  from	
  the	
  output	
  panel.	
  	
  
4. Wire	
  your	
  flow	
  together	
  as	
  shown	
  below:	
  
	
  
5. Deploy	
  your	
  flow.	
  
6. Once	
  deployed,	
  open	
  a	
  separate	
  browser	
  window	
  and	
  enter	
  localhost:1880/mypage.	
  
A	
  note	
  on	
  addresses	
  and	
  ports:	
  Web	
  servers	
  have	
  their	
  own	
  numerical	
  addresses,	
  e.g.	
  a	
  special	
  table	
  (called	
  DNS)	
  resolves	
  the	
  BBC	
  website	
  to	
  
212.58.246.103.	
   Each	
   address	
   can	
   have	
   thousands	
   of	
   communication	
   channels	
   (called	
   ports).	
   A	
   standard	
   webpage	
   call	
   uses	
   port	
   80	
   by	
  
default.	
  Your	
  own	
  machine	
  is	
  always	
  called	
  “localhost”	
  and	
  resolves	
  to	
  127.0.0.1.	
  A	
  default	
  Node-­‐RED	
  server	
  can	
  be	
  opened	
  on	
  port	
  1880.	
  
Does	
  the	
  address	
  http://localhost:1880/mypage	
  make	
  more	
  sense	
  to	
  you	
  now?	
  
Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED
	
   - 4 -
4)	
  Exercise:	
  	
  The	
  anatomy	
  and	
  function	
  of	
  a	
  template	
  node	
  
Our	
  previous	
  Node-­‐RED	
  workflow	
  hides	
  the	
  complexity	
  of	
  the	
  client	
  "	
  server	
  communication	
  
via	
  the	
  hypertext	
  transfer	
  protocol	
  (“http”)	
  (which	
  sits	
  on	
  top	
  of	
  another	
  protocol,	
  TCP/IP,	
  
which	
  sits	
  on	
  top	
  of…	
  …you	
  get	
  the	
  gist).	
  We	
  don’t	
  need	
  to	
  care	
  how	
  the	
  browser	
  talks	
  to	
  the	
  
server.	
  
One	
   technicality	
   that	
   we	
   can’t	
   fully	
   get	
   around	
   in	
   this	
   workshop	
   is	
   HTML,	
   the	
   hypertext	
  
markup	
  language.	
  It’s	
  the	
  code	
  that	
  describes	
  how	
  a	
  website	
  is	
  supposed	
  to	
  look.	
  It’s	
  beyond	
  
the	
  scope	
  of	
  this	
  course	
  to	
  teach	
  you	
  all	
  goodness	
  of	
  HTML,	
  a	
  good	
  entry	
  point	
  for	
  further	
  
explorations	
  is	
  here:	
  http://www.w3schools.com/html.	
  What	
  you	
  need	
  to	
  remember,	
  however,	
  
is	
  that	
  the	
  template	
  node	
  encapsulates	
  a	
  minimal	
  HTML	
  page.	
  So	
  
	
  
	
  indeed	
  returns	
  
<!DOCTYPE html>
<html>
<head> </head>
<body> This is the payload: {{payload}} </body>
</html>
which	
  instructs	
  the	
  browser	
  to	
  show	
  the	
  text	
  you’ve	
  seen	
  in	
  Exercise	
  3.	
  
In	
  the	
  next	
  exercise,	
  we	
  will	
  use	
  additional	
  HTML	
  code	
  to	
  add	
  some	
  styling	
  to	
  our	
  website,	
  
and	
  we	
  will	
  learn	
  to	
  use	
  the	
  moustache	
  {{	
  }}	
  format	
  to	
  add	
  dynamic	
  content	
  to	
  it.	
  
1. Drag	
  and	
  drop	
  a	
  “function”	
  node	
  into	
  the	
  flow	
  editor.	
  Call	
  it	
  “where	
  things	
  happen”.	
  
Stick	
  it	
  in	
  between	
  the	
  http-­‐in	
  and	
  the	
  template	
  node.	
  
	
  
2. Edit	
  the	
  function:	
  Add	
  msg.payload = "Hello, Pi";	
  in	
  the	
  line	
  before	
  return msg;	
  
3. Change	
  the	
  template	
  into	
  This is the <b>message</b>: {{payload}}	
  
4. Deploy	
  your	
  flow	
  and	
  check	
  out	
  localhost:1880/mypage.	
  
	
  
Note:	
  If	
  you	
  know	
  HTML,	
  have	
  a	
  play	
  with	
  other	
  style	
  tags.	
  You	
  can	
  even	
  embed	
  CSS!	
  
	
  
Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED
	
   - 5 -
5)	
  Exercise:	
  Retain	
  state	
  
So	
   far	
   our	
   Node-­‐RED	
   flow	
   is	
   strictly	
   linear:	
   Once	
   the	
   /mypage	
   is	
   requested,	
   the	
   function	
  
populates	
  the	
  variable	
  payload	
  with	
  “Hello,	
  Pi”,	
  the	
  template	
  node	
  embeds	
  this	
  payload	
  into	
  
the	
  HTML	
  that’s	
  returned	
  to	
  the	
  server.	
  
How	
  can	
  we	
  put	
  other	
  things	
  into	
  the	
  payload?	
  
1. Wire	
  your	
  inject	
  node	
  from	
  Exercise	
  1	
  to	
  the	
  function	
  node.	
  Modify	
  the	
  inject	
  node	
  to	
  
send	
  the	
  string	
  “Have	
  a	
  nice	
  day”	
  as	
  payload,	
  with	
  “new	
  message”	
  as	
  topic.	
  
	
  
2. Edit	
  the	
  function	
  node	
  to	
  contain	
  the	
  following	
  JavaScript:	
  
	
  
3. Deploy	
  the	
  flow.	
  	
  
4. Look	
  at	
  localhost:1880/mypage	
  in	
  your	
  web	
  browser.	
  Note	
  what	
  you	
  see.	
  
5. Click	
  on	
  the	
  rounded	
  rectangle	
  on	
  the	
  left	
  of	
  your	
  inject	
  node.	
  
6. Reload	
   localhost:1880/mypage.	
   Note	
   what	
   you	
   see.	
   Can	
   you	
   make	
   sense	
   of	
   your	
  
observation	
  in	
  the	
  light	
  of	
  your	
  JavaScript	
  code	
  from	
  step	
  2?	
  
A	
  bit	
  of	
  background:	
  
By	
  default,	
  most	
  wires	
  between	
  nodes	
  are	
  topic/payload	
  pairs,	
  a	
  bit	
  like	
  emails	
  have	
  subject	
  
and	
  body.	
  However,	
  the	
  default	
  msg	
  variable	
  can	
  always	
  be	
  extended,	
  and	
  in	
  the	
  case	
  of	
  the	
  
http	
  nodes	
  contain	
  an	
  entire	
  http	
  response	
  object.	
  
The	
  context	
  variable	
  is	
  available	
  in	
  the	
  function	
  node	
  to	
  retain	
  information	
  between	
  different	
  
executions	
  of	
  the	
  node.	
  In	
  our	
  example,	
  if	
  the	
  input	
  message	
  msg	
  arrives	
  from	
  the	
  injection	
  
node	
  (having	
  the	
  topic	
  “new	
  message”),	
  we	
  populate	
  context.value	
  with	
  the	
  payload	
  “Have	
  a	
  
nice	
  day”	
  and	
  leave	
  the	
  node.	
  If	
  the	
  input	
  arrives	
  from	
  the	
  /mypage	
  http	
  node,	
  we	
  evaluate	
  
whether	
  something	
  is	
  present	
  in	
  the	
  context	
  variable.	
  If	
  not,	
  we	
  deliver	
  the	
  payload	
  “never	
  got	
  
anything”	
  for	
  rendering	
  in	
  the	
  template	
  node,	
  otherwise	
  we	
  take	
  it	
  from	
  the	
  context.	
  
The	
  special	
  case	
  context.global	
  is	
  a	
  variable	
  that	
  persist	
  between	
  executions	
  of	
  a	
  node	
  and	
  are	
  
globally	
  available	
  to	
  all	
  other	
  function	
  nodes.	
  More	
  about	
  messages	
  and	
  context	
  variables	
  can	
  
be	
  found	
  here:	
  http://nodered.org/docs/writing-­functions.html	
  
Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED
	
   - 6 -
6)	
  Exercise:	
  Returning	
  the	
  result	
  of	
  a	
  web	
  form	
  to	
  Node-­RED	
  
So	
  far	
  our	
  interaction	
  between	
  the	
  server	
  and	
  the	
  client	
  was	
  rather	
  unidirectional.	
  Following	
  
the	
  http	
  request,	
  us	
  injecting	
  or	
  not	
  injecting	
  a	
  message	
  determined	
  the	
  actual	
  outcome.	
  Now,	
  
we	
  extend	
  the	
  example	
  so	
  that	
  the	
  return	
  value	
  is	
  dependant	
  on	
  the	
  user’s	
  input.	
  
1. Drag	
  and	
  drop	
  a	
  “http”	
  input	
  node,	
  a	
  “template”	
  node	
  and	
  a	
  “http“	
  output	
  node	
  into	
  
your	
   flow.	
   Set	
   the	
   input	
   node	
   to	
   respond	
   to	
   GET	
   request	
   on	
   /login.	
   Wire	
   the	
   nodes	
  
together	
  as	
  shown	
  below:	
  
	
  
2. Add	
  the	
  following	
  HTML	
  to	
  your	
  template	
  node:	
  
<form action="http://localhost:1880/chat" method="post">
<b>User</b><br> <input type="text" name="user"/><br>
<button type="submit">Submit</button>
</form>
3. Add	
  another	
  set	
  of	
  four	
  nodes	
  to	
  your	
  flow.	
  Configure	
  the	
  http	
  input	
  node	
  to	
  respond	
  
to	
   POST	
   requests	
   at	
   /chat.	
   This	
   is	
   how	
   your	
   server	
   is	
   going	
   to	
   react	
   to	
   form	
  
submissions:	
  
	
  
4. Edit	
  the	
  function	
  node	
  to	
  extract	
  the	
  content	
  of	
  the	
  incoming	
  input	
  field	
  “user”	
  (if	
  not	
  
empty)	
  and	
  assign	
  it	
  to	
  our	
  standard	
  payload:	
  
if (msg.req.body["user"] != "") {
msg.payload = msg.req.body["user"]
}
return msg;
5. The	
  template	
  node	
  can	
  simply	
  say:	
  The user’s name is: {{payload}}	
  
6. Deploy	
  and	
  test	
  your	
  flow	
  at	
  localhost:1880/login.	
  
Does	
  it	
  do	
  what	
  you	
  expect?	
  If	
  so:	
  Congratulations,	
  you’re	
  now	
  seeing	
  the	
  key	
  ingredients	
  
to	
  a	
  basic	
  chat	
  server.	
  
	
  
	
  
Exercise	
  7:	
  Putting	
  it	
  all	
  together	
  
In	
  the	
  next	
  step	
  we’re	
  going	
  to	
  put	
  all	
  of	
  our	
  new	
  skills	
  together.	
  To	
  build	
  a	
  basic	
  chat	
  server,	
  
all	
  we	
  need	
  is	
  a	
  little	
  more	
  trickery	
  with	
  the	
  context.global	
  to	
  retain	
  our	
  conversation	
  (we’re	
  
going	
   to	
   use	
   context.global.dialog),	
   some	
   HTML	
   concept	
   called	
   iframe	
   to	
   separate	
   an	
   input	
  
field	
  from	
  the	
  conversation,	
  and	
  a	
  bit	
  of	
  client-­‐sided	
  JavaScript	
  to	
  auto-­‐update	
  the	
  iframe.	
  
Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED
	
   - 7 -
1. Rewrite	
  the	
  function	
  node	
  following	
  the	
  /chat	
  http	
  input	
  like	
  this:	
  
if (msg.req.body["user"] != "") {
msg.payload = msg.req.body["user"]
}
if (msg.req.body["message"] != undefined) {
context.global.dialog +=
msg.req.body["user"]+':'+msg.req.body["message"]+"<BR>";
}
context.global.dialog = context.global.dialog || "";
return msg;
2. The	
  template	
  node	
  hides	
  most	
  of	
  the	
  trickery:	
  
<iframe src="http://localhost:1880/dialog" name="iframe_a" width="90%"
height="70%"></iframe>
<form name="frm" action="http://localhost:1880/chat" method="post">
<b>Message from {{payload}}</b><br>
<input type="text" name="message" size="90%"/>
<input type="hidden" name="user" value="{{payload}}"><br>
<button type="submit">Submit</button>
</form>
<SCRIPT language="JavaScript">
window.setInterval("reloadIFrame();", 1000);
function reloadIFrame() { window.frames["iframe_a"].location.reload(); }
</SCRIPT>
3. We	
  need	
  another	
  set	
  of	
  http	
  input,	
  function,	
  template	
  and	
  http	
  out	
  nodes.	
  These	
  will	
  
represent	
  the	
  /dialog	
  page	
  that’s	
  shown	
  in	
  the	
  iframe.	
  The	
  code	
  is	
  fairly	
  simple.	
  
	
  
4. Add	
   to	
   function	
   node	
   node	
   following	
   the	
   /dialog	
   http	
   input	
   msg.payload =
context.global.dialog;	
  before	
  return msg;	
  
5. The	
  template	
  node	
  just	
  says:	
  {{payload}}	
  
6. Deploy	
  your	
  web	
  server.	
  	
  
	
  
Open	
  localhost:1880/login	
  from	
  two	
  different	
  browser	
  windows	
  and	
  login	
  with	
  different	
  
identities.	
   Both	
   windows	
   will	
   update	
   their	
   iframe	
   once	
   a	
   second,	
   showing	
   /dialog	
   as	
   it	
  
continues	
  to	
  grow	
  on	
  the	
  server	
  with	
  lines	
  that	
  are	
  sent	
  via	
  the	
  form	
  field	
  “message”	
  from	
  
either	
  client.	
  
Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED
	
   - 8 -
	
  
Further	
  explanations	
  and	
  suggestions	
  for	
  experiments:	
  
So	
   far	
   all	
   code	
   refers	
   to	
   localhost:1880.	
   It	
   is	
   possible	
   to	
   change	
   the	
   default	
   port,	
   allowing	
  
addresses	
   without	
   the	
   addition	
   of	
   :1880	
   (see	
   http://nodered.org/docs/configuration.html).	
  
Furthermore,	
  localhost	
  is	
  only	
  visible	
  on	
  your	
  own	
  machine.	
  You	
  can	
  change	
  localhost	
  to	
  your	
  
Raspberry	
   Pi’s	
   local	
   IP	
   address	
   (often	
   something	
   like	
   192.168.x.x	
   or	
   172.x.x.x)	
   and	
   request	
  
your	
  chat	
  server	
  from	
  any	
  other	
  computer	
  within	
  your	
  local	
  network.	
  These	
  changes	
  would	
  
impact	
  the	
  address	
  that’s	
  specified	
  in	
  the	
  HTML	
  form	
  definitions.	
  
	
  
Node-­‐RED	
  is	
  an	
  incredibly	
  powerful	
  framework	
  that	
  allows	
  you	
  to	
  do	
  things	
  in	
  very	
  little	
  time.	
  
The	
  official	
  directory	
  of	
  flows	
  donated	
  to	
  the	
  community	
  is	
  here	
  http://flows.nodered.org	
  
and	
  they	
  can	
  easily	
  be	
  imported	
  by	
  copying	
  &	
  pasting	
  the	
  JSON-­‐formatted	
  code.	
  
	
  
A	
  few	
  suggestions	
  and	
  examples	
  that	
  I	
  have	
  described	
  over	
  the	
  past	
  months	
  are	
  here:	
  
! Triggering	
   Node-­RED	
   with	
   drawings:	
   The	
   Aestheticodes	
  
project	
   uses	
   a	
   QR	
   code	
   like	
   method	
   to	
   encode	
   information	
   in	
  
beautiful	
  drawings.	
  Draw	
  a	
  picture,	
  take	
  a	
  photograph	
  with	
  your	
  
mobile	
   and	
   trigger	
   the	
   debug	
   node	
   doing	
   that:	
  
http://logic.sysbiol.cam.ac.uk/?p=1514	
  
	
  
! Control	
  Minecraft	
  with	
  Node-­RED:	
  The	
  Minecraft	
  Pi	
  Edition	
  can	
  be	
  controlled	
  through	
  
Python,	
  but	
  that	
  may	
  not	
  be	
  easily	
  accessible	
  for	
  everyone.	
  With	
  a	
  MQTT-­‐to-­‐Minecraft	
  
bridge,	
   the	
   Node-­‐RED	
   inject	
   nodes	
   can	
   be	
   used	
   to	
   control	
   Steve:	
  
http://logic.sysbiol.cam.ac.uk/?p=1499	
  
	
  
! Got	
   an	
   AirPi	
   shield?	
   Monitor	
   your	
   room	
   climate	
   with	
   AirPi	
   and	
   Node-­RED:	
  
http://logic.sysbiol.cam.ac.uk/?p=1423	
  
	
  
! The	
  first	
  CamJam	
  Node-­RED	
  tutorial	
  that	
  teaches	
  radio	
  communication	
  through	
  Ciseco	
  
radio	
   modules	
   is	
   available	
   here:	
   http://www.slideshare.net/BorisAdryan/node-­red-­
coursecamjamjuly2014	
  
	
  

Más contenido relacionado

La actualidad más candente

CROP - Wireless Sensor Network for Precision Agriculture (presentation)
CROP - Wireless Sensor Network for Precision Agriculture (presentation)CROP - Wireless Sensor Network for Precision Agriculture (presentation)
CROP - Wireless Sensor Network for Precision Agriculture (presentation)Luis Batista
 
Beginners: What is Industrial IoT (IIoT)
Beginners: What is Industrial IoT (IIoT)Beginners: What is Industrial IoT (IIoT)
Beginners: What is Industrial IoT (IIoT)3G4G
 
EDGE COMPUTING: VISION AND CHALLENGES
EDGE COMPUTING: VISION AND CHALLENGESEDGE COMPUTING: VISION AND CHALLENGES
EDGE COMPUTING: VISION AND CHALLENGESsuthi
 
Iot ppt
Iot pptIot ppt
Iot pptpiyuu7
 
Information technology seminar topics
Information technology  seminar topicsInformation technology  seminar topics
Information technology seminar topics123seminarsonly
 
Syed IoT - module 5
Syed  IoT - module 5Syed  IoT - module 5
Syed IoT - module 5Syed Mustafa
 
Final year project presentation IOT Based home security system
Final year project presentation IOT Based home security systemFinal year project presentation IOT Based home security system
Final year project presentation IOT Based home security systemSarmadMalik18
 
Iot presentation
Iot presentationIot presentation
Iot presentationhuma742446
 
Ardu sat (Arduino based satellite)
Ardu sat (Arduino based satellite)Ardu sat (Arduino based satellite)
Ardu sat (Arduino based satellite)Barira Khan
 
Practical introduction to IoT
Practical introduction to IoTPractical introduction to IoT
Practical introduction to IoTpekkanikander
 
IoT and its Applications
IoT and its ApplicationsIoT and its Applications
IoT and its ApplicationsAbdulla Shaheen
 
WiFi mesh network(ESP32 mStar and mesh topology)
WiFi mesh network(ESP32 mStar and mesh topology)WiFi mesh network(ESP32 mStar and mesh topology)
WiFi mesh network(ESP32 mStar and mesh topology)Raziuddin Khazi
 

La actualidad más candente (20)

Introduction to IoT (Internet of Things)
Introduction to IoT (Internet of Things)Introduction to IoT (Internet of Things)
Introduction to IoT (Internet of Things)
 
CROP - Wireless Sensor Network for Precision Agriculture (presentation)
CROP - Wireless Sensor Network for Precision Agriculture (presentation)CROP - Wireless Sensor Network for Precision Agriculture (presentation)
CROP - Wireless Sensor Network for Precision Agriculture (presentation)
 
IoT Connectivity
IoT Connectivity IoT Connectivity
IoT Connectivity
 
Iot applications in manufacturing
Iot applications in manufacturingIot applications in manufacturing
Iot applications in manufacturing
 
Beginners: What is Industrial IoT (IIoT)
Beginners: What is Industrial IoT (IIoT)Beginners: What is Industrial IoT (IIoT)
Beginners: What is Industrial IoT (IIoT)
 
Ppt on embedded systems
Ppt on embedded systemsPpt on embedded systems
Ppt on embedded systems
 
EDGE COMPUTING: VISION AND CHALLENGES
EDGE COMPUTING: VISION AND CHALLENGESEDGE COMPUTING: VISION AND CHALLENGES
EDGE COMPUTING: VISION AND CHALLENGES
 
Iot ppt
Iot pptIot ppt
Iot ppt
 
Information technology seminar topics
Information technology  seminar topicsInformation technology  seminar topics
Information technology seminar topics
 
Syed IoT - module 5
Syed  IoT - module 5Syed  IoT - module 5
Syed IoT - module 5
 
Overview of IoT and Security issues
Overview of IoT and Security issuesOverview of IoT and Security issues
Overview of IoT and Security issues
 
Final year project presentation IOT Based home security system
Final year project presentation IOT Based home security systemFinal year project presentation IOT Based home security system
Final year project presentation IOT Based home security system
 
Iot presentation
Iot presentationIot presentation
Iot presentation
 
EE8691 – EMBEDDED SYSTEMS.pptx
EE8691 – EMBEDDED SYSTEMS.pptxEE8691 – EMBEDDED SYSTEMS.pptx
EE8691 – EMBEDDED SYSTEMS.pptx
 
nptel-1.pdf
nptel-1.pdfnptel-1.pdf
nptel-1.pdf
 
Internet Of Things (IOT)
Internet Of Things (IOT)Internet Of Things (IOT)
Internet Of Things (IOT)
 
Ardu sat (Arduino based satellite)
Ardu sat (Arduino based satellite)Ardu sat (Arduino based satellite)
Ardu sat (Arduino based satellite)
 
Practical introduction to IoT
Practical introduction to IoTPractical introduction to IoT
Practical introduction to IoT
 
IoT and its Applications
IoT and its ApplicationsIoT and its Applications
IoT and its Applications
 
WiFi mesh network(ESP32 mStar and mesh topology)
WiFi mesh network(ESP32 mStar and mesh topology)WiFi mesh network(ESP32 mStar and mesh topology)
WiFi mesh network(ESP32 mStar and mesh topology)
 

Similar a An introduction to workflow-based programming with Node-RED

Node-RED and getting started on the Internet of Things
Node-RED and getting started on the Internet of ThingsNode-RED and getting started on the Internet of Things
Node-RED and getting started on the Internet of ThingsBoris Adryan
 
Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015Boris Adryan
 
maXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_MagazinemaXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_MagazineMax Kleiner
 
Node red & IoT - IEDC Hardware Club, April 8th 2016
Node red & IoT - IEDC Hardware Club, April 8th 2016Node red & IoT - IEDC Hardware Club, April 8th 2016
Node red & IoT - IEDC Hardware Club, April 8th 2016Sebin Benjamin
 
AT&T Hack Dallas Node-RED Tutorial
AT&T Hack Dallas Node-RED TutorialAT&T Hack Dallas Node-RED Tutorial
AT&T Hack Dallas Node-RED TutorialStefania Kaczmarczyk
 
Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3Max Kleiner
 
Analyzing Twitter with Node-RED
Analyzing Twitter with Node-RED Analyzing Twitter with Node-RED
Analyzing Twitter with Node-RED Pooja Mistry
 
Maxbox starter18
Maxbox starter18Maxbox starter18
Maxbox starter18Max Kleiner
 
maXbox Arduino Tutorial
maXbox Arduino TutorialmaXbox Arduino Tutorial
maXbox Arduino TutorialMax Kleiner
 
Devry gsp 215 week 7 i lab networking and a tiny web server new
Devry gsp 215 week 7 i lab networking and a tiny web server newDevry gsp 215 week 7 i lab networking and a tiny web server new
Devry gsp 215 week 7 i lab networking and a tiny web server newwilliamethan912
 
Node red with Arduino
Node red with ArduinoNode red with Arduino
Node red with ArduinoAnshu Pandey
 
Using Node-RED for building IoT workflows
Using Node-RED for building IoT workflowsUsing Node-RED for building IoT workflows
Using Node-RED for building IoT workflowsAniruddha Chakrabarti
 
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP ProtocolSerial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP ProtocolSanjay Kumar
 
maXbox starter30 Web of Things
maXbox starter30 Web of ThingsmaXbox starter30 Web of Things
maXbox starter30 Web of ThingsMax Kleiner
 
IoT, APIs und Microservices - alles unter Node-RED
IoT, APIs und Microservices - alles unter Node-REDIoT, APIs und Microservices - alles unter Node-RED
IoT, APIs und Microservices - alles unter Node-REDLars Gregori
 
Prototyping the internet of things with Node-RED
Prototyping the internet of things with Node-REDPrototyping the internet of things with Node-RED
Prototyping the internet of things with Node-REDPooja Mistry
 
Build your own discovery index of scholary e-resources
Build your own discovery index of scholary e-resourcesBuild your own discovery index of scholary e-resources
Build your own discovery index of scholary e-resourcesMartin Czygan
 

Similar a An introduction to workflow-based programming with Node-RED (20)

Node-RED and getting started on the Internet of Things
Node-RED and getting started on the Internet of ThingsNode-RED and getting started on the Internet of Things
Node-RED and getting started on the Internet of Things
 
Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015
 
maXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_MagazinemaXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_Magazine
 
Node red & IoT - IEDC Hardware Club, April 8th 2016
Node red & IoT - IEDC Hardware Club, April 8th 2016Node red & IoT - IEDC Hardware Club, April 8th 2016
Node red & IoT - IEDC Hardware Club, April 8th 2016
 
AT&T Hack Dallas Node-RED Tutorial
AT&T Hack Dallas Node-RED TutorialAT&T Hack Dallas Node-RED Tutorial
AT&T Hack Dallas Node-RED Tutorial
 
Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3
 
Analyzing Twitter with Node-RED
Analyzing Twitter with Node-RED Analyzing Twitter with Node-RED
Analyzing Twitter with Node-RED
 
Maxbox starter18
Maxbox starter18Maxbox starter18
Maxbox starter18
 
maXbox Arduino Tutorial
maXbox Arduino TutorialmaXbox Arduino Tutorial
maXbox Arduino Tutorial
 
Nodejs
NodejsNodejs
Nodejs
 
Devry gsp 215 week 7 i lab networking and a tiny web server new
Devry gsp 215 week 7 i lab networking and a tiny web server newDevry gsp 215 week 7 i lab networking and a tiny web server new
Devry gsp 215 week 7 i lab networking and a tiny web server new
 
Node red with Arduino
Node red with ArduinoNode red with Arduino
Node red with Arduino
 
Using Node-RED for building IoT workflows
Using Node-RED for building IoT workflowsUsing Node-RED for building IoT workflows
Using Node-RED for building IoT workflows
 
INET for Starters
INET for StartersINET for Starters
INET for Starters
 
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP ProtocolSerial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
 
maXbox starter30 Web of Things
maXbox starter30 Web of ThingsmaXbox starter30 Web of Things
maXbox starter30 Web of Things
 
Node js
Node jsNode js
Node js
 
IoT, APIs und Microservices - alles unter Node-RED
IoT, APIs und Microservices - alles unter Node-REDIoT, APIs und Microservices - alles unter Node-RED
IoT, APIs und Microservices - alles unter Node-RED
 
Prototyping the internet of things with Node-RED
Prototyping the internet of things with Node-REDPrototyping the internet of things with Node-RED
Prototyping the internet of things with Node-RED
 
Build your own discovery index of scholary e-resources
Build your own discovery index of scholary e-resourcesBuild your own discovery index of scholary e-resources
Build your own discovery index of scholary e-resources
 

Más de Boris Adryan

Computational decision making
Computational decision makingComputational decision making
Computational decision makingBoris Adryan
 
Development and Deployment: The Human Factor
Development and Deployment: The Human FactorDevelopment and Deployment: The Human Factor
Development and Deployment: The Human FactorBoris Adryan
 
Zühlke Meetup - Mai 2017
Zühlke Meetup - Mai 2017Zühlke Meetup - Mai 2017
Zühlke Meetup - Mai 2017Boris Adryan
 
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16Boris Adryan
 
Industry of Things World - Berlin 19-09-16
Industry of Things World - Berlin 19-09-16Industry of Things World - Berlin 19-09-16
Industry of Things World - Berlin 19-09-16Boris Adryan
 
Just because you can doesn't mean that you should - thingmonk 2016
Just because you can doesn't mean that you should - thingmonk 2016Just because you can doesn't mean that you should - thingmonk 2016
Just because you can doesn't mean that you should - thingmonk 2016Boris Adryan
 
Plattformen für das Internet der Dinge, solutions.hamburg, 05.09.16
Plattformen für das Internet der Dinge, solutions.hamburg, 05.09.16Plattformen für das Internet der Dinge, solutions.hamburg, 05.09.16
Plattformen für das Internet der Dinge, solutions.hamburg, 05.09.16Boris Adryan
 
Eclipse IoT - Day 0 of thingmonk 2016
Eclipse IoT - Day 0 of  thingmonk 2016Eclipse IoT - Day 0 of  thingmonk 2016
Eclipse IoT - Day 0 of thingmonk 2016Boris Adryan
 
Geo-IoT World, 25/05/16
Geo-IoT World, 25/05/16Geo-IoT World, 25/05/16
Geo-IoT World, 25/05/16Boris Adryan
 
Smart IoT London, 13th April 2016
Smart IoT London, 13th April 2016Smart IoT London, 13th April 2016
Smart IoT London, 13th April 2016Boris Adryan
 
Eclipse IoT - ecosystem
Eclipse IoT - ecosystemEclipse IoT - ecosystem
Eclipse IoT - ecosystemBoris Adryan
 
TopConf Linz, 02/02/2016
TopConf Linz, 02/02/2016TopConf Linz, 02/02/2016
TopConf Linz, 02/02/2016Boris Adryan
 
IoT - Be Open or Miss Out
IoT - Be Open or Miss OutIoT - Be Open or Miss Out
IoT - Be Open or Miss OutBoris Adryan
 
EclipseCon France 2015 - Science Track
EclipseCon France 2015 - Science TrackEclipseCon France 2015 - Science Track
EclipseCon France 2015 - Science TrackBoris Adryan
 
Node-RED workshop at IoT Toulouse
Node-RED workshop at IoT ToulouseNode-RED workshop at IoT Toulouse
Node-RED workshop at IoT ToulouseBoris Adryan
 
Data Science London - Meetup, 28/05/15
Data Science London - Meetup, 28/05/15Data Science London - Meetup, 28/05/15
Data Science London - Meetup, 28/05/15Boris Adryan
 
O'Reilly Webcast: Organizing the Internet of Things - Actionable Insight Thro...
O'Reilly Webcast: Organizing the Internet of Things - Actionable Insight Thro...O'Reilly Webcast: Organizing the Internet of Things - Actionable Insight Thro...
O'Reilly Webcast: Organizing the Internet of Things - Actionable Insight Thro...Boris Adryan
 
What the IoT should learn from the life sciences
What the IoT should learn from the life sciencesWhat the IoT should learn from the life sciences
What the IoT should learn from the life sciencesBoris Adryan
 
Wiring the Internet of Things with Node-RED, @IoTConf talk, September '14
Wiring the Internet of Things with Node-RED, @IoTConf talk, September '14Wiring the Internet of Things with Node-RED, @IoTConf talk, September '14
Wiring the Internet of Things with Node-RED, @IoTConf talk, September '14Boris Adryan
 

Más de Boris Adryan (20)

Computational decision making
Computational decision makingComputational decision making
Computational decision making
 
Development and Deployment: The Human Factor
Development and Deployment: The Human FactorDevelopment and Deployment: The Human Factor
Development and Deployment: The Human Factor
 
Zühlke Meetup - Mai 2017
Zühlke Meetup - Mai 2017Zühlke Meetup - Mai 2017
Zühlke Meetup - Mai 2017
 
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16
 
Industry of Things World - Berlin 19-09-16
Industry of Things World - Berlin 19-09-16Industry of Things World - Berlin 19-09-16
Industry of Things World - Berlin 19-09-16
 
Just because you can doesn't mean that you should - thingmonk 2016
Just because you can doesn't mean that you should - thingmonk 2016Just because you can doesn't mean that you should - thingmonk 2016
Just because you can doesn't mean that you should - thingmonk 2016
 
Plattformen für das Internet der Dinge, solutions.hamburg, 05.09.16
Plattformen für das Internet der Dinge, solutions.hamburg, 05.09.16Plattformen für das Internet der Dinge, solutions.hamburg, 05.09.16
Plattformen für das Internet der Dinge, solutions.hamburg, 05.09.16
 
Eclipse IoT - Day 0 of thingmonk 2016
Eclipse IoT - Day 0 of  thingmonk 2016Eclipse IoT - Day 0 of  thingmonk 2016
Eclipse IoT - Day 0 of thingmonk 2016
 
Geo-IoT World, 25/05/16
Geo-IoT World, 25/05/16Geo-IoT World, 25/05/16
Geo-IoT World, 25/05/16
 
Smart IoT London, 13th April 2016
Smart IoT London, 13th April 2016Smart IoT London, 13th April 2016
Smart IoT London, 13th April 2016
 
Eclipse IoT - ecosystem
Eclipse IoT - ecosystemEclipse IoT - ecosystem
Eclipse IoT - ecosystem
 
TopConf Linz, 02/02/2016
TopConf Linz, 02/02/2016TopConf Linz, 02/02/2016
TopConf Linz, 02/02/2016
 
IoT - Be Open or Miss Out
IoT - Be Open or Miss OutIoT - Be Open or Miss Out
IoT - Be Open or Miss Out
 
Thingmonk 2015
Thingmonk 2015Thingmonk 2015
Thingmonk 2015
 
EclipseCon France 2015 - Science Track
EclipseCon France 2015 - Science TrackEclipseCon France 2015 - Science Track
EclipseCon France 2015 - Science Track
 
Node-RED workshop at IoT Toulouse
Node-RED workshop at IoT ToulouseNode-RED workshop at IoT Toulouse
Node-RED workshop at IoT Toulouse
 
Data Science London - Meetup, 28/05/15
Data Science London - Meetup, 28/05/15Data Science London - Meetup, 28/05/15
Data Science London - Meetup, 28/05/15
 
O'Reilly Webcast: Organizing the Internet of Things - Actionable Insight Thro...
O'Reilly Webcast: Organizing the Internet of Things - Actionable Insight Thro...O'Reilly Webcast: Organizing the Internet of Things - Actionable Insight Thro...
O'Reilly Webcast: Organizing the Internet of Things - Actionable Insight Thro...
 
What the IoT should learn from the life sciences
What the IoT should learn from the life sciencesWhat the IoT should learn from the life sciences
What the IoT should learn from the life sciences
 
Wiring the Internet of Things with Node-RED, @IoTConf talk, September '14
Wiring the Internet of Things with Node-RED, @IoTConf talk, September '14Wiring the Internet of Things with Node-RED, @IoTConf talk, September '14
Wiring the Internet of Things with Node-RED, @IoTConf talk, September '14
 

Último

Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 

Último (20)

Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 

An introduction to workflow-based programming with Node-RED

  • 1. Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED   - 1 -       http://nodered.org   An  introduction  to  flow-­based   programming  using  Node-­RED     ! Node-­RED   is   a   visual   tool   for   wiring   the   Internet   of   Things   (IoT).   Node-­‐RED   is   platform-­‐independent,   but   has   been   developed   with   small   computers   such   as   the   Raspberry  Pi  in  mind.     ! Traditional   IoT   development   can   be   very   technical:   Access   to   the   GPIO   and   other   hardware  requires  skills  in  C  or  assembler,  output  of  data  to  web  services  or  sending   tweets   and   emails   requires   the   use   of   complex   APIs.   Node-­RED   takes   care   of   the   technicalities  and  lets  you  concentrate  on  the  logic  of  your  workflow     ! While   most   programming   in   Node-­‐RED   is   done   visually   using   pre-­‐defined   functions   (“nodes”),  any  additional  functionality  can  be  added  in  JavaScript.     ! Node-­RED  is  a  multi-­purpose  jackknife  –  use  it  for  any  prototyping!       WORKSHOP  CONTENT:  In  this  workshop,  we’re  going  to  use  Node-­‐RED  to  build  a  basic  web   server.   We   are   going   to   build   a   web   site   that   provides   the   functionality   of   an   online   chat   application,  i.e.  you  are  going  to  learn  about  communication  between  a  web  browser  and  the   underlying  service.  
  • 2. Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED   - 2 - Technical  background:  For  this  workshop,  you  will  find  a  Raspberry  Pi  with  Node-­‐RED  already  installed.  While  the  installation  of  Node-­‐RED   software  is  relatively  easy,  it  would  be  difficult  to  include  this  step  within  the  time  constraints  of  the  exercise.  For  completeness,  this  is   what’s  happened  to  a  fresh  and  up-­‐to-­‐date  Raspian  installation  on  your  SD  card:   1. Install  node.js  and  npm  as  per:  http://nodered.org/docs/hardware/raspberrypi.html   2. Clone  Node-­‐RED  from  Github  and  install  as  described  here:  http://nodered.org/docs/getting-­started/installation.html   Note:   To   leverage   the   power   of   Node-­‐RED,   consider   installing   nodes   for   email   or   raw   GPIO   access   as   well.   The   latter   is   described   here:   http://nodered.org/docs/hardware/raspberrypi.html     1)  Exercise:  Starting  Node-­RED  as  Raspberry  Pi  user   Node-­‐RED  can  be  installed  as  a  service  on  the  Raspberry  Pi,  i.e.  as  a  program  that’s  always   executed  when  your  Pi  is  running.  However,  this  is  only  useful  if  you  want  to  commit  your  Pi   for   this   particular   use   as   it   can   consume   considerable   resources.   For   everyone   else,   it’s   recommended  to  start  Node-­‐RED  only  when  needed:   1. Open  the  LXTerminal    to  see  a  console  that  allows  you  to  enter  Linux  commands.   2. Change  into  the  Node-­‐RED  directory  by  issuing  “cd  node-­‐red”.   3. Start  Node-­‐RED  by  typing  “node  red.js”.     You  should  now  see  Node-­‐RED  starting  up  –  that  may  take  a  few  seconds:     Congratulations.  You’re  now  ready  for  the  exercises.   Node-­‐RED  represents  a  server  on  the  basis  of  node.js  and  interacts  with  the  user  through  a   graphical   user   interface.   It   can   be   reached   on   port   1880.   To   use   Node-­RED,   open   a   web   browser  and  direct  it  to  http://localhost:1880   It’s  useful  to  remember  that  Node-­‐RED  acts  as  a  server  in  your  entire  network.  That  is,  if  your  Raspberry  Pi’s  internal  IP  address  is  something   like  192.x.x.x,  every  computer  in  your  network  can  open  the  Node-­‐RED  GUI  through  http://192.x.x.x:1880.  You  can  make  your  system  more   restricted/secure  by  following  the  configuration  advice  on  http://nodered.org/docs/configuration.html.    
  • 3. Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED   - 3 - 2)  Exercise:  Your  first  flow  –  this  is  a  recap  for  those  who  attended  the  last  course   The  best  way  to  explain  “a  flow”  is  by  creating  one.  In  this  mini  flow,  we’re  going  to  inject  a   value  into  our  debug  window  (refer  to  page  1  for  what  the  GUI  elements  are  called).   1. Open  the  Epiphany  Web  Browser.  (It  supports  JavaScript  better  than  Midori).   2. In  the  address  line,  enter  localhost:1880.  You  will  then  see  the  Node-­‐RED  GUI.   3. Drag   and   drop   an   “inject”   node   from   the   nodes   library   into   the   flow   editor   (once   you’ve   chosen   the   inject   node,   you   should   see   some   general   explanation   about   its   functionality  in  the  info  pane  –  no  need  to  read  that  now).   4. Drag  and  drop  a  “debug”  node  from  the  nodes  library  into  the  flow  editor.   5. Create  a  pipe  between  the  inject  and  debug  nodes  by  drawing  a  connection  between   their  small  grey  rounded  rectangles.   6. Change  from  the  info  pane  to  the  debug  pane  (upper  right).   7. Deploy  (=start)  your  flow.   8. Once  deployed,  press  the  left  blue  rectangle  that’s  attached  to  the  inject  node.  Check   what’s  happening  in  the  debug  pane.     3)  Exercise:  Setting  up  a  static  website   It  is  very  easy  to  set  up  a  very  basic  web  server  in  Node-­‐RED.   1. From  the  input  panel,  chose  a  “http”  node.   2. Change  the  properties  of  your  http  node  so  that  it   will   respond   to   GET   requests   to   /mypage   from   a   browser.   3. Add  a  “template”  node  (from  the  function  panel),   and  a  “http  response”  node  from  the  output  panel.     4. Wire  your  flow  together  as  shown  below:     5. Deploy  your  flow.   6. Once  deployed,  open  a  separate  browser  window  and  enter  localhost:1880/mypage.   A  note  on  addresses  and  ports:  Web  servers  have  their  own  numerical  addresses,  e.g.  a  special  table  (called  DNS)  resolves  the  BBC  website  to   212.58.246.103.   Each   address   can   have   thousands   of   communication   channels   (called   ports).   A   standard   webpage   call   uses   port   80   by   default.  Your  own  machine  is  always  called  “localhost”  and  resolves  to  127.0.0.1.  A  default  Node-­‐RED  server  can  be  opened  on  port  1880.   Does  the  address  http://localhost:1880/mypage  make  more  sense  to  you  now?  
  • 4. Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED   - 4 - 4)  Exercise:    The  anatomy  and  function  of  a  template  node   Our  previous  Node-­‐RED  workflow  hides  the  complexity  of  the  client  "  server  communication   via  the  hypertext  transfer  protocol  (“http”)  (which  sits  on  top  of  another  protocol,  TCP/IP,   which  sits  on  top  of…  …you  get  the  gist).  We  don’t  need  to  care  how  the  browser  talks  to  the   server.   One   technicality   that   we   can’t   fully   get   around   in   this   workshop   is   HTML,   the   hypertext   markup  language.  It’s  the  code  that  describes  how  a  website  is  supposed  to  look.  It’s  beyond   the  scope  of  this  course  to  teach  you  all  goodness  of  HTML,  a  good  entry  point  for  further   explorations  is  here:  http://www.w3schools.com/html.  What  you  need  to  remember,  however,   is  that  the  template  node  encapsulates  a  minimal  HTML  page.  So      indeed  returns   <!DOCTYPE html> <html> <head> </head> <body> This is the payload: {{payload}} </body> </html> which  instructs  the  browser  to  show  the  text  you’ve  seen  in  Exercise  3.   In  the  next  exercise,  we  will  use  additional  HTML  code  to  add  some  styling  to  our  website,   and  we  will  learn  to  use  the  moustache  {{  }}  format  to  add  dynamic  content  to  it.   1. Drag  and  drop  a  “function”  node  into  the  flow  editor.  Call  it  “where  things  happen”.   Stick  it  in  between  the  http-­‐in  and  the  template  node.     2. Edit  the  function:  Add  msg.payload = "Hello, Pi";  in  the  line  before  return msg;   3. Change  the  template  into  This is the <b>message</b>: {{payload}}   4. Deploy  your  flow  and  check  out  localhost:1880/mypage.     Note:  If  you  know  HTML,  have  a  play  with  other  style  tags.  You  can  even  embed  CSS!    
  • 5. Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED   - 5 - 5)  Exercise:  Retain  state   So   far   our   Node-­‐RED   flow   is   strictly   linear:   Once   the   /mypage   is   requested,   the   function   populates  the  variable  payload  with  “Hello,  Pi”,  the  template  node  embeds  this  payload  into   the  HTML  that’s  returned  to  the  server.   How  can  we  put  other  things  into  the  payload?   1. Wire  your  inject  node  from  Exercise  1  to  the  function  node.  Modify  the  inject  node  to   send  the  string  “Have  a  nice  day”  as  payload,  with  “new  message”  as  topic.     2. Edit  the  function  node  to  contain  the  following  JavaScript:     3. Deploy  the  flow.     4. Look  at  localhost:1880/mypage  in  your  web  browser.  Note  what  you  see.   5. Click  on  the  rounded  rectangle  on  the  left  of  your  inject  node.   6. Reload   localhost:1880/mypage.   Note   what   you   see.   Can   you   make   sense   of   your   observation  in  the  light  of  your  JavaScript  code  from  step  2?   A  bit  of  background:   By  default,  most  wires  between  nodes  are  topic/payload  pairs,  a  bit  like  emails  have  subject   and  body.  However,  the  default  msg  variable  can  always  be  extended,  and  in  the  case  of  the   http  nodes  contain  an  entire  http  response  object.   The  context  variable  is  available  in  the  function  node  to  retain  information  between  different   executions  of  the  node.  In  our  example,  if  the  input  message  msg  arrives  from  the  injection   node  (having  the  topic  “new  message”),  we  populate  context.value  with  the  payload  “Have  a   nice  day”  and  leave  the  node.  If  the  input  arrives  from  the  /mypage  http  node,  we  evaluate   whether  something  is  present  in  the  context  variable.  If  not,  we  deliver  the  payload  “never  got   anything”  for  rendering  in  the  template  node,  otherwise  we  take  it  from  the  context.   The  special  case  context.global  is  a  variable  that  persist  between  executions  of  a  node  and  are   globally  available  to  all  other  function  nodes.  More  about  messages  and  context  variables  can   be  found  here:  http://nodered.org/docs/writing-­functions.html  
  • 6. Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED   - 6 - 6)  Exercise:  Returning  the  result  of  a  web  form  to  Node-­RED   So  far  our  interaction  between  the  server  and  the  client  was  rather  unidirectional.  Following   the  http  request,  us  injecting  or  not  injecting  a  message  determined  the  actual  outcome.  Now,   we  extend  the  example  so  that  the  return  value  is  dependant  on  the  user’s  input.   1. Drag  and  drop  a  “http”  input  node,  a  “template”  node  and  a  “http“  output  node  into   your   flow.   Set   the   input   node   to   respond   to   GET   request   on   /login.   Wire   the   nodes   together  as  shown  below:     2. Add  the  following  HTML  to  your  template  node:   <form action="http://localhost:1880/chat" method="post"> <b>User</b><br> <input type="text" name="user"/><br> <button type="submit">Submit</button> </form> 3. Add  another  set  of  four  nodes  to  your  flow.  Configure  the  http  input  node  to  respond   to   POST   requests   at   /chat.   This   is   how   your   server   is   going   to   react   to   form   submissions:     4. Edit  the  function  node  to  extract  the  content  of  the  incoming  input  field  “user”  (if  not   empty)  and  assign  it  to  our  standard  payload:   if (msg.req.body["user"] != "") { msg.payload = msg.req.body["user"] } return msg; 5. The  template  node  can  simply  say:  The user’s name is: {{payload}}   6. Deploy  and  test  your  flow  at  localhost:1880/login.   Does  it  do  what  you  expect?  If  so:  Congratulations,  you’re  now  seeing  the  key  ingredients   to  a  basic  chat  server.       Exercise  7:  Putting  it  all  together   In  the  next  step  we’re  going  to  put  all  of  our  new  skills  together.  To  build  a  basic  chat  server,   all  we  need  is  a  little  more  trickery  with  the  context.global  to  retain  our  conversation  (we’re   going   to   use   context.global.dialog),   some   HTML   concept   called   iframe   to   separate   an   input   field  from  the  conversation,  and  a  bit  of  client-­‐sided  JavaScript  to  auto-­‐update  the  iframe.  
  • 7. Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED   - 7 - 1. Rewrite  the  function  node  following  the  /chat  http  input  like  this:   if (msg.req.body["user"] != "") { msg.payload = msg.req.body["user"] } if (msg.req.body["message"] != undefined) { context.global.dialog += msg.req.body["user"]+':'+msg.req.body["message"]+"<BR>"; } context.global.dialog = context.global.dialog || ""; return msg; 2. The  template  node  hides  most  of  the  trickery:   <iframe src="http://localhost:1880/dialog" name="iframe_a" width="90%" height="70%"></iframe> <form name="frm" action="http://localhost:1880/chat" method="post"> <b>Message from {{payload}}</b><br> <input type="text" name="message" size="90%"/> <input type="hidden" name="user" value="{{payload}}"><br> <button type="submit">Submit</button> </form> <SCRIPT language="JavaScript"> window.setInterval("reloadIFrame();", 1000); function reloadIFrame() { window.frames["iframe_a"].location.reload(); } </SCRIPT> 3. We  need  another  set  of  http  input,  function,  template  and  http  out  nodes.  These  will   represent  the  /dialog  page  that’s  shown  in  the  iframe.  The  code  is  fairly  simple.     4. Add   to   function   node   node   following   the   /dialog   http   input   msg.payload = context.global.dialog;  before  return msg;   5. The  template  node  just  says:  {{payload}}   6. Deploy  your  web  server.       Open  localhost:1880/login  from  two  different  browser  windows  and  login  with  different   identities.   Both   windows   will   update   their   iframe   once   a   second,   showing   /dialog   as   it   continues  to  grow  on  the  server  with  lines  that  are  sent  via  the  form  field  “message”  from   either  client.  
  • 8. Raspberry Pi Birthday Weekend & CamJam! Workshop: Node-RED   - 8 -   Further  explanations  and  suggestions  for  experiments:   So   far   all   code   refers   to   localhost:1880.   It   is   possible   to   change   the   default   port,   allowing   addresses   without   the   addition   of   :1880   (see   http://nodered.org/docs/configuration.html).   Furthermore,  localhost  is  only  visible  on  your  own  machine.  You  can  change  localhost  to  your   Raspberry   Pi’s   local   IP   address   (often   something   like   192.168.x.x   or   172.x.x.x)   and   request   your  chat  server  from  any  other  computer  within  your  local  network.  These  changes  would   impact  the  address  that’s  specified  in  the  HTML  form  definitions.     Node-­‐RED  is  an  incredibly  powerful  framework  that  allows  you  to  do  things  in  very  little  time.   The  official  directory  of  flows  donated  to  the  community  is  here  http://flows.nodered.org   and  they  can  easily  be  imported  by  copying  &  pasting  the  JSON-­‐formatted  code.     A  few  suggestions  and  examples  that  I  have  described  over  the  past  months  are  here:   ! Triggering   Node-­RED   with   drawings:   The   Aestheticodes   project   uses   a   QR   code   like   method   to   encode   information   in   beautiful  drawings.  Draw  a  picture,  take  a  photograph  with  your   mobile   and   trigger   the   debug   node   doing   that:   http://logic.sysbiol.cam.ac.uk/?p=1514     ! Control  Minecraft  with  Node-­RED:  The  Minecraft  Pi  Edition  can  be  controlled  through   Python,  but  that  may  not  be  easily  accessible  for  everyone.  With  a  MQTT-­‐to-­‐Minecraft   bridge,   the   Node-­‐RED   inject   nodes   can   be   used   to   control   Steve:   http://logic.sysbiol.cam.ac.uk/?p=1499     ! Got   an   AirPi   shield?   Monitor   your   room   climate   with   AirPi   and   Node-­RED:   http://logic.sysbiol.cam.ac.uk/?p=1423     ! The  first  CamJam  Node-­RED  tutorial  that  teaches  radio  communication  through  Ciseco   radio   modules   is   available   here:   http://www.slideshare.net/BorisAdryan/node-­red-­ coursecamjamjuly2014