IoT中心和ASA输入之间的JSON避难所中的部分数据丢失
设置为: IoT Hub>输入到>流分析
我目前有(3)个传感器和一个来自NCD.IO的Azure网关,这些传感器都向Azure IoT Hub报告了很棒。
在设置ASA中的IoT Hub输入时,只有两个元素通过我的传感器的记录数据通过自动JSON避难所进行。
我在Iot Hub中有一个设备设置,该设备设置了,该设备在本地网关中报告了正确的设备twin 数据,如下所示:
"reported": {
"nodes": {
"SN0013A20041DADDF7": {
"firmware_version": 10,
"transmission_count": 192,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 27.93,
"temperature": 22.28
},
"SN0013A20041DADD51": {
"firmware_version": 10,
"transmission_count": 175,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 42.25,
"temperature": 22.55
},
"SN0013A20041DADE33": {
"firmware_version": 10,
"transmission_count": 217,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 39.33,
"temperature": 22.62
}
},
我从我的Iot Hub中设置ASA中的输入为JSON,没有压缩。 ASA的结果看起来很棒,但是第一个位置“ Node” 似乎被排除在结果之外。
[
{
"nodes": {
"SN0013A20041DADE33": {
"firmware_version": 10,
"transmission_count": 164,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 39.01,
"temperature": 23.08
}
},
"EventProcessedUtcTime": "2022-05-02T20:39:23.3568635Z",
"PartitionId": 3,
"EventEnqueuedUtcTime": "2022-05-02T19:55:43.2820000Z",
"IoTHub": {
"MessageId": null,
"CorrelationId": null,
"ConnectionDeviceId": "***",
"ConnectionDeviceGenerationId": "***",
"EnqueuedTime": "2022-05-02T19:55:43.1570000Z"
}
},
{
"nodes": {
"SN0013A20041DADD51": {
"firmware_version": 10,
"transmission_count": 122,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 42.09,
"temperature": 22.62
}
},
"EventProcessedUtcTime": "2022-05-02T20:39:23.3568635Z",
"PartitionId": 3,
"EventEnqueuedUtcTime": "2022-05-02T19:55:40.8290000Z",
"IoTHub": {
"MessageId": null,
"CorrelationId": null,
"ConnectionDeviceId": "***",
"ConnectionDeviceGenerationId": "***",
"EnqueuedTime": "2022-05-02T19:55:40.8130000Z"
}
},
{
"nodes": {
"SN0013A20041DADE33": {
"firmware_version": 10,
"transmission_count": 163,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 38.9,
"temperature": 23.14
}
},
"EventProcessedUtcTime": "2022-05-02T20:39:23.3568635Z",
"PartitionId": 3,
"EventEnqueuedUtcTime": "2022-05-02T19:55:03.7180000Z",
"IoTHub": {
"MessageId": null,
"CorrelationId": null,
"ConnectionDeviceId": "***",
"ConnectionDeviceGenerationId": "***",
"EnqueuedTime": "2022-05-02T19:55:03.6710000Z"
}
},
{
"nodes": {
"SN0013A20041DADD51": {
"firmware_version": 10,
"transmission_count": 121,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 42.22,
"temperature": 22.65
}
},
实际上,我找不到选择来调整它,因为它都是单个记录的一部分...我可以查询我收到的数据并输出没有问题。
Setup is: IoT Hub > input into > Stream Analytics
I currently have (3) sensors and an azure gateway from ncd.io which are all reporting great into Azure IoT Hub.
Only two elements the record data from my sensors are making it through the auto JSON deserialization when setting up an IoT Hub input in ASA.
I have a device setup in IoT Hub which reports the correct Device Twin data from my local gateway as follows:
"reported": {
"nodes": {
"SN0013A20041DADDF7": {
"firmware_version": 10,
"transmission_count": 192,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 27.93,
"temperature": 22.28
},
"SN0013A20041DADD51": {
"firmware_version": 10,
"transmission_count": 175,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 42.25,
"temperature": 22.55
},
"SN0013A20041DADE33": {
"firmware_version": 10,
"transmission_count": 217,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 39.33,
"temperature": 22.62
}
},
I setup the input in ASA from my IoT Hub as JSON with no compression. The result in ASA looks great, but first position 'node' seems to be excluded from the result.
[
{
"nodes": {
"SN0013A20041DADE33": {
"firmware_version": 10,
"transmission_count": 164,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 39.01,
"temperature": 23.08
}
},
"EventProcessedUtcTime": "2022-05-02T20:39:23.3568635Z",
"PartitionId": 3,
"EventEnqueuedUtcTime": "2022-05-02T19:55:43.2820000Z",
"IoTHub": {
"MessageId": null,
"CorrelationId": null,
"ConnectionDeviceId": "***",
"ConnectionDeviceGenerationId": "***",
"EnqueuedTime": "2022-05-02T19:55:43.1570000Z"
}
},
{
"nodes": {
"SN0013A20041DADD51": {
"firmware_version": 10,
"transmission_count": 122,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 42.09,
"temperature": 22.62
}
},
"EventProcessedUtcTime": "2022-05-02T20:39:23.3568635Z",
"PartitionId": 3,
"EventEnqueuedUtcTime": "2022-05-02T19:55:40.8290000Z",
"IoTHub": {
"MessageId": null,
"CorrelationId": null,
"ConnectionDeviceId": "***",
"ConnectionDeviceGenerationId": "***",
"EnqueuedTime": "2022-05-02T19:55:40.8130000Z"
}
},
{
"nodes": {
"SN0013A20041DADE33": {
"firmware_version": 10,
"transmission_count": 163,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 38.9,
"temperature": 23.14
}
},
"EventProcessedUtcTime": "2022-05-02T20:39:23.3568635Z",
"PartitionId": 3,
"EventEnqueuedUtcTime": "2022-05-02T19:55:03.7180000Z",
"IoTHub": {
"MessageId": null,
"CorrelationId": null,
"ConnectionDeviceId": "***",
"ConnectionDeviceGenerationId": "***",
"EnqueuedTime": "2022-05-02T19:55:03.6710000Z"
}
},
{
"nodes": {
"SN0013A20041DADD51": {
"firmware_version": 10,
"transmission_count": 121,
"reserve_byte": 0,
"battery_level": 3.29406,
"type": 1,
"node_id": 0,
"rssi": 100,
"humidity": 42.22,
"temperature": 22.65
}
},
There are really no options I can find to adjust this as it is all part of a single record... I can query the data I do receive and output it no problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来,在深入研究传感器时,丢失的传感器在报告中存在问题,并且在集线器上的其他两个设备后面显着落后于结果,这使其从结果中删除。
电源循环传感器并采样数据后,我能够接收所有三个传感器,并不会毫无问题地将它们传递到PowerBi。
感谢 @Florian-Eiden的所有帮助!
It appears that upon a deeper dive into the sensor, the missing sensor had an issue with reporting and was significantly behind the other two devices on the hub which caused it to be stripped from the result.
After power cycling the sensor and sampling the data I was able to receive all three sensors and pass them through to PowerBI with no issues.
Thanks @Florian-Eiden for all your help!