azure iot hub : the cloud gateway for the internet of things iot hub : the cloud gateway ... c#...
TRANSCRIPT
![Page 1: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/1.jpg)
presenta
www.wpc2015.it – [email protected] - +39 02 365738.11 - #wpc15it 1
CP013Azure IoT Hub : the cloud gateway for the Internet of Things
Paolo Patierno – Microsoft MVP Windows Embedded & IoT
![Page 2: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/2.jpg)
Who am I ?Contacts !
• Senior Software Engineer (Leonardo Ricerche S.r.l.)
• Microsoft MVP for Windows Embedded & IoT
”... constantly moving between the devices and the cloud ...”
• «DotNetCampania» member https://paolopatierno.wordpress.com
• «TinyCLR.it» member http://www.tinyclr.it
• «Embedded101» board of director member http://www.embedded101.com/Blogs/PaoloPatierno.aspx
• Linkedin http://it.linkedin.com/in/paolopatierno
• Contacts [twitter] @ppatierno
[email] [email protected]
[skype] paolopat80
www.wpc2015.it – [email protected] - +39 02 365738.11 - #wpc15it 2
![Page 3: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/3.jpg)
Agenda
• IoT Reference Architecture
• IoT Cloud Gateway ? Why ? What ?
• IoT Hub architecture
• features
• endopoints
• messagges
• Developing on IoT Hub : SDKs and Hardware
• Identity, Security & Authentication
• Provision a starting IoT solution : IoT Suite !
• Demo time
www.wpc2015.it – [email protected] - +39 02 365738.11 3
![Page 4: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/4.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 4
IoT Reference Architecture
Data Visualization & Presentation
Gateway
IP capable devices
Existing IoT devices
Low power devices
Presentation Device and Event ProcessingData Transport
Devices and Data Sources
Clo
ud
Gat
eway
AgentLibs
AgentLibs
AgentLibs
IoT Solution backend
![Page 5: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/5.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 - #wpc15it 5
Telemetry
• Need to ingest million events/second from billion (??) devices
![Page 6: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/6.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 - #wpc15it 6
Command/Notification
• Need to control devices for executing command
• Need to notify devices with some useful information/events
![Page 7: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/7.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 - #wpc15it 7
Think at «scale»
• Start «small» ... to «big»
• Million clients
• Concurrent
100 10,000 1,000,000
![Page 8: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/8.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 8
• Need for a «gate» to handle communication between :
Cloud services (and apps ?)
Devices
Need for a “gate”
![Page 10: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/10.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 10
• Connection bidirectional comunication
reliable & secure channel
per-device authentication
multiplexing
• Features device to cloud telemetry
cloud to device commands and notifications (with TTL & feedback)
bulk uploads/downloads
monitoring devices (connection, activity, ...)
multi protocols (AMQP, HTTP) IoT Protocol Gateway (MQTT)
IoT Hub : features
![Page 11: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/11.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 11
• Device To Cloud D2C : send messages to the cloud (telemetry data, outcome for a
received command or request for execution)
C2D : receive commands for executing the requested action. IoT Hub generates a feedback for the cloud
• Cloud To Device C2D : send messages (ex. commands) to the devices. Like a queue
and each message has a TTL (Time To Live)
D2C : retrieve messages from device (telemetry or outcome for commands). Event Hubs compatible. On a different path there are feedbacks on command delivery
IoT Hub : endpoints
![Page 12: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/12.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 12
IoT Hub : message lifecycle• Service send
feedback (none, positive, negative, full)
feedback retention
message TTL
• Device receive complete
abandon
reject
• Message size Max 256 KB / chunk 16 KB
![Page 13: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/13.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 13
IoT Hub : internal architecture analogy/device/[DEVICE_ID]/messages/events
/device/[DEVICE_ID]/messages/devicebound
/messages/servicebound/feedback
/messages/devicebound
Forwarding on the right device queue reading :
Msg.To = /device/[DEVICE_ID]/messages/devicebound
Feedback generation based on
device accept/reject or TTL expiration
D2C
C2D
D2C
C2D
![Page 14: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/14.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 14
Developing on IoT Hub : SDKs
• For devices and field gateway
• Platforms Windows
Linux
RTOS (freeRTOS), ARM mbed
Android, iOS
WEC2013 ? .Net MF ? Stay tuned !
• Languages C#, C, Java, JavaScript (NodeJS)
• For back-ends and cloud gateway
• Languages .Net C#
Java
JavaScript (NodeJS)
No SDK for your platform ? Porting or ... AMQP and HTTP directly !!
![Page 15: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/15.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 15
Developing on IoT Hub : Hardware
• Raspberry Pi 2
• MinnowBoard Max
• Dragonboard 410C
• Freescale FRDM-K64F
• TI CC3200
• …
• …
• Your board !!
![Page 16: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/16.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 16
Identity, Authentication & Security
• Identity devices registry
provisioning APIs (create, delete, ...)
monitoring (connection status, activity, ...)
• Authentication permission (r-only registry, r/w registry, device, service)
policy made with one or more permissions
per-device auth with SAS token (from device id and device key)
• Security encrypted channel SSL/TLS protocol
![Page 17: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/17.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 17
Prices, Quotas & Throttling
• prices based on : IoT Hub units (up to 200 or ... contact Microsoft Support)
number of devices
total number of messages/day
messages billed as 16 KB chunk
• throttling based on identity registry ops, device connections, D2C & C2D operations
![Page 18: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/18.jpg)
18
Provision a starting IoT solution : IoT Suite !
• Start from a preconfigured solution to customize ...
![Page 19: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/19.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 19
Azure IoT Suite Remote Monitoring• http://www.azureiotsuite.com
![Page 20: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/20.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 20
Azure IoT Suite Remote Monitoring
• Get started in few minutes
• Dashboard devices location
data visualization in real time
alarm history
• Manage devices enable/disable
commands
add your devices (simulator or real device)
• Modify rules and actions
![Page 21: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/21.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 21
Azure IoT Suite Remote Monitoring : the services
Devices
Azure IoT Suite Remote Monitoring
Back end systems and processes
C# simulator
Event Hub
Storage blobs DocumentDB
Web/Mobile App
Stream Analytics Logic Apps
Azure
Active Directory
IoT Hub Web Jobs
Power BI
![Page 22: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/22.jpg)
22
Azure IoT Suite Remote Monitoring : the services
![Page 24: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/24.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 24
References & Links
• Azure IoT Hub : https://azure.microsoft.com/en-us/services/iot-hub/
• Azure IoT Suite : http://www.azureiotsuite.com
• Azure IoT Dev center : http://www.azure.com/iotdev
• Azure IoT SDKs : https://github.com/Azure/azure-iot-sdks
• Azure Certified IoT : https://azure.microsoft.com/en-us/marketplace/certified-iot-program/
• Let’s connect : https://azure.microsoft.com/en-us/develop/iot/get-started/
• IoT Protocol Gateway : https://github.com/Azure/azure-iot-protocol-gateway
• Azure IoT Remote Monitoring : https://github.com/Azure/azure-iot-remote-monitoring
![Page 25: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/25.jpg)
www.wpc2015.it – [email protected] - +39 02 365738.11 25
References & Links
• IoT Hub vs AWS IoT : https://paolopatierno.wordpress.com/2015/10/13/an-iot-platforms-match-microsoft-azure-iot-vs-amazon-aws-iot/
• IoT Hub connection using AMQP stack : https://paolopatierno.wordpress.com/2015/10/24/connecting-to-the-azure-iot-hub-
using-an-the-amqp-stack/
https://paolopatierno.wordpress.com/2015/10/31/azure-iot-hub-commands-and-feedback-using-amqp-net-lite/
https://paolopatierno.wordpress.com/2015/11/02/azure-iot-hub-get-telemetry-data-using-amqp-stack-and-azure-sb-lite/
![Page 27: Azure IoT Hub : the cloud gateway for the Internet of Things IoT Hub : the cloud gateway ... C# simulator processes Event Hub Storage blobs DocumentDB Web/Mobile App Stream Analytics](https://reader036.vdocuments.mx/reader036/viewer/2022062306/5ac2c3517f8b9a57528b4edf/html5/thumbnails/27.jpg)
Contatti OverNetEducation
OverNet [email protected]
www.overneteducation.it
Tel. 02 365738
@overnete
www.facebook.com/OverNetEducation
www.linkedin.com/company/overnet-solutionswww.wpc2015.it
www.wpc2015.it – [email protected] - +39 02 365738.11 - #wpc15it 27