虚拟下游设备的Azure IoT边缘模块身份转换 [英] Azure IoT Edge Module Identity Translation for virtual Downstream Devices

查看:54
本文介绍了虚拟下游设备的Azure IoT边缘模块身份转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下设置:

  • 多个Modbus传感器
  • 1个通过ModbusTCP连接到这些传感器的网关.在此网关上,一个Azure IoT Edge模块正在运行(使用NodeJS SDK),该模块读取每个连接的传感器的所有值
  • 用于设备管理的Azure IoT Central

在IoT Central中,我想用一个单独的设备模板代表每个Modbus传感器.这样,我可以配置每个传感器唯一的仪表板.然后,应将这些传感器设备模板配置为网关设备模板的子设备.因此,网关的一个设备模板和每个Modbus传感器的一个唯一的设备模板.这样,我可以为多个网关设置不同的传感器设置,而无需为每个网关创建新的设备模板(我只需要为每个网关配置不同数量的子设备).

In IoT Central, I would like to represent each modbus sensor with a separate device template. This way, I can configure dashboards that are unique for each sensor. These sensor device templates should then be configured to be child devices of the device template for the gateway. So one device template for the gateway and one unique device template for each modbus sensor. This way, I can provision multiple gateways with a different sensor setup without the need of creating a new device template for each of these gateways (I would only need to configure a different amount of child devices for each gateway).

然后,在网关上运行的Azure IoT Edge Modbus模块应从每个连接的传感器读取所有值,并以该传感器的名称将其发送到IoT Central实例,因此看起来该传感器已发送了此消息.但是,我不确定如何在Azure IoT Edge模块内部实现此行为.

The Azure IoT Edge modbus module running on the gateway should then read all values from each connected sensor and send them to the IoT Central instance in the name of the sensor, so it looks like that the sensor had sent this message. However, I am not sure on how to implement this behaviour inside my Azure IoT Edge module.

文档指出可以实现此行为(连接到下游设备的IoT Edge网关设备,其身份由IoT Edge网关提供),但是我找不到有关如何实现此操作的任何文档.我希望有人能提供帮助.

The documentation states that this behaviour can be implemented (IoT Edge gateway device connected to downstream devices with identity provided by the IoT Edge gateway), however I could not find any documentation on HOW to implement this. I hope someone can help.

推荐答案

简短的答案是:Azure IoT堆栈中不存在支持该方案的本机支持.您链接到的文档已经讨论了一段时间功能请求已创建.但这并不意味着不可能,但是它涉及一些解决方法,这些对于您的用例来说可能是不可接受的.

The short answer is: there is no native support in the Azure IoT stack that supports that scenario. The documentation you have linked to has been under discussion for a while now and a feature request has been created. That doesn't mean it's impossible though, but it involves some workarounds that might not be acceptable to your use case.

为传感器提供身份的一种方法是为IoT Central中的每个传感器创建一个设备,并将其连接信息传递到您需要构建的模块的孪生模块.该模块将接收传感器值,找出要使用的连接信息,然后将遥测直接发送到IoT Central(而不是通过Edge Runtime).

One way to provide identity to your sensor is to create a device for each sensor in IoT Central and to pass their connection information to the module twin of a module you need to build. That module would receive the sensor values, figure out what connection information to use and send telemetry straight to IoT Central (so not through the Edge Runtime).

更新: 微软创建了一个示例模块,其中显示了如何提供身份翻译的基本实现.除此之外,运行时还没有本机支持.

Update: Microsoft created a sample module that shows how to provide a basic implementation of identity translation. Other than that, no native support in the runtime yet.

这篇关于虚拟下游设备的Azure IoT边缘模块身份转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