Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parsing of hexadecimal values
#1
Good day.  I have an MQTT client in the field which is very limited in terms of selecting and configuring messages.  All messages gets published to the same topic and I can also not change the format of it in any way.  The client is reading data via Modbus RTU and then publishing the following message:

{
  "devId": "493C220314031120",
  "msgType": "rs485ValueRpt",
  "data": "0203140002004E0041000500650000000213EE000300C08051",
  "timestamp": "1659254156"
}


The data is the hexadecimal modbus RTU return.  My question is whether it would be possible to parse and convert one of these hexadecimal values and then display it on the app in a 'value display' for example convert the 4E to 78.  The second question is related in whether I would be able to extract a single bit from one of these hexadecimal values and then use it to display status of an 'LED' for example. 

I haven't worked with the app or scripting that much so just want to know whether it would be possible.  I'm trying to evaluate which app I can use long term and this one seems the most promising by far.
Reply
#2
Hi,

I have ready a Hex converter. I was intending to add this feature later.
I can add it to the next version (0.0.14).

After the Hex to INT convertion you can use the "Bit Converter" to get the state of the value bits.
Reply
#3
Thanks a lot, that would be very helpful.  I'll test it as soon as new version becomes available.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)