Westminster Impact Hub
London, UK. 29/5/2015
Hack Risk Allianz
Hackathon
Getting started with the
Internet of Things
Tom Collins
@snillocmot
What is IoT?
An extension of the traditional web
providing intelligent features
through embedded computing,
which allows dumb objects
to autonomously react, inform and learn
from the context of Humans and Things
How is IoT?
The convergence of
cheaper and accessible
cloud, network and processing power,
with smaller and smarter computers
and a variety of hardware I/O sources
Where is IoT?
Where is IoT?
Where is IoT?
By 2020...
$7.1 trillion market value
50 billion connected devices
30 million every day
1 in 3 ‘knowledge workers’ will be
replaced by a digital workforce and smart machines
Why IoT?
To improve quality of life and drive new business
through connecting physical, cyber and social domains
Getting Started with the Internet of Things  - Allianz Hackrisk Hackathon 29/5/15 #IoT
Connected devices
Problems
Millions of apps
Still stuck in remote control mode
Siloed solutions (An API doesn’t make it IoT)
Big innovation captures the consumers eye,
but not enough immediate ROI for business
to adopt
SmartLiving
IoT Starter Kit
A Computer (Arduino Ethernet, Intel
Edison or Raspberry PI) & Grove shield
A bunch of sensors and actuators
● Button
● Blue LED (5mm)
● Rotary Angle Sensor (P)
● Light Sensor (P)
● Vibration Motor
● Temperature Sensor
● Infrared receiver
● Infrared emitter
● LED Bar
● PIR Motion sensor
Check out the kits at
http://www.smartliving.io/kits
Examples
TCP/IP, MQTT, IPv6,
CoAP, REST, XBEE,
ZigBee, ZWave, Serial,
custom radios, IPoAC, etc
CONNECTIVITY
Landscape
END POINTS
aka Things
MIDDLEWARE
router
gateways
fog services
cloud bridges
brokers
Examples
OpenHAB,
TheThingSystem, ZIPR,
Dowse, Ponte,
WebSphere, RabbitMQ,
Dweet
IOT SERVICES
SmartLiving
IFTTT
Xively
TempoIQ
InitialState
Waylay.io
Millions of other
single use services...
Examples
Persistence, (E.g TempoIQ),
automation (E.g IFTTT),
intelligence, third party
integrators (ERP
connectors)
APPS
Companion apps
Widgiots
Freeboard
Node red
Wyliodrin
Examples
WidgIoTs, SmartLiving
Web & Mobile Apps,
Freeboard
Custom RF
END POINTS
aka Things
CONNECTIVITY MIDDLEWARE IOT SERVICES APPS
LED
POT
Arduino DBBroker Manage
Widget
Rules
Blinking IoT Led
Trusty
Ethernet cable
Potentiometer Sensor Code
Device.Send(String(potRead), pot); //Reads and
sends pot
LED Actuator code
if (command == "false") {
digitalWrite(led, LOW); //Turns LED off
} else if (command == "true") {
digitalWrite(led, HIGH); //Turns LED on
}
SmartLiving API’s
httpServer = "api.smartliving.io";
mqttServer = "broker.smartliving.io";
Automation Rule
When
Arduino.pot > 500
Then
Arduino.led = true
Else
Arduino.led = false
SmartLiving Toolbox
END POINTS CONNECTIVITY MIDDLEWARE IOT SERVICES APPS
Arduino
Raspberr
y Pi
Android
Makers
App
Virtual
actuator
Virtual
sensors
iOS App
Web app Widgets
ZWave
Devices
SolutionsDevTools
C Lib
Android
Gateway
Arduino
Gateway
PUBSUB
Clients
REST
Clients
Raspberry
Pi Makers
Gateway
Management
Telemetry DB
Rule Engine
Automation
Scripting
Rule
Wizard
SERIALTCP/IP
ZWAVE
XBEE
Python
Lib
JS
Lib
Widget
Lib
Node.js
Lib
Go
Lib
433 Mhz
IR!!?
Polymer
Widgets
Web
Services
ZigBee
Custom
microco
ntrollers
Java
Lib
Plenty of
existing
resources
here
SmartLiving
pub:sub
Broker
ZWave
IPv6
Gateway
Library & API’S
Endpoints (Hardware and libs)
Arduino/C
Python
Node.js
C#
Javascript (HTML5-browser-as-a-sensor)
Middleware
Python Gateway
C++ Gateway
XBee Gateway
IOT Services
REST API - Gateway, Device, Asset, Rules,
Users
Telemetry API - Sensor data, actuator
commands
Automation rules, scripting & API
Apps
Javascript Widgets
Arduino - setup
void setup()
{
pinMode(ledPin, OUTPUT); // initialize the digital pin as an output.
Serial.begin(9600); // init serial link for debugging
byte mac[] = {0x90, 0xA2, 0xDA, 0x0D, 0xE1, 0x3E}; // Adapt to your Arduino MAC Address
if (Ethernet.begin(mac) == 0) // Initialize the Ethernet connection:
{
Serial.println(F("DHCP failed,end"));
while(true); //we failed to connect, halt execution here.
}
delay(1000); //give the Ethernet shield a second to initialize:
if(Device.Connect(&ethClient, httpServer)) //connect the device with the IOT platform.
{
Device.AddAsset(knobPin, "Potentiometer", "A rotary sensor pot",false, "int"); //pin, name, desc, assetType, dataPro
Device.AddAsset(ledPin, "LED", "A blinky light emitting diode", true, "bool"); //pin, name, desc, assetType, dataPro
Device.Subscribe(pubSub);
}
}
Arduino - sensor read loop
void loop()
{
unsigned long curTime = millis();
if (curTime > (time + 1000)) // publish light reading every 5 seconds to sensor 1
{
unsigned int lightRead = analogRead(knobPin); // read from light sensor (photocell)
if(prevVal != lightRead){
Device.Send(String(lightRead), knobPin);
prevVal = lightRead;
}
time = curTime;
}
Device.Process();
}
Arduino - actuator callback
void callback(char* topic, byte* payload, unsigned int length)
{
String msgString;
{
char message_buff[length + 1];
strncpy(message_buff, (char*)payload, length);
message_buff[length] = '0';
msgString = String(message_buff);
}
int* idOut = NULL;
{
int pinNr = Device.GetPinNr(topic, strlen(topic)); //Find what topic hooks to the pin
if (pinNr == ledPin)
{
if (msgString == "false") {
digitalWrite(ledPin, LOW); //led off
idOut = &ledPin;
}
else if (msgString == "true") {
digitalWrite(ledPin, HIGH); //led on
idOut = &ledPin;
}
}
}
Device.Send(msgString, *idOut); //Acknowledges the LED was activated and confirm in the user interface
}
Python Pi - Summary
IOT.connect()
IOT.addAsset(knobPin, sensorName, "Push button", False, "int")
IOT.addAsset(ledPin, actuatorName, "Light Emitting Diode", True, "bool")
IOT.subscribe()
while True:
try:
if grovepi.digitalRead(sensorPin) == 1:
if sensorPrev == False:
IOT.send("true", sensorPin)
sensorPrev = True
elif sensorPrev == True:
IOT.send("false", sensorPin)
sensorPrev = False
sleep(.3)
Node.js - Summary
var a0 = new mraa.Aio(0); //setup access analog input Analog pin #0 (A0)
var d8 = new mraa.Gpio(8); //LED hooked up to digital pin 13 (or built in pin on Galileo Gen1 & Gen2)
d8.dir(mraa.DIR_OUT); //set the gpio direction to output
smartliving.addAsset("2", "Missile launcher", "Fires 10xD missiles at incoming spacecraft, and also a neat LED for some visual feedback...", true, "bool", confirmEnroll());
smartliving.addAsset("3", "Thermoreactor turbine temperature ", "Monitors the temperature of main alpha turbine", false, "int", confirmEnroll());
smartliving.subscribe(smartliving.baseMQTTUrl, 1883);
vloop();
function vloop()
{
var analogValue = a0.read(); //read the value of the analog pin
smartliving.send(analogValue, "3")
setTimeout(vloop,1000);
}
smartliving.registerActuatorCallback("2", function() {
d8.write(ledState?1:0); //if ledState is true then write a '1' (high) otherwise write a '0' (low)
ledState = !ledState; //invert the ledState
});
Rules
FYI
● Rule wizard doesn’t support complex operators like &&, ||
● Create a script and run it in the cloud if you need crazy logic
Hackathon Ethos
Fake it, until you make it
(literally)
Hackathons always have
network issues
Hardware is normally limited or
even shared
Mock data is easy
Things always go wrong
Fancy UI elements always look
good
KISS, Hardware is Hard, Retrofit
● Nest is just a potentiometer,
temp, PIR sensor
● GNL is just a LED & Push
Button
● Hue is just a RGB
● Wemo is just a Relay
MVP Mentality
Build small think big (What’s the
story behind your use case)
High impact features first
Brainstorming IoT
The problem - Short sharp
sentence describing the story of
your problem and how the solution
solves it
Topology diagram - Visualise what
you’re going to build, show the
inputs and outputs and use it to
explain your idea
THINGS - What are the dumb objects?
END POINTS - What computers and sensors are need
to make things smarter?
DATA MODEL - What type of data will the Things
produce? What are the inputs/outputs?
MIDDLEWARE - How will devices communicate? one-
one, one-many?
AUTOMATION - When this event happens then do
this event?
UI - Mockups and wireframes
HUMANS - Who are the most important people using
the solution?
Resources
Get your SmartLiving IoT Starter Kit
www.smartliving.io/kits
The platform
beta.smartliving.io
Documentation
http://docs.smartliving.io/Get_Started
GitHub
https://github.com/allthingstalk
API Reference
http://allthingstalk.github.io/api-docs

