TTNMQTT module processes decoded_payload even in the absence of a frm_payload
Posted: Wednesday 09 February 2022 12:31
Using build 14.166 on raspberry pi.
Every now and then one or more sensors publish a message without a frm_payload. However the decoded_payload is present as probably processed by the provided payload formatter in TTN. These decoded payload values are all based on 0(null) values and have no meaningful values.
The calculation on the temperature results in a -32 degrees centigrade. This is the part of the payload formatter used in TTN that creates that value:
This gives a significant negative spike in the graphs on Domoticz.
Is it possible to ignore messages with missing frm_payload?
This is an example of the message:
Every now and then one or more sensors publish a message without a frm_payload. However the decoded_payload is present as probably processed by the provided payload formatter in TTN. These decoded payload values are all based on 0(null) values and have no meaningful values.
The calculation on the temperature results in a -32 degrees centigrade. This is the part of the payload formatter used in TTN that creates that value:
Code: Select all
temperature: (bytes[2] & 0x7f) - 32,
This gives a significant negative spike in the graphs on Domoticz.
Is it possible to ignore messages with missing frm_payload?
This is an example of the message:
Code: Select all
{"tst":"2022-02-08T20:27:11.905264+0100","topic":"v3/first-lorawan-app@ttn/devices/eui-e8e1e100010910c9/up","qos":0,"retain":0,"payloadlen":1525,"payload":{"end_device_ids":{"device_id":"eui-e8e1e100010910c9","application_ids":{"application_id":"first-lorawan-app"},"dev_eui":"E8E1E100010910C9","join_eui":"58A0CB0001500000","dev_addr":"260B690D"},"correlation_ids":["as:up:01FVDCVQGBEVNKFYG0ETY5B6A5","gs:conn:01FVBZ1886KVF4MCNFK0A7R5CY","gs:up:host:01FVBZ188PQVP85GGX5N14VQCZ","gs:uplink:01FVDCVQ95TDN885MXPF3GT3TA","ns:uplink:01FVDCVQ97RV6Z60B644FAQAKP","rpc:/ttn.lorawan.v3.GsNs/HandleUplink:01FVDCVQ972JNXTHVTK1YXGHAB","rpc:/ttn.lorawan.v3.NsAs/HandleUplink:01FVDCVQGANA7JARYXDW74VC05"],"received_at":"2022-02-08T19:27:11.884713022Z","uplink_message":{"session_key_id":"AX6cPSqpNS9in/+WtPtRaA==","f_port":103,"f_cnt":368,"decoded_payload":{"battery":2.5,"humidity":0,"status":0,"temperature":-32},"rx_metadata":[{"gateway_ids":{"gateway_id":"hf-lorawan-gw01","eui":"58A0CBFFFE804796"},"time":"2022-02-08T19:27:11.590468883Z","timestamp":807436691,"rssi":-60,"channel_rssi":-60,"snr":8.5,"uplink_token":"Ch0KGwoPaGYtbG9yYXdhbi1ndzAxEghYoMv//oBHlhCTg4KBAxoMCI+Ii5AGEKvnz7cCILjM6Pe/9goqDAiPiIuQBhCTrseZAg=="}],"settings":{"data_rate":{"lora":{"bandwidth":125000,"spreading_factor":7}},"coding_rate":"4/5","frequency":"867100000","timestamp":807436691,"time":"2022-02-08T19:27:11.590468883Z"},"received_at":"2022-02-08T19:27:11.655431697Z","consumed_airtime":"0.051456s","version_ids":{"brand_id":"browan","model_id":"tbhh100","hardware_version":"1.0","firmware_version":"1.0.1","band_id":"EU_863_870"},"network_ids":{"net_id":"000013","tenant_id":"ttn","cluster_id":"ttn-eu1"}}}}