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
223 stars 74 forks source link

Telemetry not displaying message correctly #498

Closed bhnaphade closed 2 years ago

bhnaphade commented 2 years ago

The telemetry data displays messages in ascii associated decimal numbers instead of Characters that were sent.

image

This message should display "Hello" but is shows up as decimal values for each character.

I had v013.5 previously , which showed messages in characters.

image
rido-min commented 2 years ago

May I ask you which SDK or library are you using to send telemetry?

bhnaphade commented 2 years ago

This is without SDK, my setup includes Cellular modem connected to COM port terminal on PC and I am sending AT commands to publish message

Sandlerdev commented 2 years ago

I am seeing this as well. The SDK in use is the JavaScript library.

kartben commented 2 years ago

+1

YingXue commented 2 years ago

Hi, After version 0.14.7, we have updated the Event Hub's SDK for telemetry monitoring, where their older SDK has been depcreated. The message body type in their SDK is now an 'any' type. image

Explorer will be showing the body as is without any conversion as a dev tool to reveal what's truly under the cover. If you are sending the string properly, we will be able to show it properly as well. For example, I am sending az iot device simulate --device-id test1 --login "" --data "n\HELLO", and I am able to see the following properly from explorer: image

YingXue commented 2 years ago

We will release 0.14.10 soon to revert this sdk change.

timscchao commented 2 years ago

Tested on 0.15.0, still get decimal numbers output when publish string.

az iot device send-d2c-message -n igstesthub -d igstestdevice --data "\nHELLO"

{ "body": { "0": 92, "1": 110, "2": 72, "3": 69, "4": 76, "5": 76, "6": 79 }, "enqueuedTime": "Mon Oct 24 2022 14:09:37 GMT+0800 (台北標準時間)" }

Test env: az version { "azure-cli": "2.39.0", "azure-cli-core": "2.39.0", "azure-cli-telemetry": "1.0.6", "extensions": { "azure-iot": "0.15.0" } }