More Related Content

PDF
The IoT Methodology & An Introduction to the Intel Galileo, Edison and SmartL...
PDF
IoT Methodology - Welcome slides for #iotday IoT Ghent Meetup 090418
PDF
IoT Methodology Co-creation Workshop with Kraak de Krook and Smart City Ghent...
PPTX
IndianaJS - Building spatially aware web sites for the Web of Things
PPTX
A Methodology for Building the Internet of Things
PPTX
IOT - Design Principles of Connected Devices
PDF
Prototyping the Internet of Things
PDF
Foundational Elements for IoT (1)
The IoT Methodology & An Introduction to the Intel Galileo, Edison and SmartL...
IoT Methodology - Welcome slides for #iotday IoT Ghent Meetup 090418
IoT Methodology Co-creation Workshop with Kraak de Krook and Smart City Ghent...
IndianaJS - Building spatially aware web sites for the Web of Things
A Methodology for Building the Internet of Things
IOT - Design Principles of Connected Devices
Prototyping the Internet of Things
Foundational Elements for IoT (1)

What's hot (20)

PPTX
Internet of Things: Trends and challenges for future
PPT
Data Modelling and Knowledge Engineering for the Internet of Things
PPTX
WoT 2016 - Seventh International Workshop on the Web of Things
PDF
Iot–a unique combination of biz ux-tech-sandhi bhide oct29-2014- semi pnw bre...
PDF
Meetup 11 here&now_megatriscomp design methodpartii_v0.2
PDF
Internet of Things: What it is, where it is going and how it is being applied.
PDF
Semantics for the Web of Things
PPTX
IoT Geeks & Internet of Things
PDF
VET4SBO Level 1 module 3 - unit 1 - v1.0 en
PDF
Soldatos io t-academy-cosmote-231117-v-final
PDF
Defining the IoT Stack
PDF
IoT and machine learning - Computational Intelligence conference
PDF
What if Things Start to Think - Artificial Intelligence in IoT
PDF
IOT and Big Data - The Perfect Marriage
PDF
bhide_connected_raleigh2016 (1)
PDF
Meetup 10 here&now: Megatris Comp design method (Part 1)
PPTX
Arpan pal u world2012
PDF
Introduction to IoT Architecture
PDF
Internet das Coisas e o Paradigma Software-Defined Everything (SDE)
Internet of Things: Trends and challenges for future
Data Modelling and Knowledge Engineering for the Internet of Things
WoT 2016 - Seventh International Workshop on the Web of Things
Iot–a unique combination of biz ux-tech-sandhi bhide oct29-2014- semi pnw bre...
Meetup 11 here&now_megatriscomp design methodpartii_v0.2
Internet of Things: What it is, where it is going and how it is being applied.
Semantics for the Web of Things
IoT Geeks & Internet of Things
VET4SBO Level 1 module 3 - unit 1 - v1.0 en
Soldatos io t-academy-cosmote-231117-v-final
Defining the IoT Stack
IoT and machine learning - Computational Intelligence conference
What if Things Start to Think - Artificial Intelligence in IoT
IOT and Big Data - The Perfect Marriage
bhide_connected_raleigh2016 (1)
Meetup 10 here&now: Megatris Comp design method (Part 1)
Arpan pal u world2012
Introduction to IoT Architecture
Internet das Coisas e o Paradigma Software-Defined Everything (SDE)

