// Copy this file to config_user.h and adjust it to your needs. #ifndef __CONFIG_USER_H__ #define __CONFIG_USER_H__ // Debug output on the serial console #define DEBUG // Device name // WARNING: Keep the name short! If your access point did not show up, you // maybe have a TOO LONG SSID! String DEVICE_NAME = "weatherstation"; // Enable/Disable features #define USE_WIFIMANAGER //#define WEBUPDATER_FEATURE #define INFLUXDB_FEATURE #define INFLUXDB_VERSION 1 // 1 or 2 #define SERIAL_FEATURE //#define BATTERY_POWERED //#define SENSOR_WIND #define SENSOR_APDS9960 //#define SENSOR_APDS9930 #define SENSOR_BME280 #define SENSOR_BATTERY //#define BAT_PINS_D34 // Homebridge Webstat is only possible if webupdater is also enabled //#define HOMEBRIDGE_WEBSTAT // retries to connect after 5 seconds or starts the wifimanager #define SLEEP_IF_NO_WLAN_CONNECTION // Restarts the firmware every n seconds //#define RESET_ESP_TIMEINTERVAL // BETA STATUS //#define HTTP_CALL_ON_WINDSPEED_EXCEED // BETA STATUS //#define DEBUG_WINDSPEED_MEASUREMENT // for debugging windspeed measurement only //#define LOG_MILLIS_TO_INFLUXDB //#define ENABLE_WATCHDOG //#define WATCHDOG_TIMEOUT_MS 30000 const float HUMIDITY_FACTOR = 1.0; const float LIGHT_FACTOR = 1.0; const float TEMP_FACTOR = 1.0; // InfluxDB credentials const char *INFLUXDB_HOST = "hostname"; const uint16_t INFLUXDB_PORT = 80; const char *INFLUXDB_DB = "database"; const char *INFLUXDB_USER = "user"; const char *INFLUXDB_PASS = "password"; // InfluxDB2 credentials /* const char *INFLUXDB_URL = "http://192.168.0.123:3124"; const char *INFLUXDB_ORG = "home_org"; const char *INFLUXDB_BUCKET = "mybucket"; const char *INFLUXDB_TOKEN = "your api token"; */ // enable HTTP_CALL_ON_WINDSPEED_EXCEED to enable this feature #define HTTP_CALL_ON_WINDSPEED_EXCEED_MPS 5.0 // 5.0 m/s == 18 km/h #define HTTP_CALL_ON_WINDSPEED_INTERVAL_S 60 // it's required to be bigger than WIND_SENSOR_MEAS_TIME_S #define HTTP_CALL_ON_WINDSPEED_URL "http://192.168.178.100:3001/button-windspeedexceed?event=click" // anemometer settings // thingiverse anemometer settings: https://www.thingiverse.com/thing:2559929/files #define ROTOR_LENGTH_CM 8.25 #define ROTOR_LENGTH_M (ROTOR_LENGTH_CM / 100.0) //#define ROTOR_LENGTH_KM (ROTOR_LENGTH_M / 1000.0) // configuration example for generalization //#define SEC_TO_HOUR_FACTOR (60.0 * 60.0) // configuration example for generalization #define MPS_CORRECT_FACT 9.28 //#define COUNT_TO_KMH ((TWO_PI * ROTOR_LENGTH_KM / WIND_SENSOR_MEAS_TIME_S) * SEC_TO_HOUR_FACTOR) // configuration exampe for generalization #define COUNT_TO_MPS (TWO_PI * ROTOR_LENGTH_M / WIND_SENSOR_MEAS_TIME_S) // only this define is used for calculation, all other before are only used to describe the math v_wind = correction_factor * rotations * 2 * pi * radius / time_of_measurement_in_sec // and if required the result has t be multiplied by another factor to convert it from m/s #define WINDSPEED_FACTOR (COUNT_TO_MPS * MPS_CORRECT_FACT) // china aliexpress anemometer settings (calculation unknown) //#define WINDSPEED_FACTOR 2.4 #ifndef USE_WIFIMANAGER // Set IP address IPAddress local_IP(192, 168, 178, 123); // Set your Gateway IP address IPAddress gateway(192, 168, 178, 1); // Set subnet mask IPAddress subnet(255, 255, 255, 0); const char* ssid = "My-WLAN-SSID"; // WLAN Netzwerk const char* password = "My-Passphrase"; // WLAN Passphrase #endif