Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * config.h
  3. *
  4. * ESP8266 / ESP32 Relais Actor
  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. #define MQTT_USER "USERNAME" // undef to disable auth
  35. #define MQTT_PASS "PASSWORD" // undef to disable auth
  36. // InfluxDB settings
  37. #define INFLUXDB_HOST "10.23.42.14"
  38. #define INFLUXDB_PORT 8086
  39. #define INFLUXDB_DATABASE "roomsensorsdiy"
  40. // feature selection
  41. #define ENABLE_MQTT
  42. //#define ENABLE_INFLUXDB_LOGGING
  43. //#define ENABLE_NTP
  44. // all given in milliseconds
  45. #define SERVER_HANDLE_INTERVAL 10
  46. #define AUTO_TIMING_INTERVAL (15UL * 60UL * 1000UL)
  47. #define LED_BLINK_INTERVAL (2 * 1000)
  48. #define LED_INIT_BLINK_INTERVAL 500
  49. #define LED_CONNECT_BLINK_INTERVAL 250
  50. #define LED_ERROR_BLINK_INTERVAL 100
  51. #define DB_WRITE_INTERVAL 0 // 0 to disable
  52. #define MQTT_RECONNECT_INTERVAL 5000
  53. #if defined(ARDUINO_ARCH_ESP8266)
  54. #define RELAIS_COUNT 4
  55. #define ESP_PLATFORM_NAME "ESP8266"
  56. #elif defined(ARDUINO_ARCH_ESP32)
  57. #define RELAIS_COUNT 10
  58. #define ESP_PLATFORM_NAME "ESP32"
  59. #endif
  60. #endif // __ESP_ENV_CONFIG__