0
0
IOT Protocolsdevops~20 mins

Device shadow (digital twin) in IOT Protocols - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Device Shadow Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding Device Shadow States

Which of the following best describes the desired state in a device shadow?

AThe state the device should be in, as set by the user or application.
BThe current physical state of the device as detected by sensors.
CThe error state when the device fails to connect to the cloud.
DThe last reported state sent by the device to the cloud.
Attempts:
2 left
💡 Hint

Think about what the user or application wants the device to do.

💻 Command Output
intermediate
2:00remaining
Interpreting Device Shadow Update Response

What is the output of this AWS CLI command updating a device shadow?

aws iot-data update-thing-shadow --thing-name MyDevice --payload '{"state":{"desired":{"power":"on"}}}' MyDeviceShadow.json
AAn error: Invalid payload file path or unrecognized argument
BCommand executed successfully with no output
C{"state":{"desired":{"power":"on"}},"metadata":{"desired":{"power":{"timestamp":1680000000}}},"version":5}
D{"state":{"reported":{"power":"on"}},"version":5}
Attempts:
2 left
💡 Hint

Check the command syntax and required parameters for updating a device shadow.

🔀 Workflow
advanced
2:30remaining
Correct Sequence to Sync Device Shadow

Arrange the steps in the correct order to synchronize a device's physical state with its device shadow.

A1,3,2,4
B1,2,3,4
C2,1,3,4
D1,2,4,3
Attempts:
2 left
💡 Hint

Think about the logical flow from retrieving data to updating device and reporting back.

Troubleshoot
advanced
1:30remaining
Troubleshooting Shadow Update Failures

A device shadow update fails with a ConflictException. What is the most likely cause?

AThe device shadow service is disabled in the cloud account.
BThe device is offline and cannot reach the cloud service.
CThe device shadow JSON payload is missing the <code>state</code> key.
DThe device shadow document version is outdated compared to the cloud version.
Attempts:
2 left
💡 Hint

Think about version control and concurrency in device shadows.

Best Practice
expert
2:00remaining
Best Practice for Device Shadow State Management

Which approach is best to minimize conflicts and ensure smooth device shadow synchronization in a fleet of IoT devices?

ADevices update their shadow state immediately after every small sensor reading change.
BDevices never report state; only the cloud updates the shadow to avoid conflicts.
CDevices batch state changes and update the shadow periodically with the latest state.
DDevices delete and recreate their shadow document on every update to reset state.
Attempts:
2 left
💡 Hint

Consider network usage and conflict frequency when updating shadows.