Closed MiguelMar98 closed 7 months ago
Oh SORRY I just realised this is meant to be on the Clietn Page not the broker
@MiguelMar98
The method you use to Publish your data is serializing the variant as a flattened LabVIEW string... this is the reason why you see a few funny characters. Here, you have two choices. Either you define a serializer (JSON in this case) or you use the Publish Raw method to send bytes that you have serialized beforehand.
In this video, around the 12th minute, I demonstrate how to change your serializer. Around the 14th minute, this is where I select a different default serializer. https://www.youtube.com/watch?v=Y-jrwyfD9DU
Alternatively, instead of publishing with the Variant payload, use this method instead:
All-in-all, you can use any of these methodologies:
This is the serializer you probably want. https://www.vipm.io/package/labview_open_source_project_lib_serializer_jki_json/
Thank you again! Using the serializer worked.
Hello,
I followed the guide on how to connect to IoT Core through LabVIEW and now I can send message to my thing's shadow. Connection is good. I have some questions regarding how to format the data being published.
I'm monitoring my test topic with the test client on IoT Core and I can see my data but there is this formatting issue..
This is how the message is being displayed if I publish directly from the test client:
I've tried sending the data straight from a string constant, integer constant, variant data type but with all of those I'm getting the same result.
This is my block diagram, I know that IoT Core sends data on a JSON format, is that the issue with the formatting problem?
Thank you