IoT Workshop
IoT solutions on Azure
Excersises
I:๐ธ Create IoT Hub
- Go to Azure Portal
- Create IoT Hub
- preferable S1 tier
- 1 unit
- 4 partitions
- Create device
- IoT Devices -> New
- with symetric key
- Go to your device and open connection strings, we will need it later
- IoT Devices -> your device -> Primary Connection String
I:๐ธ VS Code for IoT Hub
- In VS Code call Command Palette and call Azure: Sign in
- In Explorer at the bottom go to Azure IoT Hub
- select More actionsโฆ
- Select IoT Hub
- Select Devices
- select your device
- Start monitoring build-in endpoints
- observe messages in Output window
I:๐ธ VS Code Simulate device
- Select Devices
- select your device
- Send D2C Messages
- set your text and send
- While sending look into Output windows
II:๐ฅ Arduino create project
- Create new project
- Shift + Ctrl + P => Command Palette
- Azure IoT Device Workbench: Create Project
- choose project name
- close all instances of VS Code
- open again ale wait about minute
II:๐ฅ Arduino fun
- Go to documentation and choose what you want to code
III:๐ฎ IoT DevKit
- Update firmware
- Set WIFI connection - Access Point mode
- => Hold B, press Reset - still holding B just press and release Reset still holding B, release B
- Connect to you DevKit access point
- Configure WIFI at 192.168.0.1
- See sensors reading => Press B
IV:๐น Getting started
- Upload getting started program Solution link
- Configure getting started
- => Hold B, press Reset - still holding B just press and release Reset still holding B,
- => release B
- Connect to you DevKit access point
- Configure at 192.168.0.1
- set WIFI
- set connection string from recent demo
- restart device
IV:๐น Getting started - Cold Path
- Go to Azure portal
- go to Message routing
- Add
- on Add Route page Add endpoint, storage
- fill name, choose frequency, choose JSON and pick container
- create or choose storage account and container
- Check storage
- body is encripted with Base64
V:๐บ Hot Path
- create Azure Function App
- add new function custom template, in-portal
- set trigger on IoT Hub, output on CosmosDB
- add return in function body (return input)
- in IoT Hub add message routing telemetry to build in events
VII:๐ป Stream Analytics to Storage Account
- Create new container in existing Storage Account
- Create Stream Analytics Job
- Configure Stream Analytics Job
- set Storage Account as output
- set IoT Hub as input
- write Query - choose what you want to save
- start job
VII:๐ป Stream Analytics to SQL
- Create SQL Database
- create new database without any tables
- Create new SQL to Stream Analytic integration
- go to SQL Database
- in integration create new Stream Analytic Job
- set IoT Hub as input
- create satisfying query
- run test Query to create Sql schema
- run job
VII:๐ป Stream Analytics multiple queries
- Combine both jobs quesies in one job
- add needed inputs
- put needed queries
- Add new query for max value for temperature
- use MAX(value)
- use tumbling or sliding window