gpt4 book ai didi

Azure iot上传图像然后在azure函数中处理

转载 作者:行者123 更新时间:2023-12-03 05:54:56 24 4
gpt4 key购买 nike

我最想知道这是否可能 - 然后也许是如何实现它的步骤。

我有一个带摄像头的 Pi,它应该拍照并 upload to a blobContainer using azure iot hub

我希望能够处理该图像,同时也向设备发送消息。即 - 我需要知道 DeviceId,然后将消息发送回设备 (Pi)。我想使用 Azure 函数来实现此步骤...我以前能够发送消息 D2C,在 azure 函数中进行处理,然后 (C2D) 将消息发送回相关设备,如本链接所示

http://www.10thmagnitude.com/tech-blog/step-step-guide-creating-functions-within-azures-iot-hub/

我需要知道图像来自哪个设备 - 这可以做到吗?

最佳答案

在教程中您引用Upload files from your simulated device to the cloud with IoT Hub ,有一个简单的控制台应用程序用于接收文件上传通知(如果我理解正确的话,您计划将其替换为 Azure 函数)。控制台应用程序使用以下方式检索 blob 名称:

fileUploadNotification.BlobName

FileNotification 对象还有一个 DeviceId 属性,可为您提供所需的设备 ID。

如果您的 Azure 函数正在从/messages/servicebound/fileuploadnotifications 端点读取数据,它会收到一条消息,其中包含上传 Blob 的设备的 deviceid。请参阅File upload notifications 。您的函数是否可以使用 blob 触发函数,然后从/messages/servicebound/fileuploadnotifications 端点读取,或者甚至只是在计时器上运行并定期检查端点?

关于Azure iot上传图像然后在azure函数中处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42786416/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com