Virtuino Forum
Parsing of hexadecimal values - Printable Version

+- Virtuino Forum (
+-- Forum: Virtuino (
+--- Forum: Virtuino IoT (
+--- Thread: Parsing of hexadecimal values (/showthread.php?tid=1001)

Parsing of hexadecimal values - driaan - 07-31-2022

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.

RE: Parsing of hexadecimal values - iliaslamprou - 08-01-2022


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.

RE: Parsing of hexadecimal values - driaan - 08-02-2022

Thanks a lot, that would be very helpful.  I'll test it as soon as new version becomes available.