diff --git a/CHANGELOG.md b/CHANGELOG.md index cd72e5052..73594ea8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,17 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - Development -## [10.0.0.2] +## [10.0.0.3] +### Changed +- ESP8266 Gratuitous ARP enabled and set to 60 seconds (#13623) + +## [10.0.0.2] 20211113 ### Added - Support for HDC2010 temperature/humidity sensor by Luc Boudreau (#13633) +### Breaking Changed +- ESP32-S2 TSettings memory usage fixed to 4096 bytes regression from v9.5.0.8 + ### Changed - ESP32 core library from v1.0.7.5 to v2.0.1 diff --git a/RELEASENOTES.md b/RELEASENOTES.md index af4c13ba3..858ab7ac7 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -100,7 +100,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo [Complete list](BUILDS.md) of available feature and sensors. -## Changelog v10.0.0.2 +## Changelog v10.0.0.3 ### Added - 1 second heartbeat GPIO - ESP32 Berry add module ``python_compat`` to be closer to Python syntax [#13428](https://github.com/arendst/Tasmota/issues/13428) @@ -108,11 +108,13 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo - Support for HDC2010 temperature/humidity sensor by Luc Boudreau [#13633](https://github.com/arendst/Tasmota/issues/13633) ### Breaking Changed +- ESP32-S2 TSettings memory usage fixed to 4096 bytes regression from v9.5.0.8 ### Changed -- File editor no-wrap [#13427](https://github.com/arendst/Tasmota/issues/13427) - ESP32 core library from v1.0.7.4 to v2.0.1 -- ESP32-C3 core library from v2.0.0-post to v2.0.1-rc1 +- ESP32-C3 core library from v2.0.0-post to v2.0.1 +- File editor no-wrap [#13427](https://github.com/arendst/Tasmota/issues/13427) +- ESP8266 Gratuitous ARP enabled and set to 60 seconds [#13623](https://github.com/arendst/Tasmota/issues/13623) ### Fixed - Initial reset RTC memory based variables like EnergyToday and EnergyTotal diff --git a/lib/default/TasmotaSerial-3.3.0/src/TasmotaSerial.cpp b/lib/default/TasmotaSerial-3.3.0/src/TasmotaSerial.cpp index 8b21de109..07754719e 100644 --- a/lib/default/TasmotaSerial-3.3.0/src/TasmotaSerial.cpp +++ b/lib/default/TasmotaSerial-3.3.0/src/TasmotaSerial.cpp @@ -153,10 +153,10 @@ bool TasmotaSerial::begin(uint32_t speed, uint32_t config) { m_uart = tasmota_serial_index; tasmota_serial_index--; TSerial = new HardwareSerial(m_uart); - TSerial->begin(speed, config, m_rx_pin, m_tx_pin); - if (serial_buffer_size > 256) { + if (serial_buffer_size > 256) { // RX Buffer can't be resized when Serial is already running (HardwareSerial.cpp) TSerial->setRxBufferSize(serial_buffer_size); } + TSerial->begin(speed, config, m_rx_pin, m_tx_pin); // For low bit rate, below 9600, set the Full RX threshold at 10 bytes instead of the default 120 if (speed <= 9600) { // At 9600, 10 chars are ~10ms diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 6f708f58b..432532e6e 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -79,7 +79,7 @@ #define WIFI_CONFIG_TOOL WIFI_RETRY // [WifiConfig] Default tool if Wi-Fi fails to connect (default option: 4 - WIFI_RETRY) // (WIFI_RESTART, WIFI_MANAGER, WIFI_RETRY, WIFI_WAIT, WIFI_SERIAL, WIFI_MANAGER_RESET_ONLY) // The configuration can be changed after first setup using WifiConfig 0, 2, 4, 5, 6 and 7. -#define WIFI_ARP_INTERVAL 0 // [SetOption41] Send gratuitous ARP interval +#define WIFI_ARP_INTERVAL 60 // [SetOption41] Send gratuitous ARP interval #define WIFI_SCAN_AT_RESTART false // [SetOption56] Scan Wi-Fi network at restart for configured AP's #define WIFI_SCAN_REGULARLY true // [SetOption57] Scan Wi-Fi network every 44 minutes for configured AP's diff --git a/tasmota/settings.h b/tasmota/settings.h index de77a0390..0cde278e9 100644 --- a/tasmota/settings.h +++ b/tasmota/settings.h @@ -524,7 +524,7 @@ typedef struct { uint8_t ex_switchmode[8]; // 3A4 - Free since 9.2.0.6 - myio my_gp; // 3AC 2 x 18 bytes (ESP8266) / 2 x 40 bytes (ESP32) / 2 x 22 bytes (ESP32-C3) + myio my_gp; // 3AC 2x18 bytes (ESP8266) / 2x40 bytes (ESP32) / 2x22 bytes (ESP32-C3) / 2x47 bytes (ESP32-S2) #ifdef ESP8266 uint16_t gpio16_converted; // 3D0 uint8_t free_esp8266_3D2[42]; // 3D2 @@ -534,7 +534,7 @@ typedef struct { uint8_t free_esp32c3_3D8[36]; // 3D8 - Due to smaller myio #endif // CONFIG_IDF_TARGET_ESP32C3 #endif // ESP32 - mytmplt user_template; // 3FC 2 x 15 bytes (ESP8266) / 2 x 37 bytes (ESP32) / 2 x 23 bytes (ESP32-C3) + mytmplt user_template; // 3FC 2x15 bytes (ESP8266) / 2x37 bytes (ESP32) / 2x23 bytes (ESP32-C3) / 2x37 bytes (ESP32-S2) #ifdef ESP8266 uint8_t free_esp8266_41A[55]; // 41A #endif // ESP8266 @@ -546,6 +546,9 @@ typedef struct { uint8_t eth_clk_mode; // 447 uint8_t free_esp32_448[4]; // 448 +#ifdef CONFIG_IDF_TARGET_ESP32S2 + uint8_t free_esp32s2_456[2]; // 456 - fix 32-bit offset for WebCamCfg +#endif WebCamCfg webcam_config; // 44C uint8_t eth_address; // 450 @@ -563,9 +566,11 @@ typedef struct { myio8 ex_my_gp8; // 484 17 bytes (ESP8266) - Free since 9.0.0.1 #endif // ESP8266 #ifdef ESP32 - +#ifdef CONFIG_IDF_TARGET_ESP32S2 + uint8_t free_esp32s2_494[1]; // 494 - 2 bytes extra because of WebCamCfg 32-bit offset +#else uint8_t free_esp32_484[17]; // 484 - +#endif #endif // ESP32 uint8_t ex_my_adc0; // 495 Free since 9.0.0.1 @@ -634,9 +639,7 @@ typedef struct { mytmplt8285 ex_user_template8; // 72F 14 bytes (ESP8266) - Free since 9.0.0.1 #endif // ESP8266 #ifdef ESP32 - uint8_t free_esp32_72f[14]; // 72F - #endif // ESP32 uint8_t novasds_startingoffset; // 73D diff --git a/tasmota/settings.ino b/tasmota/settings.ino index e64e0cec1..ec09129f4 100644 --- a/tasmota/settings.ino +++ b/tasmota/settings.ino @@ -1454,6 +1454,11 @@ void SettingsDelta(void) { memset(&Settings->energy_kWhtoday_ph, 0, 36); memset(&RtcSettings.energy_kWhtoday_ph, 0, 24); } + if (Settings->version < 0x0A000003) { + if (0 == Settings->param[P_ARP_GRATUITOUS]) { + Settings->param[P_ARP_GRATUITOUS] = WIFI_ARP_INTERVAL; + } + } Settings->version = VERSION; SettingsSave(1); diff --git a/tasmota/support.ino b/tasmota/support.ino index 54f95bc28..76ca608e9 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -1840,16 +1840,15 @@ int8_t ParseSerialConfig(const char *pstr) return serial_config; } -#ifdef ESP8266 -SerConfu8 ConvertSerialConfig(uint8_t serial_config) { - return (SerConfu8)pgm_read_byte(kTasmotaSerialConfig + serial_config); -} -#endif // ESP8266 -#ifdef ESP32 uint32_t ConvertSerialConfig(uint8_t serial_config) { +#ifdef ESP8266 + return (uint32_t)pgm_read_byte(kTasmotaSerialConfig + serial_config); +#elif defined(ESP32) return (uint32_t)pgm_read_dword(kTasmotaSerialConfig + serial_config); +#else + #error "platform not supported" +#endif } -#endif // ESP32 // workaround disabled 05.11.2021 solved with https://github.com/espressif/arduino-esp32/pull/5549 //#if defined(ESP32) && CONFIG_IDF_TARGET_ESP32C3 diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h index 0de887e9c..4f9b41b4b 100644 --- a/tasmota/tasmota_template.h +++ b/tasmota/tasmota_template.h @@ -1076,11 +1076,11 @@ const char PINS_WEMOS[] PROGMEM = "IOTXIORXIOIOFLFLFLFLFLFLIOIOIOIOIOIOIOIOIOIOI typedef struct MYIO { uint16_t io[MAX_GPIO_PIN]; -} myio; // ESP8266: 18 * 2 = 36 bytes / ESP32: 40 * 2 = 80 bytes / ESP32-C3: 22 * 2 = 44 bytes +} myio; // ESP8266: 18*2 = 36 bytes / ESP32: 40*2 = 80 bytes / ESP32-C3: 22*2 = 44 bytes / ESP32-S2: 47*2 = 94 bytes typedef struct MYCFGIO { uint16_t io[MAX_USER_PINS]; -} mycfgio; // ESP8266: 14 * 2 = 28 bytes / ESP32: 36 * 2 = 72 bytes / ESP32-C3: 22 * 2 = 44 bytes +} mycfgio; // ESP8266: 14*2 = 28 bytes / ESP32: 36*2 = 72 bytes / ESP32-C3: 22*2 = 44 bytes / ESP32-S2: 36*2 = 72 bytes #define GPIO_FLAG_USED 0 // Currently no flags used @@ -1107,9 +1107,9 @@ typedef union { } gpio_flag; // 2 bytes typedef struct MYTMPLT { - mycfgio gp; // 28 / 72 / 44 bytes + mycfgio gp; // 28 / 72 / 44 / 72 bytes gpio_flag flag; // 2 bytes -} mytmplt; // 30 / 74 / 46 bytes +} mytmplt; // 30 / 74 / 46 / 74 bytes //******************************************************************************************** diff --git a/tasmota/tasmota_version.h b/tasmota/tasmota_version.h index 5c33aeeaf..7e3e74d42 100644 --- a/tasmota/tasmota_version.h +++ b/tasmota/tasmota_version.h @@ -20,6 +20,6 @@ #ifndef _TASMOTA_VERSION_H_ #define _TASMOTA_VERSION_H_ -const uint32_t VERSION = 0x0A000002; +const uint32_t VERSION = 0x0A000003; #endif // _TASMOTA_VERSION_H_ diff --git a/tasmota/xdrv_23_zigbee_5_converters.ino b/tasmota/xdrv_23_zigbee_5_converters.ino index 494d26fb8..f2d3334eb 100644 --- a/tasmota/xdrv_23_zigbee_5_converters.ino +++ b/tasmota/xdrv_23_zigbee_5_converters.ino @@ -1311,8 +1311,9 @@ void ZCLFrame::computeSyntheticAttributes(Z_attribute_list& attr_list) { } break; case 0x00010021: // BatteryPercentage - if (modelId.startsWith(F("TRADFRI"))) { - attr.setUInt(attr.getUInt() * 2); // bug in TRADFRI battery, need to double the value + if (modelId.startsWith(F("TRADFRI")) || + modelId.startsWith(F("SYMFONISK"))) { + attr.setUInt(attr.getUInt() * 2); // bug in IKEA remotes battery, need to double the value } break; case 0x00060000: // "Power" for lumi Door/Window is converted to "Contact" diff --git a/tasmota/xnrg_19_cse7761.ino b/tasmota/xnrg_19_cse7761.ino index c61322d30..ec6647a76 100644 --- a/tasmota/xnrg_19_cse7761.ino +++ b/tasmota/xnrg_19_cse7761.ino @@ -137,7 +137,7 @@ bool Cse7761ReadOnce(uint32_t log_level, uint32_t reg, uint32_t size, uint32_t* uint8_t buffer[8] = { 0 }; uint32_t rcvd = 0; - uint32_t timeout = millis() + 3; + uint32_t timeout = millis() + 6; while (!TimeReached(timeout) && (rcvd <= size)) { // while (!TimeReached(timeout)) { diff --git a/tasmota/xsns_62_esp32_mi_ble.ino b/tasmota/xsns_62_esp32_mi_ble.ino index 973c1e604..92fdf4de0 100644 --- a/tasmota/xsns_62_esp32_mi_ble.ino +++ b/tasmota/xsns_62_esp32_mi_ble.ino @@ -1586,6 +1586,10 @@ void MI32ParseATCPacket(const uint8_t * _buf, uint32_t length, const uint8_t *ad MIBLEsensors[_slot].bat = ppv_packet->battery_level; MIBLEsensors[_slot].eventType.bat = 1; + MIBLEsensors[_slot].Btn = (ppv_packet->flags) & 0x1; // First bit is reed switch status + MIBLEsensors[_slot].eventType.Btn = 1; + MIBLEsensors[_slot].feature.Btn = 1; + if(MI32.option.directBridgeMode) { MIBLEsensors[_slot].shallSendMQTT = 1; MI32.mode.shallTriggerTele = 1; @@ -3271,4 +3275,4 @@ bool Xsns62(uint8_t function) #endif // CONFIG_IDF_TARGET_ESP32 or CONFIG_IDF_TARGET_ESP32C3 #endif // ESP32 -#endif \ No newline at end of file +#endif