Hi,
I experienced a lit problem while using MQTT. So far it works, with my MQTT-client I receive data from TTN. What I do not understand is how to subcribe to a specific topic.
I have read to manual: https://www.thethingsnetwork.org/docs/applications/mqtt/ but I don’t really understand how to figure out the “name” of a topic. What I want to do is to get the gps-data from the following data.
Would be great if someone can give me a hint how to extract just the lat / lon.
{
“name”: “as.up.data.forward”,
“time”: “2022-02-12T12:22:52.954221609Z”,
“identifiers”: [
{
“device_ids”: {
“device_id”: “eui-XXXXXX”,
“application_ids”: {
“application_id”: “testapp-XXXXXX”
}
}
},
{
“device_ids”: {
“device_id”: “eui-XXXXXXX”,
“application_ids”: {
“application_id”: “testapp-XXXXXX”
},
“dev_eui”: “A8404169F184105D”,
“join_eui”: “A840410000000102”,
“dev_addr”: “260B53C6”
}
}
],
“data”: {
“@type”: “type.googleapis.com/ttn.lorawan.v3.ApplicationUp”,
“end_device_ids”: {
“device_id”: “eui-XXXXXXX”,
“application_ids”: {
“application_id”: “testapp-XXXXXXX”
},
“dev_eui”: “A8404169FXXXXXXX”,
“join_eui”: “A84041000XXXXXXXX”,
“dev_addr”: “260XXXXX”
},
“correlation_ids”: [
“as:up:01FVPY5N88EEGQCZFRTHA8N4TN”,
“gs:conn:01FVPWYBXK0HP2ESCC8R867SYE”,
“gs:up:host:01FVPWYBXTGK6XWT1QWHB6C7NG”,
“gs:uplink:01FVPY5N1K74Y1W8RGHPZYXY1W”,
“ns:uplink:01FVPY5N1N7ZVVB5KR54VVYCY4”,
“rpc:/ttn.lorawan.v3.GsNs/HandleUplink:01FVPY5N1N2D43PB64HXJ6WCVN”,
“rpc:/ttn.lorawan.v3.NsAs/HandleUplink:01FVPY5N86QRGR8JDESJ1NKXVP”
],
“received_at”: “2022-02-12T12:22:52.937740542Z”,
“uplink_message”: {
“session_key_id”: “AX7tE/nUQM5tMWxEV47C+w==”,
“f_port”: 2,
“f_cnt”: 21,
“frm_payload”: “AulrRACOWU4PR2Q=”,
“decoded_payload”: {
“ALARM_status”: “FALSE”,
“Altitude”: 0,
“BatV”: 3.911,
“FW”: 164,
“HDOP”: null,
“LON”: “ON”,
“Latitude”: 48.85178,
“Longitude”: 9.328974,
“MD”: “Move”,
“Pitch”: 0,
“Roll”: 0
},
“rx_metadata”: [
{