weatherstation/firmware/influxdb.ino

13 lines
679 B
Arduino
Raw Normal View History

void pushToInfluxDB(String device, float sensorValues[]) {
influxdb.write("weather,device=" + device + " temperature=" + String(sensorValues[SENSOR_TEMPERATURE]));
influxdb.write("weather,device=" + device + " humidity=" + String(sensorValues[SENSOR_HUMIDITY]));
influxdb.write("weather,device=" + device + " light=" + String(sensorValues[SENSOR_LIGHT]));
influxdb.write("weather,device=" + device + " windspeed=" + String(sensorValues[SENSOR_WINDSPEED]));
2018-07-11 11:12:53 +02:00
influxdb.write("weather,device=" + device + " pressure=" + String(sensorValues[SENSOR_PRESSURE]));
influxdb.write("weather,device=" + device + " batvoltage=" + String(sensorValues[SENSOR_BAT_VOLTAGE]));
2017-12-09 18:08:37 +01:00
}