How to decode CBOR in a payload format Decoder?

Hello,
I’m using the example enviromental sensing of AllThingsTalk that sends different sensor values using cbor.
The problem is that I would like to send those values to another platform using the integration Data Storage instead of AllThingsTalk, and it seems that I’ll have to write a decoder .
The sending data of, for example, the temperature value is 35 FA 41 AF 85 1F 62 where 35 is sensorID and FA 41 AF 85 1F 62 the value, that is 21.94 according to cbor decoder.
I’ve seen some decoders from byte to float of 32 bits but here I have 48 (FA 41 AF 85 1F 62) ¿Is it posible to decode 48 bits instead of 32?

I cannot get your example to decode in the decoder. But it’s not always going to be 48 bits, but depends on the actual value:

So, even when not using JSON, I’d fix the problem at its root cause, and try to get rid of CBOR. Unless your device sends a lot of different types of messages, it’s just too much overhead to use in LoRaWAN. And even if it does send a lot of different messages, then see, e.g., Multiple sensors with different payload decoding TTN and How to best write an application that contains many nodes with different measure data types.

If you really cannot get rid of it, then you’ll need to copy a CBOR helper into the payload format in TTN Console, and use that helper in the Decoder function. See Implementations on the CBOR website.

Thanks for your answer, I’ll try to get rid of CBOR.