Amazon IoT
(and how to make an internet-connected kitty motion detector)
@lynnaloo
-
Co-organizer of this meetup
-
Works for Emerging Technology Advisors
-
Robot enthusiast
-
Open-source "pusher"
-
Local celebrity
What is Amazon IoT?
It's a managed cloud platform that lets connected devices easily and securely interact with cloud applications and other devices.
- Amazon
tldr;
-
It can support billions of devices
-
It can support trillions of messages
-
It's inexpensive
-
It's reliable
-
It's secure.
-
It's fast.
-
It's [freaking] Amazon.
How does it work?
-
Two major components are the Device Gateway (dashboard) and the Rules Engine.
-
Devices are added to the gateway as "things"
-
IoT provides a pub/sub system for hardware via the message broker.
-
The Rules Engine routes device messages to actions.
And for the visual learners...
How are messages sent to IoT?
-
IoT supports publish and subscribe via MQTT protocol and publish via HTTPS.
-
For browser-only applications, MQTT messages can be sent and received via web-sockets.
-
Amazon IoTs has SDKs to make message brokering really simple.
Can I connect *any* hardware?
-
Nope.
-
It has to be able to support TLS 1.2 for MQTT or SSL certificates for the REST API.
-
-
Yeah, sorta.
-
You can tether the hardware to a computer or Raspberry Pi. Or the device can just be a computer running the SDK.
-
There are some proxy hacks for outlying hardware.
-
One Last Thing [Shadow]...
-
Devices can have virtual "shadows" (thing/device shadows)
-
Shadows can:
-
Show current online/offline state
-
Persist and show last saved state values
-
Persist any future desired device state
-
-
When a device comes online, IoT will ask the device to match its desired state.
Amazon Iot Test Project:
A motion detector that texts (via lambda) and emails (via SNS) when something [kitty] is detected.
Kitty Detector Parts List
-
Tessel 2 (Coming soon, rPi)
-
PIR Sensor
-
External Battery Holder + Batteries
-
Lead Wires
-
3-D printed case (optional)
-
1 moving kitty (optional)
The Code
-
Tessel Hardware/Amazon IoT Code: https://github.com/lynnaloo/kitty-detector
-
Serverless Framework/Lambdas: https://github.com/lynnaloo/go-away-kitty
Demo Time!
Amazon IoT (How to Make a Kitty Detector) - Abridged Version
By Linda Nichols
Amazon IoT (How to Make a Kitty Detector) - Abridged Version
Amazon IoT Lightning Talk. Presented at Norfolk.js October 17 2016.
- 1,569