Skip to content

Commit

Permalink
Change ESP32 support for energy margin checks, like MaxPower2 per…
Browse files Browse the repository at this point in the history
… phase (#21695)

- Add ESP32 support for power and energy limit checks, like ``MaxEnergy2`` per phase (#21695)
- Bump version v14.1.0.3
  • Loading branch information
arendst committed Jun 27, 2024
1 parent 20d0207 commit 178d42c
Show file tree
Hide file tree
Showing 5 changed files with 308 additions and 145 deletions.
19 changes: 14 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@ All notable changes to this project will be documented in this file.

## [Unreleased] - Development

## [14.1.0.2]
## [14.1.0.3]
### Added
- ESP32 support for power and energy limit checks, like ``MaxEnergy2`` per phase (#21695)

### Breaking Changed

### Changed
- ESP32 support for energy margin checks, like ``MaxPower2`` per phase (#21695)

### Fixed

### Removed

## [14.1.0.2] 20240627
### Added
- Support for Sonoff WTS01 temperature sensor using SerialBridge in ``SSerialMode 3``
- Berry `classof` extended to class methods (#21615)
Expand All @@ -14,8 +27,6 @@ All notable changes to this project will be documented in this file.
- Matter show event name in logs (#21649)
- Matter full support of events (#21698)

### Breaking Changed

### Changed
- SerialBridge command ``SSerialSend9`` replaced by ``SSerialMode``
- SML replace vars in descriptor and line (#21622)
Expand All @@ -37,8 +48,6 @@ All notable changes to this project will be documented in this file.
- Matter resumption final ack (#21673)
- ESP32 allow use of UART0 with enabled USB_CDC_CONSOLE (#21496)

### Removed

## [14.1.0.1] 20240611
### Added
- Berry solidification of `bytes` instances (#21558)
Expand Down
5 changes: 3 additions & 2 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,12 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm

[Complete list](BUILDS.md) of available feature and sensors.

## Changelog v14.1.0.2
## Changelog v14.1.0.3
### Added
- Support for QMP6988 temperature and pressure sensor
- Support for Sonoff WTS01 temperature sensor using SerialBridge in ``SSerialMode 3``
- Extend command ``SetOption147 1`` to disable publish of IRReceived MQTT messages [#21574](https://github.com/arendst/Tasmota/issues/21574)
- ESP32 support for power and energy limit checks, like ``MaxEnergy2`` per phase [#21695](https://github.com/arendst/Tasmota/issues/21695)
- Berry solidification of `bytes` instances [#21558](https://github.com/arendst/Tasmota/issues/21558)
- Berry automatic rounding of float to int when calling C mapped functions [#21601](https://github.com/arendst/Tasmota/issues/21601)
- Berry add `math.round` [#21602](https://github.com/arendst/Tasmota/issues/21602)
Expand All @@ -148,7 +149,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- SML replace vars in descriptor and line [#21622](https://github.com/arendst/Tasmota/issues/21622)
- NeoPool using temperature as only frequently changing value for NPTeleperiod [#21628](https://github.com/arendst/Tasmota/issues/21628)
- NeoPool make compiler setting available by `user_config_override.h` [#21645](https://github.com/arendst/Tasmota/issues/21645)
- ESP32 Core3 platform update from 2024.05.13 to 2024.06.10 [#21569](https://github.com/arendst/Tasmota/issues/21569)
- ESP32 support for energy margin checks, like ``MaxPower2`` per phase [#21695](https://github.com/arendst/Tasmota/issues/21695)
- ESP32 MI32 refactoring, bugfixes, generic device scanning [#21603](https://github.com/arendst/Tasmota/issues/21603)
- ESP32 MI32 improve parser [#21648](https://github.com/arendst/Tasmota/issues/21648)
- Matter refactoring of bridged devices [#21575](https://github.com/arendst/Tasmota/issues/21575)
Expand Down
2 changes: 1 addition & 1 deletion tasmota/include/tasmota_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@

#define TASMOTA_SHA_SHORT // Filled by Github sed

const uint32_t TASMOTA_VERSION = 0x0E010002; // 14.1.0.2
const uint32_t TASMOTA_VERSION = 0x0E010003; // 14.1.0.3

#endif // _TASMOTA_VERSION_H_
9 changes: 8 additions & 1 deletion tasmota/tasmota_support/support_tasmota.ino
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ void ExecuteCommandPower(uint32_t device, uint32_t state, uint32_t source)
// state 2 = POWER_TOGGLE = Toggle relay
// state 3 = POWER_BLINK = Blink relay
// state 4 = POWER_BLINK_STOP = Stop blinking relay
// state 5 = POWER_OFF_FORCE = Relay off even if locked
// state 8 = POWER_OFF_NO_STATE = Relay Off and no publishPowerState
// state 9 = POWER_ON_NO_STATE = Relay On and no publishPowerState
// state 10 = POWER_TOGGLE_NO_STATE = Toggle relay and no publishPowerState
Expand All @@ -709,6 +710,12 @@ void ExecuteCommandPower(uint32_t device, uint32_t state, uint32_t source)
}
#endif // USE_SONOFF_IFAN

bool force_power_off = false;
if (POWER_OFF_FORCE == state) {
force_power_off = true;
state = POWER_OFF;
}

bool publish_power = true;
if ((state >= POWER_OFF_NO_STATE) && (state <= POWER_TOGGLE_NO_STATE)) {
state &= 3; // POWER_OFF, POWER_ON or POWER_TOGGLE
Expand All @@ -720,7 +727,7 @@ void ExecuteCommandPower(uint32_t device, uint32_t state, uint32_t source)
}
TasmotaGlobal.active_device = device;

if (bitRead(Settings->power_lock, device -1)) {
if (!force_power_off && bitRead(Settings->power_lock, device -1)) {
AddLog(LOG_LEVEL_INFO, PSTR("CMD: Power%d is LOCKED"), device);
state = POWER_SHOW_STATE; // Only show state. Make no change
}
Expand Down
Loading

0 comments on commit 178d42c

Please sign in to comment.