Is it possible to receive just the “Payload Fields” via MQTT, filtering out the metadata, app_id, etc.? The SCADA application we’re trying to get this data to only supports JSON Schema A format, which just requires a timestamp, the tag name, the tag value, and nothing else. Like this:
{
“time” : 1584630099093,
“value” : 1234
}
But the current MQTT payload looks like this:
tns_home_sensors/devices/1939a0113/up
{
“app_id” : “tns_home_sensors”,
“dev_id” : “1939a0113”,
“hardware_serial” : “647FDA00000043CF”,
“port” : 20,
“counter” : 5610,
“payload_raw” : “gAEDAgTSOtk=”,
“payload_fields” : {
“time” : 1584630159094,
“value” : 1234
},
“metadata” : {
“time” : “2020-03-19T15:02:38.885002565Z”,
“frequency” : 904.6,
“modulation” : “LORA”,
“data_rate” : “SF8BW500”,
“airtime” : 25728000,
“coding_rate” : “4/5”,
“gateways” : [ {
“gtw_id” : “eui-647fdafffe00547b”,
“timestamp” : 1636785216,
“time” : “”,
“channel” : 8,
“rssi” : -73,
“snr” : 11,
“rf_chain” : 0
} ]
}
}
Subscribing to the individual tag Topic only returns the tag value which is also unsupported:
tns_home_sensors/devices/1939a0113/up/value
1234