Connecting IoT Andy Cross, Director Elastacloud Ltd Windows Azure MVP Da zee zij oek. @andybareweb.
Connecting Netduinos to a Windows Azure Service
description
Transcript of Connecting Netduinos to a Windows Azure Service
![Page 1: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/1.jpg)
Hands on Hacknight Connecting
Netduino's to an Azure cloud
service
By: Michael LinnenTwitter: @mlinnenBlog: www.protosystem.net
![Page 2: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/2.jpg)
SPONSORS
![Page 3: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/3.jpg)
This is NOT a real security system!
DISCLAIMER!
*This is for education purposes ONLY*
Do NOT use this as your Home Security System!
![Page 4: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/4.jpg)
THE BIG PICTURE
Front
Side Back
Master Bedroom
Bedroom 1
Bedroom 2
1st Floor
Doors
Locked
Windows
Motion
Doorbell
AlarmSleep
Away
Bedroom 1
Bedroom 2
Master Bedroo
m
Back door
Front door
Side door
Talk to me!
Message Broker
Azure
Worker
Master Control Panel
Web
Master Control Panel Dashboard
![Page 5: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/5.jpg)
NETDUINO PLUS
Digital i/o Features
All 20 digital and analog pins:
GPIO
Digital pins 0-1: UART 1 RX,
TX
Digital pins 2-3: UART 2 RX,
TX
Digital pins 5-6: PWM, PWM
Digital pins 7-8: UART 2 RTS,
CTS
Digital pins 9-10: PWM, PWM
Digital pins 11-13: SPI MOSI,
MISO, SPCK
Analog pins 4-5: I2C SDA, SCL
Processor and Memory Atmel 32-bit microcontroller Speed: 48MHz, ARM7 Code Storage: 64 KB
• without networking: 128 KB RAM: 42 KB
• without networking: 60 KB
![Page 6: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/6.jpg)
Unlimited resources Service Bus (Messaging) Storage Computation Identity Networking (VPN) Web sites (10 free) Virtual Machines (Linux or
Windows) Mobile Services Media Services Database Services Reporting Services Cache CDN Store
WINDOWS AZURE
Internet Of Things Enablero Projecting 50 billion
devices in 2020
![Page 7: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/7.jpg)
DEMO
![Page 8: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/8.jpg)
ARCHITECTURE
![Page 9: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/9.jpg)
• Features– Lightweight– Publish/Subscribe– Open published protocol
• How long?– Invented in 1999 – Dr Andy Standford-Clark– Arlen Nipper
• Used By– Facebook (messenger)– Github– COSM (formerly Pachube)– RabbitMQ (MQTT Adapter)– Websphere MQ
MQTT“MQTT is a machine-to-machine (M2M)/"Internet of Things"
connectivity protocol”
![Page 10: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/10.jpg)
External Door
Doorbell
Broker Hub Browser
MQTT SignalR Dashboard
Master Control Panel
MESSAGES - DOORBELL
Home Azure Remote
![Page 11: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/11.jpg)
MESSAGES - DOORBELL
Doorbell
Broker Hub Browser
Home
MQTT SignalR Dashboard
Subscribe Doorbell
Subscribe Doorbell
Master Control Panel
External Door
Azure Remote
![Page 12: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/12.jpg)
MESSAGES - DOORBELL
Doorbell
Broker Hub Browser
Azure Remote
MQTT SignalR Dashboard
Publish Doorbell pushed
Master Control Panel
External Door
Home
![Page 13: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/13.jpg)
Doorbell
Broker Hub Browser
Remote
MQTT SignalR Dashboard
Publish Doorbell pushed
Master Control Panel
Publish Doorbell pushed
Azure Remote
External Door
Home
MESSAGES - DOORBELL
![Page 14: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/14.jpg)
Doorbell
Broker Hub Browser
Home Azure Remote
MQTT SignalR Dashboard
Update UI
Master Control Panel
Azure Remote
External Door
Home
MESSAGES - DOORBELL
![Page 15: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/15.jpg)
Doorbell
Hub Browser
Azure Remote
MQTT SignalR Dashboard
Master Control Panel
Home Azure Remote
BrokerExternal Door
MESSAGES – UNLOCK DOOR
![Page 16: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/16.jpg)
MESSAGES – UNLOCK DOOR
External Door
Doorbell
Broker Hub Browser
Azure Remote
MQTT SignalR Dashboard
Master Control Panel
Subscribe code
Subscribe setlock
Subscribe lock
Azure RemoteHome
![Page 17: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/17.jpg)
MESSAGES – UNLOCK DOOR
Doorbell
Broker Hub Browser
Remote
MQTT SignalR Dashboard
Master Control Panel
Publish code 01
Azure Remote
External Door
Home
![Page 18: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/18.jpg)
Doorbell
Broker Hub Browser
Home Azure Remote
MQTT SignalR Dashboard
Master Control Panel
Publish code 01
Azure Remote
External Door
Home
MESSAGES – UNLOCK DOOR
![Page 19: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/19.jpg)
Doorbell
Broker Hub Browser
Home Azure Remote
MQTT SignalR Dashboard
Master Control Panel
Publish code 01
Azure Remote
External Door
Home
MESSAGES – UNLOCK DOOR
![Page 20: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/20.jpg)
Doorbell
Broker Hub Browser
Home Azure Remote
MQTT SignalR Dashboard
Master Control Panel
Publish setlock unlock
Azure Remote
External Door
Home
MESSAGES – UNLOCK DOOR
![Page 21: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/21.jpg)
Doorbell
Broker Hub Browser
Home Azure Remote
MQTT SignalR Dashboard
Master Control Panel
Publish setlock unlock
Azure Remote
External Door
Home
MESSAGES – UNLOCK DOOR
![Page 22: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/22.jpg)
Doorbell
Broker Hub Browser
Home Azure Remote
MQTT SignalR Dashboard
Master Control Panel
Publish lock unlocked
Azure Remote
External Door
Home
MESSAGES – UNLOCK DOOR
![Page 23: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/23.jpg)
Doorbell
Broker Hub Browser
Azure Remote
MQTT SignalR Dashboard
Master Control Panel
Publish lock unlocked
Azure Remote
External Door
Home
MESSAGES – UNLOCK DOOR
![Page 24: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/24.jpg)
Doorbell
Broker Hub Browser
Azure Remote
MQTT SignalR Dashboard
Master Control Panel
Update UI
Azure Remote
External Door
Home
MESSAGES – UNLOCK DOOR
![Page 25: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/25.jpg)
HARDWARE
Ground Bus – Exposes more connections
LED’s – Indicators or simulates actuators
Switches – Keyboard, Window/Door/Motion sensors, Alarm mode
![Page 26: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/26.jpg)
Ground Bus
Connect to LEDs or Switches
Connect to Netduino GND
![Page 27: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/27.jpg)
LED’S
Connect to Ground Bus
Connect to Netduino Digital Pin (or 3.3 volt pin to test)
![Page 28: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/28.jpg)
Switches
Connect to Ground Bus
Connect to Netduino Digital Pin
![Page 29: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/29.jpg)
Netduino GND
Netduino 3.3 V
![Page 30: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/30.jpg)
Pick a device to buildoDoorbell (easiest)oAlarm (a little harder)oExternal Door (hardest)oAlarm Panel (hardest)
Fill out the signup sheetoUnique Client ID (use your initials)
Get your partsCode the solution
* Reference: HTTP://www.CloudHomeSecurity.com
LET’S GET STARTED
![Page 31: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/31.jpg)
SECURING MESSAGES
VPN Restricted IP’s HTTPS and a gateway
broker
![Page 32: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/32.jpg)
MQTTBroker
MQTTBroker
Hub Browser
SignalR Dashboard
Master Control Panel
Home Azure Remote
GATEWAY BROKER
HTTPs
![Page 33: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/33.jpg)
MQTTBroker
MQTTBroker
Hub Browser
SignalR Dashboard
Master Control Panel
Home Azure Remote
MISSION CRITICAL
HTTPs
![Page 34: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/34.jpg)
Messaging Patterns
MQTTBroker
MessageRouter
![Page 35: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/35.jpg)
Messaging Patterns
MQTTBroker
MessageRouter
Subscribe DO/0
Subscribe DI/0
![Page 36: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/36.jpg)
Messaging Patterns
MQTTBroker
MessageRouter
Publish DI/0 true
![Page 37: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/37.jpg)
Messaging Patterns
MQTTBroker
MessageRouter
Publish DI/0 true Publish DI/0 true
![Page 38: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/38.jpg)
Messaging Patterns
MQTTBroker
MessageRouter
Publish DI/0 true Publish DI/0 true
![Page 39: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/39.jpg)
Messaging Patterns
MQTTBroker
MessageRouter
Publish DI/0 true Publish DI/0 true
Publish DO/0 true
![Page 40: Connecting Netduinos to a Windows Azure Service](https://reader034.fdocuments.us/reader034/viewer/2022051411/541161f48d7f725c7f8b458c/html5/thumbnails/40.jpg)
Messaging Patterns
MQTTBroker
MessageRouter
Publish DO/0 true
Publish DI/0 true Publish DI/0 true
Publish DO/0 true