Azure / azure-iot-explorer

Cross-platform UI for interacting with devices attached to Azure IoT Hub. This tool is meant for learning and testing, not for production environment.
MIT License
220 stars 70 forks source link

Telemetry show more than one device in Telemetry stream after device disconnects #621

Closed codeputer closed 3 months ago

codeputer commented 1 year ago

Describe the bug Viewing Telemetry from "A" device works and I see my events for the device that I have selected. Somewhere down the line, however, I start receiving events from "other" devices. So I'm monitoring GFS010, and over time, I start seeing events from GFS030. This only happens however if GFS010 loses connectivity (network loss, reboot, etc).

To Reproduce 1) From HOME, create a subscription string to the IOT Hub (more than one device should be connected) 2) Then "View devices in this Hub" (which in dark mode is tough to see - IMO should be a button, or use a tab of the IOT Hubname, and call it Devices, using the real estate to the right. 3) select a "connected" device 4) select "Telemetry" 5) select start 6) Watch the telemetry come in and check the Device Id 7) reboot the device (fastest) / lose network 8) continue to monitor telemetry and other devices will start displaying

Expected behavior Should only show the telemetry for the device Id selected. Would be nice to see the status of the device in the Telemetry page.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Why can't we instansiate this application twice - throws a JavaScript error.

codeputer commented 6 months ago

Any body home? I'm thinking we should have seen a new release by this time?

YingXue commented 3 months ago

Hi @codeputer, like you've pointed out in another issue, event hub does not filtering on device, so we are using consumer group to fetch devices, this is a sneak peak of how we use their sdk:

new EventHubConsumerClient(params.consumerGroup, await convertIotHubToEventHubsConnectionString(params.hubConnectionString));

the granularity stops at the consumer group unfortunately. i would recommend using different consumer group for different devices.