Similar to Getting Started with the Internet of Things - Allianz Hackrisk Hackathon 29/5/15 #IoT (20)

PDF
IoT_IO1_2 Getting familiar with Hardware - Development Boards.pdf
PPTX
HEART DISEASE PROBLEM CHECKING IN THE SYSTEM USING SOME OPERATINGS
PPTX
Presentation1.pptx
PDF
World of IoT (Internet of Things).
PDF
IOT_Working_computer_science_business_recap
PDF
Pre meetup intel® roadshow london
PDF
OCS352 IOT CONCEPTS AND APPLICATION 5 NOTES.pdf
PDF
OCS352 IOT All application specific and others
PPTX
Technical seminar on it design by varsha
PDF
From the internet of things to the web of things course
PDF
Internet of Things Conference - Bogor city
PPTX
unit-3.pptx
PDF
Venture through Internet of Things
PDF
IoT and connected devices: an overview
PDF
APIs for the physical world
PDF
Developing Hardware: APIs for the physical world
PPTX
iot-component-dimensioning
PDF
YOTG Munich - Simon Mang - SixReasons - Hardware prototyping – Sketching with...
PPTX
IoT on Raspberry PI v1.2
PDF
DIY Technology for the Internet of Things
IoT_IO1_2 Getting familiar with Hardware - Development Boards.pdf
HEART DISEASE PROBLEM CHECKING IN THE SYSTEM USING SOME OPERATINGS
Presentation1.pptx
World of IoT (Internet of Things).
IOT_Working_computer_science_business_recap
Pre meetup intel® roadshow london
OCS352 IOT CONCEPTS AND APPLICATION 5 NOTES.pdf
OCS352 IOT All application specific and others
Technical seminar on it design by varsha
From the internet of things to the web of things course
Internet of Things Conference - Bogor city
unit-3.pptx
Venture through Internet of Things
IoT and connected devices: an overview
APIs for the physical world
Developing Hardware: APIs for the physical world
iot-component-dimensioning
YOTG Munich - Simon Mang - SixReasons - Hardware prototyping – Sketching with...
IoT on Raspberry PI v1.2
DIY Technology for the Internet of Things

