Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

codesys mqtt publish serialization

amy123
2024-02-16
2024-03-26
  • amy123 - 2024-02-16

    Hello,

    I am using the CODESYS IIoT Libraries SL MQTT Publish. Does this publish block only support publishing STRINGS as a readable format?

    I can publish ENUM, STRUCT, BOOL; however, MQTT Explorer will only display strings. When I use Wireshark, I can see that it is publishing something, but it looks to be publishing a serialized version which is a bunch of 0s or random text.

    If so, is there any way to deserialize this information back into a readable format? See pictures, where I have a BOOL TRUE that gets published as 001. Then see where I publish a STRUCT and it's an incomprehensible combination of 0s - only the string variable is displayed.

    Or, is it expected that you convert everything to a string before publishing?

    Any help is greatly appreciated! :)

     
  • mmpl - 2024-03-26

    Did you get any Luck? I am on same boat. Can you please share your latest Snip.

    Thank you

     

Log in to post a comment.