diff --git a/esp32/include/ControllerConfiguration.h b/esp32/include/ControllerConfiguration.h index 7cb273b..e06c6b9 100644 --- a/esp32/include/ControllerConfiguration.h +++ b/esp32/include/ControllerConfiguration.h @@ -11,7 +11,7 @@ #ifndef CONTROLLER_CONFIG_H #define CONTROLLER_CONFIG_H -#define FIRMWARE_VERSION "1.0.6" +#define FIRMWARE_VERSION "1.0.7" #define ADC_TO_VOLT(adc) ((adc) * 3.3 ) / 4095) #define ADC_TO_VOLT_WITH_MULTI(adc, multi) (((adc) * 3.3 * (multi)) / 4095) diff --git a/esp32/include/HomieConfiguration.h b/esp32/include/HomieConfiguration.h index 9146754..8351c0c 100644 --- a/esp32/include/HomieConfiguration.h +++ b/esp32/include/HomieConfiguration.h @@ -37,8 +37,8 @@ HomieNode stayAlive("stay", "alive", "alive"); /** *********************************** Settings ******************************* */ -HomieSetting deepSleepTime("deepsleep", "time in milliseconds to sleep (0 deactivats it)"); -HomieSetting deepSleepNightTime("nightsleep", "time in milliseconds to sleep (0 uses same setting: deepsleep at night, too)"); +HomieSetting deepSleepTime("deepsleep", "time in seconds to sleep (0 deactivats it)"); +HomieSetting deepSleepNightTime("nightsleep", "time in seconds to sleep (0 uses same setting: deepsleep at night, too)"); HomieSetting wateringDeepSleep("pumpdeepsleep", "time seconds to sleep, while a pump is running"); HomieSetting waterLevelMax("watermaxlevel", "distance (mm) at maximum water level"); diff --git a/esp32/src/main.cpp b/esp32/src/main.cpp index 699f959..6c803b6 100644 --- a/esp32/src/main.cpp +++ b/esp32/src/main.cpp @@ -488,8 +488,8 @@ void systemInit(){ // Set default values //in seconds - deepSleepTime.setDefaultValue(10); - deepSleepNightTime.setDefaultValue(30); + deepSleepTime.setDefaultValue(60); + deepSleepNightTime.setDefaultValue(600); wateringDeepSleep.setDefaultValue(5); /* waterLevelMax 1000 */ /* 100cm in mm */ @@ -540,12 +540,9 @@ void systemInit(){ bool mode1(){ - Serial.println("m1"); + Serial.println("==== Mode 1 ===="); Serial << getCurrentTime() << " curtime" << endl; - /* Disable all sleeping stuff before reading sensors */ - gpio_deep_sleep_hold_dis(); - readSensors(); //queue sensor values for @@ -586,7 +583,7 @@ bool mode1(){ } void mode2(){ - Serial.println("m2"); + Serial.println("==== Mode 2 ===="); systemInit(); /* Jump into Mode 3, if not configured */