41
Internet Of Things 101 Kashif Ali Siddiqui Oct 2016

Internet of Things 101 - For software engineers

Embed Size (px)

Citation preview

Page 1: Internet of Things 101 - For software engineers

Internet Of Things 101

Kashif Ali Siddiqui

Oct 2016

Page 2: Internet of Things 101 - For software engineers

Some 15 years ago …

Someone

• creates a website

• with a live camera feed

• with camera attached to a robotic arm

• and users on the website can control the robotic arm movement, and camera zoom

We also saw a “kool” (at that time) project, when enthusiast

• creates a websites

• attached to electronic switches that

• can switch on/off his room’s lighting and other electrical appliances

• and users on the website can turn lights on and off and see it live on the website

It was seem like an amazing concept of remote control, at that time …

2

Page 3: Internet of Things 101 - For software engineers

BEFORE

There were challenges due to lack of

affordable hardware, low-powered processors, microcontrollers, radios,

devices, communication modules,

standards, software, infrastructure, vendor support, etc etc

NOW

There aren’t any

3

Page 4: Internet of Things 101 - For software engineers

Enter a new concept of networking

Internet of Thingsor simply

IoT

4

Page 5: Internet of Things 101 - For software engineers

5

Kevin Ashton (British entrepreneur)

Page 6: Internet of Things 101 - For software engineers

A system that interconnects devices, and their users

Efficiently*,

anywhere in the world**

* means, it will take less communication, computation cost, and requires less user intervention, using automation when it makes sense.

** means, it will make the devices available directly in the private networks, or securely over the Internet.

6

Page 7: Internet of Things 101 - For software engineers

It is a concept, a new buzzword

Product, technology, standard, protocol, hardware, software

Rather …

IoT = [Hardware, Networking, Protocols, Standards, Software]

IoT = { collection of products (both hardware, and software) }

Its applications are numerous, widely used in

Smart Homes, Smart Buildings, Smart Cars, Smart Kitchen,

Manufacturing Automation, Healtcare & Fitness Tracking, etc.

It is a system that comprises of

Smart devices, smart controllers/hubs, Internet based service infrastructure,

and plethora of software systems

7

Page 8: Internet of Things 101 - For software engineers

IoT Enablers …• Hardware• Cheap, low powered processors / CPUs / SoCs, comm. Processors, memory modules, SSDs• Cheap SoCs from MediaTek, NVidia, AMD, Intel, etc.

• Low powered radios

• Cheap, low powered, and small form factor motherboards• Such as Raspberry Pi, Arduino, Freescale, etc.

• Cheap sensors

• Cheap actuators

• Communication / Networking• Ranged, low powered, adequate bandwidth networking layer 1 protocols• Z-Waves, ZigBee, Wi-Fi 802.11, LR-WPAN 802.15.4, 6LoWPAN, BLE, Bluetooth Smart, DASH7, Wireless M-Bus, ANT, ISA 100,

Wireless HART, Ethernet

• Fast, fault resilient application protocol• HTTP (s), MQTT, COAP

8

Page 9: Internet of Things 101 - For software engineers

(cont.) IoT Enablers …• Cloud Infrastructure • Cheap, scalable processing

• Scalable, high access database systems

• Programming• Familiar, easy languages

• Familiar, easy frameworks

9

Page 10: Internet of Things 101 - For software engineers

Ho

w It

Wo

rks

?

10

Page 11: Internet of Things 101 - For software engineers

What are the IoT Products?They are usually

◦ Smart devices

◦ Smart controllers / hubs

◦ Internet based IoT access services

◦ Workflow orchestration platform

◦ Task automation services

◦ Notification services

◦ Etc.

IoT Service Providers

11

Page 12: Internet of Things 101 - For software engineers

What devices are available?

12

Page 13: Internet of Things 101 - For software engineers

(cont.) What devices are available?Sophistication Simple switches, bulbs E.g. Wemo switches, Philips Hue Bulbs

Highly complex cars, refrigerators E.g. BMW cars, Mercedes car, Samsung refrigerators, Hitachi refrigerators

Compliance Services APIs

Standards Communication / networking protocols

