Closed makoto-soracom closed 2 years ago
Hi @makoto-soracom
Can you share the way you added the property to the devices?
It will be great if you can also use CLI to add properties, so it can help eliminate user errors. I am providing an example as below:
az iot device simulate --device-id test1 --login "
In the code, we use Azure Event Hub's SDK, and grab the properties as is without any modification, where CLI does not. So in certain cases, it is possible it may show results differently but we don't really have control over it.
Thank you for your response!
My command is here as previous message:
mosquitto_pub -d -q 1 --capath //etc/ssl/certs -V mqttv311 -p 8883 -h {iot_hub}.azure-devices.net -i myDevice-2950xxxxxxxxxxx -u "{iot_hub}.azure-devices.net/myDevice-2950xxxxxxxxxxx/api-version=2018-06-30" -P "SharedAccessSignature sr={iot_hub}.azure-devices.net&sig=xxxxx&se=12345&skn=iothubowner" -t "devices/myDevice-2950xxxxxxxxxxx/messages/events/test=1234567890" -m '{"message": "Hello!"}'
Do I need to setapplication
at some where in my command for Azure IoT Explorer?
Azure CLI can get the message as expected as:
{
"event": {
"origin": "myDevice-2950xxxxxxxxxxx",
"module": "",
"interface": "",
"component": "",
"properties": {
"application": { <----- HERE
"test": "1234567890"
}
},
"payload": "{\"message\": \"Hello!\"}"
}
}
I don't think you will need to set anything, and from the command I've only see -m with 'Hello' as message body but no properties being specifically set, so I cannot tell how the properties are formatted. I am wondering if this is a system property. Can you try check 'Show system properties' checkbox on the top and see if there is anything showing as you're expecting?
Also we released our latest version 0.14.10 to address another issue which changed the Event hub SDK. Please feel free to check it out and see if that helped with issue or not.
Hi, Please let us know if there's anything else we can help with. For now we will close the issue unless there is no information provided.
Hi, sorry for late response.
If I checked "Show system properties", the result was not changed.
The issue is that "application" is not displayed in Azure IoT Explorer but Azure CLI
Expected in Azure IoT Explorer (as same as Azure CLI):
"properties": {
"application": {
"test": "1234567890"
}
},
Azure IoT Explorer v0.14.10:
"properties": {
"test": "1234567890"
},
-t
option.Thank you
@YingXue Could you confirm my message, please?
Describe the bug When using Azure CLI, there is "application" key in the "properties".
When using Azure IoT Explorer, the "application" key doesn't exist.
To Reproduce Sent data from device as follows:
Expected behavior
Desktop (please complete the following information):