Skip to content

Commit

Permalink
Version v14.2.0.3
Browse files Browse the repository at this point in the history
- Add command ``SetOption69 1`` to enable Serial Bridge inverted Receive (#22000)
  • Loading branch information
arendst committed Aug 23, 2024
1 parent 4144f5c commit 831597e
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 11 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ All notable changes to this project will be documented in this file.

## [Unreleased] - Development

## [14.2.0.2]
## [14.2.0.3]
### Added
- Command ``SetOption69 1`` to enable Serial Bridge inverted Receive (#22000)

### Breaking Changed

### Changed
- Energy BL09xx command ``CurrentSet`` input changed from Ampere to milliAmpere
- GPIOViewer from v1.5.5 to v1.5.6

### Fixed

### Removed

## [14.2.0.2] 20240823
### Changed
- Energy BL09xx command ``CurrentSet`` input changed from Ampere to milliAmpere
- GPIOViewer from v1.5.5 to v1.5.6

## [14.2.0.1] 20240821
### Added
- Energy Log level 4 message when (Calculated) Apparent Power is less than Active Power indicating wrong calibration (#20653)
Expand Down
3 changes: 2 additions & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ 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.2.0.2
## Changelog v14.2.0.3
### Added
- Command ``SetOption69 1`` to enable Serial Bridge inverted Receive [#22000](https://github.com/arendst/Tasmota/issues/22000)
- Energy command ``PowerSet 60,230`` to calibrate both Current and Power with known resistive load of 60W at 230V using calibrated Voltage
- Energy command ``CurrentSet 60,230`` to calibrate both Power and Current with known resistive load of 60W at 230V using calibrated Voltage
- Energy Log level 4 message when (Calculated) Apparent Power is less than Active Power indicating wrong calibration [#20653](https://github.com/arendst/Tasmota/issues/20653)
Expand Down
3 changes: 2 additions & 1 deletion tasmota/include/tasmota_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
uint32_t tuya_serial_mqtt_publish : 1; // bit 16 (v6.6.0.21) - SetOption66 - (Tuya) Enable (1) TuyaMcuReceived messages over Mqtt
uint32_t buzzer_enable : 1; // bit 17 (v6.6.0.1) - SetOption67 - (Buzzer) Enable (1) buzzer when available
uint32_t pwm_multi_channels : 1; // bit 18 (v6.6.0.3) - SetOption68 - (Light) Enable multi-channels PWM (1) instead of Color PWM (0)
uint32_t ex_tuya_dimmer_min_limit : 1; // bit 19 (v6.6.0.5) - SetOption69 - (not used) Limits Tuya dimmers to minimum of 10% (25) when enabled
// uint32_t ex_tuya_dimmer_min_limit : 1; // bit 19 (v6.6.0.5) - SetOption69 - (not used) Limits Tuya dimmers to minimum of 10% (25) when enabled
uint32_t sb_receive_invert : 1; // bit 19 (v14.2.0.3) - SetOption69 - (Serial) Invert Serial receive on SerialBridge (1)
uint32_t energy_weekend : 1; // bit 20 (v6.6.0.8) - CMND_TARIFF
uint32_t dds2382_model : 1; // bit 21 (v6.6.0.14) - SetOption71 - (DDS2382) Select different Modbus registers (1) for Active Energy (#6531)
uint32_t hardware_energy_total : 1; // bit 22 (v6.6.0.15) - SetOption72 - (Energy) Enable (1) hardware energy total counter as reference (#6561)
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 = 0x0E020002; // 14.2.0.2
const uint32_t TASMOTA_VERSION = 0x0E020003; // 14.2.0.3

#endif // _TASMOTA_VERSION_H_
3 changes: 3 additions & 0 deletions tasmota/tasmota_support/settings.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1829,6 +1829,9 @@ void SettingsDelta(void) {
if (Settings->version < 0x0E010002) { // 14.1.0.2
Settings->sserial_mode = Settings->sbflag1.ex_serbridge_console;
}
if (Settings->version < 0x0E020003) { // 14.2.0.3
Settings->flag3.sb_receive_invert = 0; // SetOption69 - (Serial) Invert Serial receive on SerialBridge
}

Settings->version = TASMOTA_VERSION;
SettingsSave(1);
Expand Down
3 changes: 3 additions & 0 deletions tasmota/tasmota_support/support_command.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1565,6 +1565,9 @@ void CmndSetoptionBase(bool indexed) {
WiFiSetSleepMode(); // Update WiFi sleep mode accordingly
break;
case 18: // SetOption68 for multi-channel PWM, requires a reboot
#ifdef USE_SERIAL_BRIDGE
case 19: // SetOption69 - (Serial) Invert Serial receive on SerialBridge
#endif // USE_SERIAL_BRIDGE
case 25: // SetOption75 grouptopic change
TasmotaGlobal.restart_flag = 2;
break;
Expand Down
11 changes: 8 additions & 3 deletions tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ void SerialBridgeInput(void) {
}

#ifdef USE_SERIAL_BRIDGE_TEE
if (SB_TEE == Settings->sserial_mode) { // CMND_SSERIALSEND9 - Enable logging tee to serialbridge
if (SB_TEE == Settings->sserial_mode) { // CMND_SSERIALSEND9 - Enable logging tee to serialbridge
return;
}
#endif // USE_SERIAL_BRIDGE_TEE
Expand Down Expand Up @@ -240,8 +240,12 @@ void SerialBridgeInput(void) {

void SerialBridgeInit(void) {
if (PinUsed(GPIO_SBR_RX) || PinUsed(GPIO_SBR_TX)) {
// SerialBridgeSerial = new TasmotaSerial(Pin(GPIO_SBR_RX), Pin(GPIO_SBR_TX), HARDWARE_FALLBACK); // Default TM_SERIAL_BUFFER_SIZE (=64) size
SerialBridgeSerial = new TasmotaSerial(Pin(GPIO_SBR_RX), Pin(GPIO_SBR_TX), HARDWARE_FALLBACK, 0, MIN_INPUT_BUFFER_SIZE); // 256
SerialBridgeSerial = new TasmotaSerial(Pin(GPIO_SBR_RX),
Pin(GPIO_SBR_TX),
HARDWARE_FALLBACK,
0, // Software receive mode (FALLING edge)
MIN_INPUT_BUFFER_SIZE, // 256
Settings->flag3.sb_receive_invert); // SetOption69 - (Serial) Invert Serial receive on SerialBridge
if (SetSSerialBegin()) {
if (SerialBridgeSerial->hardwareSerial()) {
ClaimSerial();
Expand Down Expand Up @@ -384,6 +388,7 @@ void CmndSSerialMode(void) {
#ifdef USE_SERIAL_BRIDGE_WTS01
case SB_WTS01:
Settings->sserial_mode = XdrvMailbox.payload;
Settings->flag3.sb_receive_invert = 0; // SetOption69 - (Serial) Invert Serial receive on SerialBridge
Settings->sbaudrate = 9600 / 300; // 9600bps
SetSSerialConfig(3); // 8N1
break;
Expand Down
4 changes: 2 additions & 2 deletions tools/decode-status.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"(Tuya) Enable (1) TuyaMcuReceived messages over Mqtt",
"(Buzzer) Enable (1) buzzer when available",
"(Light) Enable multi-channels PWM (1) instead of Color PWM (0)",
"(not used) Limits Tuya dimmers to minimum of 10% (25) when enabled",
"(Serial) Invert Serial receive on SerialBridge (1)",
"(Energy) Enable Weekend Energy Tariff",
"(DDS2382) Select different Modbus registers (1) for Active Energy (#6531)",
"(Energy) Enable (1) hardware energy total counter as reference (#6561)",
Expand Down Expand Up @@ -339,7 +339,7 @@
obj = json.load(fp)

def StartDecode():
print ("\n*** decode-status.py v14.1.0.1 by Theo Arends and Jacek Ziolkowski ***")
print ("\n*** decode-status.py v14.2.0.3 by Theo Arends and Jacek Ziolkowski ***")

# print("Decoding\n{}".format(obj))

Expand Down

0 comments on commit 831597e

Please sign in to comment.