Script to parse byte array #1873
Unanswered
adamalfath
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The client is publishing data in byte array
0x01 0x02 0x03 0x04
and MQTTX using Hex format can read it as0102 0304
However in the script, payload treated as string
"0102 0304 "
so accessingvalue[0]="0"
,value[1]="1"
(returning char) which is not what I intended. And also the script is dynamically adjusted the "value" based on the format specified in the main window (ex: plaintext, json, etc).How to make script function independent to that changes and read the original payload value?
Beta Was this translation helpful? Give feedback.
All reactions