iot sensor sensibility - hull digital - c4di - feb 2016

40
IoT – Sensor Sensibility Hull Digital – 11 th February 2016 Glynn Bird, Developer Advocate, IBM @glynn_bird

Upload: glynn-bird

Post on 19-Jan-2017

758 views

Category:

Devices & Hardware


1 download

TRANSCRIPT

IoT – Sensor SensibilityHull Digital – 11th February 2016

Glynn Bird, Developer Advocate, IBM

@glynn_bird

Introduction

@glynn_bird [email protected]

Glynn BirdDeveloper AdvocateIBM Cloudant

http://www.glynnbird.com

IoT = Internet of Things

Internet of Things Installed Base Will Grow to 26 Billion Units By 2020

Gartner 2013http://www.gartner.com/newsroom/id/2636073

Investment

http://iot-analytics.com/top-20-iot-companies-q2-2015/

Applications

http://www.theglobeandmail.com/report-on-business/rob-magazine/the-future-is-smart/article24586994/

Is this IoT?

Gas Meter

http://www.theguardian.com/money/2013/dec/29/why-cant-submit-meter-readings-npower-website

Energy Monitor

http://www.britishgas.co.uk/content/dam/british-gas/documents/Electricity-monitor.pdf

RunKeeper

http://runkeeper.com/

Nest

https://nest.com/uk/thermostat/meet-nest-thermostat/

Hue

http://www2.meethue.com/en-gb/what-is-hue/the-system/

Smart TVs

http://www.samsung.com/uk/consumer/tv-audio-video/televisions/suhd-nano-crystal-tvs/UE88JS9500TXXU

Defining IoTsensor(s)/actuator(s)internet connectiona means of consuming the data(optional) a means of feedback(optional) composability

Power consumption

MQTT

What is MQTT?• Message Queue Telemetry Transport• design for small code footprint and

minimum bandwidth• invented by IBM in 1999• pubsub protocol

Publish/Subscribe

MQTTPubSub Broker

Publisher

Publisher

Publisher

/glynn/temperature/room1

/glynn/temperature/room2

/glynn/humidity

/glynn/temperature/*Subscriber

MQTT brokers• http://mosquitto.org/ • https://opensensors.io/• http://www-03.ibm.com/software/products/e

n/internet-of-things-foundation

MQTT Demo

Feedback loop

MQTTPubSub Broker

Publisher

Subscriber

/glynn/temperature/room1

/glynn/feedback/*

/glynn/temperature/*Subscriber

/glynn/feedback/heat-onPublisher

Node-RED● Node.js Web App● Visual programming● Combine device data and

web services● Free

Node-RED Demo

Alternative to MQTT• Offline-first storage• Sync to cloud when possible• Ideal of partially connected sensors e.g.

transportation, health care, agriculture, logistics.

Write to CouchDB

DS18B20

sensorid=`find /sys/bus/w1/devices/* -type l | grep -o '[0-9]*-.*$' | head -n 1`filename="/sys/bus/w1/devices/$sensorid/w1_slave"T=`tail -n 1 "$filename" | grep -o "[0-9]*$"`t=${T:0:2}.${T:2:3}unix=`date "+%s"`d=`date "+%Y-%m-%d %H:%M:%S %Z"`json="{ \"ts\": $unix, \"date\": \"$d\", \"temperature\": $t, \"sensor_id\": \"$sensorid\" }"curl -X POST -H "Content-Type: application/json" -d "$json" "http://localhost:5984/logger/"

Sync• Replicate to

Cloudant

• Scale by adding more sensors

• Data collection can be offline

• Sync when connected

IBM Cloudant

Cloudant

Indexed JSON

Storage

Geo-Load Balancing

App Layer / Browser / Mobile App

Physical Storage @ IBM SoftLayer, Rackspace, Microsoft Azure, AWS

Cloudant JSON API

JSON CRUD

Multi- Master

Replication

Device Sync

Lucene Search

2D, 3D Geospatial

Incremental MapReduce Monitoring Security

IO

Control

REST (HTTPS)

www.glynnbird.com• My home page

• Cloudant database of articles

• Replicated to PouchDB

• Appcache for offline first

http://www.glynnbird.com/

28

Volt• Password vault in a Chrome

extension

• Data stored in encrypted in PouchDB

• Optional back to CouchDB/Cloudant

https://github.com/glynnbird/volt

29

IoT Hardware

Smartphone

720p displayGPSWifiOrientationSpeakerMicrophoneCamera

£100 - £800

ARM mbed IoT Starter Kit

orientationpressurehumiditytemperaturejoystickLCD screenbuzzer

£95

ARM mbed demo

Raspberry Pi 2

http://www.cnet.com/products/raspberry-pi-model-b-plus/

• audio out• GPIO• I2C• HDMI• USB x 4

£40

Raspberry Pi Sense Hat• orientation• pressure• humidity• temperature• joystick• LED array

£30

TI SensorTag• orientation• pressure• humidity• temperature• magnet• microphone• buzzer

£22

Raspberry Pi Zero

https://cdn.shopify.com/s/files/1/0176/3274/products/101912_3_1024x1024.jpg

• GPIO• HDMI• USB x 1

£4.20

ESP8266GPIO

£5

http://esp8266.co.uk/shop/esp-03

Summary• IoT is receiving lots of investment• It's inexpensive to get started• No soldering required!• Send data to a broker via MQTT• Or, buffer data locally and replicate with

CouchDB & Cloudant

Glynn BirdDeveloper Advocate, Cloud Data [email protected]@glynn_bird @IBMCloudant github.com/glynnbirdwww.glynnbird.com