A Honey Pot is an intrusion (unwanted) detection technique used to study hacker movement and interested to help better system defences against later attacks usually made up of a virtual machine that sits on a network or single client.
This Presentation will cover the attacks. defenses, protocols
Some contents are taken from http://www.ieeesb.ucy.ac.cy/files/2017/11/fundamentals.pdf ,Mobile Computing Technology , Applications and Service Creation by Ashoke K Talukder, Hasan Ahmed, Roopa R Yavagal, wiki and also some other sites.
What is Serverless Computing?
From its Introduction, Architecture, Characteristics, Commercial Platform, Benefits and Drawbacks, Use Cases and Workloads, to its API Composition.
A Honey Pot is an intrusion (unwanted) detection technique used to study hacker movement and interested to help better system defences against later attacks usually made up of a virtual machine that sits on a network or single client.
This Presentation will cover the attacks. defenses, protocols
Some contents are taken from http://www.ieeesb.ucy.ac.cy/files/2017/11/fundamentals.pdf ,Mobile Computing Technology , Applications and Service Creation by Ashoke K Talukder, Hasan Ahmed, Roopa R Yavagal, wiki and also some other sites.
What is Serverless Computing?
From its Introduction, Architecture, Characteristics, Commercial Platform, Benefits and Drawbacks, Use Cases and Workloads, to its API Composition.
Replication in computing involves sharing information so as to ensure consistency between redundant resources, such as software or hardware components, to improve reliability, fault-tolerance, or accessibility.
Introduction to metasploit framework
01.History of metasploit
02.Metasploit Design and architecture
03.Metasploit Editions
04.Metasploit Interface
05.Basic commands and foot-printing modules
Introduction to Android and Android StudioSuyash Srijan
This is a presentation that I gave at Google Developer Group Oxford to introduce people to Android development and Android Studio IDE, which is used to build Android apps. This presentation gives a brief overview of the platform and fundamentals of the app and what developer tools are available.
PS: Some slides do not have any text accompanying it. That is either because it wasn't relevant or because the text would've been too long to put on the corresponding slide.
Node-RED and Minecraft - CamJam September 2015Boris Adryan
This workshop uses the Node-RED framework as development tool for JavaScript. Building on functionality available for generic programming challenges, we’re going to use the communication standard TCP (Transmission Control Protocol) to interact with the Minecraft API (Application Programming Interface). The material is aimed at people who have had first experience with the Minecraft API on a Raspberry Pi (say, using Python), who now want to understand what's going on behind the scenes and what TCP, API and all those other acronyms mean. It also introduces flow-based programming concepts.
Replication in computing involves sharing information so as to ensure consistency between redundant resources, such as software or hardware components, to improve reliability, fault-tolerance, or accessibility.
Introduction to metasploit framework
01.History of metasploit
02.Metasploit Design and architecture
03.Metasploit Editions
04.Metasploit Interface
05.Basic commands and foot-printing modules
Introduction to Android and Android StudioSuyash Srijan
This is a presentation that I gave at Google Developer Group Oxford to introduce people to Android development and Android Studio IDE, which is used to build Android apps. This presentation gives a brief overview of the platform and fundamentals of the app and what developer tools are available.
PS: Some slides do not have any text accompanying it. That is either because it wasn't relevant or because the text would've been too long to put on the corresponding slide.
Node-RED and Minecraft - CamJam September 2015Boris Adryan
This workshop uses the Node-RED framework as development tool for JavaScript. Building on functionality available for generic programming challenges, we’re going to use the communication standard TCP (Transmission Control Protocol) to interact with the Minecraft API (Application Programming Interface). The material is aimed at people who have had first experience with the Minecraft API on a Raspberry Pi (say, using Python), who now want to understand what's going on behind the scenes and what TCP, API and all those other acronyms mean. It also introduces flow-based programming concepts.
PHYSICAL COMPUTING WITH RGB LED OR MATRIX
Today we enter a topic in programming called
embedded computing with the internet; we code a
RGB LED light on a Arduino board with a breadboard
on which we switch off or on the light by a browser
on an android device with our own web server and
their COM or socket protocols too.
Node red & IoT - IEDC Hardware Club, April 8th 2016Sebin Benjamin
Node-RED is a flow-based development tool for visual programming developed originally by IBM for wiring together hardware devices, APIs and online services as part of the Internet of Things. Node-RED provides a web browser-based flow editor, which can be used to create JavaScript functions.
We code a RGB LED light on the Arduino board and a breadboard on which we switch off or on the light by a browser on an android device with our own web server and their COM protocols.
The Arduino is what is known as a Physical or Embedded Computing platform, which means that it is an interactive system that through the use of hardware, firmware and software can interact with its environment.
Workflows are a key component of server side of IoT solution along with Analytics, Rule Engine and IoT device management. IoT focused Workflow tools draw their inspiration of classical workflow tools that exist in market, but focus more on IoT use cases. For example they are able to connect with IoT devices using IoT specific protocols like CoAP or MQTT. Node-RED is a visual tool for wiring together hardware devices, APIs and online services in new and interesting ways. It’s build by IBM Emerging Technology team from group for IoT, though it’s not limited only to IoT.
INET is an internet framework for OMNeT++ simulator.
This is a guide to start INET.
INET for Dummies.
INET Tutorial
If this guide is hard for you to follow, please comment or give any suggestion.
RGB LED in Arduino with an Oscilloscope
• Generating QR Code
• 3D Printing
• Web Video Cam
• Digi Clock with Real Time Clock
• Android SeekBar to Arduino LED Matrix
Build your own discovery index of scholary e-resourcesMartin Czygan
Providing discovery systems for eresourcesis essential for library services today.
Commercial search engine indices have been a widely used solution in recent years. In
contrast, running an own discovery service is undoubtedly a challenging task but promises
full control over data processing, enrichment, performance and quality. Building an own
aggregated index of eresourcesincludes gathering the right mix of data sources, clearing
licensing issues, and negotiating data availability. Technically, these threads are resumed by
data harvesters, filters and workflow orchestration tools.
Similar to An introduction to workflow-based programming with Node-RED (20)
A brief lesson on what constitutes computational decision making, from simple regression via various classification methods to deep learning. No maths, only basic concepts to teach the lingo of machine learning to a lay audience.
Development and Deployment: The Human FactorBoris Adryan
Thingmonk 2017: End-to-end IoT solutions are often highly integrated. Even small changes to the UX of a product can have profound impact on hardware requirements, while physical constraints such as battery capacity can dictate software architecture. A holistic understanding of IoT is key to efficient implementation, the “T-shaped engineer” the star in every development team. Contrast this to intellectual silos and matrix organisation, and you may see why especially large companies fail to move quickly into IoT. Similar issues strike the application of IoT. Deploying a solution in the enterprise is just a cost factor if processes are not adjusted to leverage the connected device and its data. However, changes in process often affect companies across their entire organisational structure. This can require a change of mindsets, making the success of an IoT solution depending on the human factor.
IoT-Daten: Mehr und schneller ist nicht automatisch besser.
Über optimale Sampling-Strategien, wie man rechnen kann, ob IoT sich rechnet, und warum es nicht immer Deep Learning und Real-Time-Analytics sein muss. (Folien Deutsch/Englisch)
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16Boris Adryan
Das Gesetz der großen Zahlen gilt immer: Die statistische Sicherheit nimmt mit der Anzahl der Datenpunkte immer zu, sofern die Datennahme fair erfolgt. Leider kostet das Sammeln der Daten oftmals Geld, und so ist man vor allem im Bereich der Sensorik (Stichwort: Internet der Dinge) gezwungen, sinnvolle Kompromisse einzugehen. In diesem Vortrag fasse ich die Erkenntnisse eines Projekts zusammen, in dem die Datenanalytik zeigte, dass man zukünftig nur 60% der ausgebrachten Sensoren wirklich braucht. Auch muss es nicht immer Echtzeit-Analyse sein: Mit einer auf den Business-Case abgestimmten Datenstrategie lassen sich unnötige Ausgaben vermeiden.
Industry of Things World - Berlin 19-09-16Boris Adryan
This talk makes the case for a measured use of big data pipelines and analytics methods based on the specific business case: one size doesn't fit all. Rather than buying the fastest stack and the most hyped methods, practitioners interested in analytics for Internet-of-Things deployments can save a lot of money by asking themselves a few questions that I lay out in the talk.
Just because you can doesn't mean that you should - thingmonk 2016Boris Adryan
Big data! Fast data! Real-time analytics! These are buzzwords commonly associated with platform offerings around IoT.
Although the Law of large numbers always applies, just because you can deploy more sensors doesn't automatically mean that you should. After all, they cost money, bandwidth, and can be a pain to maintain. On the example of the Westminster Parking Trial, I'd like to show how analytics on preliminary survey data could have reduced the number of deployed sensors significantly.
A similar logic goes for fast and real-time analytics. While being advertised as killer features, many people new to IoT and analytics are not even aware that they might get away with batch processing. On the example of flying a drone, I'd like to discuss for which use cases I'd apply edge processing (on the drone), stream or micro-batch analytics (when data arrives at the platform) or work on batched data (stored in a database).
Plattformen für das Internet der Dinge, solutions.hamburg, 05.09.16Boris Adryan
Talk in German. Abstract: Prospective end users new to IoT are overwhelmed with the vast number of offerings around IoT data brokerage, storage and analysis. This talk exemplifies some of the challenges that have to be met in real-world deployments, and why there is no one-size-fits-all IoT solution. We conclude that IoT solution providers in many cases need to consider PaaS solutions with customer-specific modifications.
My talk about data and information models for IoT, how ontologies can establish the relationship between IoT devices, and how Eclipse Vorto could accommodate ontological information. Briefly features Eclipse Smarthome.
My keynote from the Location Intelligence session at Geo-IoT World in Brussels in May 2016. How location is one of many important context variables in the interpretation of sensor data.
My talk at Smart IoT London. About adding 'context' for data analytics in the consumer IoT, touching on machine learning, hidden variables, and UX/UI of communicating probabilities.
Eclipse IoT is the M2M/IoT ecosystem provided by the Eclipse Foundation. It offers open source software solutions for end devices, gateway systems and backends. Notable Eclipse IoT projects are Kura (a turn-key ready gateway e.g. for the Raspberry Pi), Eclipse SmartHome (integral part e.g. of openHAB) or the MQTT/CoAP suits Mosquitto, Paho, Californium, Wakama and Leshan. There are also solutions for process plants and manufacturing, as well as tools for large-scale device management.
Presented at the Open Data Science meetup London (January 2016). To fully leverage the potential of the Internet of Things requires the exchange of information between devices. Unfortunately, most data remains in vendor silos. This talk explains how the life sciences have tackled similar issues, and why closed, vendor-specific systems may miss out.
Potentially creepy human-computer interactions in the future of the consumer IoT. Lots of raw data need to be analysed and are represented as result of machine learning exercises. However, consumers are likely scared of probabilities. How can UX address these issues?
EclipseCon France 2015 - Science TrackBoris Adryan
Software is increasingly playing a big part in scientific research, but in most cases the growth is organic. The life time of research software is often as short as the duration of a postdoctoral contract: Once the researcher moves on, custom-written niche code is frequently not well documented, components are not reusable, and the overall development effort is likely lost.
This is a case study in looking at the evolution of software for research in the field of genomics within my research group at the Department of Genetics at Cambridge University. While our research questions changed over the past decade, we moved from Perl code and regular expressions to R and statistical analysis, and from there to agent-based simulations in Java. Not only will I discuss the languages and tools used as well as the processes and how they have evolved over the years. It also covers the factors that influence the nature of the growth, such as funding, but also how 'open source' as a default has changed our development work. We also take a look into the future to see how we predict the software usage will grow.
Also, in presenting the problems and discussing possible solution, this talk will look at the role institutions play in helping address these issues. In particular the Software Sustainability Institute (SSI, http://software.ac.uk/) works in the UK to promote the development, maintenance and (re)use of research software.
The Eclipse Foundation, with the Science Working Group, works to facilitate software sharing and reuse. How can organisations like the SSI and Eclipse align their strategies and activities for maximum effect?
Data Science London - Meetup, 28/05/15Boris Adryan
Slides from my @ds_ldn talk about Ontologies in the Internet of Things. Note that this is a short version of a talk that I presented earlier this month on O'Reilly Webcasts, still viewable for a while at: http://www.oreilly.com/pub/e/3365
O'Reilly Webcast: Organizing the Internet of Things - Actionable Insight Thro...Boris Adryan
Traditional machine-to-machine (M2M) uses the internet to replace what was previously achieved through a wire. The challenges for IT are not much different to any other implementation of a prescribed business model.
But how are we going to leverage the connectedness of devices in the consumer Internet of Things (IoT) in a world in which every individual may show a different degree of technology adoption? Not everyone has the connected Crock Pot! The challenges are manifold, and while in 2015 we are still arguing about technical standards that hinder communication of things across platforms, the looming challenges of data integration are even more significant.
Even if all devices e.g. in the connected home of the future are going to speak one language, how are we generating actionable insight from the available information according to the users' need? How do we determine the appropriateness of action? An empty fridge might be alarming, but should we inform the user of an impending hunger crisis if the door hasn't been opened in a week, the heating system is set to low, the car is parked at the local airport? Draw your conclusions!
Ontologies organize things and establish their relationship to each other. They can be used for knowledge inference. For example, a car is a means of transport and ultimately an indicator of absence or presence. Some scientific domains are already making extensive use of ontologies to deal with vast amounts of information. The Gene Ontology (GO) has over 40k interlinked terms that describe cell and molecular biology. For every biological entity on that scale, we can ask: Where is it? What is its function? What process is it involved with? Benefitting from substantial government funding (in the range of > $40M from the NIH since 2001), knowledge inference through GO is widely applied in academic and industry research.
In this webcast I aim to introduce the three main branches localization, function and process that we use in GO and demonstrate how they're immediately applicable in the IoT — after all, a cell is just a large, interconnected system. I will further discuss relationship types that we use in the annotation of biological entities, and propose a few that are more appropriate for the IoT. I will contrast this relatively simple system with other ontologies suggested for the IoT. It is not my aim to sell GO as a one-size-fits-all, but talk about how building a large ontology has taught us pragmatism that is quite remote from many purely academic ontology proposals.
What the IoT should learn from the life sciencesBoris Adryan
What the Internet of Things should learn from the life sciences. About the utility of open data, ontologies and public repositories as routinely used in the academic life science, but rarely in the IoT.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
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