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. const char* esp_relais_version = "0.1.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 = "test";
  27. #define SENSOR_HOSTNAME_PREFIX "relais-"
  28. // WiFi AP settings
  29. const char* ssid = "INSERT_SSID_HERE";
  30. const char* password = "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__