Major vendors / manufacturers Samsung, Philips, Hitachi, Nest, Logitech, etc

13

Page 14: Internet of Things 101 - For software engineers

What is a controller?

A communication (often service specific) independent module

Aggregates data from device

Communicates either to the user’s client, or IoT service

Identifies and manage devices

Examples Samsung Smart Hub

WigWag Relay

Logitech Harmony Home

VeraLite

14

Page 15: Internet of Things 101 - For software engineers

Software in IoT …

Operating Systems

Frameworks / Libraries / Tools

Database Systems

Standalone Software

15

Page 16: Internet of Things 101 - For software engineers

• Inside smart devices• From OSes to sensor/actuator management software

• Inside smart controllers • Operating system usually Linux, with device drivers for all the support smart devices

• IoT softwares for devices management, small automations, and communications

• On device storage, and database systems

• Inside IoT Service Providers• Efficient service interfaces

• Efficient server pushes, notification protocol implementations

• Message queues, data pipelining

• Database system for big data

• Data mining, and data analysis systems

• Workflow orchestration, and execution services

• Inside user side clients• Native mobile apps

• Web apps

• Wearable apps

• Health/Fitness tracking apps

16

Page 17: Internet of Things 101 - For software engineers

Operating Systems …A small factor OS that can power a smart devices, and controllers. It must have the luxuries of customization, yet have the minimalistic modular design to small footprint.

o Fuchsiao Powered by Googleo Still in its infancy stageo Is expected to power IoT products, wearables, smart

phones, laptops, computers, etc … o Project @ https://fuchsia.googlesource.com,

https://github.com/fuchsia-mirror

o RIOT OSo https://riot-os.org/o Free & open source

o Contikio http://www.contiki-os.org/o Free & open source

o mbed OSo Powered by ARMmbedo https://www.mbed.com/en/platform/mbed-os/o Free & open source

o WindRiver VxWorkso Powered by Windo http://windriver.com/products/vxworks/#VxWorkso Proprietaryo RTOS, Real time operating system

o Brilloo Powered by Google, based on Androido https://developers.google.com/brillo/o Free

17

Page 18: Internet of Things 101 - For software engineers

o Linux based distribution

o Microsoft Windows 10 for IoTo https://www.microsoft.com/en-us/WindowsForBusiness/windows-ioto In the oven, still baking …

o TinyOSo http://www.tinyos.net/o Free & open source

o Nucleus RTOSo Powered by MentorGraphicso https://www.mentor.com/embedded-software/nucleus/o Propriataryo RTOS, real time operating systems

o FreeRTOSo http://www.freertos.org/o Free & open source

18

Page 19: Internet of Things 101 - For software engineers

Frameworks / Libraries / Tools …Collection of software modules that provides function support from device management, communication, orchestrations, to workflow management.

o Johnny Fiveo http://johnny-five.io/

o JavaScript based framework for the hardware platforms from various vendors such as Arduino, Raspberry Pi, Spider, Sparkfun, Particle, Intel, etc

o Helps in developing custom device management code that will execute directly on the hardware platform, just using JavaScript language and SDK.

o Carriotso https://www.carriots.com/what-is-carriots

o An online platform that provides interface services, device storage, and other custom workflow development services.

o Crossbar.ioo http://crossbar.io/

o An online service for workflow orchestration, and workflow creation.

o It integrates disparate services, devices, interfaces into one big workflow.

19

Page 20: Internet of Things 101 - For software engineers

o Jeto http://jetbus.io/index.htmlo It is a lightweight, realtime message bus for the web.

o SocketClustero http://socketcluster.ioo Opensource framework for Node.js.o It provides scalable raw socket interface for large number of clients.

o ARMmbed Toolso https://www.mbed.com/en/platform/tools/o It offers online development IDE with full SDK to develop IoT applications for its OS.

o IoT Toolkito http://iot-toolkit.com/o It provides set of tools for building multi-protocol IoT gateways and service gateways that enable

horizontal co-operation between multiple different protocols and cloud services.o It is opensource.

20

Page 21: Internet of Things 101 - For software engineers

o AllSeen Alliance (AllJoyn) o https://allseenalliance.org/o Its managed as a Linux Foundation Projects.o Its an opensource framework defines a common way for devices and apps to communicate with one

