# Need help finding groups in hex buffer

**URL:** https://discourse.nodered.org/t/need-help-finding-groups-in-hex-buffer/59253
**Category:** General
**Created:** [2 March 2022 20:11 UTC](https://discourse.nodered.org/t/need-help-finding-groups-in-hex-buffer/59253 "2022-03-02T20:11:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![JohnnyPicnic](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/johnnypicnic/32/34787_2.png) [@JohnnyPicnic](https://discourse.nodered.org/u/JohnnyPicnic)
#### Post date: [2 March 2022 20:11 UTC](https://discourse.nodered.org/t/need-help-finding-groups-in-hex-buffer/59253/1 "2022-03-02T20:11:12Z")

</div>

I have a hex buffer that contains information about my oven. I may be reinventing the wheel a bit here as some of this has been done in python.  
I would like to be able to sort out any of these oven codes from the buffer.  
There are more than this...  
# Oven codes  
ACTIVE\_F\_CODE\_STATUS = "0x5005"  
CONVECTION\_CONVERSION = "0x5003"  
ELAPSED\_ON\_TIME = "0x5004"  
END\_TONE = "0x5001"  
HOUR\_12\_SHUTOFF\_ENABLED = "0x5000"  
KEY\_PRESSED = "0x5006"  
UPPER\_OVEN\_AVAILABLE\_COOK\_MODES = "0x510b"  
UPPER\_OVEN\_COOK\_MODE = "0x5100"  
UPPER\_OVEN\_COOK\_TIME\_REMAINING = "0x5104"  
UPPER\_OVEN\_CURRENT\_STATE = "0x5101"  
UPPER\_OVEN\_DELAY\_TIME\_REMAINING = "0x5102"  
UPPER\_OVEN\_DISPLAY\_TEMPERATURE = "0x5109"  
UPPER\_OVEN\_ELAPSED\_COOK\_TIME = "0x5108"  
UPPER\_OVEN\_KITCHEN\_TIMER = "0x5105"  
UPPER\_OVEN\_PROBE\_DISPLAY\_TEMP = "0x5103"  
UPPER\_OVEN\_PROBE\_PRESENT = "0x5107"  
UPPER\_OVEN\_REMOTE\_ENABLED = "0x510a"

Example hex buffer is:  
e2 bf 25 80 f5 04 **50 06** 01 17 **51 00** 0d 01 01 5e 00 00 00 00 00 00 00 00 00 00 **51 01** 01 01 **51 0a** 01 01 3b ef e3

The third hex contains the total length, in this case 25  
The sixth hex contains the number of groups of data, in this case 4  
Second and third last hex are CRC and last hex always end in e3.  
The groups are 5006, 5100, 5101 and 510a.  
Is there a logical way to dynamically sort this? The groups of data changes and therefore the length and quantity of data changes as well.  
Desired outcome would be:

**50 06** 01 17  
**51 00** 0d 01 01 5e 00 00 00 00 00 00 00 00 00 00  
**51 01** 01 01  
**51 0a** 01 01

Another buffer for reference:  
e2 bf 2a 80 f5 05 **50 06** 01 03 **51 00** 0d 00 01 5e 00 00 00 00 00 00 00 00 00 00 **51 01** 01 00 **51 08** 02 ff ff **51 0a** 01 00 8e 7f e3

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [1 May 2022 20:12 UTC](https://discourse.nodered.org/t/need-help-finding-groups-in-hex-buffer/59253/2 "2022-05-01T20:12:09Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
