MQTT with TTN getting payload_raw

Hi, I start to use Telegraf to extract data from TTN sent by IoT devices. The data resides in the field “payload_raw”. Telegraf is getting the json data from TTN and extracts a lot of information data (numeric only?) from that JSON structure but not the field “payload_raw” (Base64 encode string). NB: the Python library used on the IoT device does not support the of payload_fields.:frowning: Hence why data from IoT device is in payload_raw.

The best way to handle this is to use a payload decoder function in the TTN interface.

I wrote a whole blog post about doing this a while back: https://www.influxdata.com/blog/connecting-the-things-network-to-influxdb/

Let me know if that helps, or if you have further questions.

dg

Hi David, read through your blog post. And it all comes together now. The clue is indeed to use the payload formatter. I will need to dig into Javascript but that shouldn’t be a problem. Thx a lot for the revealing piece of documentation.
Keep healthy in these, by Corona dictated, days.
Greats from Europe/Belgium

1 Like

Reach out if you need help with the payload formatter, etc. Happy to help out!

dg

1 Like

Just to inform you that I have it all working the way it should be Rasberry Pi + LoRa RFM95 module -> LoRaWAN -> TTN -> Telegraf -> InfluxDB -> Grafana.
Thx a lot for the guidance!

1 Like