From 846b2174279df6e4cd7569b2b4c07954770366e1 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 16 Jul 2022 14:32:18 +0200 Subject: [PATCH] Bump version to v12.0.2.4 - Bump version to v12.0.2.4 - Command ``SetOption45 1..250`` to change default bistable latching relay pulse length of 40 milliseconds (#15856) --- CHANGELOG.md | 19 +++++++++++++------ RELEASENOTES.md | 4 +++- tasmota/include/tasmota.h | 2 +- tasmota/include/tasmota_version.h | 2 +- tasmota/my_user_config.h | 1 + tasmota/tasmota_support/settings.ino | 4 ++++ tasmota/tasmota_support/support_command.ino | 1 + tasmota/tasmota_support/support_tasmota.ino | 2 +- tools/decode-status.py | 4 ++-- 9 files changed, 27 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa7933a83..7b506a39a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,20 +3,27 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - Development -## [12.0.2.3] +## [12.0.2.4] ### Added -- Support for Sonoff POWR3xxD and THR3xxD (#15856) -- Support for bistable (latching) relays mixed with monostable relays using GPIO Relay_b or Relay_bi as used by Sonoff POWR320D and THR320D -- ESP32 Support for Ultra Low Power (ULP) coprocessor via Berry by Christian Staars (#15916) +- Command ``SetOption45 1..250`` to change default bistable latching relay pulse length of 40 milliseconds ### Changed -- Driver DHT v6 consolidation for both ESP8266 and ESP32 to support SI7021, THS01 and MS01 on ESP32 (#15856) -- Tasmota ESP32 Arduino core from v2.0.3 to v2.0.4 (#15940) ### Fixed ### Removed +## [12.0.2.3] 20220716 +### Added +- Support for Sonoff POWR3xxD and THR3xxD (#15856) +- Support for bistable (latching) relays mixed with monostable relays using GPIO Relay_b or Relay_bi as used by Sonoff POWR320D and THR320D +- ESP32 Support for Ultra Low Power (ULP) coprocessor via Berry by Christian Staars (#15916) +- Command ``Sleep2 !`` to cancel pending one-shot speed setting (#15954) + +### Changed +- Driver DHT v6 consolidation for both ESP8266 and ESP32 to support SI7021, THS01 and MS01 on ESP32 (#15856) +- Tasmota ESP32 Arduino core from v2.0.3 to v2.0.4 (#15940) + ## [12.0.2.2] ### Added - Command ``GlobalTemp2 1..250`` to select Global Temperature source indexed from teleperiod occurance data (#15834) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 0b41824aa..b0e0b4f2b 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -107,11 +107,13 @@ 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 v12.0.2.3 +## Changelog v12.0.2.4 ### Added +- Command ``SetOption45 1..250`` to change default bistable latching relay pulse length of 40 milliseconds - Command ``GlobalTemp2 1..250`` to select Global Temperature source indexed from teleperiod occurance data [#15834](https://github.com/arendst/Tasmota/issues/15834) - Command ``GlobalHum2 1..250`` to select Global Humidity source indexed from teleperiod occurance data [#15834](https://github.com/arendst/Tasmota/issues/15834) - Command ``GlobalPress2 1..250`` to select Global Pressure source indexed from teleperiod occurance data [#15834](https://github.com/arendst/Tasmota/issues/15834) +- Command ``Sleep2 !`` to cancel pending one-shot speed setting [#15954](https://github.com/arendst/Tasmota/issues/15954) - Support for 5-channel light dimmer driver SM2335 used in SwitchBot Color Bulbs [#15839](https://github.com/arendst/Tasmota/issues/15839) - Support for Sonoff POWR3xxD and THR3xxD [#15856](https://github.com/arendst/Tasmota/issues/15856) - Support for bistable (latching) relays mixed with monostable relays using GPIO Relay_b or Relay_bi as used by Sonoff POWR320D and THR320D diff --git a/tasmota/include/tasmota.h b/tasmota/include/tasmota.h index 580afd812..b210e0932 100644 --- a/tasmota/include/tasmota.h +++ b/tasmota/include/tasmota.h @@ -351,7 +351,7 @@ enum SO32_49Index { P_HOLD_TIME, // SetOption32 - (Button/Switch) K P_OVER_TEMP, // SetOption42 - (Energy) Turn all power off at or above this temperature (default 90C) P_ROTARY_MAX_STEP, // SetOption43 - (Rotary) Rotary step boundary (default 10) P_IR_TOLERANCE, // SetOption44 - (IR) Base tolerance percentage for matching incoming IR messages (default 25, max 100) - P_SO45_FREE, // SetOption45 + P_BISTABLE_PULSE, // SetOption45 - (Bistable) Pulse time for two coil bistable latching relays (default 40) P_SO46_FREE, // SetOption46 P_SO47_FREE, // SetOption47 P_SO48_FREE, // SetOption48 diff --git a/tasmota/include/tasmota_version.h b/tasmota/include/tasmota_version.h index 2a21c8947..939ce3041 100644 --- a/tasmota/include/tasmota_version.h +++ b/tasmota/include/tasmota_version.h @@ -20,6 +20,6 @@ #ifndef _TASMOTA_VERSION_H_ #define _TASMOTA_VERSION_H_ -const uint32_t VERSION = 0x0C000203; // 12.0.2.3 +const uint32_t VERSION = 0x0C000204; // 12.0.2.4 #endif // _TASMOTA_VERSION_H_ diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 2e25186a1..e95e337e2 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -283,6 +283,7 @@ // (POWER_ALL_OFF, POWER_ALL_ON, POWER_ALL_SAVED_TOGGLE, POWER_ALL_SAVED, POWER_ALL_ALWAYS_ON, POWER_ALL_OFF_PULSETIME_ON) #define APP_BLINKTIME 10 // [BlinkTime] Time in 0.1 Sec to blink/toggle power for relay 1 #define APP_BLINKCOUNT 10 // [BlinkCount] Number of blinks (0 = 32000) +#define APP_BISTABLE_PULSE 40 // [SetOption45] Pulse time in ms for two coil bistable latching relays #define APP_NORMAL_SLEEP false // [SetOption60] Enable normal sleep instead of dynamic sleep #define APP_SLEEP 0 // [Sleep] Sleep time to lower energy consumption (0 = Off, 1 - 250 mSec), diff --git a/tasmota/tasmota_support/settings.ino b/tasmota/tasmota_support/settings.ino index c25b2c75e..90cd2f7bd 100644 --- a/tasmota/tasmota_support/settings.ino +++ b/tasmota/tasmota_support/settings.ino @@ -905,6 +905,7 @@ void SettingsDefaultSet2(void) { // Settings->ledpwm_mask = 0; Settings->pulse_timer[0] = APP_PULSETIME; // for (uint32_t i = 1; i < MAX_PULSETIMERS; i++) { Settings->pulse_timer[i] = 0; } + Settings->param[P_BISTABLE_PULSE] = APP_BISTABLE_PULSE; // Serial Settings->serial_config = TS_SERIAL_8N1; @@ -1549,6 +1550,9 @@ void SettingsDelta(void) { Settings->global_sensor_index[i] = 0; } } + if (Settings->version < 0x0C000204) { // 12.0.2.4 + Settings->param[P_BISTABLE_PULSE] = APP_BISTABLE_PULSE; + } Settings->version = VERSION; SettingsSave(1); diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index 7580028f6..a41560e12 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -1138,6 +1138,7 @@ void CmndSetoptionBase(bool indexed) { switch (pindex) { case P_HOLD_TIME: case P_MAX_POWER_RETRY: + case P_BISTABLE_PULSE: param_low = 1; param_high = 250; break; diff --git a/tasmota/tasmota_support/support_tasmota.ino b/tasmota/tasmota_support/support_tasmota.ino index a601168a8..ef88dc674 100644 --- a/tasmota/tasmota_support/support_tasmota.ino +++ b/tasmota/tasmota_support/support_tasmota.ino @@ -318,7 +318,7 @@ void SetDevicePower(power_t rpower, uint32_t source) { // Reset bistable relay here to fix non-interlock situations due to fast switching if (TasmotaGlobal.rel_bistable) { // If bistable relays in the mix reset them after 40ms - delay(40); // Keep energized for about 5 x operation time + delay(Settings->param[P_BISTABLE_PULSE]); // SetOption45 - Keep energized for about 5 x operation time for (uint32_t i = 0; i < port; i++) { // Reset up to detected amount of ports if (bitRead(TasmotaGlobal.rel_bistable, i)) { DigitalWrite(GPIO_REL1, i, bitRead(TasmotaGlobal.rel_inverted, i) ? 1 : 0); diff --git a/tools/decode-status.py b/tools/decode-status.py index 802852f64..abbd334dc 100755 --- a/tools/decode-status.py +++ b/tools/decode-status.py @@ -95,7 +95,7 @@ a_setoption = [[ "(Wifi) Gratuitous ARP repeat time", "(Temperature) Over temperature threshold (celsius)", "(Rotary) Max allowed steps", - "(not used) Tuya MCU voltage Id", + "(Bistable) Pulse time for two coil bistable latching relays (default 40)", "(not used) Tuya MCU current Id", "(not used) Tuya MCU power Id", "(not used) Energy Tariff1 start hour", @@ -317,7 +317,7 @@ else: obj = json.load(fp) def StartDecode(): - print ("\n*** decode-status.py v12.0.2.3 by Theo Arends and Jacek Ziolkowski ***") + print ("\n*** decode-status.py v12.0.2.4 by Theo Arends and Jacek Ziolkowski ***") # print("Decoding\n{}".format(obj))