Hello dear friends, i have 2 esp32 that one of them are sending 6 value by json standard via lora and other side are lora receiver that lora parse data and print on terminal, i want to send influxdb received values, but i don’t know how, can you help me about this scenario how i can send lora data in json mode to influxdb, thanks
Hi @Werta,
Welcome to the community! Are you using the Things Stack as your LoRa network server? If so you could connect Telegraf directly to the MQTT broker and send these messages directly to InfluxDB. Here is an example template: community-templates/thing_network at master · influxdata/community-templates · GitHub
Hi dear jay, second esp32 sends data to my thingsboard server, how can i connect my thingsboard server to influxdb. Thanks for your response
Hi @Werta, Sorry this is my first time hearing about thingsboard. Do you mean this platform? https://thingsboard.io/
Yes this is my used platform on Ubuntu, but that’s not important with which of them i can connect to influxdb,esp32 lora receiver data with json or thingsboard data transfer to influxdb, thanks
Hi @Werta,
So I believe you have 3 options:
-
You could potentially look at going from ESP 32 straight to InfluxDB using the Arduino client library. The only two issues I see there are it requires further code to be added to your boards and I have not done much extensive testing against LoRa based controllers with it GitHub - tobiasschuerg/InfluxDB-Client-for-Arduino: Simple library for sending measurements to an InfluxDB with a single network request. Supports ESP8266 and ESP32.
-
Your second option is to install Telegraf on your Ubuntu server and read directly from your Things Platfom. it looks like it might have an MQTT broker so you could use the MQTT client of Telegraf and pull data directly into InfluxDB that way.
-
The last option is using things board to send the data directly. If things board has a rest client then you could potentially write your data directly to InfluxDB write endpoint. Note that InfluxDB only accepts data in the form on line protocol. So you will need to convert from JSON → line protocol before writing to the endpoint Write data with the InfluxDB API | InfluxDB OSS 2.3 Documentation
Thanks for your fast response dear jay, i think the third way is possible for me, can you help me about way 3, the thingsboard can work with rest api communication.