0
0
IOT Protocolsdevops~10 mins

Device provisioning and registry in IOT Protocols - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to register a new device in the registry.

IOT Protocols
registry.register_device(device_id=[1])
Drag options to blanks, or click blank then click option'
A"device123"
Bdevice123
C123device
Ddevice-123
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put quotes around the device ID.
2fill in blank
medium

Complete the code to provision a device using the correct method.

IOT Protocols
provisioning_client.[1](device_id)
Drag options to blanks, or click blank then click option'
Aprovision_device
Bdelete_device
Clist_devices
Dupdate_device
Attempts:
3 left
💡 Hint
Common Mistakes
Using methods that manage devices but don't provision them.
3fill in blank
hard

Fix the error in the code to fetch device info from the registry.

IOT Protocols
device_info = registry.get_device([1])
Drag options to blanks, or click blank then click option'
A"device_id"
Bdevice_id
CdeviceInfo
Ddevice-id
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the device ID as a string literal instead of a variable.
4fill in blank
hard

Fill both blanks to create a dictionary of devices filtered by status.

IOT Protocols
filtered_devices = {device: info for device, info in registry.devices.items() if info['[1]'] == '[2]'}
Drag options to blanks, or click blank then click option'
Astatus
Bactive
Cinactive
Ddevice_id
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong keys or status values in the filter.
5fill in blank
hard

Fill all three blanks to create a registry update for devices with low battery.

IOT Protocols
low_battery_devices = { [1]: [2] for [1] , [2] in registry.devices.items() if [2]['battery'] < 20 }
Drag options to blanks, or click blank then click option'
Adevice_id
Binfo
Cdevice
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using inconsistent variable names in the comprehension.