IoT4Devs
A JavaScript developer's approach about Internet Of Things
Henri Cavalcante
● github.com/henricavalcante
● twitter.com/henricavalcante
● fb.me/henricavalcante
The Internet of Things (IoT) is the network of physical
objects or "things" embedded with electronics, software,
sensors, and network connectivity, which enables these
objects to collect and exchange data.
IoT
- Mark Weiser
"Ubiquitous computing names the third
wave in computing, just now beginning. First
were mainframes, each shared by lots of
people. Now we are in the personal
computing era, person and machine staring
uneasily at each other across the desktop.
Next comes ubiquitous computing, or the age
of calm technology, when technology recedes
into the background of our lives."
Use cases nowadays (2016)
● Robotics - Military forces
● Healthcare - cardiac monitor - smart watches
● Domotic - Home Automation
● Smart Transportation - Parkings - Transit flow
● Logistics - Warehouses
● Surveillance - Security Systems
● Industrial Control - Industrie 4.0
● Agriculture - Animal Farming
● Metering systems
Internet of Things
Electronics
Network
Software
Sensors
Internet of Things
Electronics NetworkSoftwareSensors
Internet of Things
Electronics NetworkSoftwareSensors
Infrared
Proximity
Motion
Compass/Magnetometer
Piezo
Photoresistor
Accelerometer
Gyroscope
Temperature
Barometer
Altimeter
Hygrometer
∞
Internet of Things
Electronics NetworkSoftwareSensors
● Embedded Software
● Tools and Platforms
PaaS
- [ThingWorx](http://www.thingworx.com/)
- [Carriots](https://www.carriots.com/)
- [AWS IoT Platform](https://aws.amazon.com/iot/)
Open-source
- [Node-Red](http://nodered.org/)
- [KeeProject](http://www.kaaproject.org/)
- [ZettaJS](http://www.zettajs.org/)
Internet of Things
Electronics NetworkSoftwareSensors
MQTT - a protocol for collecting device data and communicating it to servers (D2S).
XMPP - a protocol best for connecting devices to people, a special case of the D2S pattern,
since people are connected to the servers.
DDS - a fast bus for integrating intelligent machines (D2D).
AMQP - a queuing system designed to connect servers to each other (S2S).
Standard IEEE 802.15.4 Bluetooth WiFi
Frequency 868/915 MHZ, 2.4 GHZ 2.4 GHz 2.4, 5.8 Ghz
Data rate 250 Kpbs 723 Kpbs 11 to 105 Mpbs
Range 10 to 300 m 10 m 10 to 100 m
Power Very Low Low High
Battery Operation Alkaline (months to years) Rechargeable (days/weeks) Rechargeable (hours)
Security
Network Layer - Using a physically secure network or VPN as foundation for any
communication between clients and broker is one way to provide a secure and trustworthy
connection. This would be suitable for gateway applications, where the gateway is
connected to devices on the one hand and with the broker over VPN on the other side.
Transport Layer - When the goal is to provide confidentiality in most cases TLS/SSL is
being used for transport encryption. It provides a secure and proven way to make sure
nobody can read along and even authenticate both sides, when using client certification
authentication.
Application Layer - On the transport level it can be ensured that the communication is
encrypted and the identity is authenticated. The MQTT protocol provides a client
identifier and username/password credentials.
Firmata
Firmata is a protocol for communicating with microcontrollers from software
on a computer (or smartphone/tablet, etc). The protocol can be implemented
in firmware on any microcontroller architecture as well as software on any
computer software package (see list of client libraries below).
Flash your Arduino with Standard Firmata:
● Connect the Arduino to your PC using the USB Cable
● Open the Arduino IDE, select: File > Examples > Firmata > StandardFirmata
● Click the "Upload" button.
● The text "Done Uploading" will appear once the upload is complete.
Johnny-Five
Johnny-Five is the original JavaScript Robotics programming framework.
Released by Bocoup in 2012, Johnny-Five is maintained by a community of
passionate software developers and hardware engineers. Over 75 developers
have made contributions towards building a robust, extensible and
composable ecosystem.
const five = require('johnny-five');
const board = new five.Board();
board.on('ready', () => {
const led = new five.Led(13);
led.blink(500);
});
It fucking works!!!
Node-Red
Node-RED is an environment built in NodeJS for wiring together hardware devices, APIs
and online services in new and interesting ways.
$ sudo npm i -g node-red
$ cd ~/.node_red
$ npm i node-red-node-arduino
$ npm i node-red-node-mongodb
$ node-red
?????????????????????????????????
?????????????????????????????????
?????????????????????????????????
?????????????????????????????????
?????????????????????????????????
?????????????????????????????????
?????????????????????????????????
?????????????????????????????????
?????????????????????????????????
● github.com/henricavalcante
● twitter.com/henricavalcante
● fb.me/henricavalcante

IoT4Devs (1)

  • 1.
    IoT4Devs A JavaScript developer'sapproach about Internet Of Things
  • 2.
    Henri Cavalcante ● github.com/henricavalcante ●twitter.com/henricavalcante ● fb.me/henricavalcante
  • 3.
    The Internet ofThings (IoT) is the network of physical objects or "things" embedded with electronics, software, sensors, and network connectivity, which enables these objects to collect and exchange data. IoT
  • 4.
    - Mark Weiser "Ubiquitouscomputing names the third wave in computing, just now beginning. First were mainframes, each shared by lots of people. Now we are in the personal computing era, person and machine staring uneasily at each other across the desktop. Next comes ubiquitous computing, or the age of calm technology, when technology recedes into the background of our lives."
  • 6.
    Use cases nowadays(2016) ● Robotics - Military forces ● Healthcare - cardiac monitor - smart watches ● Domotic - Home Automation ● Smart Transportation - Parkings - Transit flow ● Logistics - Warehouses ● Surveillance - Security Systems ● Industrial Control - Industrie 4.0 ● Agriculture - Animal Farming ● Metering systems
  • 7.
  • 8.
    Internet of Things ElectronicsNetworkSoftwareSensors
  • 9.
    Internet of Things ElectronicsNetworkSoftwareSensors Infrared Proximity Motion Compass/Magnetometer Piezo Photoresistor Accelerometer Gyroscope Temperature Barometer Altimeter Hygrometer ∞
  • 10.
    Internet of Things ElectronicsNetworkSoftwareSensors ● Embedded Software ● Tools and Platforms PaaS - [ThingWorx](http://www.thingworx.com/) - [Carriots](https://www.carriots.com/) - [AWS IoT Platform](https://aws.amazon.com/iot/) Open-source - [Node-Red](http://nodered.org/) - [KeeProject](http://www.kaaproject.org/) - [ZettaJS](http://www.zettajs.org/)
  • 11.
    Internet of Things ElectronicsNetworkSoftwareSensors MQTT - a protocol for collecting device data and communicating it to servers (D2S). XMPP - a protocol best for connecting devices to people, a special case of the D2S pattern, since people are connected to the servers. DDS - a fast bus for integrating intelligent machines (D2D). AMQP - a queuing system designed to connect servers to each other (S2S). Standard IEEE 802.15.4 Bluetooth WiFi Frequency 868/915 MHZ, 2.4 GHZ 2.4 GHz 2.4, 5.8 Ghz Data rate 250 Kpbs 723 Kpbs 11 to 105 Mpbs Range 10 to 300 m 10 m 10 to 100 m Power Very Low Low High Battery Operation Alkaline (months to years) Rechargeable (days/weeks) Rechargeable (hours)
  • 12.
    Security Network Layer -Using a physically secure network or VPN as foundation for any communication between clients and broker is one way to provide a secure and trustworthy connection. This would be suitable for gateway applications, where the gateway is connected to devices on the one hand and with the broker over VPN on the other side. Transport Layer - When the goal is to provide confidentiality in most cases TLS/SSL is being used for transport encryption. It provides a secure and proven way to make sure nobody can read along and even authenticate both sides, when using client certification authentication. Application Layer - On the transport level it can be ensured that the communication is encrypted and the identity is authenticated. The MQTT protocol provides a client identifier and username/password credentials.
  • 13.
    Firmata Firmata is aprotocol for communicating with microcontrollers from software on a computer (or smartphone/tablet, etc). The protocol can be implemented in firmware on any microcontroller architecture as well as software on any computer software package (see list of client libraries below). Flash your Arduino with Standard Firmata: ● Connect the Arduino to your PC using the USB Cable ● Open the Arduino IDE, select: File > Examples > Firmata > StandardFirmata ● Click the "Upload" button. ● The text "Done Uploading" will appear once the upload is complete.
  • 14.
    Johnny-Five Johnny-Five is theoriginal JavaScript Robotics programming framework. Released by Bocoup in 2012, Johnny-Five is maintained by a community of passionate software developers and hardware engineers. Over 75 developers have made contributions towards building a robust, extensible and composable ecosystem. const five = require('johnny-five'); const board = new five.Board(); board.on('ready', () => { const led = new five.Led(13); led.blink(500); });
  • 15.
  • 16.
    Node-Red Node-RED is anenvironment built in NodeJS for wiring together hardware devices, APIs and online services in new and interesting ways. $ sudo npm i -g node-red $ cd ~/.node_red $ npm i node-red-node-arduino $ npm i node-red-node-mongodb $ node-red
  • 17.
  • 18.