0
0
IOT Protocolsdevops~10 mins

Topic design patterns for IoT 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 define a topic pattern for device status updates.

IOT Protocols
topic = "devices/[1]/status"
Drag options to blanks, or click blank then click option'
Aupdate
Bdevice_id
Csensor
Dcommand
Attempts:
3 left
💡 Hint
Common Mistakes
Using generic words like 'update' or 'command' instead of device identifier.
2fill in blank
medium

Complete the code to subscribe to all temperature sensors in building 5.

IOT Protocols
topic = "building/5/[1]/temperature"
Drag options to blanks, or click blank then click option'
A+
Bdevice
C#
Dfloor
Attempts:
3 left
💡 Hint
Common Mistakes
Using multi-level wildcard # which matches too broadly.
3fill in blank
hard

Fix the error in the topic pattern to correctly subscribe to all sensors in all buildings.

IOT Protocols
topic = "[1]/sensors/#"
Drag options to blanks, or click blank then click option'
A#
Bbuilding
C+
Dbuildings
Attempts:
3 left
💡 Hint
Common Mistakes
Using multi-level wildcard # which cannot appear except at the end of the topic.
4fill in blank
hard

Fill both blanks to create a topic pattern for commands sent to a specific device in a room.

IOT Protocols
topic = "[1]/[2]/commands"
Drag options to blanks, or click blank then click option'
Aroom
Bdevice
Csensor
Dbuilding
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping device and room or using sensor instead of device.
5fill in blank
hard

Fill all three blanks to create a topic pattern for publishing sensor data with building, floor, and sensor type.

IOT Protocols
topic = "[1]/[2]/[3]/data"
Drag options to blanks, or click blank then click option'
Abuilding
Bfloor
Csensor
Ddevice
Attempts:
3 left
💡 Hint
Common Mistakes
Using device instead of sensor or wrong order of location levels.