简体   繁体   English

Azure IOT集线器-从1个设备监视设备到云的通信

[英]Azure IOT Hub - Monitor Device-To-Cloud communication from 1 device

There are x number of devices in system and y numbers of device owners. 系统中有x个设备, y个设备拥有者。 These devices are actively sending data to Azure IOT Hub - temperature, humidity, voltage, etc. 这些设备正在向Azure IOT集线器主动发送数据-温度,湿度,电压等。

These devices have RFID chips inside them that store information about device and I'm working with Xamarin.Forms project that would allow android/iOS users to get this information. 这些设备内部都有RFID芯片,用于存储有关设备的信息,我正在使用Xamarin.Forms项目,该项目将允许android / iOS用户获取此信息。

Upon retrieving this information about the device, I want users to be able to see and monitor the device-to-cloud Azure IOT communication. 检索有关设备的信息后,我希望用户能够查看和监视设备到云的Azure IOT通信。

In similar fashion, I'm working on a web dashboard, where user could just select device from dropdown/selection and do the same thing. 我以类似的方式在Web仪表板上工作,用户可以从下拉菜单/选择中选择设备并执行相同的操作。

I've tried implementing the Azure Device Explorer approach, however here's the problem; 我尝试实现Azure设备资源管理器方法,但这是问题所在。 in Azure IOT Hub, one consumer group can only have 5 clients and once, meaning, if 6 people want to monitor the live device-to-cloud communication, only 5 people will be able to do it. 在Azure IOT集线器中,一个消费者组只能有5个客户端,一次只有一个,这意味着,如果有6个人要监视实时设备到云的通信,则只有5个人可以执行此操作。 Furthermore, what this example does is - get all incoming IOT Hub messages, query and filter only the information that the user wants to see - which would probably put quite of a load on mobile phones. 此外,此示例所做的是-获取所有传入的IOT Hub消息,仅查询和过滤用户想要查看的信息-这可能会给移动电话带来很大的负担。

So the question is: Is there a way to see live device-to-cloud Azure IOT Hub communication from a single device ? 所以问题是: 有没有办法从单个设备查看实时的设备到云Azure IOT Hub的通信

I'm open to adding other Azure services. 我愿意添加其他Azure服务。

I am working on a similar project, we developed a web app with back end database. 我正在从事类似的项目,我们开发了一个带有后端数据库的Web应用程序。 this db stores all the iot messages as it comes in, web app send the push notification via azure notification hub to the mobile clients interested about a device. 此数据库存储所有传入的物联网消息,Web应用程序通过天蓝色的通知中心将推送通知发送给对设备感兴趣的移动客户端。 All the business logic and operations is written in the web api project. 所有业务逻辑和操作都写在Web api项目中。

Mobiles directly do not communicate with IOT, they communicate via api to get the information from db, and using push notification helps to keep everything real time. 移动设备不直接与IOT通信,而是通过api进行通信以从db获取信息,并且使用推送通知有助于保持一切实时。

we are using azure functions for reading message from iot as it comes and process. 我们正在使用azure函数从物联网读取消息并进行处理。

The Azure IoT Hub telemetry path (hot path) is a data stream of all devices ingested internally into the default built-in Event Hub or externally via the custom endpoint. Azure IoT中心遥测路径(热路径)是内部提取到默认内置事件中心或通过自定义终结点从外部提取的所有设备的数据流。 To see a telemetry data from the single device, it is necessary to capture a telemetry stream and use a filtering technique for a specific data. 要从单个设备查看遥测数据,必须捕获遥测流,并对特定数据使用过滤技术。 In other words, the telemetry stream must flow transparently in the stream pipeline without any latency and the capture point will hold a copy of the telemetry window. 换句话说,遥测流必须在流管道中透明地流动,并且没有任何等待时间,并且捕获点将保留遥测窗口的副本。

This warm path is close to the real-time (hot path) and it can be configured from 1-15 minutes. 热路径接近实时(热路径),可以在1至15分钟内进行配置。

The following screen snippet shows an example of the warm path using an Event Hub feature such as Capture . 以下屏幕片段显示了使用Event Hub功能(例如Capture)热路径示例。 Note, that this feature is not in the Azure IoT Hub, so that's used a custom endpoint with an external Event Hub: 请注意,此功能不在Azure IoT中心中,因此使用了带有外部事件中心的自定义终结点:

事件网格

Once we have a telemetry warm path (stored in the Blobs, for example each minute), we can query a device messages, twin changes events and device lifecycle events based on the time, value, etc. by user request, eventing or trigger. 一旦有了遥测热路径(例如,每分钟存储在Blob中),我们就可以根据用户请求,事件或触发器,根据时间,值等查询设备消息,孪生更改事件和设备生命周期事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM