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


Messages In This Thread
Parsing of hexadecimal values - by driaan - 07-31-2022, 08:10 AM
RE: Parsing of hexadecimal values - by driaan - 08-02-2022, 07:53 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)