another regardless of brands, categories, transports, and OSes.

o Dweet and Freeboard o Powered by Bugs Lab & open sourcedo http://buglabs.net/o Bug Labs offers a “dweet” messaging and alerts platform and a “freeboard” IoT design app.

o DeviceHiveo http://devicehive.com/o Open Source IoT Data Platform with the wide range of device integration options.

o DSAo http://www.iot-dsa.org/o Distributed Services Architecture facilitates decentralized device inter-communication, logic,

and applications.

21

Page 22: Internet of Things 101 - For software engineers

Database systems …Database systems that provide both scalable read and write access with support of big data.

o MemSQLo http://www.memsql.com/

o It is a in-memory database for fast data access.

o It is proprietary.

o RockDBo Powered by Facebook

o http://rocksdb.org/

o A persistent key-value NoSQL database system.

o Crate.ioo https://crate.io/overview

o It is a opensource distributed database.

o CockroachDBo https://www.cockroachlabs.com/

o It is a opensource distributed database.

22

Page 23: Internet of Things 101 - For software engineers

Software Systems …o OpenHAB

o http://www.openhab.org/

o A vendor and technology agnostic open source automation software for the home.

o It is open source.

o OpenIOTo EU funded project

o https://github.com/OpenIotOrg/openiot

o A middleware infrastructure supporting flexible configuration and deployment of algorithms for collection, and filtering information streams stemming from the internet-connected objects, while at the same time generating and processing important business/applications events..

o OpenRemoteo http://www.openremote.org/display/HOME/OpenRemote

o It is a is software integration platform for residential and commercial building automation..

o Home Assistanto https://home-assistant.io/

o It is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control. Installation in less than a minute.

23

Page 24: Internet of Things 101 - For software engineers

IoTService Providers

Major Corporates behind IoT

SmartThings

Nest

HomeKit

Watson IoT

Other Contributors

24

Page 25: Internet of Things 101 - For software engineers

Major Corporates Behind IoTo Samsungo SmartThingso https://www.smartthings.com/

o Provides

o Smart devices

o Controller

o Internet based services

o Custom application development

o Cloud infrastructure for custom applications

o Googleo Nesto https://nest.com/

o Provides

o Smart Thermostat

o Internet based services

o Backend infrastructure

o Developer APIs

o Appleo HomeKito http://www.apple.com/ios/home/

o https://developer.apple.com/homekit/

o Provides

o Internet based services

o Mobile device framework

o Backend infrastructure

o IBMo Watson IoTo http://www.ibm.com/internet-of-things/iot-solutions/watson-iot-

platform/

o Provides

o Internet based services

o Backend infrastructure

o Developer APIs

o Data analytics & information management

o Various dashboards for data, info, knowledge, trends, etc

25

Page 26: Internet of Things 101 - For software engineers

SmartThingsConsumer End …

• User installs smart devices either from Samsung or from other vendors

• User installs the smart controller in the building

• User installs the SmartThing mobile app

• User creates its SmartThing account

• User creates locations where it have the smart devices

• User adds smart controller to its account• This will make all the visible smart devices to the user client

• User distributes smart devices in rooms, and create modes

• User configures triggers

• User can install 3rd party SmartThings apps to its location• The 3rd party apps then bring various automations to the user location only using the authorized devices

26

Page 27: Internet of Things 101 - For software engineers

• The developer creates a SmartThing developer account

• The developer using the SmartThing online IDE, creates and registers the apps

• The app can only be programmed in Groovy language as scripts

• These apps are published on the SmartThing apps store for the SmartThing consumers

• When these apps are installed they are deployed on the installer user’s location, and are usually run on the SmartThing cloud

• The developer explicitly mentioned the device types that are required by his app

• The required devices are authorized by the installing user during app installation

• The app with the authorized devices can • Perform actions such as turning on a light bulb

• Register for a device event such as subscribing for the event when a motion is detected by the motion sensor

•Besides that, the app can • Executes any user created triggers

• Change its location modes, and other status parameters

• Notify the user for certain events either as push notification, SMS, or email

27

