diff --git a/firmware/config_user.h.example b/firmware/config_user.h.example index 67f0fc2..9375af4 100755 --- a/firmware/config_user.h.example +++ b/firmware/config_user.h.example @@ -1,6 +1,5 @@ // Copy this file to config_user.h and adjust it to your needs. - #ifndef __CONFIG_USER_H__ #define __CONFIG_USER_H__ @@ -52,12 +51,19 @@ String DEVICE_NAME = "weatherstation"; //#define DEBUG_WINDSPEED_MEASUREMENT //#define HTTP_CALL_ON_WINDSPEED_EXCEED //#define HTTP_CALL_SEND_JSON_DATA +//#define SHOW_SENSOR_DATA_ON_WEBUPDATER_MAIN_PAGE +/********************************************************************************/ + +// measurement correction factors const float HUMIDITY_FACTOR = 1.0; const float LIGHT_FACTOR = 1.0; const float TEMP_FACTOR = 1.0; -// InfluxDB credentials +/********************************************************************************/ + + +// InfluxDB1 credentials const char *INFLUXDB_HOST = "hostname"; const uint16_t INFLUXDB_PORT = 80; const char *INFLUXDB_DB = "database"; @@ -70,7 +76,8 @@ 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 diff --git a/firmware/firmware.ino b/firmware/firmware.ino index fb0a739..e3dc09a 100644 --- a/firmware/firmware.ino +++ b/firmware/firmware.ino @@ -530,7 +530,9 @@ void _fsm_loop() case FSM_STATE_8: //debug("set sensor data in webupdater if required"); #ifdef WEBUPDATER_FEATURE +#ifdef SHOW_SENSOR_DATA_ON_WEBUPDATER_MAIN_PAGE setSensorData(currentSensorData); +#endif #endif fsm_state = FSM_STATE_1; @@ -611,9 +613,11 @@ void _fsm_loop() } #ifdef WEBUPDATER_FEATURE +#ifdef SHOW_SENSOR_DATA_ON_WEBUPDATER_MAIN_PAGE sentWindspeed(currentSensorData[SENSOR_WINDSPEED]); -#endif -#endif +#endif // SHOW_SENSOR_DATA_ON_WEBUPDATER_MAIN_PAGE +#endif // WEBUPDATER_FEATURE +#endif // HTTP_CALL_ON_WINDSPEED_EXCEED // step into read of next fsm state fsm_state = FSM_STATE_2; @@ -661,8 +665,10 @@ void _battery_mode_main() { #endif #ifdef WEBUPDATER_FEATURE +#ifdef SHOW_SENSOR_DATA_ON_WEBUPDATER_MAIN_PAGE setSensorData(currentSensorData); #endif +#endif } //*************************************************************************// diff --git a/firmware/webUpdater.ino b/firmware/webUpdater.ino index 906d2d6..02ea993 100644 --- a/firmware/webUpdater.ino +++ b/firmware/webUpdater.ino @@ -23,7 +23,10 @@ ESP8266HTTPUpdateServer httpUpdater; String _webUpdater_ip = "127.0.0.1"; String _webUpdater_dev = "unknown"; + +#ifdef SHOW_SENSOR_DATA_ON_WEBUPDATER_MAIN_PAGE float _webUpdater_sensValues[VALUES]; +#endif #define TR_TD_START_STR "