ESP32 / ESP8266 & BME280 / SHT2x sensor with InfluxDB support
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.h 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * config.h
  3. *
  4. * ESP8266 / ESP32 Environmental Sensor
  5. *
  6. * ----------------------------------------------------------------------------
  7. * "THE BEER-WARE LICENSE" (Revision 42):
  8. * <xythobuz@xythobuz.de> wrote this file. As long as you retain this notice
  9. * you can do whatever you want with this stuff. If we meet some day, and you
  10. * think this stuff is worth it, you can buy me a beer in return. Thomas Buck
  11. * ----------------------------------------------------------------------------
  12. */
  13. #ifndef __ESP_ENV_CONFIG__
  14. #define __ESP_ENV_CONFIG__
  15. // Sketch version
  16. const char* esp_env_version = "0.4.0";
  17. // location of sensor, used in DB and hostname
  18. //const char* sensor_location = "livingroom";
  19. //const char* sensor_location = "bedroom";
  20. //const char* sensor_location = "bathroom";
  21. //const char* sensor_location = "kitchen";
  22. //const char* sensor_location = "hallway";
  23. //const char* sensor_location = "tent";
  24. //const char* sensor_location = "storage";
  25. //const char* sensor_location = "greenhouse";
  26. const char* sensor_location = "testing";
  27. #define SENSOR_HOSTNAME_PREFIX "ESP-"
  28. // WiFi AP settings
  29. const char* ssid = "WIFI_SSID_HERE";
  30. const char* password = "WIFI_PASSWORD_HERE";
  31. // InfluxDB settings
  32. #define INFLUXDB_HOST "INFLUX_IP_HERE"
  33. #define INFLUXDB_PORT 8086
  34. #define INFLUXDB_DATABASE "roomsensorsdiy"
  35. // feature selection
  36. #define ENABLE_INFLUXDB_LOGGING
  37. // all given in milliseconds
  38. #define SERVER_HANDLE_INTERVAL 10
  39. #define DB_WRITE_INTERVAL (30 * 1000)
  40. #define LED_BLINK_INTERVAL (2 * 1000)
  41. #define LED_INIT_BLINK_INTERVAL 500
  42. #define LED_CONNECT_BLINK_INTERVAL 250
  43. #define LED_ERROR_BLINK_INTERVAL 100
  44. #endif // __ESP_ENV_CONFIG__