The Things Stack uplink adapter
A strict mapping for The Things Stack v3 JSON uplink envelopes.
Input mapping
| The Things Stack field | Ghost field |
|---|---|
| end_device_ids.dev_eui | device.devEui |
| end_device_ids.application_ids.application_id | applicationId |
| received_at | receivedAt |
| uplink_message.f_cnt / f_port | frameCounter / fPort |
| uplink_message.frm_payload / decoded_payload | payloadBase64 / decoded |
Event identity policy
Version 0.1 requires an as:up: correlation ID. It rejects events without one rather than generating a potentially misleading identity. This is Ghost’s explicit adapter policy; validate it against the provider events enabled in your deployment.
import {fromThingsStack} from './uplink.mjs';
const event = fromThingsStack(body, trustedBinding);Unsupported input
Join, downlink and status messages do not satisfy this uplink contract. Route them to dedicated handlers. Empty decoded payloads do not mean a zero reading; your application must distinguish absent measurements from valid values.
Provider reference
The Things Stack data formats ↗Provider behaviour should be verified against the version you deploy.