2019-01-08 22:41:24 +01:00
// Copy this file to config_user.h and adjust it to your needs.
2019-01-27 20:31:15 +01:00
#ifndef __CONFIG_USER_H__
#define __CONFIG_USER_H__
2019-01-08 22:41:24 +01:00
// Debug output on the serial console
2019-01-27 18:49:28 +01:00
#define DEBUG
2019-01-08 22:41:24 +01:00
2022-05-23 12:09:45 +02:00
// 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";
2022-09-14 11:54:27 +02:00
/********************************************************************************/
// Enable/Disable general features
#define BATTERY_POWERED
// retries to connect after 5 seconds or starts the wifimanager
//#define SLEEP_IF_NO_WLAN_CONNECTION
2022-05-20 10:13:02 +02:00
#define INFLUXDB_FEATURE
#define INFLUXDB_VERSION 1 // 1 or 2
2022-09-14 11:54:27 +02:00
//#define LOG_MILLIS_TO_INFLUXDB
//#define SERIAL_FEATURE
#define SENSOR_WIND
2019-08-04 11:56:18 +02:00
#define SENSOR_APDS9960
//#define SENSOR_APDS9930
#define SENSOR_BME280
2022-11-04 09:12:01 +01:00
//#define SENSOR_BMP280
2019-08-04 11:56:18 +02:00
#define SENSOR_BATTERY
2022-09-14 11:54:27 +02:00
2020-02-20 19:49:44 +01:00
//#define BAT_PINS_D34
2022-09-14 11:54:27 +02:00
/********************************************************************************/
// not available or recommended for battery mode
/********************************************************************************/
2022-10-31 11:56:44 +01:00
//#define DISABLE_WIFIMANAGER
2022-05-15 22:47:23 +02:00
// Restarts the firmware every n seconds
2022-09-14 11:54:27 +02:00
//#define RESET_ESP_TIME_INTERVAL
2022-06-22 13:52:55 +02:00
//#define ENABLE_WATCHDOG
2022-09-14 11:54:27 +02:00
//#define WEBUPDATER_FEATURE
// only available in case that webupdater is enabled
//#define USE_LOGGER
// only possible if webupdater is also enabled
//#define HOMEBRIDGE_WEBSTAT
// for debugging windspeed measurement only, trigger and results are handled by webupdater
//#define DEBUG_WINDSPEED_MEASUREMENT
//#define HTTP_CALL_ON_WINDSPEED_EXCEED
2022-11-11 14:34:42 +01:00
//#define HTTP_CALL_SEND_JSON_DATA
2019-01-08 22:41:24 +01:00
2019-02-03 15:09:01 +01:00
const float HUMIDITY_FACTOR = 1.0;
const float LIGHT_FACTOR = 1.0;
2022-05-15 22:47:23 +02:00
const float TEMP_FACTOR = 1.0;
2019-02-03 14:53:08 +01:00
2019-01-08 22:41:24 +01:00
// 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";
2022-05-20 10:13:02 +02:00
// InfluxDB2 credentials
2022-05-23 12:09:45 +02:00
/*
2022-05-20 10:13:02 +02:00
const char *INFLUXDB_URL = "http://192.168.0.123:3124";
const char *INFLUXDB_ORG = "home_org";
2022-05-22 16:35:10 +02:00
const char *INFLUXDB_BUCKET = "mybucket";
const char *INFLUXDB_TOKEN = "your api token";
2022-05-23 12:09:45 +02:00
*/
2022-05-20 10:13:02 +02:00
2022-05-23 12:09:45 +02:00
// 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"
2022-11-11 14:34:42 +01:00
#define HTTP_CALL_SEND_JSON_DATA_INTERVAL_S 300
#define HTTP_CALL_SEND_JSON_DATA_URL "http://192.168.178.123:80/html/index.html?json_weather_data="
2022-06-22 13:52:55 +02:00
// anemometer settings
2022-05-23 12:09:45 +02:00
// 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) <add link here>
//#define WINDSPEED_FACTOR 2.4
2019-01-27 20:31:15 +01:00
2022-10-31 11:56:44 +01:00
/********************************************************************************/
#ifdef DISABLE_WIFIMANAGER
// Set your Static 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);
#define WIFI_SSID "myWifi" // WLAN Netzwerk
#define WIFI_PASSWD "myPass" // WLAN Passwort
2019-01-27 20:31:15 +01:00
#endif
2022-05-15 22:47:23 +02:00
2022-10-31 11:56:44 +01:00
/********************************************************************************/
#endif