I have a node that is sending a simple value of 90.
I have a decoder that is the most basic possible:
function decodeUplink(input) {
  return {
    data: {
      bytes: input.bytes,
      f_port: input.fPort
    },
    warnings: [],
    errors: []
  };
}
When I test it in the payload formatter tool, the output is as follows:
{
  "f_port": 1,
  "frm_payload": "JgsVMw==",
  "decoded_payload": {
    "bytes": [
      38,
      11,
      21,
      51
    ],
    "f_port": 1
  },
  "rx_metadata": [
    {
      "gateway_ids": {
        "gateway_id": "test"
      },
      "rssi": 42,
      "channel_rssi": 42,
      "snr": 4.2
    }
  ],
  "settings": {
    "data_rate": {
      "lora": {
        "bandwidth": 125000,
        "spreading_factor": 7
      }
    }
  }
}
However in the uplink message on both MQTT and via Webhooks, the uplink_message field has neither the f_port nor the decoded_payload fields as documented at Data Formats | The Things Stack for LoRaWAN
{
  "end_device_ids": {
    "device_id": "<DEVICE_ID>",
    "application_ids": {
      "application_id": "<MY APPLICATION>"
    },
    "dev_eui": "<DEV_EUI>",
    "join_eui": "<JOIN_EUI>",
    "dev_addr": "<DEV_ADDR>"
  },
  "correlation_ids": [
    "as:up:01GH4SXZXHT5JMQ2DKKM4G8VEV",
    "gs:conn:01GH4NPAEM49XY2TE912SVF2WY",
    "gs:up:host:01GH4NPAEWH6TBZYQTFT8E0DNS",
    "gs:uplink:01GH4SXZQ3AKNN1YXXM9TZVVZ6",
    "ns:uplink:01GH4SXZQ41K8H2185J0RMWXT9",
    "rpc:/ttn.lorawan.v3.GsNs/HandleUplink:01GH4SXZQ48QS27WFGWEPNA632",
    "rpc:/ttn.lorawan.v3.NsAs/HandleUplink:01GH4SXZXGZA1P06GYMZGDDS1G"
  ],
  "received_at": "2022-11-05T21:07:47.760681222Z",
  "uplink_message": {
    "session_key_id": "<SESSION_KEY>==",
    "f_cnt": 7,
    "rx_metadata": [
      {
        "gateway_ids": {
          "gateway_id": "<GWID>",
          "eui": "<GWEUI>"
        },
        "time": "2022-11-05T21:07:47.526207923Z",
        "timestamp": 149241811,
        "rssi": -70,
        "channel_rssi": -70,
        "snr": 9,
        "uplink_token": "<TOKEN>",
        "received_at": "2022-11-05T21:07:47.528937388Z"
      }
    ],
    "settings": {
      "data_rate": {
        "lora": {
          "bandwidth": 125000,
          "spreading_factor": 7,
          "coding_rate": "4/5"
        }
      },
      "frequency": "868100000",
      "timestamp": 149241811,
      "time": "2022-11-05T21:07:47.526207923Z"
    },
    "received_at": "2022-11-05T21:07:47.556263882Z",
    "confirmed": true,
    "consumed_airtime": "0.041216s",
    "version_ids": {
      "brand_id": "heltec",
      "model_id": "wifi-lora-32-class-a-abp",
      "hardware_version": "_unknown_hw_version_",
      "firmware_version": "1.0",
      "band_id": "EU_863_870"
    },
    "network_ids": {
      "net_id": "000013",
      "tenant_id": "ttn",
      "cluster_id": "eu1",
      "cluster_address": "eu1.cloud.thethings.network"
    }
  }
}
Any idea why this might be?



 I thought it were something small. Happy coding.
 I thought it were something small. Happy coding.