In this workshop we talk about how NodeMCU can be used to create a cost-effective solution to deploy your Internet of Things project, together with AWS IoT.
Machine Learning Software Engineering Patterns and Their Engineering
Getting started on IoT with AWS and NodeMCU for less than 5€
1. IoT on AWS and NodeMCU
FOR LESS THAN 5 EUROS
June 2016
01
2. About Johann
• Tech Evangelist @Stylight
• 15+ years in tech
• In Germany for 2 years
• 7 years in San Francisco
doing startups
• Organizer of many meetups
2
4. What are you going to learn?
4
• Discover ESP8266/NodeMCU
• Introduction to AWS IoT
• Hands-on
• Connecting a NodeMCU board
• Configuring Arduino environment for NodeMCU
• Installing AWS SDK
• Publishing sensor data to AWS IoT
• Trigger rules to invoke Lambda function
8. Why?
8
• Cheap is good in IoT because
it scales
• But no direct support of AWS
IoT because no TLS 1.2
module yet in ESP8266
• Hackers always find
workarounds
10. Introduction to AWS IoT
10
• Serverless way to connect your IoT devices and start
processing data
• Supports MQTT, HTTP
• Secure - communication through use of X.509 Certificates
• Can connect huge amount of sensors, store and process the
data in real-time
12. What’s a Thing?
12
• An IoT Device
• Sensors, actuators,
• In our case a NodeCMU board
13. What’s the Message Broker?
13
• Used to securely exchange messages following the publish-
subscribe pattern, between IoT applications and Things.
• MQTT to publish/subscribe
• HTTP to publish
• Note: MQTT uses TLS 1.2 which is not available in NodeMCU
• Let’s use HTTP then!
14. What’s the Rule Engine?
14
• Used to process messages and talk to other AWS
components like Lambda, DynamoDB, etc
• SQL-Based language to select specific messages
to be passed along.
15. What are Thing Shadows?
15
• Devices sometimes go offline
• A Thing Shadow provide a persistent
representation of a Thing
• A Thing can sync its state to its Thing Shadow
through the REST API
18. We are going to:
18
• Create a Thing in AWS IoT
• Publish sensor data from our NodeMCU to
update our Thing Shadow
• Have a look at the MQTT Client
• Create a Rule to trigger a lambda when
humidity is > 50%
• Publish the data to Slack