Add command ``SetOption113 1``

Add command ``SetOption113 1`` to set dimmer low on rotary dial after power off (#8263)
This commit is contained in:
Theo Arends 2020-10-25 12:59:24 +01:00
parent e176aaf288
commit b92b59b2b1
5 changed files with 14 additions and 4 deletions

View File

@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
- Command ``NoDelay`` for immediate backlog command execution by Erik Montnemery (#9544)
- Command ``SwitchMode 15`` sending only MQTT message on switch change (#9593)
- Command ``ShutterChange`` to increment change position (#9594)
- Command ``SetOption113 1`` to set dimmer low on rotary dial after power off
- Support for EZO Ph and ORP sensors by Christopher Tremblay (#9567)
- Support for EZO RTD sensors by Christopher Tremblay (#9585)
- Support for EZO HUM sensors by Christopher Tremblay (#9599)

View File

@ -62,6 +62,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
- Command ``NoDelay`` for immediate backlog command execution by Erik Montnemery (#9544)
- Command ``SwitchMode 15`` sending only MQTT message on switch change (#9593)
- Command ``ShutterChange`` to increment change position (#9594)
- Command ``SetOption113 1`` to set dimmer low on rotary dial after power off
- Zigbee command ``ZbData`` for better support of device specific data
- Optional support for Mitsubishi Electric HVAC by David Gwynne (#9237)
- Optional support for Orno WE517-Modbus energy meter by Maxime Vincent (#9353)

View File

@ -132,7 +132,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
uint32_t zb_disable_autobind : 1; // bit 28 (v8.5.0.1) - SetOption110 - disable Zigbee auto-config when pairing new devices
uint32_t buzzer_freq_mode : 1; // bit 29 (v8.5.0.1) - SetOption111 - Use frequency output for buzzer pin instead of on/off signal
uint32_t zb_topic_fname : 1; // bit 30 (v8.5.0.1) - SetOption112 - Use friendly name in zigbee topic (use with SetOption89)
uint32_t spare31 : 1; // bit 31
uint32_t rotary_poweron_dimlow : 1; // bit 31 (v9.0.0.2) - SetOption113 - Set dimmer low on rotary dial after power off
};
} SysBitfield4;

View File

@ -198,7 +198,14 @@ void RotaryHandler(void) {
}
}
} else { // Dimmer RGBCW or RGB only if second rotary
LightDimmerOffset(second_rotary ? 1 : 0, rotary_position * rotary_dimmer_increment[Rotary.model]);
uint32_t dimmer_index = second_rotary ? 1 : 0;
if (!Settings.flag4.rotary_poweron_dimlow || power) { // SetOption113 - On rotary dial after power off set dimmer low
LightDimmerOffset(dimmer_index, rotary_position * rotary_dimmer_increment[Rotary.model]);
} else {
if (rotary_position > 0) { // Only power on if rotary increase
LightDimmerOffset(dimmer_index, -LightGetDimmer(dimmer_index) +1);
}
}
}
} else { // Rotary2
if (button_pressed) { // Color Temperature

View File

@ -165,7 +165,8 @@ a_setoption = [[
"Force gen1 Alexa mode",
"Disable Zigbee auto-config when pairing new devices",
"Use frequency output for buzzer pin instead of on/off signal",
"",""
"Use friendly name in zigbee topic (use with SetOption89)",
"Set dimmer low on rotary dial after power off"
],[
"","","","",
"","","","",
@ -267,7 +268,7 @@ else:
obj = json.load(fp)
def StartDecode():
print ("\n*** decode-status.py v20201024 by Theo Arends and Jacek Ziolkowski ***")
print ("\n*** decode-status.py v20201025 by Theo Arends and Jacek Ziolkowski ***")
# print("Decoding\n{}".format(obj))