Best way to approach parsing a Zigbee value

I have a ZIgbee device that acts like a UART. I can send a number of char (numbers between 0 and 127) to communicate different measurements. The message comes through as a value:

A typical received number might be

Zigbee Msg# 334A780F22EE0100
the numbers sent were 33 4A 78 0F 22 EE 01 00

They will be several fixed patterns (on the sending side) in this case the first number "33" will tell the driver what the pattern of the following numbers (i.e. how to "read" them).

Is there a command or function in groovy or Hubitat that can easily separate these numbers?


Try parse description as map

1 Like

This is what I ended up least so far

Zigbee Msg# 334A780F22EE0100

            String[] str;
            str = ZigbeeHexMap.split('(?<=\\G..)');
            for( String values : str )

This may be useful: HexUtils Object - Hubitat Documentation