This document discusses using AWS IoT to connect devices in an Intel greenhouse. It describes how sensors can collect data and send it to AWS IoT via MQTT. Rules in AWS IoT can then route data to services like DynamoDB for storage and Kinesis for analytics. Actuators like misters or fans can be automatically controlled based on sensor readings using device shadows to ensure reliable commands. AWS IoT provides device management, authentication, and rules processing to integrate physical devices into cloud applications.
2. Heart monitoring implants
Biochip transponders on farm animals
Electric clams in coastal waters
Automobiles with built-in sensors
DNA analysis devices for
environmental/food/pathogen monitoring
Field operation devices that assist firefighters
in search and rescue operations
Internet of Things?
3. AWS IoT
DEVICE SDK
Set of client libraries to
connect, authenticate and
exchange messages
DEVICE GATEWAY
Communicate with devices via
MQTT, HTTP, Websockets
AUTHENTICATION
AUTHORIZATION
Secure with mutual
authentication and encryption
RULES ENGINE
Transform messages
based on rules and
route to AWS services
AWS Services
- - - - -
3P Services
DEVICE SHADOW
Persistent thing state
during intermittent
connections
APPLICATIONS
AWS IoT API
DEVICE REGISTRY
Identity and management of
your things
9. Sensors & Actions
Sensor & Threshold Action
Room temperature exceeds
80.5F
Turn on fan
Soil moisture drops below 70% Turn on misters until 75%
moisture level reached
Room humidity drops below 80% Turn on room misters until
humidity reaches 80%
10.
11. Open source software development
environment
High performance, atom dual-core CPU
(500MHz) and single core micro-
controller supports complex data
collection in a low power package
Integrated Wi-Fi certified in 68 countries,
Bluetooth® 4.0 support, 1GB DDR and
4GB flash memory simplifies
configuration and increases scalability
13. Telemetry
One of the first data-transmission circuits was developed in 1845
between the Russian Tsar's Winter Palace and army headquarters.
In 1874, French engineers built a system of weather and snow-depth
sensors on Mont Blanc that transmitted real-time information to Paris.
In 1901 the American inventor C. Michalke patented the selsyn, a
circuit for sending synchronized rotation information over a distance.
15. MQ Telemetry Transport
• Simple to implement
• Provide a Quality of Service Data Delivery
• Lightweight and Bandwidth Efficient
• Data Agnostic
• Continuous Session Awareness
Also supported: MQTT over Websockets & HTTP
Communicating
37. AWS IoT Shadow - Simple Yet Powerful
{
"state" : {
“desired" : {
"lights": { "color": "RED" },
"engine" : "ON"
},
"reported" : {
"lights" : { "color": "GREEN" },
"engine" : "ON"
},
"delta" : {
"lights" : { "color": "RED" }
} },
"version" : 10
}
Thing
Report its current state to one or multiple shadows
Retrieve its desired state from shadow
Mobile App
Set the desired state of a device
Get the last reported state of the device
Delete the shadow
Shadow
Shadow reports delta, desired and reported
states along with metadata and version
38. Device shadows and versioning
Sprinkler
Control
logic
on (version=1)
off (version=2)
Device
Gateway
off (version=2)
on (version=1)
(old message ignored by device)
Experts estimate that the IoT will consist of almost 50 billion objects by 2020.
British entrepreneur Kevin Ashton coined the term in 1999 while working at Auto-ID Labs
AWS Device SDK – this is what goes on the thing/sensor/unit
Security is the priority for AWS – Authentication and Authorization - Mutual Authentication TLS granted via certificates deployed onto the devices
Registry is the metadata store - when you deploy millions of devices you want to know what they are and what they do - devices register themselves with the registry
Device Gateway - Millions of devices and apps can connect over MQTT, WebSockets, and HTTP 1.1 Powerful Pub/Sub Broker with Long-lived bi-directional messages
Rules Engine - Match patterns and take actions to send data to other AWS services or republish
Device Shadow - DEVICE connectivity is a trouble for developers - SHADOW IS VIRTUAL DEVICE - if device is connected is pass-thru otherwise is a reference for apps
This is how applications communicate with devices, even without knowing if the device is online or not. Shadow will keep latest state of a device. IoT will know how to communicate with the device and send this state to shadow, applications will always have a state to work with
What
TELEMETRY – REMOTE MEASUREMENT
TELEMETRY – REMOTE MEASUREMENT
TELEMETRY – REMOTE MEASUREMENT
TELEMETRY – REMOTE MEASUREMENT
TELEMETRY – REMOTE MEASUREMENT
TELEMETRY – REMOTE MEASUREMENT
TELEMETRY – REMOTE MEASUREMENT
TELEMETRY – REMOTE MEASUREMENT
TELEMETRY – REMOTE MEASUREMENT
Design a connected farm, where different IoT components and AWS services fit into the architecture
TELEMETRY – REMOTE MEASUREMENT
Quality of service
QoS0 – fire and forget
QoS1 – at least once
QoS2 – at most once
all traffic funnels into one instance, also one DB instance
MQTT has these handy wildcard topics. Beware!
Nicely horizontally scalable IoT platform. “Hey let’s feed 100% of the data coming into the platform down one TCP connection to one server”.
Has to be running to process the data
Operationally painful (not serverless)
IoT comes with a free place to store state about each device in your system. We’ll go into it more in a bit.
Useful for synchronizing state. Query the last known state of a device, communicate a desired state back to the device
Only queryable by device id
In other words, if you do this, you can’t get at your data the right way
RULES: DESCRIBE WHAT MESSAGES TO MATCH, HOW TO TRANSFORM THEM, WHAT TO DO WITH THEM
Simple SQL
Translate keys TMP TEMP
Math functions on inbound data (averages, sums, etc)
Design a connected farm, where different IoT components and AWS services fit into the architecture
Messages aren’t ordered
“Turn on the sprinkler” “no wait turn it off” should result in “off”, not “on”.
Messages aren’t ordered
“Turn on the sprinkler” “no wait turn it off” should result in “off”, not “on”.
When it’s offline, you don’t want your commands to be dropped forever
When it re-connects, it needs to know what to do
DEVICE connectivity is a trouble for developers
SHADOW IS VIRTUAL DEVICE - if device is connected is pass-thru otherwise is a reference for apps
This is how applications communicate with devices, even without knowing if the device is online or not.
Shadow will keep latest state of a device. IoT will know how to communicate with the device and send this state to shadow,
applications will always have a state to work with
Messages aren’t ordered
“Turn on the sprinkler” “no wait turn it off” should result in “off”, not “on”.
Design a connected farm, where different IoT components and AWS services fit into the architecture
Design a connected farm, where different IoT components and AWS services fit into the architecture