Skip to content

Commit

Permalink
1.20n
Browse files Browse the repository at this point in the history
  • Loading branch information
klausahrenberg committed May 24, 2021
1 parent cefae57 commit 49dfb19
Show file tree
Hide file tree
Showing 9 changed files with 293 additions and 53 deletions.
2 changes: 1 addition & 1 deletion WThermostat/.clang_complete
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
-I/home/klausahrenberg/.platformio/packages/toolchain-xtensa/lib/gcc/xtensa-lx106-elf/4.8.2/include-fixed
-I/home/klausahrenberg/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include
-I/home/klausahrenberg/.platformio/packages/tool-unity
-DPLATFORMIO=50100
-DPLATFORMIO=50101
-DESP8266
-DARDUINO_ARCH_ESP8266
-DARDUINO_ESP8266_ESP01
Expand Down
4 changes: 2 additions & 2 deletions WThermostat/.gcc-flags.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"execPath": "/home/klausahrenberg/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-g++",
"gccDefaultCFlags": "-fsyntax-only -std=gnu99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections -fno-exceptions -Wall -DPLATFORMIO=50100 -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO=10805 -DARDUINO_BOARD=\"PLATFORMIO_ESP01_1M\" -DFLASHMODE_DOUT -DLWIP_OPEN_SRC -DNONOSDK22x_190703=1 -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DVTABLES_IN_FLASH",
"gccDefaultCppFlags": "-fsyntax-only -fno-rtti -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections -fno-exceptions -Wall -DPLATFORMIO=50100 -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO=10805 -DARDUINO_BOARD=\"PLATFORMIO_ESP01_1M\" -DFLASHMODE_DOUT -DLWIP_OPEN_SRC -DNONOSDK22x_190703=1 -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DVTABLES_IN_FLASH",
"gccDefaultCFlags": "-fsyntax-only -std=gnu99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections -fno-exceptions -Wall -DPLATFORMIO=50101 -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO=10805 -DARDUINO_BOARD=\"PLATFORMIO_ESP01_1M\" -DFLASHMODE_DOUT -DLWIP_OPEN_SRC -DNONOSDK22x_190703=1 -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DVTABLES_IN_FLASH",
"gccDefaultCppFlags": "-fsyntax-only -fno-rtti -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections -fno-exceptions -Wall -DPLATFORMIO=50101 -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO=10805 -DARDUINO_BOARD=\"PLATFORMIO_ESP01_1M\" -DFLASHMODE_DOUT -DLWIP_OPEN_SRC -DNONOSDK22x_190703=1 -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DVTABLES_IN_FLASH",
"gccErrorLimit": 15,
"gccIncludePaths": "/mnt/Daten/Users/klaus/Projects/Atom/WThermostatBeca/WThermostat/include,/mnt/Daten/Users/klaus/Projects/Atom/WThermostatBeca/WThermostat/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266HTTPClient/src,/mnt/Daten/Users/klaus/Projects/Atom/WThermostatBeca/WThermostat/.pio/libdeps/esp01_1m/Time,/mnt/Daten/Users/klaus/Projects/Atom/WThermostatBeca/WThermostat/.pio/libdeps/esp01_1m/NTPClient,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/EEPROM,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/DNSServer/src,/mnt/Daten/Users/klaus/Projects/Atom/WThermostatBeca/WThermostat/.pio/libdeps/esp01_1m/PubSubClient/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266mDNS/src,/mnt/Daten/Users/klaus/Projects/Atom/WThermostatBeca/WThermostat/.pio/libdeps/esp01_1m/ESP Async WebServer/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/Hash/src,/mnt/Daten/Users/klaus/Projects/Atom/WThermostatBeca/WThermostat/.pio/libdeps/esp01_1m/ESPAsyncTCP/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src,/mnt/Daten/Users/klaus/Projects/Atom/WAdapter/WAdapter,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/tools/sdk/include,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/cores/esp8266,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip2/include,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/variants/generic,/home/klausahrenberg/.platformio/lib/Adafruit MPR121,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ArduinoOTA,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266AVRISP/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266HTTPUpdateServer/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266LLMNR,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266NetBIOS,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266SSDP,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266SdFat/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFiMesh/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266httpUpdate/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/Ethernet/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/GDBStub/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/LittleFS/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/SD/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/SDFS/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/SPI,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/SPISlave/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/Servo/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/SoftwareSerial/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/TFT_Touch_Shield_V2,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/Ticker/src,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/Wire,/home/klausahrenberg/.platformio/packages/framework-arduinoespressif8266/libraries/esp8266/src,/home/klausahrenberg/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2,/home/klausahrenberg/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/xtensa-lx106-elf,/home/klausahrenberg/.platformio/packages/toolchain-xtensa/lib/gcc/xtensa-lx106-elf/4.8.2/include,/home/klausahrenberg/.platformio/packages/toolchain-xtensa/lib/gcc/xtensa-lx106-elf/4.8.2/include-fixed,/home/klausahrenberg/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include,/home/klausahrenberg/.platformio/packages/tool-unity",
"gccSuppressWarnings": false
Expand Down
14 changes: 7 additions & 7 deletions WThermostat/src/WClock.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ class WClock: public WDevice {
: WDevice(network, "clock", "clock", DEVICE_TYPE_TEXT_DISPLAY) {
this->mainDevice = false;
this->visibility = MQTT;
this->ntpServer = network->getSettings()->setString("ntpServer", 32, DEFAULT_NTP_SERVER);
this->ntpServer = network->getSettings()->setString("ntpServer", DEFAULT_NTP_SERVER);
this->ntpServer->setReadOnly(true);
this->ntpServer->setVisibility(MQTT);
this->addProperty(ntpServer);
this->useTimeZoneServer = network->getSettings()->setBoolean("useTimeZoneServer", true);
this->useTimeZoneServer->setReadOnly(true);
this->useTimeZoneServer->setVisibility(NONE);
this->addProperty(useTimeZoneServer);
this->timeZoneServer = network->getSettings()->setString("timeZoneServer", 45, DEFAULT_TIME_ZONE_SERVER);
this->timeZoneServer = network->getSettings()->setString("timeZoneServer", DEFAULT_TIME_ZONE_SERVER);
this->timeZoneServer->setReadOnly(true);
this->timeZoneServer->setVisibility(this->useTimeZoneServer->getBoolean() ? MQTT : NONE);
//this->ntpServer->setVisibility(MQTT);
Expand All @@ -57,7 +57,7 @@ class WClock: public WDevice {
p->setUnsignedLong(getEpochTime());
});
this->addProperty(epochTime);
this->epochTimeFormatted = WProperty::createStringProperty("epochTimeFormatted", "epochTimeFormatted", 19);
this->epochTimeFormatted = WProperty::createStringProperty("epochTimeFormatted", "epochTimeFormatted");
this->epochTimeFormatted->setReadOnly(true);
this->epochTimeFormatted->setOnValueRequest([this](WProperty* p) {updateFormattedTime();});
this->addProperty(epochTimeFormatted);
Expand All @@ -66,7 +66,7 @@ class WClock: public WDevice {
this->validTime->setReadOnly(true);
this->addProperty(validTime);
if (this->useTimeZoneServer->getBoolean()) {
this->timeZone = WProperty::createStringProperty("timezone", "timeZone", 32);
this->timeZone = WProperty::createStringProperty("timezone", "timeZone");
this->timeZone->setReadOnly(true);
this->addProperty(timeZone);
} else {
Expand All @@ -86,7 +86,7 @@ class WClock: public WDevice {
this->addProperty(dstOffset);
this->useDaySavingTimes = network->getSettings()->setBoolean("useDaySavingTimes", false);
this->useDaySavingTimes->setVisibility(NONE);
this->dstRule = network->getSettings()->setByteArray("dstRule", 8, DEFAULT_DST_RULE);
this->dstRule = network->getSettings()->setByteArray("dstRule", DEFAULT_DST_RULE);
//HtmlPages
WPage* configPage = new WPage(this->getId(), "Configure clock");
configPage->setPrintPage(std::bind(&WClock::printConfigPage, this, std::placeholders::_1, std::placeholders::_2));
Expand All @@ -103,7 +103,7 @@ class WClock: public WDevice {
this->enableNightMode = network->getSettings()->setBoolean("enableNightMode", true);
this->nightMode = WProperty::createBooleanProperty("nightMode", "nightMode");
this->addProperty(this->nightMode);
this->nightSwitches = network->getSettings()->setByteArray("nightSwitches", 4, DEFAULT_NIGHT_SWITCHES);
this->nightSwitches = network->getSettings()->setByteArray("nightSwitches", DEFAULT_NIGHT_SWITCHES);
}
}

Expand Down Expand Up @@ -357,7 +357,7 @@ class WClock: public WDevice {

page->printf(HTTP_CHECKBOX_OPTION, "sd", "sd", (useDaySavingTimes->getBoolean() ? HTTP_CHECKED : ""), "td()", "Calculate day saving time (summer time)");
page->printf(HTTP_DIV_ID_BEGIN, "gd");
page->print(F("<table class='settingstable'>"));
page->print(F("<table class='st'>"));
page->print(F("<tr>"));
page->print(F("<th></th>"));
page->print(F("<th>Standard time</th>"));
Expand Down
6 changes: 3 additions & 3 deletions WThermostat/src/WThermostat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include "WThermostat_DLX_LH01.h"

#define APPLICATION "Thermostat"
#define VERSION "1.20m"
#define FLAG_SETTINGS 0x20
#define VERSION "1.20n"
#define FLAG_SETTINGS 0x22
#define DEBUG false

WNetwork* network;
Expand All @@ -25,7 +25,7 @@ WClock* wClock;
void setup() {
Serial.begin(9600);
//Wifi and Mqtt connection
network = new WNetwork(DEBUG, APPLICATION, VERSION, NO_LED, FLAG_SETTINGS);
network = new WNetwork(DEBUG, APPLICATION, VERSION, NO_LED, FLAG_SETTINGS, nullptr);
network->setOnConfigurationFinished([]() {
//Switch blinking thermostat in normal operating mode back
device->cancelConfiguration();
Expand Down
2 changes: 1 addition & 1 deletion WThermostat/src/WThermostat.h
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ protected :
byte hh_Offset = this->byteSchedulingPosHour;
byte mm_Offset = this->byteSchedulingPosMinute;
page->printf(HTTP_CONFIG_PAGE_BEGIN, SCHEDULES);
page->print(F("<table class='settingstable'>"));
page->print(F("<table class='st'>"));
page->print(F("<tr>"));
page->print(F("<th></th>"));
page->print(F("<th>Weekday</th>"));
Expand Down
2 changes: 1 addition & 1 deletion WThermostat/src/WThermostat_BHT_002_GBLW.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected :
if (receivedCommand[5] == 0x05) {
//Unknown permanently sent from MCU
//55 aa 01 07 00 05 68 01 00 01 01
//knownCommand = true;
knownCommand = true;
}
} else if (cByte == this->byteEcoMode) {
if (commandLength == 0x05) {
Expand Down
Loading

0 comments on commit 49dfb19

Please sign in to comment.