From 068a42c4f39beac9ff021ed3369a29d6e251a116 Mon Sep 17 00:00:00 2001 From: andrethomas Date: Mon, 23 Jul 2018 19:46:41 +0200 Subject: [PATCH 01/28] Optimize MCP230xx_CheckForInterrupt() and MCP230xx_ApplySettings() --- sonoff/xsns_29_mcp230xx.ino | 107 +++++++++--------------------------- 1 file changed, 26 insertions(+), 81 deletions(-) diff --git a/sonoff/xsns_29_mcp230xx.ino b/sonoff/xsns_29_mcp230xx.ino index b6900d6ee..c6ed86871 100644 --- a/sonoff/xsns_29_mcp230xx.ino +++ b/sonoff/xsns_29_mcp230xx.ino @@ -65,54 +65,31 @@ uint8_t MCP230xx_readGPIO(uint8_t port) { } void MCP230xx_ApplySettings(void) { - uint8_t reg_gppu = 0; - uint8_t reg_gpinten = 0; - uint8_t reg_iodir = 0xFF; uint8_t int_en = 0; - for (uint8_t idx = 0; idx < 8; idx++) { - switch (Settings.mcp230xx_config[idx].pinmode) { - case 0 ... 1: - reg_iodir |= (1 << idx); - break; - case 2 ... 4: - reg_iodir |= (1 << idx); - reg_gpinten |= (1 << idx); - int_en=1; - break; - default: - break; - } - if (Settings.mcp230xx_config[idx].pullup) { - reg_gppu |= (1 << idx); - } - } - I2cWrite8(mcp230xx_address, MCP230xx_GPPU, reg_gppu); - I2cWrite8(mcp230xx_address, MCP230xx_GPINTEN, reg_gpinten); - I2cWrite8(mcp230xx_address, MCP230xx_IODIR, reg_iodir); - if (mcp230xx_type == 2) { // We have a MCP23017 - reg_gppu = 0; - reg_gpinten = 0; - reg_iodir = 0xFF; - for (uint8_t idx = 8; idx < 16; idx++) { - switch (Settings.mcp230xx_config[idx].pinmode) { + for (uint8_t mcp230xx_port=0;mcp230xx_port 0) { - if (I2cValidRead8(&mcp230xx_intcap, mcp230xx_address, MCP230xx_INTCAP)) { - for (uint8_t intp = 0; intp < 8; intp++) { - if ((intf >> intp) & 0x01) { // we know which pin caused interrupt - report_int = 0; - if (Settings.mcp230xx_config[intp].pinmode > 1) { - switch (Settings.mcp230xx_config[intp].pinmode) { - case 2: - report_int = 1; - break; - case 3: - if (((mcp230xx_intcap >> intp) & 0x01) == 0) report_int = 1; // Int on LOW - break; - case 4: - if (((mcp230xx_intcap >> intp) & 0x01) == 1) report_int = 1; // Int on HIGH - break; - default: - break; - } - if (report_int) { - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_JSON_TIME "\":\"%s\""), GetDateAndTime(DT_LOCAL).c_str()); - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"MCP230XX_INT\":{\"Pin\":\"D%i\", \"State\":%i}"), mqtt_data, intp, ((mcp230xx_intcap >> intp) & 0x01)); - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s}"), mqtt_data); - MqttPublishPrefixTopic_P(RESULT_OR_STAT, mqtt_data); - } - } - } - } - } - } - } - if (mcp230xx_type == 2) { // We have a MCP23017 so we need to check the other 8 bits also - if (I2cValidRead8(&intf, mcp230xx_address, MCP230xx_INTF+1)) { + for (uint8_t mcp230xx_port=0;mcp230xx_port 0) { - if (I2cValidRead8(&mcp230xx_intcap, mcp230xx_address, MCP230xx_INTCAP+1)) { + if (I2cValidRead8(&mcp230xx_intcap, mcp230xx_address, MCP230xx_INTCAP+mcp230xx_port)) { for (uint8_t intp = 0; intp < 8; intp++) { if ((intf >> intp) & 0x01) { // we know which pin caused interrupt report_int = 0; - if (Settings.mcp230xx_config[intp+8].pinmode > 1) { // change on INT - switch (Settings.mcp230xx_config[intp+8].pinmode) { + if (Settings.mcp230xx_config[intp+(mcp230xx_port*8)].pinmode > 1) { + switch (Settings.mcp230xx_config[+(mcp230xx_port*8)].pinmode) { case 2: report_int = 1; break; @@ -215,12 +159,12 @@ bool MCP230xx_CheckForInterrupt(void) { default: break; } - } - if (report_int) { - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_JSON_TIME "\":\"%s\""), GetDateAndTime(DT_LOCAL).c_str()); - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"MCP230XX_INT\":{\"Pin\":\"D%i\", \"State\":%i}"), mqtt_data, intp+8, ((mcp230xx_intcap >> intp) & 0x01)); - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s}"), mqtt_data); - MqttPublishPrefixTopic_P(RESULT_OR_STAT, mqtt_data); + if (report_int) { + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_JSON_TIME "\":\"%s\""), GetDateAndTime(DT_LOCAL).c_str()); + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"MCP230XX_INT\":{\"Pin\":\"D%i\", \"State\":%i}"), mqtt_data, intp+(mcp230xx_port*8), ((mcp230xx_intcap >> intp) & 0x01)); + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s}"), mqtt_data); + MqttPublishPrefixTopic_P(RESULT_OR_STAT, mqtt_data); + } } } } @@ -334,3 +278,4 @@ boolean Xsns29(byte function) #endif // USE_MCP230xx #endif // USE_I2C + From d7e6f6114ad5819b0c031b1a9981625810dea637 Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Tue, 24 Jul 2018 18:40:13 +0200 Subject: [PATCH 02/28] Fix possible WDT Fix possible WDT due to long MQTT publish handling (#3313) --- sonoff/xdrv_01_mqtt.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sonoff/xdrv_01_mqtt.ino b/sonoff/xdrv_01_mqtt.ino index 4bfff0724..8afcf672b 100644 --- a/sonoff/xdrv_01_mqtt.ino +++ b/sonoff/xdrv_01_mqtt.ino @@ -231,6 +231,8 @@ void MqttPublishDirect(const char* topic, boolean retained) if (Settings.ledstate &0x04) { blinks++; } + + yield(); // #3313 } void MqttPublish(const char* topic, boolean retained) From 99e81ba86ef5423dfac677fca6eb355cf30532f8 Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Tue, 24 Jul 2018 18:41:50 +0200 Subject: [PATCH 03/28] Fix CCS811 env compensation Fix CCS811 temperature and humidity compensation --- sonoff/_changelog.ino | 2 ++ sonoff/sonoff.h | 1 + sonoff/sonoff.ino | 7 +++++-- sonoff/support.ino | 16 ++++++++++++++++ sonoff/xsns_07_sht1x.ino | 2 ++ sonoff/xsns_08_htu21.ino | 2 ++ sonoff/xsns_09_bmp.ino | 3 +-- sonoff/xsns_14_sht3x.ino | 5 +---- sonoff/xsns_31_ccs811.ino | 5 +---- 9 files changed, 31 insertions(+), 12 deletions(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 7e52e3404..f780d7a21 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,4 +1,6 @@ /* 6.1.1c + * Fix possible WDT due to long MQTT publish handling (#3313) + * Fix CCS811 temperature and humidity compensation * Add support for CCS811 sensor (#3309) * Add command Timers 0/1 to globally disable or enable armed timers (#3270) * diff --git a/sonoff/sonoff.h b/sonoff/sonoff.h index 1a2e6f8af..00c1e1c59 100644 --- a/sonoff/sonoff.h +++ b/sonoff/sonoff.h @@ -68,6 +68,7 @@ typedef unsigned long power_t; // Power (Relay) type #define HLW_IREF_PULSE 3500 // was 1666us = 600Hz = 4.545A #define MQTT_RETRY_SECS 10 // Minimum seconds to retry MQTT connection +#define GLOBAL_VALUES_VALID 300 // Max number of seconds to keep last received values #define APP_POWER 0 // Default saved power state Off #define WS2812_MAX_LEDS 512 // Max number of LEDs diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index af68a4879..1d4442d59 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -188,8 +188,9 @@ uint8_t ntp_force_sync = 0; // Force NTP sync StateBitfield global_state; RulesBitfield rules_flag; -uint8_t glob_humidity = 0; -sint16_t glob_temperature = -9999; +uint32_t global_update = 0; +float global_temperature = 0; +float global_humidity = 0; char my_version[33]; // Composed version string char my_hostname[33]; // Composed Wifi hostname @@ -1544,6 +1545,8 @@ void PerformEverySecond() } } + ResetGlobalValues(); + if (Settings.tele_period) { tele_period++; if (tele_period == Settings.tele_period -1) { diff --git a/sonoff/support.ino b/sonoff/support.ino index a5d6e9e4e..13a9d4265 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -414,6 +414,22 @@ char TempUnit() return (Settings.flag.temperature_conversion) ? 'F' : 'C'; } +void SetGlobalValues(float temperature, float humidity) +{ + global_update = uptime; + global_temperature = temperature; + global_humidity = humidity; +} + +void ResetGlobalValues() +{ + if ((uptime - global_update) > GLOBAL_VALUES_VALID) { // Reset after 5 minutes + global_update = 0; + global_temperature = 0; + global_humidity = 0; + } +} + double FastPrecisePow(double a, double b) { // https://martin.ankerl.com/2012/01/25/optimized-approximative-pow-in-c-and-cpp/ diff --git a/sonoff/xsns_07_sht1x.ino b/sonoff/xsns_07_sht1x.ino index 510ee7be3..8771dab7f 100644 --- a/sonoff/xsns_07_sht1x.ino +++ b/sonoff/xsns_07_sht1x.ino @@ -147,6 +147,8 @@ boolean ShtRead() sht_humidity = (sht_temperature - 25) * (t1 + t2 * humRaw) + rhLinear; sht_temperature = ConvertTemp(sht_temperature); + SetGlobalValues(sht_temperature, sht_humidity); + sht_valid = SENSOR_MAX_MISS; return true; } diff --git a/sonoff/xsns_08_htu21.ino b/sonoff/xsns_08_htu21.ino index 9534cbbce..61266e106 100644 --- a/sonoff/xsns_08_htu21.ino +++ b/sonoff/xsns_08_htu21.ino @@ -185,6 +185,8 @@ boolean HtuRead() htu_humidity = (-0.15) * (25 - htu_temperature) + htu_humidity; } + SetGlobalValues(htu_temperature, htu_humidity); + htu_valid = SENSOR_MAX_MISS; return true; } diff --git a/sonoff/xsns_09_bmp.ino b/sonoff/xsns_09_bmp.ino index 8f46219c8..8a50b8ae6 100755 --- a/sonoff/xsns_09_bmp.ino +++ b/sonoff/xsns_09_bmp.ino @@ -460,8 +460,7 @@ void BmpRead() } if (bmp_temperature != 0.0) { bmp_temperature = ConvertTemp(bmp_temperature); } - glob_humidity = bmp_humidity; - glob_temperature = bmp_temperature; + SetGlobalValues(bmp_temperature, bmp_humidity); } void BmpEverySecond() diff --git a/sonoff/xsns_14_sht3x.ino b/sonoff/xsns_14_sht3x.ino index c754bbab0..c3c8b2f9c 100755 --- a/sonoff/xsns_14_sht3x.ino +++ b/sonoff/xsns_14_sht3x.ino @@ -102,10 +102,7 @@ void Sht3xShow(boolean json) for (byte i = 0; i < sht3x_count; i++) { if (Sht3xRead(t, h, sht3x_sensors[i].address)) { - if (0 == i) { - glob_humidity = h; - glob_temperature = t; - } + if (0 == i) { SetGlobalValues(t, h); } dtostrfd(t, Settings.flag2.temperature_resolution, temperature); dtostrfd(h, Settings.flag2.humidity_resolution, humidity); diff --git a/sonoff/xsns_31_ccs811.ino b/sonoff/xsns_31_ccs811.ino index 8fb43d62a..482572cdb 100644 --- a/sonoff/xsns_31_ccs811.ino +++ b/sonoff/xsns_31_ccs811.ino @@ -62,10 +62,7 @@ void CCS811Update() // Perform every n second TVOC = ccs.getTVOC(); eCO2 = ccs.geteCO2(); CCS811_ready = 1; - if ((glob_humidity != 0) && (glob_temperature != -9999)) { - double gtmp = glob_temperature * 4; - ccs.setEnvironmentalData(glob_humidity, gtmp / 4); - } + if (global_update) { ccs.setEnvironmentalData((uint8_t)global_humidity, global_temperature); } ecnt = 0; } } else { From bd536d2d9535e68ec77d1edebf7a80cc4c29700f Mon Sep 17 00:00:00 2001 From: andrethomas Date: Tue, 24 Jul 2018 19:36:30 +0200 Subject: [PATCH 04/28] Opto'd MCP230xx_Show() shaving off another 92 bytes of flash --- sonoff/xsns_29_mcp230xx.ino | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sonoff/xsns_29_mcp230xx.ino b/sonoff/xsns_29_mcp230xx.ino index c6ed86871..786fde098 100644 --- a/sonoff/xsns_29_mcp230xx.ino +++ b/sonoff/xsns_29_mcp230xx.ino @@ -178,16 +178,16 @@ void MCP230xx_Show(boolean json) { if (mcp230xx_type) { if (json) { - if (mcp230xx_type == 1) { + if (mcp230xx_type > 0) { // we have at least 8 pins uint8_t gpio = MCP230xx_readGPIO(0); - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"MCP23008\":{\"D0\":%i,\"D1\":%i,\"D2\":%i,\"D3\":%i,\"D4\":%i,\"D5\":%i,\"D6\":%i,\"D7\":%i}"), + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"MCP230XX\":{\"D0\":%i,\"D1\":%i,\"D2\":%i,\"D3\":%i,\"D4\":%i,\"D5\":%i,\"D6\":%i,\"D7\":%i"), mqtt_data,(gpio>>0)&1,(gpio>>1)&1,(gpio>>2)&1,(gpio>>3)&1,(gpio>>4)&1,(gpio>>5)&1,(gpio>>6)&1,(gpio>>7)&1); - } - if (mcp230xx_type == 2) { - uint8_t gpio1 = MCP230xx_readGPIO(0); - uint8_t gpio2 = MCP230xx_readGPIO(1); - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"MCP23017\":{\"D0\":%i,\"D1\":%i,\"D2\":%i,\"D3\":%i,\"D4\":%i,\"D5\":%i,\"D6\":%i,\"D7\":%i,\"D8\":%i,\"D9\":%i,\"D10\":%i,\"D11\":%i,\"D12\":%i,\"D13\":%i,\"D14\":%i,\"D15\":%i}"), - mqtt_data, (gpio1>>0)&1,(gpio1>>1)&1,(gpio1>>2)&1,(gpio1>>3)&1,(gpio1>>4)&1,(gpio1>>5)&1,(gpio1>>6)&1,(gpio1>>7)&1,(gpio2>>0)&1,(gpio2>>1)&1,(gpio2>>2)&1,(gpio2>>3)&1,(gpio2>>4)&1,(gpio2>>5)&1,(gpio2>>6)&1,(gpio2>>7)&1); + if (mcp230xx_type == 2) { + gpio = MCP230xx_readGPIO(1); + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"D8\":%i,\"D9\":%i,\"D10\":%i,\"D11\":%i,\"D12\":%i,\"D13\":%i,\"D14\":%i,\"D15\":%i"), + mqtt_data,(gpio>>0)&1,(gpio>>1)&1,(gpio>>2)&1,(gpio>>3)&1,(gpio>>4)&1,(gpio>>5)&1,(gpio>>6)&1,(gpio>>7)&1); + } + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s%s"),mqtt_data,"}"); } } } From 9376b6f7c048e32cd3b99a6455a392d792b32ad7 Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Wed, 25 Jul 2018 10:04:35 +0200 Subject: [PATCH 05/28] Fix invalid JSON Fix command TimeDst/TimeStd invalid JSON (#3322) --- sonoff/_changelog.ino | 1 + sonoff/sonoff.ino | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index f780d7a21..a5097c3b6 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,4 +1,5 @@ /* 6.1.1c + * Fix command TimeDst/TimeStd invalid JSON (#3322) * Fix possible WDT due to long MQTT publish handling (#3313) * Fix CCS811 temperature and humidity compensation * Add support for CCS811 sensor (#3309) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 1d4442d59..593ee1d92 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -1117,7 +1117,7 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) ntp_force_sync = 1; } } - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"%s\":{\"Hemisphere\":%d,\"Week\":%d,\"Month\":%d,\"Day\":%d,\"Hour\":%d,\"Offset\":%d\"}}"), + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"%s\":{\"Hemisphere\":%d,\"Week\":%d,\"Month\":%d,\"Day\":%d,\"Hour\":%d,\"Offset\":%d}}"), command, Settings.tflag[ts].hemis, Settings.tflag[ts].week, Settings.tflag[ts].month, Settings.tflag[ts].dow, Settings.tflag[ts].hour, Settings.toffset[ts]); } else if (CMND_ALTITUDE == command_code) { From c2b3ff1fd22da2f53cad16c667ddd8b0f3f50577 Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Wed, 25 Jul 2018 10:35:36 +0200 Subject: [PATCH 06/28] Fix yield exception Fix yield exception using non PubSubClient library --- sonoff/xdrv_01_mqtt.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sonoff/xdrv_01_mqtt.ino b/sonoff/xdrv_01_mqtt.ino index 8afcf672b..e91e56f16 100644 --- a/sonoff/xdrv_01_mqtt.ino +++ b/sonoff/xdrv_01_mqtt.ino @@ -92,7 +92,9 @@ void MqttSubscribeLib(char *topic) bool MqttPublishLib(const char* topic, boolean retained) { - return MqttClient.publish(topic, mqtt_data, retained); + bool result = MqttClient.publish(topic, mqtt_data, retained); + yield(); // #3313 + return result; } void MqttLoop() @@ -231,8 +233,6 @@ void MqttPublishDirect(const char* topic, boolean retained) if (Settings.ledstate &0x04) { blinks++; } - - yield(); // #3313 } void MqttPublish(const char* topic, boolean retained) From 52f642b0c0c28c5d34aa62e91825194e32ca693e Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Wed, 25 Jul 2018 11:59:43 +0200 Subject: [PATCH 07/28] Remove obsolete define Remove obsolete define --- sonoff/language/bg-BG.h | 1 - sonoff/language/cs-CZ.h | 1 - sonoff/language/de-DE.h | 1 - sonoff/language/el-GR.h | 1 - sonoff/language/en-GB.h | 1 - sonoff/language/es-AR.h | 1 - sonoff/language/fr-FR.h | 1 - sonoff/language/hu-HU.h | 1 - sonoff/language/it-IT.h | 1 - sonoff/language/nl-NL.h | 1 - sonoff/language/pl-PL.h | 1 - sonoff/language/pt-BR.h | 1 - sonoff/language/pt-PT.h | 1 - sonoff/language/ru-RU.h | 1 - sonoff/language/uk-UK.h | 1 - sonoff/language/zh-CN.h | 1 - sonoff/language/zh-TW.h | 1 - 17 files changed, 17 deletions(-) diff --git a/sonoff/language/bg-BG.h b/sonoff/language/bg-BG.h index 5461883e4..d2f57f88f 100644 --- a/sonoff/language/bg-BG.h +++ b/sonoff/language/bg-BG.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Подтвърдете рестартирането" #define D_CONFIGURE_MODULE "Конфигурация на модула" -#define D_CONFIGURE_MCP230XX "Конфигурация на MCP230xx" #define D_CONFIGURE_WIFI "Конфигурация на WiFi" #define D_CONFIGURE_MQTT "Конфигурация на MQTT" #define D_CONFIGURE_DOMOTICZ "Конфигурация на Domoticz" diff --git a/sonoff/language/cs-CZ.h b/sonoff/language/cs-CZ.h index 3c89518e9..b69355ee6 100644 --- a/sonoff/language/cs-CZ.h +++ b/sonoff/language/cs-CZ.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Potvrzení restartu" #define D_CONFIGURE_MODULE "Nastavení modulu" -#define D_CONFIGURE_MCP230XX "Nastavení MCP230xx" #define D_CONFIGURE_WIFI "Nastavení WiFi" #define D_CONFIGURE_MQTT "Nastavení MQTT" #define D_CONFIGURE_DOMOTICZ "Nastavení Domoticz" diff --git a/sonoff/language/de-DE.h b/sonoff/language/de-DE.h index 42730e9ec..37175a72b 100644 --- a/sonoff/language/de-DE.h +++ b/sonoff/language/de-DE.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Wirklich neustarten?" #define D_CONFIGURE_MODULE "Gerät konfigurieren" -#define D_CONFIGURE_MCP230XX "MCP230xx konfigurieren" #define D_CONFIGURE_WIFI "WLAN konfigurieren" #define D_CONFIGURE_MQTT "MQTT konfigurieren" #define D_CONFIGURE_DOMOTICZ "Domoticz konfigurieren" diff --git a/sonoff/language/el-GR.h b/sonoff/language/el-GR.h index 1cc112b03..1b7c23bda 100644 --- a/sonoff/language/el-GR.h +++ b/sonoff/language/el-GR.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Επιβεβαίωση Επανεκκίνησης" #define D_CONFIGURE_MODULE "Ρύθμιση Module" -#define D_CONFIGURE_MCP230XX "Ρύθμιση MCP230xx" #define D_CONFIGURE_WIFI "Ρύθμιση WiFi" #define D_CONFIGURE_MQTT "Ρύθμιση MQTT" #define D_CONFIGURE_DOMOTICZ "Ρύθμιση Domoticz" diff --git a/sonoff/language/en-GB.h b/sonoff/language/en-GB.h index dee89bd39..2b2c3986d 100644 --- a/sonoff/language/en-GB.h +++ b/sonoff/language/en-GB.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Confirm Restart" #define D_CONFIGURE_MODULE "Configure Module" -#define D_CONFIGURE_MCP230XX "Configure MCP230xx" #define D_CONFIGURE_WIFI "Configure WiFi" #define D_CONFIGURE_MQTT "Configure MQTT" #define D_CONFIGURE_DOMOTICZ "Configure Domoticz" diff --git a/sonoff/language/es-AR.h b/sonoff/language/es-AR.h index 1cae4508a..df3d488a7 100644 --- a/sonoff/language/es-AR.h +++ b/sonoff/language/es-AR.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Confirmar Reinicio" #define D_CONFIGURE_MODULE "Configuración del Módulo" -#define D_CONFIGURE_MCP230XX "Configuración MCP230xx" #define D_CONFIGURE_WIFI "Configuración WiFi" #define D_CONFIGURE_MQTT "Configuración MQTT" #define D_CONFIGURE_DOMOTICZ "Configuración Domoticz" diff --git a/sonoff/language/fr-FR.h b/sonoff/language/fr-FR.h index c6653bd65..d8865db7a 100644 --- a/sonoff/language/fr-FR.h +++ b/sonoff/language/fr-FR.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Confirmer redémarrage" #define D_CONFIGURE_MODULE "Configuration du Module" -#define D_CONFIGURE_MCP230XX "Configuration MCP230xx" #define D_CONFIGURE_WIFI "Configuration WiFi" #define D_CONFIGURE_MQTT "Configuration MQTT" #define D_CONFIGURE_DOMOTICZ "Configuration Domoticz" diff --git a/sonoff/language/hu-HU.h b/sonoff/language/hu-HU.h index abd397abf..702165770 100644 --- a/sonoff/language/hu-HU.h +++ b/sonoff/language/hu-HU.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Újraindítás megerősítése" #define D_CONFIGURE_MODULE "Eszköz konfiguráció" -#define D_CONFIGURE_MCP230XX "MCP230xx konfiguráció" #define D_CONFIGURE_WIFI "WiFi konfiguráció" #define D_CONFIGURE_MQTT "MQTT konfiguráció" #define D_CONFIGURE_DOMOTICZ "Domoticz konfiguráció" diff --git a/sonoff/language/it-IT.h b/sonoff/language/it-IT.h index 763f2f912..832dc348a 100644 --- a/sonoff/language/it-IT.h +++ b/sonoff/language/it-IT.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Conferma Riavvio" #define D_CONFIGURE_MODULE "Configurazione Modulo" -#define D_CONFIGURE_MCP230XX "Configurazione MCP230xx" #define D_CONFIGURE_WIFI "Configurazione WiFi" #define D_CONFIGURE_MQTT "Configurazione MQTT" #define D_CONFIGURE_DOMOTICZ "Configurazione Domoticz" diff --git a/sonoff/language/nl-NL.h b/sonoff/language/nl-NL.h index d7ba586fa..ca7b90fc0 100644 --- a/sonoff/language/nl-NL.h +++ b/sonoff/language/nl-NL.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Bevestig herstart" #define D_CONFIGURE_MODULE "Configureer Module" -#define D_CONFIGURE_MCP230XX "Configureer MCP230xx" #define D_CONFIGURE_WIFI "Configureer WiFi" #define D_CONFIGURE_MQTT "Configureer MQTT" #define D_CONFIGURE_DOMOTICZ "Configureer Domoticz" diff --git a/sonoff/language/pl-PL.h b/sonoff/language/pl-PL.h index 6a1397218..9fb9c0821 100644 --- a/sonoff/language/pl-PL.h +++ b/sonoff/language/pl-PL.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Potwierdź restart" #define D_CONFIGURE_MODULE "Konfiguruj moduł" -#define D_CONFIGURE_MCP230XX "Konfiguruj MCP230xx" #define D_CONFIGURE_WIFI "Konfiguruj WiFi" #define D_CONFIGURE_MQTT "Konfiguruj MQTT" #define D_CONFIGURE_DOMOTICZ "Konfiguruj Domoticz" diff --git a/sonoff/language/pt-BR.h b/sonoff/language/pt-BR.h index 2d3f89b1f..d8615f5ac 100644 --- a/sonoff/language/pt-BR.h +++ b/sonoff/language/pt-BR.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Confirmar o reinicio" #define D_CONFIGURE_MODULE "Configurar Módulo" -#define D_CONFIGURE_MCP230XX "Configurar MCP230xx" #define D_CONFIGURE_WIFI "Configurar WiFi" #define D_CONFIGURE_MQTT "Configurar MQTT" #define D_CONFIGURE_DOMOTICZ "Configurar Domoticz" diff --git a/sonoff/language/pt-PT.h b/sonoff/language/pt-PT.h index 38ba38911..857ccff95 100644 --- a/sonoff/language/pt-PT.h +++ b/sonoff/language/pt-PT.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Confirmar o reinicio" #define D_CONFIGURE_MODULE "Configurar Módulo" -#define D_CONFIGURE_MCP230XX "Configurar MCP230xx" #define D_CONFIGURE_WIFI "Configurar WiFi" #define D_CONFIGURE_MQTT "Configurar MQTT" #define D_CONFIGURE_DOMOTICZ "Configurar Domoticz" diff --git a/sonoff/language/ru-RU.h b/sonoff/language/ru-RU.h index a0284adcd..14f8ece94 100644 --- a/sonoff/language/ru-RU.h +++ b/sonoff/language/ru-RU.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Подтвердить перезагрузку" #define D_CONFIGURE_MODULE "Конфигурация Модуля" -#define D_CONFIGURE_MCP230XX "Конфигурация MCP230xx" #define D_CONFIGURE_WIFI "Конфигурация WiFi" #define D_CONFIGURE_MQTT "Конфигурация MQTT" #define D_CONFIGURE_DOMOTICZ "Конфигурация Domoticz" diff --git a/sonoff/language/uk-UK.h b/sonoff/language/uk-UK.h index dd5dffb23..ea4213298 100644 --- a/sonoff/language/uk-UK.h +++ b/sonoff/language/uk-UK.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "Підтвердити перезавантаження" #define D_CONFIGURE_MODULE "Конфігурація модуля" -#define D_CONFIGURE_MCP230XX "Конфігурація MCP230xx" #define D_CONFIGURE_WIFI "Конфігурація WiFi" #define D_CONFIGURE_MQTT "Конфігурація MQTT" #define D_CONFIGURE_DOMOTICZ "Конфігурація Domoticz" diff --git a/sonoff/language/zh-CN.h b/sonoff/language/zh-CN.h index 0228e26e5..cae9f3af3 100644 --- a/sonoff/language/zh-CN.h +++ b/sonoff/language/zh-CN.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "确认重启" #define D_CONFIGURE_MODULE "模块设置" -#define D_CONFIGURE_MCP230XX "MCP230xx设置" #define D_CONFIGURE_WIFI "WiFi设置" #define D_CONFIGURE_MQTT "MQTT设置" #define D_CONFIGURE_DOMOTICZ "Domoticz设置" diff --git a/sonoff/language/zh-TW.h b/sonoff/language/zh-TW.h index 18becc2aa..02b89efe0 100644 --- a/sonoff/language/zh-TW.h +++ b/sonoff/language/zh-TW.h @@ -227,7 +227,6 @@ #define D_CONFIRM_RESTART "確認重啟" #define D_CONFIGURE_MODULE "模塊設置" -#define D_CONFIGURE_MCP230XX "MCP230xx設置" #define D_CONFIGURE_WIFI "WiFi設置" #define D_CONFIGURE_MQTT "MQTT設置" #define D_CONFIGURE_DOMOTICZ "Domoticz設置" From cb192c5c2d87aa0ae804b3376068a40e44d6f1d7 Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Wed, 25 Jul 2018 12:42:53 +0200 Subject: [PATCH 08/28] Update decode-status.py Update decode-status.py --- sonoff/sonoff.ino | 4 ++-- tools/decode-status.py | 47 ++++++++++++++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 593ee1d92..7b63160fb 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -1371,8 +1371,8 @@ void PublishStatus(uint8_t payload) } if ((0 == payload) || (3 == payload)) { - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS D_STATUS3_LOGGING "\":{\"" D_CMND_SERIALLOG "\":%d,\"" D_CMND_WEBLOG "\":%d,\"" D_CMND_SYSLOG "\":%d,\"" D_CMND_LOGHOST "\":\"%s\",\"" D_CMND_LOGPORT "\":%d,\"" D_CMND_SSID "\":[\"%s\",\"%s\"],\"" D_CMND_TELEPERIOD "\":%d,\"" D_CMND_SETOPTION "\":[\"%08X\",\"%08X\"]}}"), - Settings.seriallog_level, Settings.weblog_level, Settings.syslog_level, Settings.syslog_host, Settings.syslog_port, Settings.sta_ssid[0], Settings.sta_ssid[1], Settings.tele_period, Settings.flag.data, Settings.flag2.data); + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS D_STATUS3_LOGGING "\":{\"" D_CMND_SERIALLOG "\":%d,\"" D_CMND_WEBLOG "\":%d,\"" D_CMND_SYSLOG "\":%d,\"" D_CMND_LOGHOST "\":\"%s\",\"" D_CMND_LOGPORT "\":%d,\"" D_CMND_SSID "\":[\"%s\",\"%s\"],\"" D_CMND_TELEPERIOD "\":%d,\"" D_CMND_SETOPTION "\":[\"%08X\",\"%08X\",\"%08X\"]}}"), + Settings.seriallog_level, Settings.weblog_level, Settings.syslog_level, Settings.syslog_host, Settings.syslog_port, Settings.sta_ssid[0], Settings.sta_ssid[1], Settings.tele_period, Settings.flag.data, Settings.flag2.data, Settings.flag3.data); MqttPublishPrefixTopic_P(option, PSTR(D_CMND_STATUS "3")); } diff --git a/tools/decode-status.py b/tools/decode-status.py index 3adc8e707..7fc7ba4e1 100644 --- a/tools/decode-status.py +++ b/tools/decode-status.py @@ -48,11 +48,11 @@ from StringIO import StringIO a_on_off = ["OFF","ON "] -a_setoption = [ +a_setoption = [[ "Save power state and use after restart", "Restrict button actions to single, double and hold", "Show value units in JSON messages", - "MQTT", + "MQTT enabled", "Respond as Command topic instead of RESULT", "MQTT retain on Power", "MQTT retain on Button", @@ -74,13 +74,24 @@ a_setoption = [ "MQTT serial", "Rules until 5.14.0b", "Rules once mode until 5.14.0b", - "KNX", + "KNX enabled", "Use Power device index on single relay devices", "KNX enhancement", "RF receive decimal", "IR receive decimal", "Enforce HASS light group", - "Do not show Wifi and Mqtt state using Led"] + "Do not show Wifi and Mqtt state using Led" + ],[ + "Timers enabled", + "","","", + "","","","", + "","","","", + "","","","", + "","","","", + "","","","", + "","","","", + "","","","" + ]] a_features = [[ "","","USE_I2C","USE_SPI", @@ -144,6 +155,8 @@ else: fp.close() def StartDecode(): + print ("\n*** decode-status.py v20180725 by Theo Arends ***") + # print("Decoding\n{}".format(obj)) if ("StatusSNS" in obj): @@ -152,17 +165,29 @@ def StartDecode(): if ("Status" in obj): if ("FriendlyName" in obj["Status"]): - print("\nDecoding information for device {}{}".format(obj["Status"]["FriendlyName"][0], time)) + print("Decoding information for device {}{}".format(obj["Status"]["FriendlyName"][0], time)) if ("StatusLOG" in obj): if ("SetOption" in obj["StatusLOG"]): options = [] - option = obj["StatusLOG"]["SetOption"][0] - i_option = int(option,16) - for i in range(len(a_setoption)): - if (a_setoption[i]): - state = (i_option >> i) & 1 - options.append(str("{0:2d} ({1}) {2}".format(i, a_on_off[state], a_setoption[i]))) + o = 0 + p = 0 + + r = 1 + if (len(obj["StatusLOG"]["SetOption"]) == 3): + r = 2 + + for f in range(r): + if (f == 1): + o = 2 + p = 50 + + option = obj["StatusLOG"]["SetOption"][o] + i_option = int(option,16) + for i in range(len(a_setoption[f])): + if (a_setoption[f][i]): + state = (i_option >> i) & 1 + options.append(str("{0:2d} ({1}) {2}".format(i + p, a_on_off[state], a_setoption[f][i]))) print("\nOptions") for i in range(len(options)): From e82c993134b263f6fb3194fbfc4431e0b4bfa379 Mon Sep 17 00:00:00 2001 From: Ali TEKE Date: Wed, 25 Jul 2018 23:34:21 +0300 Subject: [PATCH 09/28] Added Turkish language --- sonoff/language/tr-TR.h | 529 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 529 insertions(+) create mode 100755 sonoff/language/tr-TR.h diff --git a/sonoff/language/tr-TR.h b/sonoff/language/tr-TR.h new file mode 100755 index 000000000..4c588bdbd --- /dev/null +++ b/sonoff/language/tr-TR.h @@ -0,0 +1,529 @@ +/* + en-GB.h - localization for English - United Kingdom for Sonoff-Tasmota + + Copyright (C) 2018 Theo Arends + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef _LANGUAGE_TR_TR_H_ +#define _LANGUAGE_TR_TR_H_ + +/*************************** ATTENTION *******************************\ + * + * Due to memory constraints only UTF-8 is supported. + * To save code space keep text as short as possible. + * Time and Date provided by SDK can not be localized (yet). + * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. + * Use online command Prefix to translate cmnd, stat and tele. + * + * Updated until v5.14.0b +\*********************************************************************/ + +//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) + +#define LANGUAGE_LCID 2057 +// HTML (ISO 639-1) Language Code +#define D_HTML_LANGUAGE "tr" + +// "2017-03-07T11:08:02" - ISO8601:2004 +#define D_YEAR_MONTH_SEPARATOR "-" +#define D_MONTH_DAY_SEPARATOR "-" +#define D_DATE_TIME_SEPARATOR "T" +#define D_HOUR_MINUTE_SEPARATOR ":" +#define D_MINUTE_SECOND_SEPARATOR ":" + +#define D_DAY3LIST "PazPztsSalCarPerCumCmrts" +#define D_MONTH3LIST "OckSubMarNisMayHazTemAguEylEkmKasAra" + +// Non JSON decimal separator +#define D_DECIMAL_SEPARATOR "." + +// Common +#define D_ADMIN "Admin" +#define D_AIR_QUALITY "Air quality" +#define D_AP "AP" // Access Point +#define D_AS "as" +#define D_AUTO "OTOMATIK" +#define D_BLINK "Blink" +#define D_BLINKOFF "BlinkOff" +#define D_BOOT_COUNT "Yeniden başlama sayısı" +#define D_BRIGHTLIGHT "Işık" +#define D_BUTTON "Buton" +#define D_BY "by" // Written by me +#define D_BYTES "Bayt" +#define D_CELSIUS "Derece" +#define D_CO2 "Karbon dioksit" +#define D_CODE "kod" // Button code +#define D_COLDLIGHT "Soğuk" +#define D_COMMAND "Komut" +#define D_CONNECTED "Bağlandı" +#define D_COUNT "Sayı" +#define D_COUNTER "Sayaç" +#define D_CURRENT "Current" // As in Voltage and Current +#define D_DATA "Data" +#define D_DARKLIGHT "Karanlık" +#define D_DEBUG "Hata Ayıklama" +#define D_DISABLED "Etkin Değil" +#define D_DISTANCE "Mesage" +#define D_DNS_SERVER "DNS Sunucu" +#define D_DONE "Tamam" +#define D_DST_TIME "DST" +#define D_ECO2 "eCO2" +#define D_EMULATION "Emülasyon" +#define D_ENABLED "Etkin" +#define D_ERASE "Temizle" +#define D_ERROR "Hata" +#define D_FAHRENHEIT "Fahrenayt" +#define D_FAILED "Başlarısız" +#define D_FALLBACK "Geri iletim" +#define D_FALLBACK_TOPIC "Geri İletim Topiği" +#define D_FALSE "False" +#define D_FILE "Dosya" +#define D_FREE_MEMORY "Boş Hafıza" +#define D_FREQUENCY "Frekans" +#define D_GAS "Gas" +#define D_GATEWAY "Geçit" +#define D_GROUP "Grup" +#define D_HOST "Host" +#define D_HOSTNAME "Host Adresi" +#define D_HUMIDITY "Nem" +#define D_ILLUMINANCE "Aydınlık" +#define D_IMMEDIATE "derhal" // Button immediate +#define D_INDEX "Index" +#define D_INFO "Bilgi" +#define D_INFRARED "Kızılötesi" +#define D_INITIALIZED "Başlatıldı" +#define D_IP_ADDRESS "IP Adresi" +#define D_LIGHT "Işık" +#define D_LWT "LWT" +#define D_MODULE "Modül" +#define D_MQTT "MQTT" +#define D_MULTI_PRESS "multi-press" +#define D_NOISE "Noise" +#define D_NONE "None" +#define D_OFF "Off" +#define D_OFFLINE "Çevirimdışı" +#define D_OK "Tamam" +#define D_ON "On" +#define D_ONLINE "Çevirimiçi" +#define D_PASSWORD "Şifre" +#define D_PORT "Port" +#define D_POWER_FACTOR "Güç Faktörü" +#define D_POWERUSAGE "Güç" +#define D_POWERUSAGE_ACTIVE "Aktif Güç" +#define D_POWERUSAGE_APPARENT "Görünen Güç" +#define D_POWERUSAGE_REACTIVE "Reaktif Güç" +#define D_PRESSURE "Basınç" +#define D_PRESSUREATSEALEVEL "Deniz Seviyesi Basıncı" +#define D_PROGRAM_FLASH_SIZE "Yazılım Flash Boyutu" +#define D_PROGRAM_SIZE "Yazılım Boyutu" +#define D_PROJECT "Proje" +#define D_RECEIVED "Alınan" +#define D_RESTART "Yeniden Başlat" +#define D_RESTARTING "Yeniden Başlatılıyor" +#define D_RESTART_REASON "Yeniden Başlatma Sebebi" +#define D_RESTORE "restore" +#define D_RETAINED "tutulan" +#define D_RULE "Kural" +#define D_SAVE "Kaydet" +#define D_SENSOR "Sensör" +#define D_SSID "SSId" +#define D_START "Başlat" +#define D_STD_TIME "STD" +#define D_STOP "Durdur" +#define D_SUBNET_MASK "Altağ Geçidi Maskesi" +#define D_SUBSCRIBE_TO "Abone olunan" +#define D_SUCCESSFUL "Başarıyla Tamamlandı" +#define D_SUNRISE "Gün doğumu" +#define D_SUNSET "Gün batımı" +#define D_TEMPERATURE "Sıcaklık" +#define D_TO "den" +#define D_TOGGLE "Geçiş Tuşu" +#define D_TOPIC "Başlık" +#define D_TRANSMIT "İletim" +#define D_TRUE "True" +#define D_TVOC "TVOC" +#define D_UPGRADE "yükseltme" +#define D_UPLOAD "Yükleme" +#define D_UPTIME "Açık Kalma Süresi" +#define D_USER "Kullanıcı" +#define D_UTC_TIME "UTC" +#define D_UV_INDEX "UV Indeksi" +#define D_UV_LEVEL "UV Seviyesi" +#define D_VERSION "Versiyon" +#define D_VOLTAGE "Voltaj" +#define D_WARMLIGHT "Sıcak" +#define D_WEB_SERVER "Web Sunucusu" + +// sonoff.ino +#define D_WARNING_MINIMAL_VERSION "UYARI Bu versiyon ayarların kalıcı olarak kaydedilmesine olanak sağlamıyor" +#define D_LEVEL_10 "seviye 1-0" +#define D_LEVEL_01 "seviye 0-1" +#define D_SERIAL_LOGGING_DISABLED "Seri port loglaması kapalı" +#define D_SYSLOG_LOGGING_REENABLED "Sistem loglaması tekrar aktif" + +#define D_SET_BAUDRATE_TO "Baud hızını şu şekilde değiştir" +#define D_RECEIVED_TOPIC "Alınan Başlık" +#define D_DATA_SIZE "Veri Büyüklüğü" +#define D_ANALOG_INPUT "Analog" + +// support.ino +#define D_OSWATCH "osWatch" +#define D_BLOCKED_LOOP "Döngü bloke edildi" +#define D_WPS_FAILED_WITH_STATUS "WPSconfig FAILED with status" +#define D_ACTIVE_FOR_3_MINUTES "3 dakika aktif" +#define D_FAILED_TO_START "başlatma başarılı olamadı" +#define D_PATCH_ISSUE_2186 "Patch issue 2186" +#define D_CONNECTING_TO_AP "AP'ye bağlan" +#define D_IN_MODE "modunda" +#define D_CONNECT_FAILED_NO_IP_ADDRESS "IP adresi alınamadığı için bağlantı kurulamadı" +#define D_CONNECT_FAILED_AP_NOT_REACHED "Ap'ye ulaşılamadı" +#define D_CONNECT_FAILED_WRONG_PASSWORD "Girilen parolayı AP kabul etmedi" +#define D_CONNECT_FAILED_AP_TIMEOUT "AP'ye bağlanılırken süre aşımı oluştu" +#define D_ATTEMPTING_CONNECTION "Yeniden bağlanılıyor..." +#define D_CHECKING_CONNECTION "Bağlantı kontrol ediliyor..." +#define D_QUERY_DONE "Soru tamamlandı. MQTT servisleri bulundu" +#define D_MQTT_SERVICE_FOUND "Üzerinden MQTT serivisi tespit edildi" +#define D_FOUND_AT "(bulundu)" +#define D_SYSLOG_HOST_NOT_FOUND "Syslog hostu bulunamadı" + +// settings.ino +#define D_SAVED_TO_FLASH_AT "Bellekten (Flash) kaydedidi:" +#define D_LOADED_FROM_FLASH_AT "Bellekten (Flash) okundu" +#define D_USE_DEFAULTS "Varsayılanları Kullan" +#define D_ERASED_SECTOR "Sektör temizlendi" + +// xdrv_02_webserver.ino +#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "Donanım yazılımı çok düşük, lütfen yükseltin" +#define D_WEBSERVER_ACTIVE_ON "Web sunucusu aktif" +#define D_WITH_IP_ADDRESS "IP adres ile" +#define D_WEBSERVER_STOPPED "Web sunucusu durdu" +#define D_FILE_NOT_FOUND "Dosya Bulunamadı" +#define D_REDIRECTED "Portala yönlendirildiniz" +#define D_WIFIMANAGER_SET_ACCESSPOINT_AND_STATION "Wifi yöneticisi AP olarak ayarlandı ve istasyon olarak bekletiliyor" +#define D_WIFIMANAGER_SET_ACCESSPOINT "Wifi yöneticisi AP olarak ayarlandı" +#define D_TRYING_TO_CONNECT "Cihaz ağa bağlanmaya çalışıyor" + +#define D_RESTART_IN "Burada tekrar başlat" +#define D_SECONDS "saniye" +#define D_DEVICE_WILL_RESTART "Birkaç saniye içerisinde cihaz tekrar başlatılacak" +#define D_BUTTON_TOGGLE "Toggle" +#define D_CONFIGURATION "Konfigürasyon" +#define D_INFORMATION "Bilgi" +#define D_FIRMWARE_UPGRADE "Cihaz yazılımını Güncelle" +#define D_CONSOLE "Konsol" +#define D_CONFIRM_RESTART "Yeniden Başlatmayı Onayla" + +#define D_CONFIGURE_MODULE "Modül Ayarlarını Değiştir" +#define D_CONFIGURE_WIFI "WiFi'i Ayarlarını Değiştir" +#define D_CONFIGURE_MQTT "MQTT'yi Ayarlarını Değiştir" +#define D_CONFIGURE_DOMOTICZ "Domoticz Ayarlarını Değiştir" +#define D_CONFIGURE_LOGGING "Loglama Ayarlarını Değiştir" +#define D_CONFIGURE_OTHER "Diğer Ayarları Değiştir" +#define D_CONFIRM_RESET_CONFIGURATION "Resetleme Ayarlarını Onayla" +#define D_RESET_CONFIGURATION "Tüm Ayarları Resetle" +#define D_BACKUP_CONFIGURATION "Ayarları Yedekle" +#define D_RESTORE_CONFIGURATION "Ayarları Geri Yükle" +#define D_MAIN_MENU "Ana Menü" + +#define D_MODULE_PARAMETERS "Modül parametreleri" +#define D_MODULE_TYPE "Modul türü" +#define D_GPIO "GPIO" +#define D_SERIAL_IN "Serial In" +#define D_SERIAL_OUT "Serial Out" + +#define D_WIFI_PARAMETERS "Wifi parametreleri" +#define D_SCAN_FOR_WIFI_NETWORKS "Çevredeki Wifi Networklerini Tara" +#define D_SCAN_DONE "Tarama tamamladı" +#define D_NO_NETWORKS_FOUND "Herhangi wifi ağı bulunamadı" +#define D_REFRESH_TO_SCAN_AGAIN "Tekrar tarama - yenile" +#define D_DUPLICATE_ACCESSPOINT "AP'yi çoğalt" +#define D_SKIPPING_LOW_QUALITY "Düşük kalitedekileri dikkate alma" +#define D_RSSI "RSSI" +#define D_WEP "WEP" +#define D_WPA_PSK "WPA PSK" +#define D_WPA2_PSK "WPA2 PSK" +#define D_AP1_SSID "AP1 SSId" +#define D_AP1_PASSWORD "AP1 Password" +#define D_AP2_SSID "AP2 SSId" +#define D_AP2_PASSWORD "AP2 Password" + +#define D_MQTT_PARAMETERS "MQTT parametreleri" +#define D_CLIENT "İstemci" +#define D_FULL_TOPIC "Tüm Başlık" + +#define D_LOGGING_PARAMETERS "Loglama parametreleri" +#define D_SERIAL_LOG_LEVEL "Serial log seviyesi" +#define D_WEB_LOG_LEVEL "Web log seviyesi" +#define D_SYS_LOG_LEVEL "Syslog seviyesi" +#define D_MORE_DEBUG "Hata ayıklama devamı" +#define D_SYSLOG_HOST "Syslog host" +#define D_SYSLOG_PORT "Syslog port" +#define D_TELEMETRY_PERIOD "Telemetri peryodu" + +#define D_OTHER_PARAMETERS "Diğer parametreler" +#define D_WEB_ADMIN_PASSWORD "Web Yönetici Şifresi" +#define D_MQTT_ENABLE "MQTT aktif" +#define D_FRIENDLY_NAME "Kullanıcı Dostu İsim" +#define D_BELKIN_WEMO "Belkin WeMo" +#define D_HUE_BRIDGE "Hue Bridge" +#define D_SINGLE_DEVICE "tekli cihaz" +#define D_MULTI_DEVICE "çoklu cihaz" + +#define D_SAVE_CONFIGURATION "Ayarları Kaydet" +#define D_CONFIGURATION_SAVED "Ayarlar kaydedildi" +#define D_CONFIGURATION_RESET "Ayarlar resetlendi" + +#define D_PROGRAM_VERSION "Yazılım versiyonu" +#define D_BUILD_DATE_AND_TIME "Derleme Tarihi ve Saati" +#define D_CORE_AND_SDK_VERSION "Core/SDK Versiyonu" +#define D_FLASH_WRITE_COUNT "Belleğe (flash) Yazma Sayısı" +#define D_MAC_ADDRESS "MAC Adresi" +#define D_MQTT_HOST "MQTT Host" +#define D_MQTT_PORT "MQTT Port" +#define D_MQTT_CLIENT "MQTT İstemcisi" +#define D_MQTT_USER "MQTT Kullanıcısı" +#define D_MQTT_TOPIC "MQTT Topiği" +#define D_MQTT_GROUP_TOPIC "MQTT Grup Topiği" +#define D_MQTT_FULL_TOPIC "MQTT Full Topik" +#define D_MDNS_DISCOVERY "mDNS Keşfi" +#define D_MDNS_ADVERTISE "mDNS Yayını" +#define D_ESP_CHIP_ID "ESP Chip Id" +#define D_FLASH_CHIP_ID "Flash Chip Id" +#define D_FLASH_CHIP_SIZE "Flash Boyutu" +#define D_FREE_PROGRAM_SPACE "Boşta Yazılım Alanı Boyutu" + +#define D_UPGRADE_BY_WEBSERVER "Web server kullanarak yükselt" +#define D_OTA_URL "OTA Url" +#define D_START_UPGRADE "Yükseltmeyi başlat" +#define D_UPGRADE_BY_FILE_UPLOAD "Dosya kullanrak yükset" +#define D_UPLOAD_STARTED "Yükleme başlatıldı" +#define D_UPGRADE_STARTED "YÜkestlme başlatıldı" +#define D_UPLOAD_DONE "Yükleme Tamamlandı" +#define D_UPLOAD_ERR_1 "Dosya seçilmedi" +#define D_UPLOAD_ERR_2 "Boş yer yok" +#define D_UPLOAD_ERR_3 "Magic byte is not 0xE9" +#define D_UPLOAD_ERR_4 "Yazılımın boyutu gerçek boyutundan fazla" +#define D_UPLOAD_ERR_5 "Upload buffer miscompare" +#define D_UPLOAD_ERR_6 "Upload failed. Enable logging 3" +#define D_UPLOAD_ERR_7 "Upload aborted" +#define D_UPLOAD_ERR_8 "File invalid" +#define D_UPLOAD_ERR_9 "File too large" +#define D_UPLOAD_ERR_10 "Failed to init RF chip" +#define D_UPLOAD_ERR_11 "Failed to erase RF chip" +#define D_UPLOAD_ERR_12 "Failed to write to RF chip" +#define D_UPLOAD_ERR_13 "Failed to decode RF firmware" +#define D_UPLOAD_ERROR_CODE "Upload error code" + +#define D_ENTER_COMMAND "Enter command" +#define D_ENABLE_WEBLOG_FOR_RESPONSE "Enable weblog 2 if response expected" +#define D_NEED_USER_AND_PASSWORD "Need user=&password=" + +// xdrv_01_mqtt.ino +#define D_FINGERPRINT "Verify TLS fingerprint..." +#define D_TLS_CONNECT_FAILED_TO "TLS Connect failed to" +#define D_RETRY_IN "Retry in" +#define D_VERIFIED "Verified using Fingerprint" +#define D_INSECURE "Insecure connection due to invalid Fingerprint" +#define D_CONNECT_FAILED_TO "Connect failed to" + +// xplg_wemohue.ino +#define D_MULTICAST_DISABLED "Multicast disabled" +#define D_MULTICAST_REJOINED "Multicast (re)joined" +#define D_MULTICAST_JOIN_FAILED "Multicast join failed" +#define D_FAILED_TO_SEND_RESPONSE "Failed to send response" + +#define D_WEMO "WeMo" +#define D_WEMO_BASIC_EVENT "WeMo basic event" +#define D_WEMO_EVENT_SERVICE "WeMo event service" +#define D_WEMO_META_SERVICE "WeMo meta service" +#define D_WEMO_SETUP "WeMo setup" +#define D_RESPONSE_SENT "Response sent" + +#define D_HUE "Hue" +#define D_HUE_BRIDGE_SETUP "Hue setup" +#define D_HUE_API_NOT_IMPLEMENTED "Hue API not implemented" +#define D_HUE_API "Hue API" +#define D_HUE_POST_ARGS "Hue POST args" +#define D_3_RESPONSE_PACKETS_SENT "3 response packets sent" + +// xdrv_07_domoticz.ino +#define D_DOMOTICZ_PARAMETERS "Domoticz parameters" +#define D_DOMOTICZ_IDX "Idx" +#define D_DOMOTICZ_KEY_IDX "Key idx" +#define D_DOMOTICZ_SWITCH_IDX "Switch idx" +#define D_DOMOTICZ_SENSOR_IDX "Sensor idx" + #define D_DOMOTICZ_TEMP "Temp" + #define D_DOMOTICZ_TEMP_HUM "Temp,Hum" + #define D_DOMOTICZ_TEMP_HUM_BARO "Temp,Hum,Baro" + #define D_DOMOTICZ_POWER_ENERGY "Power,Energy" + #define D_DOMOTICZ_ILLUMINANCE "Illuminance" + #define D_DOMOTICZ_COUNT "Count/PM1" + #define D_DOMOTICZ_VOLTAGE "Voltage/PM2.5" + #define D_DOMOTICZ_CURRENT "Current/PM10" + #define D_DOMOTICZ_AIRQUALITY "AirQuality" +#define D_DOMOTICZ_UPDATE_TIMER "Update timer" + +// xdrv_09_timers.ino +#define D_CONFIGURE_TIMER "Configure Timer" +#define D_TIMER_PARAMETERS "Timer parameters" +#define D_TIMER_ARM "Arm" +#define D_TIMER_TIME "Time" +#define D_TIMER_DAYS "Days" +#define D_TIMER_REPEAT "Repeat" +#define D_TIMER_OUTPUT "Output" +#define D_TIMER_ACTION "Action" + +// xdrv_10_knx.ino +#define D_CONFIGURE_KNX "Configure KNX" +#define D_KNX_PARAMETERS "KNX Parameters" +#define D_KNX_GENERAL_CONFIG "General" +#define D_KNX_PHYSICAL_ADDRESS "Physical Address" +#define D_KNX_PHYSICAL_ADDRESS_NOTE "( Must be unique on the KNX network )" +#define D_KNX_ENABLE "Enable KNX" +#define D_KNX_GROUP_ADDRESS_TO_WRITE "Data to Send to Group Addresses" +#define D_ADD "Add" +#define D_DELETE "Delete" +#define D_REPLY "Reply" +#define D_KNX_GROUP_ADDRESS_TO_READ "Group Addresses to Receive Data from" +#define D_LOG_KNX "KNX: " +#define D_RECEIVED_FROM "Received from" +#define D_KNX_COMMAND_WRITE "Yaz" +#define D_KNX_COMMAND_READ "Oku" +#define D_KNX_COMMAND_OTHER "Diğer" +#define D_SENT_TO "gönder" +#define D_KNX_WARNING "The group address ( 0 / 0 / 0 ) is reserved and can not be used." +#define D_KNX_ENHANCEMENT "Communication Enhancement" +#define D_KNX_TX_SLOT "KNX TX" +#define D_KNX_RX_SLOT "KNX RX" + +// xdrv_03_energy.ino +#define D_ENERGY_TODAY "Energy Today" +#define D_ENERGY_YESTERDAY "Energy Yesterday" +#define D_ENERGY_TOTAL "Energy Total" + +// xsns_05_ds18b20.ino +#define D_SENSOR_BUSY "Sensör başgül" +#define D_SENSOR_CRC_ERROR "Sensor CRC hatası" +#define D_SENSORS_FOUND "Sensörler bulundu" + +// xsns_06_dht.ino +#define D_TIMEOUT_WAITING_FOR "Timeout waiting for" +#define D_START_SIGNAL_LOW "düşük sinyal başlat" +#define D_START_SIGNAL_HIGH "yüksek sinyal başlat" +#define D_PULSE "pulse" +#define D_CHECKSUM_FAILURE "Checksum failure" + +// xsns_07_sht1x.ino +#define D_SENSOR_DID_NOT_ACK_COMMAND "Sensor did not ACK command" +#define D_SHT1X_FOUND "SHT1X found" + +// xsns_18_pms5003.ino +#define D_STANDARD_CONCENTRATION "CF-1 PM" // Standard Particle CF-1 Particle Matter +#define D_ENVIRONMENTAL_CONCENTRATION "PM" // Environmetal Particle Matter +#define D_PARTICALS_BEYOND "Particals" + +// sonoff_template.h +#define D_SENSOR_NONE "None" +#define D_SENSOR_DHT11 "DHT11" +#define D_SENSOR_AM2301 "AM2301" +#define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_DS18X20 "DS18x20" +#define D_SENSOR_I2C_SCL "I2C SCL" +#define D_SENSOR_I2C_SDA "I2C SDA" +#define D_SENSOR_WS2812 "WS2812" +#define D_SENSOR_IRSEND "IRsend" +#define D_SENSOR_SWITCH "Switch" // Suffix "1" +#define D_SENSOR_BUTTON "Button" // Suffix "1" +#define D_SENSOR_RELAY "Relay" // Suffix "1i" +#define D_SENSOR_LED "Led" // Suffix "1i" +#define D_SENSOR_PWM "PWM" // Suffix "1" +#define D_SENSOR_COUNTER "Counter" // Suffix "1" +#define D_SENSOR_IRRECV "IRrecv" +#define D_SENSOR_MHZ_RX "MHZ Rx" +#define D_SENSOR_MHZ_TX "MHZ Tx" +#define D_SENSOR_PZEM_RX "PZEM Rx" +#define D_SENSOR_PZEM_TX "PZEM Tx" +#define D_SENSOR_SAIR_RX "SAir Rx" +#define D_SENSOR_SAIR_TX "SAir Tx" +#define D_SENSOR_SPI_CS "SPI CS" +#define D_SENSOR_SPI_DC "SPI DC" +#define D_SENSOR_BACKLIGHT "BkLight" +#define D_SENSOR_PMS5003 "PMS5003" +#define D_SENSOR_SDS0X1 "SDS0X1" +#define D_SENSOR_SBR_RX "SerBr Rx" +#define D_SENSOR_SBR_TX "SerBr Tx" +#define D_SENSOR_SR04_TRIG "SR04 Tri" +#define D_SENSOR_SR04_ECHO "SR04 Ech" +#define D_SENSOR_SDM120_TX "SDM120 Tx" +#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM630_TX "SDM630 Tx" +#define D_SENSOR_SDM630_RX "SDM630 Rx" +#define D_SENSOR_TM1638_CLK "TM16 CLK" +#define D_SENSOR_TM1638_DIO "TM16 DIO" +#define D_SENSOR_TM1638_STB "TM16 STB" + +// Units +#define D_UNIT_AMPERE "A" +#define D_UNIT_CENTIMETER "cm" +#define D_UNIT_HOUR "Hr" +#define D_UNIT_KILOOHM "kOhm" +#define D_UNIT_KILOWATTHOUR "kWh" +#define D_UNIT_LUX "lx" +#define D_UNIT_MICROGRAM_PER_CUBIC_METER "ug/m3" +#define D_UNIT_MICROMETER "um" +#define D_UNIT_MICROSECOND "us" +#define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLISECOND "ms" +#define D_UNIT_MINUTE "Min" +#define D_UNIT_PARTS_PER_BILLION "ppb" +#define D_UNIT_PARTS_PER_DECILITER "ppd" +#define D_UNIT_PARTS_PER_MILLION "ppm" +#define D_UNIT_PRESSURE "hPa" +#define D_UNIT_SECOND "sec" +#define D_UNIT_SECTORS "sectors" +#define D_UNIT_VA "VA" +#define D_UNIT_VAR "VAr" +#define D_UNIT_VOLT "V" +#define D_UNIT_WATT "W" +#define D_UNIT_WATTHOUR "Wh" +#define D_UNIT_HERTZ "Hz" + +// Log message prefix +#define D_LOG_APPLICATION "APP: " // Application +#define D_LOG_BRIDGE "BRG: " // Bridge +#define D_LOG_CONFIG "CFG: " // Settings +#define D_LOG_COMMAND "CMD: " // Command +#define D_LOG_DEBUG "DBG: " // Debug +#define D_LOG_DHT "DHT: " // DHT sensor +#define D_LOG_DOMOTICZ "DOM: " // Domoticz +#define D_LOG_DSB "DSB: " // DS18xB20 sensor +#define D_LOG_HTTP "HTP: " // HTTP webserver +#define D_LOG_I2C "I2C: " // I2C +#define D_LOG_IRR "IRR: " // Infra Red Received +#define D_LOG_LOG "LOG: " // Logging +#define D_LOG_MODULE "MOD: " // Module +#define D_LOG_MDNS "DNS: " // mDNS +#define D_LOG_MQTT "MQT: " // MQTT +#define D_LOG_OTHER "OTH: " // Other +#define D_LOG_RESULT "RSL: " // Result +#define D_LOG_RFR "RFR: " // RF Received +#define D_LOG_SERIAL "SER: " // Serial +#define D_LOG_SHT1 "SHT: " // SHT1x sensor +#define D_LOG_UPLOAD "UPL: " // Upload +#define D_LOG_UPNP "UPP: " // UPnP +#define D_LOG_WIFI "WIF: " // Wifi + +#endif // _LANGUAGE_EN_GB_H_ From b40f187514097fdc5c4644d6c00bb7d7f1500c70 Mon Sep 17 00:00:00 2001 From: Ali TEKE Date: Wed, 25 Jul 2018 23:38:22 +0300 Subject: [PATCH 10/28] Message update in languages/tr-TR.h file --- sonoff/language/tr-TR.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/language/tr-TR.h b/sonoff/language/tr-TR.h index 4c588bdbd..4c0724252 100755 --- a/sonoff/language/tr-TR.h +++ b/sonoff/language/tr-TR.h @@ -52,7 +52,7 @@ // Common #define D_ADMIN "Admin" -#define D_AIR_QUALITY "Air quality" +#define D_AIR_QUALITY "Hava Kalitesi" #define D_AP "AP" // Access Point #define D_AS "as" #define D_AUTO "OTOMATIK" From aa41a8f4d1676abfb289d2d585e34d9c635a19c8 Mon Sep 17 00:00:00 2001 From: Ali TEKE Date: Wed, 25 Jul 2018 23:44:28 +0300 Subject: [PATCH 11/28] Turkish file update --- sonoff/language/tr-TR.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/language/tr-TR.h b/sonoff/language/tr-TR.h index 4c0724252..b88ceefe3 100755 --- a/sonoff/language/tr-TR.h +++ b/sonoff/language/tr-TR.h @@ -1,5 +1,5 @@ /* - en-GB.h - localization for English - United Kingdom for Sonoff-Tasmota + tr-TR.h - localization for Turkish - Turkey for Sonoff-Tasmota Copyright (C) 2018 Theo Arends From 72bb979d06d0d017b5ac90e249b5d99fed6ed1b7 Mon Sep 17 00:00:00 2001 From: Ali TEKE Date: Wed, 25 Jul 2018 23:55:23 +0300 Subject: [PATCH 12/28] fixed D_DAY3LIST format --- sonoff/language/tr-TR.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sonoff/language/tr-TR.h b/sonoff/language/tr-TR.h index b88ceefe3..1e5c63d1f 100755 --- a/sonoff/language/tr-TR.h +++ b/sonoff/language/tr-TR.h @@ -38,13 +38,13 @@ #define D_HTML_LANGUAGE "tr" // "2017-03-07T11:08:02" - ISO8601:2004 -#define D_YEAR_MONTH_SEPARATOR "-" -#define D_MONTH_DAY_SEPARATOR "-" +#define D_YEAR_MONTH_SEPARATOR "." +#define D_MONTH_DAY_SEPARATOR "." #define D_DATE_TIME_SEPARATOR "T" #define D_HOUR_MINUTE_SEPARATOR ":" #define D_MINUTE_SECOND_SEPARATOR ":" -#define D_DAY3LIST "PazPztsSalCarPerCumCmrts" +#define D_DAY3LIST "PazPztSalCarPerCumCmt" #define D_MONTH3LIST "OckSubMarNisMayHazTemAguEylEkmKasAra" // Non JSON decimal separator From d34c24175a88f7f35bbdb56b9eb93c9e298ea4be Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Thu, 26 Jul 2018 10:52:33 +0200 Subject: [PATCH 13/28] Update tr-TR.h --- sonoff/language/tr-TR.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sonoff/language/tr-TR.h b/sonoff/language/tr-TR.h index 1e5c63d1f..ab5ce97fa 100755 --- a/sonoff/language/tr-TR.h +++ b/sonoff/language/tr-TR.h @@ -1,7 +1,7 @@ /* tr-TR.h - localization for Turkish - Turkey for Sonoff-Tasmota - Copyright (C) 2018 Theo Arends + Copyright (C) 2018 Ali Sait Teke and Theo Arends This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,12 +28,12 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v5.14.0b + * Updated until v6.1.1 \*********************************************************************/ //#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) -#define LANGUAGE_LCID 2057 +#define LANGUAGE_LCID 1055 // HTML (ISO 639-1) Language Code #define D_HTML_LANGUAGE "tr" @@ -379,6 +379,7 @@ // xdrv_09_timers.ino #define D_CONFIGURE_TIMER "Configure Timer" #define D_TIMER_PARAMETERS "Timer parameters" +#define D_TIMER_ENABLE "Enable Timers" #define D_TIMER_ARM "Arm" #define D_TIMER_TIME "Time" #define D_TIMER_DAYS "Days" @@ -526,4 +527,4 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi -#endif // _LANGUAGE_EN_GB_H_ +#endif // _LANGUAGE_TR_TR_H_ From 34769099d120d8869400741af59551163fa3cf66 Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Thu, 26 Jul 2018 10:57:59 +0200 Subject: [PATCH 14/28] Add Turkish language file Add Turkish language file (#3332) --- sonoff/_changelog.ino | 1 + sonoff/user_config.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index a5097c3b6..dcead2a0b 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,4 +1,5 @@ /* 6.1.1c + * Add Turkish language file (#3332) * Fix command TimeDst/TimeStd invalid JSON (#3322) * Fix possible WDT due to long MQTT publish handling (#3313) * Fix CCS811 temperature and humidity compensation diff --git a/sonoff/user_config.h b/sonoff/user_config.h index dcbb7c9fe..eb991eed2 100644 --- a/sonoff/user_config.h +++ b/sonoff/user_config.h @@ -199,6 +199,7 @@ //#define MY_LANGUAGE pt-BR // Portuguese in Brazil //#define MY_LANGUAGE pt-PT // Portuguese in Portugal //#define MY_LANGUAGE ru-RU // Russian in Russia +//#define MY_LANGUAGE tr-TR // Turkish in Turkey //#define MY_LANGUAGE uk-UK // Ukrainian in Ukrain //#define MY_LANGUAGE zh-CN // Chinese (Simplified) in China //#define MY_LANGUAGE zh-TW // Chinese (Traditional) in Taiwan @@ -274,7 +275,7 @@ #define USE_SHT // Enable SHT1X sensor (+1k4 code) #define USE_HTU // Enable HTU21/SI7013/SI7020/SI7021 sensor (I2C address 0x40) (+1k5 code) #define USE_BMP // Enable BMP085/BMP180/BMP280/BME280 sensor (I2C address 0x76 or 0x77) (+4k code) - #define USE_BME680 // Enable support for BME680 sensor using Bosch BME680 library (+4k code) +// #define USE_BME680 // Enable support for BME680 sensor using Bosch BME680 library (+4k code) #define USE_BH1750 // Enable BH1750 sensor (I2C address 0x23 or 0x5C) (+0k5 code) // #define USE_VEML6070 // Enable VEML6070 sensor (I2C addresses 0x38 and 0x39) (+0k5 code) // #define USE_ADS1115 // Enable ADS1115 16 bit A/D converter (I2C address 0x48, 0x49, 0x4A or 0x4B) based on Adafruit ADS1x15 library (no library needed) (+0k7 code) From 823f4ae801e94b2c6f720dc69df009d58cc3e379 Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Thu, 26 Jul 2018 17:53:50 +0200 Subject: [PATCH 15/28] Fix unsecure main webpage update Fix unsecure main webpage update --- sonoff/_changelog.ino | 1 + sonoff/xdrv_02_webserver.ino | 72 ++++++++++++++++++++++++++++-------- 2 files changed, 58 insertions(+), 15 deletions(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index dcead2a0b..37c6b4e36 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,4 +1,5 @@ /* 6.1.1c + * Fix unsecure main webpage update * Add Turkish language file (#3332) * Fix command TimeDst/TimeStd invalid JSON (#3322) * Fix possible WDT due to long MQTT publish handling (#3313) diff --git a/sonoff/xdrv_02_webserver.ino b/sonoff/xdrv_02_webserver.ino index 8418f3ce9..46699d757 100644 --- a/sonoff/xdrv_02_webserver.ino +++ b/sonoff/xdrv_02_webserver.ino @@ -39,7 +39,7 @@ const char HTTP_HEAD[] PROGMEM = "{h} - {v}" "