代理 Azure IoT 中心上的其他设备

Act for other devices on Azure IoT Hub

在我们的场景中,我们有一堆设备在本地与网关通信。网关负责聚合来自设备的事件并将其发送到云端。它还应该从云端接收设备配置更改并将其传输到特定设备。

根据我的阅读,我认为这实际上是一个典型的 IoT 中心场景。我们非常想使用 IoT Hub 提供的设备管理、消息传递甚至双胞胎。

但是,设备通信的方式已经实施,不得更改。这意味着设备本身无法创建连接并提供 IoT 中心凭据。这排除了使用 azure-iot-protocol-gateway 或类似的。

我们宁愿需要网关充当可以代表其他设备的设备。网关会检测哪些设备在他的本地网络中并订阅它们的主题(通过 MQTT 或 AMQP)。

这可能吗?设备能否代替其他设备发送事件或收听 Cloud-To-Device 消息?

您的方案非常适合 Azure IoT Edge:

https://docs.microsoft.com/en-us/azure/iot-edge/

"Azure IoT Edge is an Internet of Things (IoT) service that builds on top of IoT Hub. This service is meant for customers who want to analyze data on devices, a.k.a. "在边缘”,而不是在云端。通过将部分工作负载转移到边缘,您的设备可以减少向云端发送消息的时间,并更快地对状态变化做出反应."

我建议您使用 IoT Edge 作为身份或协议转换网关:

https://docs.microsoft.com/en-us/azure/iot-edge/iot-edge-as-gateway

"Gateways in IoT solutions provide device connectivity and edge analytics to IoT devices that otherwise wouldn't have those capabilities. Azure IoT Edge can be used to satisfy all needs for an IoT gateway regardless of whether they are related to connectivity, identity, or edge analytics. "