ESM LoRaWAN API
HTTP ingestion endpoint for ChirpStack v4 uplink events from Dragino LPS8-V2 gateways and LSN50v2-D20 temperature sensors.
POC endpoint
Endpoint
POST
/api/lorawan/lps8-uplink.php?event=up
GET
/api/lorawan/readings.php?limit=25
GET
/api/lorawan/raw-uplinks.php?limit=25
GET
/api/lorawan/debug.php
1. Receive
ChirpStack posts JSON uplink events.
2. Store raw
Full JSON is saved before decoding.
3. Decode
Temperature readings are inserted when payload data is valid.
Request
- Method
POST- Content-Type
application/json- Event
?event=up- Auth
?token=...orX-API-Key: ...- Duplicate
- Returns HTTP 200 with
{"ok":true,"duplicate":true}
Sample Payload
{
"deduplicationId": "poc-dedup-0001",
"time": "2026-06-02T06:30:00.000000Z",
"deviceInfo": {
"devEui": "a84041ffff123456",
"deviceName": "lsn50v2-d20-poc"
},
"fPort": 2,
"data": "DuwAyAAAAQAAAAA=",
"rxInfo": [
{
"gatewayId": "a84041ffffabcdef",
"rssi": -57,
"snr": 9.5
}
]
}