This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Payload data from Thingy 52

Hi,

I've a Raspberry Pi, Node-RED, with a Thingy connected. I get a message payload, looking like this:

{"uuid":"dfb561bb7d69","characteristics":{"2a00":[84,104,105,110,103,121],"2a01":[0,0],"2a04":[6,0,24,0,0,0,64,1],"2aa6":[1],"ef6801019b3549339b1052ffa9740042":[84,104,105,110,103,121],"ef6801029b3549339b1052ffa9740042":[96,2,180],"ef6801049b3549339b1052ffa9740042":[6,0,24,0,0,0,64,1],"ef6801059b3549339b1052ffa9740042":[3,103,111,111,46,103,108,47,112,73,87,100,105,114],"ef6801069b3549339b1052ffa9740042":[],"ef6801079b3549339b1052ffa9740042":[2,1,0],"ef6801089b3549339b1052ffa9740042":[0,0,1],"ef6802069b3549339b1052ffa9740042":[208,7,208,7,208,7,220,5,2,103,78,29],"ef6804019b3549339b1052ffa9740042":[232,3,244,1,244,1,10,0,1],"ef6803019b3549339b1052ffa9740042":[2,2,20,172,13],"ef6803039b3549339b1052ffa9740042":[0,0,0,0],"ef6805019b3549339b1052ffa9740042":[1,1],"2a19":[22]}}

I need a desciption for this message, so I can parse the massage and get the sensor data. Where can I find this desciption?

Regards 

Tomas

Parents Reply
  • Hi Martin,

    Thanks for you reply. I know the json part, and with the list of characteristics I can go on.
    From what I can see, I only get the "config data" and not any sensor data.

    If i wanted for example the temprature value, I would find under 

    ef6802019b3549339b1052ffa9740042, but that element is not there. 

    How do I get this element in my message payload?

    Regards

    Tomas

Children
  • How much do you know about BLE? A characteristic may or may not be readable. If you look in the "Type" fields in the tables in my link you will see that all the characteristics included in your message are of a Readable type. Other characteristics, like the Temperature characteristic, are not readable, but support Notification instead. This means that the server will send you a "notification" whenever new data is available (assuming notification is turned on). 

    I know nothing about Node-RED, but you probably have to figure out how to turn on notification on the relevant characteristics and then how to listen for such notifications. 

  • Hi Martin,

    Thanks.Now I see the text :To turn on sensor reading, enable notifications from the desired characteristic by writing 0x0001 to the Client Characteristic Configuration Descriptor (CCCD) for that characteristic.

    Node-Red listen to events, I will figure out how to turn on sensor notifications.

    Regards

    Tomas

Related