IoT Hub Event does not receive recorded property changes in the device twin. For example, property ledState is updated by the actual device (with patch) and the device twin updates the reported property, but the IoT Hub Event does not receive the event. This limits me in passing this property change to a digital twin with an azure function.
The IoT Hub Event does not show updated properties, unlike telemetry which IoT Hub Event receives. Considering IoT Hub Event only receives Device Created, Deleted, Connected, Disconnected, Telemetry Event Types, how can I get IoT Hub Events to subscribe to property updates?
This is my device as shown in IoT hub and the device's ledState (reported) property is updated to true when I press button A in mxchip:
"etag": "AAAAAAAAAF8=",
"deviceEtag": "NDY5NTIxODE1",
"status": "enabled",
"statusUpdateTime": "0001-01-01T00:00:00Z",
"connectionState": "Connected",
"lastActivityTime": "2022-09-16T14:51:32.9293466Z",
"cloudToDeviceMessageCount": 0,
"authenticationType": "sas",
"x509Thumbprint": {
"primaryThumbprint": null,
"secondaryThumbprint": null
},
"modelId": "dtmi:azurertos:devkit:gsgmxchip;2",
"version": 5310,
"properties": {
"desired": {
"telemetryInterval": 5,
"$metadata": {
"$lastUpdated": "2022-09-16T12:44:24.4494023Z",
"$lastUpdatedVersion": 95,
"telemetryInterval": {
"$lastUpdated": "2022-09-16T12:44:24.4494023Z",
"$lastUpdatedVersion": 95
}
},
"$version": 95
},
"reported": {
"deviceInformation": {
"__t": "c",
"manufacturer": "MXCHIP",
"model": "AZ3166",
"swVersion": "1.0.0",
"osName": "Azure RTOS",
"processorArchitecture": "Arm Cortex M4",
"processorManufacturer": "STMicroelectronics",
"totalStorage": 1024,
"totalMemory": 128
},
"ledState": true,
"telemetryInterval": {
"ac": 200,
"av": 1,
"value": 5
},
"$metadata": {
"$lastUpdated": "2022-09-16T14:55:52.6321409Z",
"deviceInformation": {
"$lastUpdated": "2022-09-16T13:54:57.5894378Z",
"__t": {
"$lastUpdated": "2022-09-16T13:54:57.5894378Z"
},
"manufacturer": {
"$lastUpdated": "2022-09-16T13:54:57.5894378Z"
},
"model": {
"$lastUpdated": "2022-09-16T13:54:57.5894378Z"
},
"swVersion": {
"$lastUpdated": "2022-09-16T13:54:57.5894378Z"
},
"osName": {
"$lastUpdated": "2022-09-16T13:54:57.5894378Z"
},
"processorArchitecture": {
"$lastUpdated": "2022-09-16T13:54:57.5894378Z"
},
"processorManufacturer": {
"$lastUpdated": "2022-09-16T13:54:57.5894378Z"
},
"totalStorage": {
"$lastUpdated": "2022-09-16T13:54:57.5894378Z"
},
"totalMemory": {
"$lastUpdated": "2022-09-16T13:54:57.5894378Z"
}
},
"ledState": {
"$lastUpdated": "2022-09-16T14:55:52.6321409Z"
},
"telemetryInterval": {
"$lastUpdated": "2022-09-16T13:54:58.1675571Z",
"ac": {
"$lastUpdated": "2022-09-16T13:54:58.1675571Z"
},
"av": {
"$lastUpdated": "2022-09-16T13:54:58.1675571Z"
},
"value": {
"$lastUpdated": "2022-09-16T13:54:58.1675571Z"
}
}
},
"$version": 5215
}
},
"capabilities": {
"iotEdge": false
}
I have commented out telemetry messages in the code so only recorded property changes are sent to IoT hub but property changes don't show for Events:
![image](https://user-images.githubusercontent.com/24430655/196028491-92d912ee-c2f5-48f3-a77f-f7fbd4dae7cc.png)