Create smart application as well as store Live data through wireless sensors

influxdb
telegraf
time-series
kapacitor
schema

#1

Hey as IT administrator for food preservation company we are trying to make cloud based transport consisting of Refrigerated container vehicles use within the state to provide door to door service for preserved food,
And to check the temperature readings in refrigerator vehicle, I am using Wireless sensor which is connected to Sim Based Particle
I need to share the sensor data to Influx Database but I am unaware about how to use it
Please suggest me how can I send more than 10 Wireless sensor data readings(connected to Vehicles) as well as temperature location at same time and also suggest the development tools which help to create smart application to trace the temperature readings through operational process


#2

Hi @jeremy75,

Great question! And since you’re using Particle devices, it’s super easy! There’s a web hooks integration as part of the Particle.io cloud for InfluxDB via Telegraf. There’s a tutorial in the Particle docs

String data = String::format("{\"data\": { \"tags\" : {\"id\": \"%s\", \"location\": \"%s\"}, \"values\": \"temp_f\": %f}}, \"ttl\": 60, \"published_at\": %s, \"coreid\": %s, \"name\": \"sensor\"}", myID.c_str(), fTemp, Time.format(time, TIME_FORMAT_ISO8601_FULL).c_str(), myID.c_str());
Particle.publish("sensor", data, PRIVATE);

That little code snippet will post a temperature to Particle’s cloud. If you follow the tutorial at https://docs.particle.io/tutorials/integrations/influxdata/photon/ for setting up the WebHook you should be good to go.

Note: You will need an instance of Telegraf running somewhere that is accessible from the Particle cloud in order to make this work.

Let me know if you have questions.

Best regards,
dg


#3

Hey is there any library available which import telegraf plugin directly ? Also I have python library so is there any possible way to integrate the the data with telegraf ?


#4

I’m not sure I understand your question here. What do you mean by “import the telegraf plugin directly”? Telegraf is a stand-alone, compiled binary application.

There are Python libraries for InfluxDB here https://github.com/influxdata/influxdb-python which you can use to send data directly to InfluxDB using Python.

HTH,
dg