No Description
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.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. #define ESP_RELAIS_VERSION "0.1.0"
  17. // location of sensor, used in DB and hostname
  18. //#define SENSOR_LOCATION "livingroom"
  19. //#define SENSOR_LOCATION "bedroom"
  20. //#define SENSOR_LOCATION "bathroom"
  21. //#define SENSOR_LOCATION "kitchen"
  22. //#define SENSOR_LOCATION "hallway"
  23. //#define SENSOR_LOCATION "tent"
  24. //#define SENSOR_LOCATION "storage"
  25. //#define SENSOR_LOCATION "greenhouse"
  26. #define SENSOR_LOCATION "test"
  27. #define SENSOR_HOSTNAME_PREFIX "relais-"
  28. // WiFi AP settings
  29. #define WIFI_SSID "INSERT_SSID_HERE"
  30. #define WIFI_PASS "INSERT_PASSPHRASE_HERE"
  31. // MQTT settings
  32. #define MQTT_HOST "10.23.42.14"
  33. #define MQTT_PORT 1883
  34. // InfluxDB settings
  35. #define INFLUXDB_HOST "10.23.42.14"
  36. #define INFLUXDB_PORT 8086
  37. #define INFLUXDB_DATABASE "roomsensorsdiy"
  38. // feature selection
  39. //#define ENABLE_MQTT
  40. //#define ENABLE_INFLUXDB_LOGGING
  41. #define ENABLE_NTP
  42. // all given in milliseconds
  43. #define SERVER_HANDLE_INTERVAL 10
  44. #define AUTO_TIMING_INTERVAL (15UL * 60UL * 1000UL)
  45. #define LED_BLINK_INTERVAL (2 * 1000)
  46. #define LED_INIT_BLINK_INTERVAL 500
  47. #define LED_CONNECT_BLINK_INTERVAL 250
  48. #define LED_ERROR_BLINK_INTERVAL 100
  49. #if defined(ARDUINO_ARCH_ESP8266)
  50. #define RELAIS_COUNT 4
  51. #define ESP_PLATFORM_NAME "ESP8266"
  52. #elif defined(ARDUINO_ARCH_ESP32)
  53. #define RELAIS_COUNT 10
  54. #define ESP_PLATFORM_NAME "ESP32"
  55. #endif
  56. #endif // __ESP_ENV_CONFIG__