Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.02 KB

02.CreateSimulationDevice.md

File metadata and controls

46 lines (29 loc) · 1.02 KB

Create Simulation Device

Copy IoT device sample code (python)

Login 'azlab###wvm'

Access to azlab###wvm using remote desktop app and use id and password

ID PW
azureadmin ********

Run IoT Device Sample

  1. Open Visual Studio Code and create new file

  2. Copy the sample code from IoT Device Sample (Python) and pate it to VS Code

  3. Update connection string in line 20

  4. Install IoT Device python library

pip install azure-iothub-device-client

02.01

  1. Run the code
python SimulatedDevice.py

Read the telemetry from your hub

  1. Go back to Azure portal

  2. Run following commands from Cloud Shell

az extension add --name azure-cli-iot-ext
az iot hub monitor-events --hub-name YourIoTHubName --device-id MyPythonDevice

Please DO NOT stop the simulated device python sample for next lab