Ah, so it’s more like: Use FCntUp as a pulse counter? (I’ve edited the title and removed some intermediate posts.)
If the pulse frequency is not too high, then: yes, that will work. (I stand corrected; see below!)
The Decoder in the payload formats really only exists to translate an application payload, and the metadata simply is not part of that payload, so I assume it was not even considered. (Also, testing would be much harder.) With or without a Decoder, you still need the MQTT Data API or some integration to actually access the (translated) application payload anyhow, which will give you the metadata as well. It’s not like that with a Decoder, you would no longer need some API or integration to access the data anyhow.
Aside: given the 13 bytes LoRaWAN overhead, an additional small application payload will not affect the total airtime much. Also beware that most SDKs have been deprecated, so when using the MQTT API just don’t bother about any SDK.
MQTT example
{
"app_id":"arjanvanb-app-1",
"dev_id":"arjanvanb-bb-1",
"hardware_serial":"70B3D5B020035CD1",
"port":2,
"counter":7165,
"payload_raw":"CWUMqw0LDNM=",
"metadata":{
"time":"2017-04-27T10:07:27.207187339Z",
"frequency":868.1,
"modulation":"LORA",
"data_rate":"SF7BW125",
"coding_rate":"4/5",
"gateways":[
{
"gtw_id":"eui-b827ebffff5fe05c",
"timestamp":532315708,
"time":"",
"channel":0,
"rssi":-57,
"snr":9,
"latitude":52.37447,
"longitude":4.63576
},
{
"gtw_id":"eui-5ccf7ff42f1970ec",
"timestamp":1284851361,
"time":"2017-04-27T10:07:26.494026Z",
"channel":0,
"rssi":-49,
"snr":9,
"rf_chain":1,
"latitude":52.374523,
"longitude":4.635771,
"altitude":4
}
]
}
}