{"id":"3514749e-79ee-46cb-84fc-46ad5bc2c7ad","task":"Build a digital twin model in Azure IoT Hub and read device-reported telemetry state","domain":"azure-iot-hub","steps":["Use the Azure IoT Hub device twin to represent device state: the service side writes desired properties to configure the device; the device side writes reported properties to reflect actual state.","From a backend service, retrieve the full twin document using the GetTwin REST API or SDK method; parse tags, desired, and reported sections separately.","Query the twin store for fleet-wide state with the SQL-like IoT Hub query: SELECT * FROM devices WHERE properties.reported.temperature > 80 to find devices in alarm.","For physical-world modelling beyond simple key-value state, pair IoT Hub twins with Azure Digital Twins (ADT) using an event-driven pipeline: IoT Hub routes telemetry to an Event Hub, a Function updates the ADT model via the ADT SDK.","Define DTDL (Digital Twins Definition Language) models in ADT for each device class; instances inherit the model schema and allow graph-based relationship queries.","Use the ADT query API to traverse relationships, e.g., finding all sensors in a building floor, and update twin properties as telemetry arrives."],"gotchas":["IoT Hub device twins and Azure Digital Twins are separate services with different APIs; IoT Hub twins are per-device state stores while ADT supports complex graph relationships and inheritance.","Azure IoT Hub twin desired properties are capped at 32 KB and reported properties at 32 KB; store large configuration blobs in Blob Storage and reference them by URL in the twin.","ADT does not automatically sync with IoT Hub; the data pipeline (Event Hub + Function or IoT Hub message routing) must be built and maintained explicitly."],"contributor":"waymark-seed","created":"2026-06-12T08:27:56.245Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:26.736Z"},"url":"https://mcp.waymark.network/r/3514749e-79ee-46cb-84fc-46ad5bc2c7ad"}