123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
-
-
- #ifndef __ESP_ENV_CONFIG__
- #define __ESP_ENV_CONFIG__
-
-
- #define ESP_ENV_VERSION "0.7.0"
-
-
-
-
-
-
-
-
- #define SENSOR_LOCATION_TESTING
-
-
- #define WIFI_SSID "WIFI_SSID_HERE"
- #define WIFI_PASS "WIFI_PASSWORD_HERE"
-
-
- #define MQTT_HOST "MQTT_IP_HERE"
- #define MQTT_PORT 1883
- #define MQTT_USER "USERNAME"
- #define MQTT_PASS "PASSWORD"
-
-
- #define INFLUXDB_HOST "INFLUX_IP_HERE"
- #define INFLUXDB_PORT 8086
- #define INFLUXDB_DATABASE "roomsensorsdiy"
-
-
-
-
- #define LORA_XOR_KEY "_SUPER_SECRET_KEY_HERE_"
-
-
- #define SERVER_HANDLE_INTERVAL 10
- #define SENSOR_HANDLE_INTERVAL (5 * 1000)
- #define DB_WRITE_INTERVAL (30 * 1000)
- #define MQTT_WRITE_INTERVAL (30 * 1000)
- #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 MQTT_RECONNECT_INTERVAL (5 * 1000)
-
- #define NTP_SERVER "pool.ntp.org"
-
-
- #define gmtOffset_sec (60 * 60)
- #define daylightOffset_sec (60 * 60)
-
- #if defined(SENSOR_LOCATION_LIVINGROOM)
- #define SENSOR_LOCATION "livingroom"
- #define SENSOR_ID SENSOR_LOCATION
- #elif defined(SENSOR_LOCATION_LIVINGROOM_WORKSPACE)
- #define SENSOR_LOCATION "livingroom"
- #define SENSOR_ID "livingroom-ws"
- #elif defined(SENSOR_LOCATION_LIVINGROOM_TV)
- #define SENSOR_LOCATION "livingroom"
- #define SENSOR_ID "livingroom-tv"
- #elif defined(SENSOR_LOCATION_BEDROOM)
- #define SENSOR_LOCATION "bedroom"
- #define SENSOR_ID SENSOR_LOCATION
- #elif defined(SENSOR_LOCATION_BATHROOM)
- #define SENSOR_LOCATION "bathroom"
- #define SENSOR_ID SENSOR_LOCATION
- #elif defined(SENSOR_LOCATION_GREENHOUSE)
- #define SENSOR_LOCATION "greenhouse"
- #define SENSOR_ID SENSOR_LOCATION
- #elif defined(SENSOR_LOCATION_TESTING)
- #define SENSOR_LOCATION "testing"
- #define SENSOR_ID SENSOR_LOCATION
- #else
- #define SENSOR_LOCATION "unknown"
- #define SENSOR_ID SENSOR_LOCATION
- #endif
-
- #if defined(RELAIS_SERIAL) || defined(RELAIS_GPIO)
- #define FEATURE_RELAIS
- #endif
-
- #if defined(MOISTURE_ADC_ESP32) || defined(MOISTURE_ADC_ARDUINO)
- #define FEATURE_MOISTURE
- #endif
-
- #if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
- #define BUILTIN_LED_PIN 1
- #elif defined(ARDUINO_ARCH_AVR)
- #define BUILTIN_LED_PIN 13
- #endif
-
- #if defined(ARDUINO_ARCH_ESP8266)
- #define ESP_PLATFORM_NAME "ESP8266"
- #elif defined(ARDUINO_ARCH_ESP32)
- #define ESP_PLATFORM_NAME "ESP32"
- #elif defined(ARDUINO_ARCH_AVR)
- #define ESP_PLATFORM_NAME "Uno WiFi"
- #endif
-
- #endif
|