diff --git a/Network.cpp b/Network.cpp index f533e71..7dcf29e 100644 --- a/Network.cpp +++ b/Network.cpp @@ -254,6 +254,7 @@ bool Network::connectWiFi() { Serial.print("Set hostname to:"); Serial.println(WiFi.getHostname()); WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE, INADDR_NONE); + WiFi.setSleep(false); WiFi.mode(WIFI_STA); delay(100); WiFi.begin(settings.WIFI.ssid, settings.WIFI.passphrase); diff --git a/Somfy.cpp b/Somfy.cpp index d9b4262..0397ea2 100644 --- a/Somfy.cpp +++ b/Somfy.cpp @@ -1349,24 +1349,26 @@ void SomfyShade::moveToTarget(float pos, float tilt) { cmd = somfy_commands::Up; else if(tilt >= 0 && tilt > this->currentTiltPos) cmd = somfy_commands::Down; - Serial.print("Moving to "); - Serial.print(pos); - Serial.print("% from "); - Serial.print(this->currentPos); - if(tilt >= 0) { - Serial.print(" tilt "); - Serial.print(tilt); + if(cmd != somfy_commands::My) { + Serial.print("Moving to "); + Serial.print(pos); Serial.print("% from "); - Serial.print(this->currentTiltPos); - } - Serial.print("% using "); - Serial.println(translateSomfyCommand(cmd)); - SomfyRemote::sendCommand(cmd); - this->target = pos; - this->settingPos = true; - if(tilt >= 0) { - this->tiltTarget = tilt; - this->settingTiltPos = true; + Serial.print(this->currentPos); + if(tilt >= 0) { + Serial.print(" tilt "); + Serial.print(tilt); + Serial.print("% from "); + Serial.print(this->currentTiltPos); + } + Serial.print("% using "); + Serial.println(translateSomfyCommand(cmd)); + SomfyRemote::sendCommand(cmd); + this->settingPos = true; + this->target = pos; + if(tilt >= 0) { + this->tiltTarget = tilt; + this->settingTiltPos = true; + } } } bool SomfyShade::save() { diff --git a/SomfyController.ino.esp32.bin b/SomfyController.ino.esp32.bin index e9de3a7..cd322d6 100644 Binary files a/SomfyController.ino.esp32.bin and b/SomfyController.ino.esp32.bin differ diff --git a/SomfyController.littlefs.bin b/SomfyController.littlefs.bin index 8c8a437..7249d8f 100644 Binary files a/SomfyController.littlefs.bin and b/SomfyController.littlefs.bin differ diff --git a/data/index.js b/data/index.js index dc41c29..59d2b32 100644 --- a/data/index.js +++ b/data/index.js @@ -430,6 +430,7 @@ class General { { city: "America/Miquelon", code: "<-03>3<-02>,M3.2.0,M11.1.0" }, { city: "America/Noronha", code: "<-02>2" }, { city: "America/Santiago", code: "<-04>4<-03>,M9.1.6/24,M4.1.6/24" }, + { city: "America/Sao_Paulo", code: "<-03>3" }, { city: "America/Scoresbysund", code: "<-01>1<+00>,M3.5.0/0,M10.5.0/1" }, { city: "America/St_Johns", code: "NST3:30NDT,M3.2.0,M11.1.0" }, { city: "Antarctica/Casey", code: "<+11>-11" },