Real-Time Asset Tracking
Total Page:16
File Type:pdf, Size:1020Kb
Azure Azure IoT Workshop Real-time asset tracking Benjamin Cabé // @kartben Nov. 3, 2019 Principal Program Manager Azure IoT Agenda Introducing the problem – Contoso Art Shipping Typical IoT architecture Hands-on labs Going further Follow along at: http://aka.ms/iot-workshop/asset-tracking Introducing the problem Contoso Monitoring of high-value parcels for international company Contoso Art Shipping Problem statement (1/3) Contoso’s goods are getting tampered, ruined in transit Increased customer Losing customers, dissatisfaction revenue Increased High personnel costs insurance claims to follow-up on claims Problem statement (2/3) Goods that are getting tampered with during transportation Contoso lacks ability to monitor Nearly 60% of insurance In-transit product condition claims for damaged art are related to its transport Location of the parcels Problem statement (3/3) Goods getting tampered package is out for delivery Contoso already has an ERP They would like to enable and mobile app in place for real-time tracking of basic tracking information shipments Contoso Art Shipping’s requirements Track in real-time the physical location and condition of their parcels Efficiently store this data so that it can be accessed and queried Get alerts when abnormal conditions are detected… … and visualize them on a map Integrate with their existing business application Scale from a very small deployment to something much bigger … bonus points if they can be supported by great developer tools ☺ Architecture of an IoT solution Things Insights Actions A More Realistic View… Data storage Deployment Enterprise integration Cloud-to-device Business process integration commands Cold path analytics Device recovery Solution scale Operations monitoring Cost management Internationalization High availability Updating devices Provisioning devices Device lifecycle Transport protocols Warm path analytics Drivers Things Disaster recovery Insights Hot path analytics Actions Device updates Data ownership < ---- End-to-End Security ---- > On device analytics Data visualization Industry and government compliance HW certification Manufacturing scale Device commercialization Securing data … and why IoT needs simplifying Provision and send data from devices to Cloud Device Management Things Insights Actions Stream processing and Provision rules evaluations over data and send data from devices to Cloud Store data Device Management Things Insights Actions Stream processing and Provision rules evaluations over data and send data from devices to Cloud Store data Device Management Integrate with Business process Things Insights Actions Configure and control Visualize data and learnings Stream processing and Provision rules evaluations over data and send data from devices to Cloud Store data Device Management Integrate with Business process Things Insights Actions aka.ms/iot-workshop/asset-tracking Hands-on lab Step 1 – Connecting a device to Azure IoT Track in real-time the physical location and condition of their parcels Learning goals: • How to setup the messaging infrastructure for connecting your IoT devices • Understand basic security and device management concepts • Explore IoT Plug-and-Play concepts • Discover VS Code IoT extensions and Azure IoT Explorer Provision and send data from devices to Cloud Device Management Things Insights Actions IoT Hub and Device Provisioning Service Device Azure IoT Hub Provisioning Service Bi-directional Enterprise scale End-to-end IoT-scale automated communication & integration security provisioning Millions of Devices Billions of messages Per Device Certificates Zero-touch provisioning Multi-language, open source Scale up and down Per Device Enable/Disable Centralize your provisioning SDKs workflow Declarative Message Routes TLS Security HTTPS/AMQPS/MQTTS Load balance across multiple File Upload X.509 Support IoT Hubs Send Telemetry WebSockets & Multiplexing IP Whitelisting/Blacklisting Re-provisioning support Receive Commands Azure Monitor Shared Access Polices Supports TPM + X.509 Device Management Azure Resource Health Firmware/Software Updates Device Twins Configuration Management Azure Security Center Support Queries & Jobs IoT Device Lifecycle Replace or decommission Group devices and control access devices after failure, upgrade RETIRE PLAN according to your organization's cycle or service lifetime needs MONITOR REGISTER Monitor device inventory, Securely authenticate devices, health & security while on-board for management providing proactive and provision for service remediation of issues CONFIGURE Provide updates, configuration & applications to assign the purpose of each device IoT Device Lifecycle Replace or decommission Group devices and control access devices after failure, upgrade RETIRE PLAN according to your organization's cycle or service lifetime needs MONITOR REGISTER Monitor device inventory, Securely authenticate devices, health & security while on-board for management providing proactive and provision for service remediation of issues CONFIGURE Provide updates, configuration & applications to assign the purpose of each device Quick orientation Provisioning happens here Power BI Devices Web/ Mobile App Storage blobs CosmosDB Back end systems and processes IoT Hub Stream Event Hub Web Jobs Logic Apps Analytics * Azure ML What is provisioning? Registration Configuration Provisioning Why provisioning is hard today Azure IoT Hub Device Provisioning Service Simplify with zero touch provisioning Minimize manual connection requirements DPS IoT Hub US IoT Hub Japan Cross-geo provisioning support IoT Hub India Multitenancy support Enhanced security For any device compatible with IoT Hub DPS knows exactly which IoT Hub to connect and provision An IoT device’s relationship to DPS High level provisioning 1. Asks for hub 2. Creates ID Device DPS IoT hub 4. Returns hub 3. Returns ID 5. Connects IoT Plug and Play In Platform Context Capability Model Repository (Optional) Interface D2C IoT Device Message Routes C2D/MethodsTelemetry DeviceProperties Twin Custom Commands Solution Interface D2C Message Routes IoT Edge C2D/MethodsTelemetry DeviceProperties Twin Commands Interface D2C Azure IoT Device Message Routes C2D/MethodsTelemetry Azure IoT DeviceProperties Twin IoT Hub & DPS IoT Edge Commands Central IoT Device Where are capability models stored? Device sends capability model ID and version expected for the solution to know If unknown, the following are the model retrieval options for the solution: IoT Plug and Play Repository* https://preview.catalog.azureiotsolutions.com Capability model and interface workspace and publishing repository experience Publishing integrated in VS Code and Azure CLI for both interfaces and capability models Automated validation, collision checks and versioning support Search, filter, sort, view models & their graphs in model repository UX Works out-of-the-box with any Azure IoT solution Will be made available as an open-source project Microsoft will also host a fully managed, multi-tenant instance for always up-to-date for Azure Certified devices; integrated into certification flow Capability Model Developer Tooling Easy to model Devices that just device work out of the capabilities, easy box with no code to generate required device software skeleton Device Capability Model JSON-LD Schema Easy to certify plug and play devices Easy to develop device software Easy for and ensure it just Generated Device Agent customers and works with IoT partners to find solutions plug and play Azure IoT Device SDK devices that just work IoT Hub, DPS, PnP Step 1 – Hands-on http://aka.ms/iot-workshop/asset-tracking Setup IoT Hub and DPS Configure asset tracking device Explore capabilities thanks to PnP Step 2 – Setting up an IoT data pipeline Efficiently store this data so that it can be accessed and queried Learning goals: • How to implement short-term and long-term retention using Azure Time Series Insights • How to use TSI built-in data explorer to perform data analytics Provision and send data from devices to Cloud Device Management Things Insights Actions Stream processing and Provision rules evaluations over data and send data from devices to Cloud Store data Device Management Things Insights Actions What is Azure Time Series Insights A Fully Managed Platform as a Service (PaaS) Solution Built for IoT Fully managed, end-to-end PaaS solution to ingest, process, store, Connect to a variety of data and query highly contextualized, solutions using TSI’s flexible data time-series-optimized, IoT-scale platform data Use rich analytics APIs and UX for Use JavaScript control library for ad-hoc exploration and operational building custom analytics apps on intelligence the TSI platform IoT Data Characteristics Lacks Needs Often used with Infinite structural contextualization other data retention consistency Canonical IoT Data Pipeline Operator Notify or System Explore and monitor Perform operational analysis Models for learning & predictions COLLECT PROCESS STORE ANALYZE Collect time series data Parse, Normalize, Store in multi-layered Run ad-hoc queries for monitoring coming from different Enrich, Transform (hot, warm, cold) time Operationalize using asset-based analysis sources, formats & rates series data store Use models for machine learning optimized for analysis inference and make predictions Azure Time Series Insights Time Series Insights Step 2 – Hands-on http://aka.ms/iot-workshop/asset-tracking Setup TSI environment Setup event sources Explore data Step 3 – Anomaly detection Getting alerts when