question

SaifALMALIKI-9163 avatar image
0 Votes"
SaifALMALIKI-9163 asked SaifALMALIKI-9163 commented

Azure IoT Edge OPC Publisher message UADP encoding

I want to send telemetry data from Azure iot edge device to IoTHub through OPC publisher module.

OPC publisher can be configured to encode the message either Json ("--me=Json") or Uadp ("--me=Uadp") before sending. OPC Publisher parameters

https://github.com/Azure/Industrial-IoT/blob/main/docs/modules/publisher-commandline.md

So I configured my edge device to send the message in uadp message encoding format as its compact and compressed , However When I monitor the message received to IoTHub, its unreadable.

Any one can help how we can decode the uadp message to readable format in IoTHub so I can process it in Azure stream analytics.

Why its possible to decode the message to UADP io opc publisher but not able to decode it in cloud side

Thanks

azure-iot-edgeazure-iotazure-stream-analyticsazure-iot-dps
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@SaifALMALIKI-9163 Wanted to follow up with you to understand whether the below information helped. Please let us know if there are any other queries.
If below suggestions answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.

0 Votes 0 ·
SaifALMALIKI-9163 avatar image SaifALMALIKI-9163 AshokPeddakotla-MSFT ·

Thank you for the follow up,

Using Azure function in IoTHub is good option to decode the message and It should work.

But I went with another approach by compressing the message in the edge with Gzip compression format, and from the cloud side ASA has built in Gzip decompression capability.

This approach minimize the size of message up to 95% as well as no overhead of writing decompression script, as ASA will take care of the decompression.

0 Votes 0 ·

1 Answer

AshokPeddakotla-MSFT avatar image
1 Vote"
AshokPeddakotla-MSFT answered AshokPeddakotla-MSFT commented

@SaifALMALIKI-9163 Azure IoTHub messages will be encoded as per the encoding type set and saved. To decode the messages you use the "Azure Function" This can be triggered directly from the IoT-Hub. Please see the discussion on similar ask and see if it helps: https://docs.microsoft.com/en-us/answers/questions/230228/iot-hub-message-routing-received-json-message-body.html
Regarding your specific query, "Why its possible to decode the message to UADP io opc publisher but not able to decode it in cloud side" I am checking with our team internally and update you if there is a direct way. Appreciate your time and patience.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AshokPeddakotla-MSFT
Thank you for your response.

0 Votes 0 ·

@SaifALMALIKI-9163 Sincere apologies for the delay in response. There is no direct way to decode it. As suggested please use Azure Functions.

Remember:
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

0 Votes 0 ·