Recently uploaded (20)

PPTX
Internet of Everything -Basic concepts details
PDF
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
Introduction to MCP and A2A Protocols: Enabling Agent Communication
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PDF
Electrocardiogram sequences data analytics and classification using unsupervi...
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PDF
Auditboard EB SOX Playbook 2023 edition.
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
SaaS reusability assessment using machine learning techniques
PDF
Ensemble model-based arrhythmia classification with local interpretable model...
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PDF
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
PDF
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
Internet of Everything -Basic concepts details
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
Basics of Cloud Computing - Cloud Ecosystem
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
Build Real-Time ML Apps with Python, Feast & NoSQL
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
Introduction to MCP and A2A Protocols: Enabling Agent Communication
Rapid Prototyping: A lecture on prototyping techniques for interface design
Electrocardiogram sequences data analytics and classification using unsupervi...
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
Auditboard EB SOX Playbook 2023 edition.
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
SaaS reusability assessment using machine learning techniques
Ensemble model-based arrhythmia classification with local interpretable model...
Data Virtualization in Action: Scaling APIs and Apps with FME
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf

Getting Started with the Internet of Things - Allianz Hackrisk Hackathon 29/5/15 #IoT

  • 1. Westminster Impact Hub London, UK. 29/5/2015 Hack Risk Allianz Hackathon Getting started with the Internet of Things Tom Collins @snillocmot
  • 2. What is IoT? An extension of the traditional web providing intelligent features through embedded computing, which allows dumb objects to autonomously react, inform and learn from the context of Humans and Things
  • 3. How is IoT? The convergence of cheaper and accessible cloud, network and processing power, with smaller and smarter computers and a variety of hardware I/O sources
  • 7. By 2020... $7.1 trillion market value 50 billion connected devices 30 million every day 1 in 3 ‘knowledge workers’ will be replaced by a digital workforce and smart machines
  • 8. Why IoT? To improve quality of life and drive new business through connecting physical, cyber and social domains
  • 11. Problems Millions of apps Still stuck in remote control mode Siloed solutions (An API doesn’t make it IoT) Big innovation captures the consumers eye, but not enough immediate ROI for business to adopt
  • 12. SmartLiving IoT Starter Kit A Computer (Arduino Ethernet, Intel Edison or Raspberry PI) & Grove shield A bunch of sensors and actuators ● Button ● Blue LED (5mm) ● Rotary Angle Sensor (P) ● Light Sensor (P) ● Vibration Motor ● Temperature Sensor ● Infrared receiver ● Infrared emitter ● LED Bar ● PIR Motion sensor Check out the kits at http://www.smartliving.io/kits
  • 13. Examples TCP/IP, MQTT, IPv6, CoAP, REST, XBEE, ZigBee, ZWave, Serial, custom radios, IPoAC, etc CONNECTIVITY Landscape END POINTS aka Things MIDDLEWARE router gateways fog services cloud bridges brokers Examples OpenHAB, TheThingSystem, ZIPR, Dowse, Ponte, WebSphere, RabbitMQ, Dweet IOT SERVICES SmartLiving IFTTT Xively TempoIQ InitialState Waylay.io Millions of other single use services... Examples Persistence, (E.g TempoIQ), automation (E.g IFTTT), intelligence, third party integrators (ERP connectors) APPS Companion apps Widgiots Freeboard Node red Wyliodrin Examples WidgIoTs, SmartLiving Web & Mobile Apps, Freeboard Custom RF
  • 14. END POINTS aka Things CONNECTIVITY MIDDLEWARE IOT SERVICES APPS LED POT Arduino DBBroker Manage Widget Rules Blinking IoT Led Trusty Ethernet cable Potentiometer Sensor Code Device.Send(String(potRead), pot); //Reads and sends pot LED Actuator code if (command == "false") { digitalWrite(led, LOW); //Turns LED off } else if (command == "true") { digitalWrite(led, HIGH); //Turns LED on } SmartLiving API’s httpServer = "api.smartliving.io"; mqttServer = "broker.smartliving.io"; Automation Rule When Arduino.pot > 500 Then Arduino.led = true Else Arduino.led = false
  • 15. SmartLiving Toolbox END POINTS CONNECTIVITY MIDDLEWARE IOT SERVICES APPS Arduino Raspberr y Pi Android Makers App Virtual actuator Virtual sensors iOS App Web app Widgets ZWave Devices SolutionsDevTools C Lib Android Gateway Arduino Gateway PUBSUB Clients REST Clients Raspberry Pi Makers Gateway Management Telemetry DB Rule Engine Automation Scripting Rule Wizard SERIALTCP/IP ZWAVE XBEE Python Lib JS Lib Widget Lib Node.js Lib Go Lib 433 Mhz IR!!? Polymer Widgets Web Services ZigBee Custom microco ntrollers Java Lib Plenty of existing resources here SmartLiving pub:sub Broker ZWave IPv6 Gateway
  • 16. Library & API’S Endpoints (Hardware and libs) Arduino/C Python Node.js C# Javascript (HTML5-browser-as-a-sensor) Middleware Python Gateway C++ Gateway XBee Gateway IOT Services REST API - Gateway, Device, Asset, Rules, Users Telemetry API - Sensor data, actuator commands Automation rules, scripting & API Apps Javascript Widgets
  • 17. Arduino - setup void setup() { pinMode(ledPin, OUTPUT); // initialize the digital pin as an output. Serial.begin(9600); // init serial link for debugging byte mac[] = {0x90, 0xA2, 0xDA, 0x0D, 0xE1, 0x3E}; // Adapt to your Arduino MAC Address if (Ethernet.begin(mac) == 0) // Initialize the Ethernet connection: { Serial.println(F("DHCP failed,end")); while(true); //we failed to connect, halt execution here. } delay(1000); //give the Ethernet shield a second to initialize: if(Device.Connect(&ethClient, httpServer)) //connect the device with the IOT platform. { Device.AddAsset(knobPin, "Potentiometer", "A rotary sensor pot",false, "int"); //pin, name, desc, assetType, dataPro Device.AddAsset(ledPin, "LED", "A blinky light emitting diode", true, "bool"); //pin, name, desc, assetType, dataPro Device.Subscribe(pubSub); } }
  • 18. Arduino - sensor read loop void loop() { unsigned long curTime = millis(); if (curTime > (time + 1000)) // publish light reading every 5 seconds to sensor 1 { unsigned int lightRead = analogRead(knobPin); // read from light sensor (photocell) if(prevVal != lightRead){ Device.Send(String(lightRead), knobPin); prevVal = lightRead; } time = curTime; } Device.Process(); }
  • 19. Arduino - actuator callback void callback(char* topic, byte* payload, unsigned int length) { String msgString; { char message_buff[length + 1]; strncpy(message_buff, (char*)payload, length); message_buff[length] = '0'; msgString = String(message_buff); } int* idOut = NULL; { int pinNr = Device.GetPinNr(topic, strlen(topic)); //Find what topic hooks to the pin if (pinNr == ledPin) { if (msgString == "false") { digitalWrite(ledPin, LOW); //led off idOut = &ledPin; } else if (msgString == "true") { digitalWrite(ledPin, HIGH); //led on idOut = &ledPin; } } } Device.Send(msgString, *idOut); //Acknowledges the LED was activated and confirm in the user interface }
  • 20. Python Pi - Summary IOT.connect() IOT.addAsset(knobPin, sensorName, "Push button", False, "int") IOT.addAsset(ledPin, actuatorName, "Light Emitting Diode", True, "bool") IOT.subscribe() while True: try: if grovepi.digitalRead(sensorPin) == 1: if sensorPrev == False: IOT.send("true", sensorPin) sensorPrev = True elif sensorPrev == True: IOT.send("false", sensorPin) sensorPrev = False sleep(.3)
  • 21. Node.js - Summary var a0 = new mraa.Aio(0); //setup access analog input Analog pin #0 (A0) var d8 = new mraa.Gpio(8); //LED hooked up to digital pin 13 (or built in pin on Galileo Gen1 & Gen2) d8.dir(mraa.DIR_OUT); //set the gpio direction to output smartliving.addAsset("2", "Missile launcher", "Fires 10xD missiles at incoming spacecraft, and also a neat LED for some visual feedback...", true, "bool", confirmEnroll()); smartliving.addAsset("3", "Thermoreactor turbine temperature ", "Monitors the temperature of main alpha turbine", false, "int", confirmEnroll()); smartliving.subscribe(smartliving.baseMQTTUrl, 1883); vloop(); function vloop() { var analogValue = a0.read(); //read the value of the analog pin smartliving.send(analogValue, "3") setTimeout(vloop,1000); } smartliving.registerActuatorCallback("2", function() { d8.write(ledState?1:0); //if ledState is true then write a '1' (high) otherwise write a '0' (low) ledState = !ledState; //invert the ledState });
  • 22. Rules FYI ● Rule wizard doesn’t support complex operators like &&, || ● Create a script and run it in the cloud if you need crazy logic
  • 23. Hackathon Ethos Fake it, until you make it (literally) Hackathons always have network issues Hardware is normally limited or even shared Mock data is easy Things always go wrong Fancy UI elements always look good KISS, Hardware is Hard, Retrofit ● Nest is just a potentiometer, temp, PIR sensor ● GNL is just a LED & Push Button ● Hue is just a RGB ● Wemo is just a Relay MVP Mentality Build small think big (What’s the story behind your use case) High impact features first
  • 24. Brainstorming IoT The problem - Short sharp sentence describing the story of your problem and how the solution solves it Topology diagram - Visualise what you’re going to build, show the inputs and outputs and use it to explain your idea THINGS - What are the dumb objects? END POINTS - What computers and sensors are need to make things smarter? DATA MODEL - What type of data will the Things produce? What are the inputs/outputs? MIDDLEWARE - How will devices communicate? one- one, one-many? AUTOMATION - When this event happens then do this event? UI - Mockups and wireframes HUMANS - Who are the most important people using the solution?
  • 25. Resources Get your SmartLiving IoT Starter Kit www.smartliving.io/kits The platform beta.smartliving.io Documentation http://docs.smartliving.io/Get_Started GitHub https://github.com/allthingstalk API Reference http://allthingstalk.github.io/api-docs