mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
v1.6.1
* Added Sao Paulo timezone * Check for target change before movement so the shades to run to my position.
This commit is contained in:
parent
a5868618c7
commit
5f67b99f88
5 changed files with 21 additions and 17 deletions
|
|
@ -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);
|
||||
|
|
|
|||
36
Somfy.cpp
36
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() {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -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" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue