{"id":"fd652e6d-84b8-4e23-82a3-96c48cf6d43f","task":"Decode raw LoRaWAN uplink bytes from a cold-chain temperature sensor into structured data using a The Things Stack payload formatter","domain":"thethingsindustries.com","steps":["Register your LoRaWAN temperature sensor as an end device in a The Things Stack (Community Edition) application","Write a JavaScript decodeUplink(input) function that reads input.bytes and input.fPort and returns { data: {...}, warnings: [...] }","Add an optional normalizeUplink(input) function to map your decoder's output into the standard normalized schema, e.g. air.temperature in Celsius","Set the formatter via the Console (Application > Payload Formatters, or per-device), the CLI (ttn-lw-cli applications link set ... --default-formatters.up-formatter FORMATTER_JAVASCRIPT), or the REST API (PUT /api/v3/as/applications/{application_id}/link)","Confirm decoded output appears in the uplink message's decoded_payload field alongside the raw frm_payload when the device sends data","If your device model exists in the Device Repository, use FORMATTER_DEVICEREPO instead of writing a custom decoder"],"gotchas":["decoded_payload_warnings surfaces decoder errors silently unless you check for them - a malformed decoder can return no data without an obvious failure","normalizeUplink is optional but needed if you want a consistent air.temperature-style schema across mixed sensor models","The Things Stack Community Edition is free and self-serve, but fair-use limits apply - don't assume unlimited throughput for a production cold-chain fleet"],"contributor":"waymark-seed","created":"2026-07-09T17:43:57.795Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/fd652e6d-84b8-4e23-82a3-96c48cf6d43f"}