(cont.) SmartThingsDeveloper End …

Page 28: Internet of Things 101 - For software engineers

NestConsumer End …

• User installs the Nest Thermostat

• User configures the thermostat device, and his home Internet available to the device

• User installs the Nest Thermostat mobile app

• User creates his Nest account

• User connects the thermostat device with his account

• User install other Nest compliant devices (with Works with Nest logo) in his location, and they become available in his account

• The mobile app provides all the configuration, and management options

• The thermostat being a smart device, also act as a smart controller for the Nest service

28

Page 29: Internet of Things 101 - For software engineers

• The developer creates a Nest developer account

• The developer creates a new app project, and register it

• The developer creates the his app in any other language, platform of his liking

• In the app, he will use the Nest project credentials to identify his self

• The app must have a mechanism to take the user to the Nest portal for the pincode

• The pincode along with the project credentials will allow the developer to consume Nest webservices API

• Through the APIs, the app can access the consumer devices and can• perform actions, and

• listen for events

29

(cont.) NestDeveloper End …

Page 30: Internet of Things 101 - For software engineers

HomeKitConsumer End …

• The user must own a iOS device like iPhone, iPad or iPod touch with atleast iOSv8

• The user must own MFI certified smart device, or have a MFI certified hub

• The user can then install the smart device companion apps from the AppStore

• The user then using the companion apps can control and manage its devices

• The user can use Apple’s own Home app and Siri interface to unify the controls for various smart devices

Manufacturer End …

• The developer must join Apple's Made for iPhone (MFI) certification program and submit its plans, prototypes, etc

• Apple will check the APIs, then ensure the third-party app meets the App Store's requirements, and finally, approve or deny the accessory for production

Developer End …

• The developer being a registered iOS developer, will create a iOS app using HomeKit mobile framework, and do the submission for the Appstore

30

Page 31: Internet of Things 101 - For software engineers

Watson IoT• Provide data analysis services to the developers

• The developer can choose to directly send IoT data from smart devices or from their backend servers

• The infrastructure provide storage for big data

• The developer and its users can use the information dashboard to • Get know trends

• Manage risks

• Manage devices

• Get know various optimizations

• Get know what they can automate

31

Page 32: Internet of Things 101 - For software engineers

Other contributors …• Wink• http://www.wink.com/

• Provides• Smart controllers

• Mobile apps

• IFTTT (If This Than That)• https://ifttt.com/

• Late comers in IoT

• Provides• Online workflow management

• Direct automation of some devices from BMW cars to lightbulbs

• Integration with other IoT service providers such as SmartThings

• Flow• Powered by Microsoft

• https://flow.microsoft.com/en-us/

• A connection between IoT and MS Enterprise systems

• Similar to IFTTT

• Provides• Task automation

• Workflow management

32

Page 33: Internet of Things 101 - For software engineers

In the End …

What are the challenges? Security Issues

Some examples

Some exciting products

Internet of Useless Things (IoUT)

33

Page 34: Internet of Things 101 - For software engineers

What are the current challenges?Sensing a complex environment Innovative ways to sense and deliver information from the physical world to the cloud

Connectivity Variety of wired and wireless connectivity standards are required to enable different application needs

Power is critical Many IoT applications need to run for years over batteries and reduce the overall energy consumption

Security is vital Protecting users' privacy and manufacturers' IP; detecting and blocking malicious activity

Support for Update, and Maintenance The IoT must be built with maintenance and updates in mind, with plan and support for backward compatibility

34

Page 35: Internet of Things 101 - For software engineers

(cont.) What are the current challenges?… Security concerns are high …Issues in cloud services Lack of proper access control of user’s data to third party processes

Low security on data access

Issues in devices Lack of breach detection and alerting

Lack of security for data and storage within device

Lack of security for data within communication

Lack of authentication

Weakness in standards Lack of standardization for security services more concerns on data rates and low power communication

Lack of standard infrastructure and mechanism for IoT

35

Page 36: Internet of Things 101 - For software engineers

(cont.) What are the current challenges?… Security concerns are high …Flawed services implementation Lacking in access control and authorization to 3rd party apps and services Low protection of user data, account, profiles, devices Low security on service layers

