Parsing payload in Python to send from RPi based node

Look at struct.pack() and .unpack() on the python end.

On the decoder end you’re going to need to spend some time to understand how multi-byte values are made of individual bytes. If you have signed values, getting the decoder right is particularly tricky, many people make coding mistakes there (and worse, for something like temperature or GPS it might be half a year or an overseas customer before the value passes through zero such that they discover the error)

I was having in mind the struct pack and unpack to arrange any bytes order, but i will look more on the TTN decoder as for now up until values 0-256 i wasn’t needing and i could pass my array as is. Thanks for this insight.

You mean 0-255.

And this is what I meant by understanding how larger values are represented as multiple bytes, 0-255 (or alternately -128 - 127) being the range of values that a byte can represent in the two most common interpretations.

Yes i had the out of range error in python (0-256) before importing a numpy array. With numpy i didn’t had that error and i could display values >255 only in the console. When i was attempting to send that equivalent bytes string a value eg of 326 i was displayed in my application the value of 70 in uint8.
[(0, 326), (1, 42)]
[ 0 70 1 42]
b’\x00F\x01*’
In uint16 i assume 2 bytes per number i get the following result
[0,0,70,1,1,0,42,0]