123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- /*
- * config.h
- *
- * ESP8266 / ESP32 Relais Actor
- *
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <xythobuz@xythobuz.de> wrote this file. As long as you retain this notice
- * you can do whatever you want with this stuff. If we meet some day, and you
- * think this stuff is worth it, you can buy me a beer in return. Thomas Buck
- * ----------------------------------------------------------------------------
- */
-
- #ifndef __ESP_ENV_CONFIG__
- #define __ESP_ENV_CONFIG__
-
- // Sketch version
- #define ESP_RELAIS_VERSION "0.1.0"
-
- // location of sensor, used in DB and hostname
- //#define SENSOR_LOCATION "livingroom"
- //#define SENSOR_LOCATION "bedroom"
- //#define SENSOR_LOCATION "bathroom"
- //#define SENSOR_LOCATION "kitchen"
- //#define SENSOR_LOCATION "hallway"
- //#define SENSOR_LOCATION "tent"
- //#define SENSOR_LOCATION "storage"
- //#define SENSOR_LOCATION "greenhouse"
- #define SENSOR_LOCATION "test"
-
- #define SENSOR_HOSTNAME_PREFIX "relais-"
-
- // WiFi AP settings
- #define WIFI_SSID "INSERT_SSID_HERE"
- #define WIFI_PASS "INSERT_PASSPHRASE_HERE"
-
- // MQTT settings
- #define MQTT_HOST "10.23.42.14"
- #define MQTT_PORT 1883
- #define MQTT_USER "USERNAME" // undef to disable auth
- #define MQTT_PASS "PASSWORD" // undef to disable auth
-
- // InfluxDB settings
- #define INFLUXDB_HOST "10.23.42.14"
- #define INFLUXDB_PORT 8086
- #define INFLUXDB_DATABASE "roomsensorsdiy"
-
- // feature selection
- #define ENABLE_MQTT
- //#define ENABLE_INFLUXDB_LOGGING
- //#define ENABLE_NTP
-
- // all given in milliseconds
- #define SERVER_HANDLE_INTERVAL 10
- #define AUTO_TIMING_INTERVAL (15UL * 60UL * 1000UL)
- #define LED_BLINK_INTERVAL (2 * 1000)
- #define LED_INIT_BLINK_INTERVAL 500
- #define LED_CONNECT_BLINK_INTERVAL 250
- #define LED_ERROR_BLINK_INTERVAL 100
- #define DB_WRITE_INTERVAL 0 // 0 to disable
- #define MQTT_RECONNECT_INTERVAL 5000
-
- #if defined(ARDUINO_ARCH_ESP8266)
-
- #define RELAIS_COUNT 4
- #define ESP_PLATFORM_NAME "ESP8266"
-
- #elif defined(ARDUINO_ARCH_ESP32)
-
- #define RELAIS_COUNT 10
- #define ESP_PLATFORM_NAME "ESP32"
-
- #endif
-
- #endif // __ESP_ENV_CONFIG__
|