Examples Bad authorization implementation for 3rd party apps at SmartThings http://www.newsfactor.com/story.xhtml?story_id=0030003Q52H0

No protection of sensitive data between device and controller/IoT service http://www.networkworld.com/article/3064296/security/researchers-take-aim-at-smartthings-security-develop-4-proof-of-concept-

attacks.html

Remote car hack while the car was still on the move http://ww.theregister.co.uk/2016/09/20/tesla_model_s_hijacked_remotely/

Others …

36

Page 37: Internet of Things 101 - For software engineers

(cont.) What are the current challenges?… Security concerns are high … IoT as a Assistant in Hacking … DDOS attack using smart devices on KrebsOnSecurity First massive DDoS attack of over 6Gbps that happened 2/3 weeks back on one of its under protected website of KrebsOnSecurity.

This is the first ever attack not with huge traffic ever recorded, but it was first of a kind that engaged more than 145 thousand various IoT devices (mostly IP cameras, DVRs) from various homes across the world mostly located in Europe, Middle east, and Africa.

The actual hacker planted bots into these IoT devices (as because the devices' own security was quite week, or the user credentials were quite simple to guess).

Thus these bots on a given fixed time, launched the first ever DDoS attack, and it was so huge and massive that the Akamai has to take off the website from the Internet as they were not able to stop/contain it.

Akamai released the details

Details : http://news.softpedia.com/news/source-code-of-ddos-botnet-that-attacked-krebs-released-by-its-author-508864.shtml

37

Page 38: Internet of Things 101 - For software engineers

Some exciting products• HAPIfork

• http://www.hapi.com/products-hapifork.asp

• Smart Tooth Bursh• http://www.beamtoothbrush.com/toothbrush/

• Smart Egg Tray • http://www.quirky.com/shop/619

• Glucose Monitoring • http://www.telcare.com/

• Hydroponic System • http://getniwa.com/

• Smart Sprinkler Control • http://lono.io/

• Smart Home Security • http://canary.is/

• Smart Blood Pressure Monitor • http://www.withings.com/us/blood-pressure-monitor.html

• Smart Slow Cooker • http://www.belkin.com/us/Products/home-automation/c/wemo-home-automation/

• Smart Bike • http://www.vanhawks.com/

• Smart Garbage Cans • http://www.bigbelly.com/solutions/stations/smartbelly/

• Petnet• http://www.petnet.io/

• Smart Gardening • http://www.bitponics.com/

• Smart Doorlock• http://www.geniesmartlock.com/index.php

• Smart Shirt • http://omsignal.com/

• Smart Lighting • http://meethue.com/

38

Page 39: Internet of Things 101 - For software engineers

IoUT: Internet of Useless ThingsSmart things doing dumb stuff …

• Ludela• The world first smart candle• https://ludela.com/• Costs $140; Preorder $100

• FitSpoon• A connected spoon that tracks your eating speed and compares with others via a cloud database

• BeatTweeter• The BeatTweeter will only Tweet when it detects no heart beat.

• Internet of Toilet

-- And there are ton of others …

39

Page 40: Internet of Things 101 - For software engineers

Useful Links …

Wikipedia - https://en.wikipedia.org/wiki/Internet_of_things

IoT Councile - http://www.theinternetofthings.eu/

IoUT - http://www.internetofuselessthings.io/

Samsung SmartThings - https://www.smartthings.com/

Google Nest – https://nest.com/

Apple HomeKit - http://www.apple.com/ios/home/

IBM Watson - http://www.ibm.com/internet-of-things/

Wink - http://www.wink.com/

Hackster.io - https://www.hackster.io/projects/tags/internet+of+things

IoT Projects - https://www.postscapes.com/projects/

IoT Ecilpse - http://iot.eclipse.org/projects

Nevonprojects - http://nevonprojects.com/iot-projects/

IoT Software - https://www.linux.com/news/21-open-source-projects-iot

Postscapes - http://www.postscapes.com/internet-of-things-software-guide/

40

Page 41: Internet of Things 101 - For software engineers

The End

• This presentation content • will start to degrade in 5 months time

• will expire in 12 months time

41

Q & A