Hello there,
When a node send data to my server through TTN V3, as an integration, I use a web hook
In the field ‘Base URL’, I saved the path to my PHP Script of my web server. The PHP script read the post data and save it into a database. It’s work since some years
Today, I got a surprise. I added a rain gauge sensor to one my station. It’s sunny and my station send the measure, the measure has been save to my database and I could read a new line in my graph.
After, a measure has been sent, I put 50ml of water in my rain gauge, I wait one hour and I observed that no measures has been sent. (none of all sensors connected to the station)
My PHP script log the data received by TTN, I checked the log file and I was surprised to not see decoded_playload
{
"end_device_ids": {
"device_id": "st-21",
"application_ids": {
"application_id": "name"
},
"dev_eui": "00000000XXXXXXXX",
"join_eui": "00000000XXXXXXXX",
"dev_addr": "XXXXXXXX"
},
"correlation_ids": [
"as:up:01G33VD27M4M7N59X7XXXXXXXX",
"gs:conn:01G2H1B3K1P2DHJEN1XXXXXXXX",
"gs:up:host:01G2H1B3K53ZWW7AR6XXXXXXXX",
"gs:uplink:01G33VD215CAAR0XKVXXXXXXXX",
"ns:uplink:01G33VD216RVA8CK3XXXXXXXXX",
"rpc:/ttn.lorawan.v3.GsNs/HandleUplink:01G33VD216S7V3KSK8XXXXXXXX",
"rpc:/ttn.lorawan.v3.NsAs/HandleUplink:01G33VD27KVJ5Y53EVXXXXXXXX"
],
"received_at": "2022-05-15T12:34:30.260503051Z",
"uplink_message": {
"session_key_id": "AYDHf5qY7PBXteXXXXXXXX==",
"f_cnt": 1,
"rx_metadata": [
{
"gateway_ids": {
"gateway_id": "ic800a",
"eui": "B827EBFFXXXXXXXX"
},
"time": "2022-05-15T12:34:30.033273Z",
"timestamp": 4243657139,
"rssi": -47,
"channel_rssi": -47,
"snr": 8,
"location": {
"latitude": 46.XXXXXXXX313159,
"longitude": 6.XXXXXXXX7700196,
"altitude": 700,
"source": "SOURCE_REGISTRY"
},
"uplink_token": "XXXXXXXXaWM4MDBhEgi4J+v//kaBbhCzo8TnDxoLCNbmg5QGEJ/11BkguMa07cDIjgEqXXXXXXXXXXXXXXXX"
}
],
"settings": {
"data_rate": {
"lora": {
"bandwidth": 125000,
"spreading_factor": 7
}
},
"coding_rate": "4/5",
"frequency": "868100000",
"timestamp": 4243657139,
"time": "2022-05-15T12:34:30.033273Z"
},
"received_at": "2022-05-15T12:34:30.054707053Z",
"consumed_airtime": "0.046336s",
"network_ids": {
"net_id": "000013",
"tenant_id": "ttn",
"cluster_id": "eu1",
"cluster_address": "eu1.cloud.thethings.network"
}
}
}
I tried it again. I add a few water in my rain gauge and I checked the Live data of my TTN V3 application. I can see the all measures are sent and receive at TTN V3. The ga has a value (ga is the parameter for the rain gauge) Great
I tried again with no watter in my rain gauge and the data has been saved this time. Compared my two file log, and the second time, I could see the ‘decoded_payload’. The ‘uplink_message’ contains more information
{
"end_device_ids": {
"device_id": "st-21",
"application_ids": {
"application_id": "name"
},
"dev_eui": "00000000XXXXXXXX",
"join_eui": "00000000XXXXXXXX",
"dev_addr": "XXXXXXXX"
},
"correlation_ids": [
"as:up:01G33QZBYSXPE7JK2FXXXXXXXX",
"gs:conn:01G2H1B3K1P2DHJEN1XXXXXXXX",
"gs:up:host:01G2H1B3K53ZWW7AR6XXXXXXXX",
"gs:uplink:01G33QZBRAT7D5PFPVXXXXXXXX",
"ns:uplink:01G33QZBRBH1RNVG5XXXXXXXX",
"rpc:/ttn.lorawan.v3.GsNs/HandleUplink:01G33QZBRBEQNAACX1XXXXXXXX",
"rpc:/ttn.lorawan.v3.NsAs/HandleUplink:01G33QZBYSDAH1QJTEXXXXXXXX"
],
"received_at": "2022-05-15T11:34:35.738040564Z",
"uplink_message": {
"session_key_id": "AYDHf5qXXXXXXXXXXXXXXXXX",
"f_port": 1,
"frm_payload": "YTIzYjkzYzU5ajBrNDIwbTB0XXXXXXXX",
"decoded_payload": {
"an": "0",
"ar": null,
"b1": null,
"b2": null,
"b3": null,
"b4": null,
"ba": "420",
"da": null,
"ga": "0",
"hu": "59",
"it": null,
"lu": null,
"pr": "93",
"sb": null,
"sl": null,
"su": "159",
"te": "23",
"ts": null,
"w1": null,
"w2": null,
"w3": null,
"wd": "45",
"wr": null
},
"rx_metadata": [
{
"gateway_ids": {
"gateway_id": "ic800a",
"eui": "B827EBFFFE46816E"
},
"time": "2022-05-15T11:34:35.502070Z",
"timestamp": 649139603,
"rssi": -65,
"channel_rssi": -65,
"snr": 7.5,
"location": {
"latitude": 46.XXXXXXXX313159,
"longitude": 6.XXXXXXXX7700196,
"altitude": 700,
"source": "SOURCE_REGISTRY"
},
"uplink_token": "XXXXXXXXaWM4MDBhEgi4J+v//kaBbhCTq8S1AhoMCMvKg5QGELvvkf0BILiM8Z3y340BKgwIXXXXXXXX",
"channel_index": 2
}
],
"settings": {
"data_rate": {
"lora": {
"bandwidth": 125000,
"spreading_factor": 7
}
},
"coding_rate": "4/5",
"frequency": "868500000",
"timestamp": 649139603,
"time": "2022-05-15T11:34:35.502070Z"
},
"received_at": "2022-05-15T11:34:35.531803582Z",
"consumed_airtime": "0.082176s",
"network_ids": {
"net_id": "000013",
"tenant_id": "ttn",
"cluster_id": "eu1",
"cluster_address": "eu1.cloud.thethings.network"
}
}
}
I just tried again with 50ml of water in my rain gauge and the rain gauge value has been sent
So as I far I understand,
- 4 or 5 time, the ‘decode_payload’ was not sent but mainly after I switched on my station and it send the first value.
- I observed another station which has the same problem. You can see here when the two measures are with a value of 0.1
What can be the reason why TTN do not send the ‘decoded_payload’ section?
My configuration has always been working
Do you need more information?
Many thanks