Skip to content

Commit

Permalink
Add backported fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arendst committed Dec 21, 2020
1 parent 08ec5ce commit 3ba19e1
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 12 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ All notable changes to this project will be documented in this file.

## [Released]

## [9.2.0] 20201221
### Fixed Backported
- Shelly Dimmer power on state (#10154, #10182)
- Wemo emulation for single devices (#10165, #10194)
- ESP32 LoadStoreError when using ``#define USER_TEMPLATE`` (#9506)
- Compile error when ``#ifdef USE_IR_RECEIVE`` is disabled regression from 9.1.0.2

## [9.2.0] 20201216
- Release Julie

## [Unreleased] - Development

## [9.1.0.2]
## [9.1.0.2] 20201216
### Added
- KNX read reply for Power (#9236, #9891)
- Zigbee persistence of device/sensor data in EEPROM (only ZBBridge)
Expand Down
6 changes: 6 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
- ESP32 CC2530 heap corruption [#10121](https://github.com/arendst/Tasmota/issues/10121)
- ESP32 Analog input div10 rule trigger [#10149](https://github.com/arendst/Tasmota/issues/10149)

### Fixed Backported
- Shelly Dimmer power on state (#10154, #10182)
- Wemo emulation for single devices (#10165, #10194)
- ESP32 LoadStoreError when using ``#define USER_TEMPLATE`` (#9506)
- Compile error when ``#ifdef USE_IR_RECEIVE`` is disabled regression from 9.1.0.2

### Removed
- Version compatibility check
- PN532 define USE_PN532_CAUSE_EVENTS replaced by generic rule trigger `on pn532#uid=`
Expand Down
3 changes: 2 additions & 1 deletion tasmota/settings.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,8 @@ void SettingsDefaultSet2(void)
flag4.mqtt_no_retain |= MQTT_NO_RETAIN;

#ifdef USER_TEMPLATE
JsonTemplate((char *)USER_TEMPLATE);
String user_template = USER_TEMPLATE;
JsonTemplate((char*)user_template.c_str());
#endif

Settings.flag = flag;
Expand Down
7 changes: 7 additions & 0 deletions tasmota/xdrv_05_irremote.ino
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ uint32_t IrRemoteCmndIrSendJson(void)
AddLog_P(LOG_LEVEL_DEBUG, PSTR("IRS: protocol_text %s, protocol %s, bits %d, data %s (0x%s), repeat %d, protocol_code %d"),
protocol_text, protocol, bits, ulltoa(data, dvalue, 10), Uint64toHex(data, hvalue, bits), repeat, protocol_code);

#ifdef USE_IR_RECEIVE
if (irrecv != nullptr) { irrecv->disableIRIn(); }
#endif // USE_IR_RECEIVE

switch (protocol_code) { // Equals IRremoteESP8266.h enum decode_type_t
#ifdef USE_IR_SEND_RC5
case RC5:
Expand All @@ -305,10 +308,14 @@ uint32_t IrRemoteCmndIrSendJson(void)
irsend->sendNEC(data, (bits > NEC_BITS) ? NEC_BITS : bits, repeat); break;
#endif
default:
#ifdef USE_IR_RECEIVE
if (irrecv != nullptr) { irrecv->enableIRIn(); }
#endif // USE_IR_RECEIVE
return IE_PROTO_UNSUPPORTED;
}
#ifdef USE_IR_RECEIVE
if (irrecv != nullptr) { irrecv->enableIRIn(); }
#endif // USE_IR_RECEIVE

return IE_NO_ERROR;
}
Expand Down
2 changes: 1 addition & 1 deletion tasmota/xdrv_21_wemo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#if defined(USE_WEBSERVER) && defined(USE_EMULATION) && defined (USE_EMULATION_WEMO_SINGLE)
#if defined(USE_WEBSERVER) && defined(USE_EMULATION) && defined(USE_EMULATION_WEMO_SINGLE)
/*********************************************************************************************\
* Belkin WeMo emulation
\*********************************************************************************************/
Expand Down
10 changes: 7 additions & 3 deletions tasmota/xdrv_21_wemo_multi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,18 @@ private:
int _deviceId;

String WemoSerialnumber(void) {
char serial[18];
char serial[20];

snprintf_P(serial, sizeof(serial), PSTR("201612K%08X-%d"), ESP_getChipId(), _deviceId);
char index[8] = { 0 };
if (_deviceId > 1) { // Keep backward compatibility
snprintf_P(index, sizeof(index), PSTR("%02X"), _deviceId);
}
snprintf_P(serial, sizeof(serial), PSTR("201612K%08X%s"), ESP_getChipId(), index);
return String(serial);
}

String WemoUuid(void) {
char uuid[29];
char uuid[32];

snprintf_P(uuid, sizeof(uuid), PSTR("Socket-1_0-%s"), WemoSerialnumber().c_str());
return String(uuid);
Expand Down
8 changes: 4 additions & 4 deletions tasmota/xdrv_45_shelly_dimmer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -626,19 +626,19 @@ bool ShdSendVersion(void)
void ShdGetSettings(void)
{
char parameters[32];
Shd.req_brightness = 0;
// Shd.req_brightness = 0;
Shd.leading_edge = 0;
Shd.req_fade_rate = 0;
// Shd.req_fade_rate = 0;
Shd.warmup_brightness = 0;
Shd.warmup_time = 0;
if (strstr(SettingsText(SET_SHD_PARAM), ",") != nullptr)
{
#ifdef SHELLY_DIMMER_DEBUG
AddLog_P(LOG_LEVEL_INFO, PSTR(SHD_LOGNAME "Loading params: %s"), SettingsText(SET_SHD_PARAM));
#endif // SHELLY_DIMMER_DEBUG
Shd.req_brightness = atoi(subStr(parameters, SettingsText(SET_SHD_PARAM), ",", 1));
// Shd.req_brightness = atoi(subStr(parameters, SettingsText(SET_SHD_PARAM), ",", 1));
Shd.leading_edge = atoi(subStr(parameters, SettingsText(SET_SHD_PARAM), ",", 2));
Shd.req_fade_rate = atoi(subStr(parameters, SettingsText(SET_SHD_PARAM), ",", 3));
// Shd.req_fade_rate = atoi(subStr(parameters, SettingsText(SET_SHD_PARAM), ",", 3));
Shd.warmup_brightness = atoi(subStr(parameters, SettingsText(SET_SHD_PARAM), ",", 4));
Shd.warmup_time = atoi(subStr(parameters, SettingsText(SET_SHD_PARAM), ",", 5));
}
Expand Down

0 comments on commit 3ba19e1

Please sign in to comment.