Skip to content
ESP8266 DHT sensor probe that pushes readings to influxdb
C++
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
src
.gitignore
.travis.yml
README.md
connections.png
platformio.ini

README.md

Build Status

Overview

ESP8266 DHT sensor probe that pushes readings to influxdb

Build requirements

  • PlatformIO
  • ESP8266 board (only tested with D1 Mini)

Connections diagram

Connections

Usage requirements

  • influxdb accessible from the wifi network where the probe connects to

Required build flags

  • WIFI_SSID - wifi ssid

  • WIFI_PASSWD - wifi password

  • INFLUXDB_URI - influxdb write endpoint url, as in http://INFLUXDB_HOST:INFLUXDB_PORT/write?db=INFLUXDB_DB

  • INFLUXDB_TAGS - influxdb tags to use for all readings. Use "" if none is needed. Be careful with length! Internal string buffer is 128 bytes.

  • DEEPSLEEP - Time to deep sleep (usecs). 15e6 is 15 seconds

    Note: these flags can be defined in platformio.ini and/or defined as environment variables before calling platformio.

Building

PLATFORMIO_BUILD_FLAGS='-DWIFI_SSID=\"MY_SSID\" -DWIFI_PASSWD=\"MY_PASSWD\" -DINFLUXDB_URI=\"http://INFLUXDB_HOST:INFLUXDB_PORT/write?db=INFLUXDB_DB\" -DINFLUXDB_TAGS=\",KEY1=VALUE,KEY2=VALUE\" -DDEEPSLEEP="15e6"' platformio run

Uploading

PLATFORMIO_BUILD_FLAGS='-DWIFI_SSID=\"MY_SSID\" -DWIFI_PASSWD=\"MY_PASSWD\" -DINFLUXDB_URI=\"http://INFLUXDB_HOST:INFLUXDB_PORT/write?db=INFLUXDB_DB\" -DINFLUXDB_TAGS=\",KEY1=VALUE,KEY2=VALUE\" -DDEEPSLEEP="15e6"' platformio run -t upload
You can’t perform that action at this time.