Anchors... again!

Michael Ingraham 2019-09-07 17:41:42 -04:00
parent 47b3c923c9
commit 1a84da0eab
1 changed files with 402 additions and 401 deletions

@ -1,21 +1,21 @@
* [**How to Use Commands**](#how-to-use-commands)
* [**Device Control**](#control)
* [**Management and Configuration**](#management)
* [**Wi-Fi**](#Wi-Fi)
* [**MQTT**](#mqtt)
* [**Rules**](#rules)
* [**Timers**](#timers)
* [**Sensors**](#sensor)
* [**Power Monitoring**](#power-monitoring)
* [**Lights (PWM and addressable RGB LED lights)**](#light)
* [**RF 433MHz Bridge**](#sonoff-rf-bridge)
* [**IR Remote Control**](#irremote)
* [**SetOption List**](#setoption-overview)
* [**Serial Bridge**](#serial-bridge)
* [**MP3 Player**](#mp3-player)
* [**Domoticz**](#domoticz)
* [**KNX IP Protocol**](#knx)
* [**Displays**](#displays)
* [**How to Use Commands**](#how-to-use-commands)
* [**Device Control**](#control)
* [**Management and Configuration**](#management)
* [**Wi-Fi**](#Wi-Fi)
* [**MQTT**](#mqtt)
* [**Rules**](#rules)
* [**Timers**](#timers)
* [**Sensors**](#sensor)
* [**Power Monitoring**](#power-monitoring)
* [**Lights (PWM and addressable RGB LED lights)**](#light)
* [**RF 433MHz Bridge**](#sonoff-rf-bridge)
* [**IR Remote Control**](#irremote)
* [**SetOption List**](#setoption-overview)
* [**Serial Bridge**](#serial-bridge)
* [**MP3 Player**](#mp3-player)
* [**Domoticz**](#domoticz)
* [**KNX IP Protocol**](#knx)
* [**Displays**](#displays)
The Sonoff-Tasmota firmware provides three powerful man machine interfaces:<BR>**MQTT**, **web** and **serial**.
@ -97,142 +97,142 @@ When a command mentions resetting to *"firmware default"* it means the setting w
Simply put, other messages may precede messages published as a result of your commands.
* a `tele/%topic%/STATUS` message (sent every 300 seconds by default) may appear exactly after you issue `Power off` command and before you receive `stat/%topic%/RESULT = {"POWER":"OFF"}` message.
### Control
### Control
<a id="tb-command">Command | Parameters
:--- | :---
<a id="Backlog"></a>Backlog | List of commands to be executed in sequence separated by `;`<BR> See [Using Backlog](#using-backlog) for examples.
<a id="BlinkCount"></a>BlinkCount | Number of relay toggles ([blinks](#power)) **(does not control the status LED)**<BR> `0` = blink many times before restoring power state <BR> `1..32000` = set number of blinks
<a id="BlinkTime"></a>BlinkTime | `2..3600` set duration, in 0.1 second increments, to [blink](#power) (i.e., toggle Power) for a relay **(does not control the status LED)**
<a id="ButtonDebounce"></a>ButtonDebounce | User control over button debounce timing <BR>`40..1000` = set button debounce time in ms. Default is `40`
<a id="Buzzer"></a>Buzzer | `<count>,<beep>,<silence>,<tune>`<BR>All parameters are optional. The default is one 100ms beep (`1` for `<count>`, `<beep>`, and `<silence>`).<BR>The `<tune >` parameter is a 32-bit [bitmask](https://en.wikipedia.org/wiki/Mask_(computing)#Masking_bits_to_1) where a `1` bit beeps and a `0` bit is silence according to the `<beep>` and `<silence>` duration parameters, respectively. The tune is played from most significant bit (MSB) to least significant bit (LSB). Leading and trailing `0` bits are ignored. If the `<tune>` parameter is specified, the `<count>` parameter is ignored. If the `<tune>` parameter is `0`, it is ignored.<BR><BR>`3` - Beep three times with 100ms duration and 100ms pause<BR>`2,3` - Beep twice with 300ms duration and 100ms pause<BR>`2,3,4` - Beep twice with 300ms duration and 400ms pause<BR>`1,2,3,0xF54` (0000 0000 0000 0000 0000 1111 0101 0100). Each `1` bit beeps for 200ms and each bounded `0` bit pauses for 300ms<BR>A device LED can be assigned as a `Buzzer` component to display a blink pattern.
<a id="FanSpeed"></a>FanSpeed | Fan speed control *(iFan02/iFan03 only)*<BR>`0` = turn fan OFF<BR>`1..3` = set fan speed<BR>`+` = increase fan speed <BR>`-` = decrease fan speed <BR>
<a id="Interlock"></a>Interlock | Relay interlock mode and group selection.<BR>`0` = set self-locking mode for all relays *(default)*<BR> `1` = set interlock mode for selected relays
| | Add up to 8 relays in 1 to 4 interlock groups, each separated by a space. For example<BR> `1,2 3,4` = Group Relay1 and Relay2 in group 1 and Relay3 and Relay4 in group 2 (_note the space between the two group declarations_) <BR> `1,2,3` = group Relay1, Relay2 and Relay3 in a single interlock group <BR>`1 3 2,4` = Relay1 is in group 1, Relay3 in group 2, Relay2 and Relay4 in group 3
<a id="LedMask"></a>LedMask | Allows setting a [`<bitmask>`](https://en.wikipedia.org/wiki/Mask_(computing)#Masking_bits_to_1) which specifies which relays control the LED indicator used to display whether a relay is latched/powered. The order of the `<bitmask>` is from most significant bit (MSB) to least significant bit (LSB). Bit 15 (MSB) masks Relay16 through bit 0 (LSB) which masks Relay1, respectively. For each relay to be included in controlling the power LED, set its corresponding bit in the `<bitmask>` to `1`. `<bitmask>` bits without corresponding configured relay components have no effect and can be ignored.<BR><BR>`<bitmask>` = [bitwise](https://whatis.techtarget.com/definition/bitwise) value representing each relay. Values may be entered as either hexadecimal or decimal values (e.g., 0xFFFF = 65535). `0xFFFF` (= 1111 1111 1111 1111) All relays control the power LED _(default)_<BR><BR>[LedState](#ledstate) must be enabled (i.e., `!= 0`) in order for `LedMask` to take effect.<BR><BR>**Examples:**<li>`LedMask 0xFFFD` Every relay, except Relay2, controls the power LED (0xFFFD = 1111 1111 1111 1101)</li><li>`LedMask 0x0002` Only Relay 2 controls the power LED (0x0002 = 0000 0000 0000 0010)</li>
<a id="LedPower"></a>LedPower | LED power state as on or off <BR> `0` = turn LED OFF and set `LedState 0` <BR> `1` = turn LED ON and set `LedState 8` <BR> `2` = toggle LED and set `LedState 0` <BR>(Use `Backlog LedPower 0; SetOption31 1` to disable LED even when Wi-Fi or MQTT is not connected)
LedPower\<x\> | LED\<x\> power state control. **Enabled only when LedLink(i) is configured**<BR> `0` = turn LED OFF and set `LedState 0` <BR> `1` = turn LED ON and set `LedState 0` <BR> `2` = toggle LED and set `LedState 0`
<a id="LedState"></a>LedState | Manage LED state<BR> `0` = disable use of LED as much as possible <BR> `1` = show power state on LED (LED on when power on) *(default)* *(inverted for Sonoff Touch/T1)*<BR> `2` = show MQTT subscriptions as a LED blink<BR> `3` = show power state and MQTT subscriptions as a LED blink<BR> `4` = show MQTT publications as a LED blink<BR> `5` = show power state and MQTT publications as a LED blink<BR> `6` = show all MQTT messages as a LED blink<BR> `7` = show power state and MQTT messages as a LED blink<BR><BR>`8` = LED on when Wi-Fi and MQTT are connected. ***Cannot be issued directly*** and is only activated when `LedPower` is switched from `0` to `1`
<a id="Power0"></a>Power0 | Control the power state simultaneously for all relays on the device<BR> `0` / `off` = turn OFF <BR> `1` / `on` = turn ON <BR> `2` / `toggle` = if relay is `ON` switch to `OFF` and vice versa
<a id="Power"></a>Power\<x\> | Control the corresponding Relay (enumerated) power state and also restart PulseTime\<x\><BR> `0` / `off` = turn OFF <BR> `1` / `on` = turn ON <BR> `2` / `toggle` = if relay is `ON` switch to `OFF` and vice versa<BR> `3` / `blink` = toggle power for [BlinkCount](#blinkcount) times each [BlinkTime](#blinktime) duration (at the end of `blink`, relay power is returned to pre-blink state)<BR> `4` / `blinkoff` = stop blink sequence and return relay power to pre-blink state
<a id="PowerOnState"></a>PowerOnState | Control relay state after _**powering up**_ the device. [More information](PowerOnState-Configuration)<BR> `0` / `OFF` = keep relay(s) OFF after power up <BR> `1` / `ON` = turn relay(s) ON after power up <BR> `2` / `TOGGLE` = toggle relay(s) from last saved state <BR> `3` = switch relay(s) to their last saved state *(default)* <BR> `4` = turn relay(s) ON and disable further relay control <BR> `5` = after a `PulseTime` period turn relay(s) ON (acts as inverted [`PulseTime`](Commands#pulsetime) mode)
<a id="PulseTime"></a>PulseTime\<x\> | Display the amount of `PulseTime` remaining on the corresponding Relay (enumerated)<BR>`<value>` Set the duration to keep the corresponding Relay `ON` when `Power<x> ON` command is issued. After this amount of time, the relay will be turned `OFF`.<BR>`0` / `OFF` = disable use of PulseTime for the corresponding Relay<BR>`1..111` = set PulseTime for the corresponding Relay in 0.1 second increments<BR>`112..64900` = set PulseTime for the corresponding Relay, offset by 100, in 1 second increments. Add 100 to desired interval in seconds, e.g., `PulseTime 113` = 13 seconds and `PulseTime 460` = 6 minutes (i.e., 360 seconds)<BR>
<a id="SwitchDebounce"></a>SwitchDebounce | User control over switch debounce timing <BR> `40..1000` = set switch debounce time in ms. Default is `40`
<a id="SwitchMode"></a>SwitchMode\<x\> | [Switch mode](Buttons-and-Switches#switchmode) <BR> `0` = toggle *(default)* <BR> `1` = follow (0 = off, 1 = on) <BR> `2` = inverted follow (0 = on, 1 = off) <BR> `3` = pushbutton (default 1, 0 = toggle) <BR> `4` = inverted pushbutton (default 0, 1 = toggle) <BR> `5` = pushbutton with hold (default 1, 0 = toggle, Hold = hold) <BR> `6` = inverted pushbutton with hold (default 0, 1 = toggle, hold = hold) <BR> `7` = pushbutton toggle (0 = toggle, 1 = toggle)
See also | [`SetOption11`](#SetOption11) - Swap pushbutton single and double press functionality<BR>[`SetOption13`](#SetOption13) - Allow immediate action on single button press<BR>[`SetOption26`](#SetOption26) - Use indexes even when only one relay is present<BR>[`SetOption31`](#SetOption31) - Disable Wi-Fi LED status blinking<BR>[`SetOption32`](#SetOption32) - Set hold interval before sending `HOLD` action<BR>[`SetOption67`](#SetOption67) - Enable/Disable Buzzer
### Management
<a id="tb-command">Command|Parameters
:---|:---
Backlog<a id="Backlog"></a>|List of commands to be executed in sequence separated by `;`<BR> See [Using Backlog](#using-backlog) for examples.
BlinkCount<a id="BlinkCount"></a>|Number of relay toggles ([blinks](#power)) **(does not control the status LED)**<BR> `0` = blink many times before restoring power state <BR> `1..32000` = set number of blinks
BlinkTime<a id="BlinkTime"></a>|`2..3600` set duration, in 0.1 second increments, to [blink](#power) (i.e., toggle Power) for a relay **(does not control the status LED)**
ButtonDebounce<a id="ButtonDebounce"></a>|User control over button debounce timing <BR>`40..1000` = set button debounce time in ms. Default is `40`
Buzzer<a id="Buzzer"></a>|`<count>,<beep>,<silence>,<tune>`<BR>All parameters are optional. The default is one 100ms beep (`1` for `<count>`, `<beep>`, and `<silence>`).<BR>The `<tune >` parameter is a 32-bit [bitmask](https://en.wikipedia.org/wiki/Mask_(computing)#Masking_bits_to_1) where a `1` bit beeps and a `0` bit is silence according to the `<beep>` and `<silence>` duration parameters, respectively. The tune is played from most significant bit (MSB) to least significant bit (LSB). Leading and trailing `0` bits are ignored. If the `<tune>` parameter is specified, the `<count>` parameter is ignored. If the `<tune>` parameter is `0`, it is ignored.<BR><BR>`3` - Beep three times with 100ms duration and 100ms pause<BR>`2,3` - Beep twice with 300ms duration and 100ms pause<BR>`2,3,4` - Beep twice with 300ms duration and 400ms pause<BR>`1,2,3,0xF54` (0000 0000 0000 0000 0000 1111 0101 0100). Each `1` bit beeps for 200ms and each bounded `0` bit pauses for 300ms<BR>A device LED can be assigned as a `Buzzer` component to display a blink pattern.
FanSpeed<a id="FanSpeed"></a>|Fan speed control *(iFan02/iFan03 only)*<BR>`0` = turn fan OFF<BR>`1..3` = set fan speed<BR>`+` = increase fan speed <BR>`-` = decrease fan speed <BR>
Interlock<a id="Interlock"></a>|Relay interlock mode and group selection.<BR>`0` = set self-locking mode for all relays *(default)*<BR> `1` = set interlock mode for selected relays
||Add up to 8 relays in 1 to 4 interlock groups, each separated by a space. For example<BR> `1,2 3,4` = Group Relay1 and Relay2 in group 1 and Relay3 and Relay4 in group 2 (_note the space between the two group declarations_) <BR> `1,2,3` = group Relay1, Relay2 and Relay3 in a single interlock group <BR>`1 3 2,4` = Relay1 is in group 1, Relay3 in group 2, Relay2 and Relay4 in group 3
LedMask<a id="LedMask"></a>|Allows setting a [`<bitmask>`](https://en.wikipedia.org/wiki/Mask_(computing)#Masking_bits_to_1) which specifies which relays control the LED indicator used to display whether a relay is latched/powered. The order of the `<bitmask>` is from most significant bit (MSB) to least significant bit (LSB). Bit 15 (MSB) masks Relay16 through bit 0 (LSB) which masks Relay1, respectively. For each relay to be included in controlling the power LED, set its corresponding bit in the `<bitmask>` to `1`. `<bitmask>` bits without corresponding configured relay components have no effect and can be ignored.<BR><BR>`<bitmask>` = [bitwise](https://whatis.techtarget.com/definition/bitwise) value representing each relay. Values may be entered as either hexadecimal or decimal values (e.g., 0xFFFF = 65535). `0xFFFF` (= 1111 1111 1111 1111) All relays control the power LED _(default)_<BR><BR>[LedState](#ledstate) must be enabled (i.e., `!= 0`) in order for `LedMask` to take effect.<BR><BR>**Examples:**<li>`LedMask 0xFFFD` Every relay, except Relay2, controls the power LED (0xFFFD = 1111 1111 1111 1101)</li><li>`LedMask 0x0002` Only Relay 2 controls the power LED (0x0002 = 0000 0000 0000 0010)</li>
LedPower<a id="LedPower"></a>|LED power state as on or off <BR> `0` = turn LED OFF and set `LedState 0` <BR> `1` = turn LED ON and set `LedState 8` <BR> `2` = toggle LED and set `LedState 0` <BR>(Use `Backlog LedPower 0; SetOption31 1` to disable LED even when Wi-Fi or MQTT is not connected)
LedPower\<x\>|LED\<x\> power state control. **Enabled only when LedLink(i) is configured**<BR> `0` = turn LED OFF and set `LedState 0` <BR> `1` = turn LED ON and set `LedState 0` <BR> `2` = toggle LED and set `LedState 0`
LedState<a id="LedState"></a>|Manage LED state<BR> `0` = disable use of LED as much as possible <BR> `1` = show power state on LED (LED on when power on) *(default)* *(inverted for Sonoff Touch/T1)*<BR> `2` = show MQTT subscriptions as a LED blink<BR> `3` = show power state and MQTT subscriptions as a LED blink<BR> `4` = show MQTT publications as a LED blink<BR> `5` = show power state and MQTT publications as a LED blink<BR> `6` = show all MQTT messages as a LED blink<BR> `7` = show power state and MQTT messages as a LED blink<BR><BR>`8` = LED on when Wi-Fi and MQTT are connected. ***Cannot be issued directly*** and is only activated when `LedPower` is switched from `0` to `1`
Power0<a id="Power0"></a>|Control the power state simultaneously for all relays on the device<BR> `0` / `off` = turn OFF <BR> `1` / `on` = turn ON <BR> `2` / `toggle` = if relay is `ON` switch to `OFF` and vice versa
Power\<x\><a id="Power"></a>|Control the corresponding Relay (enumerated) power state and also restart PulseTime\<x\><BR> `0` / `off` = turn OFF <BR> `1` / `on` = turn ON <BR> `2` / `toggle` = if relay is `ON` switch to `OFF` and vice versa<BR> `3` / `blink` = toggle power for [BlinkCount](#blinkcount) times each [BlinkTime](#blinktime) duration (at the end of `blink`, relay power is returned to pre-blink state)<BR> `4` / `blinkoff` = stop blink sequence and return relay power to pre-blink state
PowerOnState<a id="PowerOnState"></a>|Control relay state after _**powering up**_ the device. [More information](PowerOnState-Configuration)<BR> `0` / `OFF` = keep relay(s) OFF after power up <BR> `1` / `ON` = turn relay(s) ON after power up <BR> `2` / `TOGGLE` = toggle relay(s) from last saved state <BR> `3` = switch relay(s) to their last saved state *(default)* <BR> `4` = turn relay(s) ON and disable further relay control <BR> `5` = after a `PulseTime` period turn relay(s) ON (acts as inverted [`PulseTime`](Commands#pulsetime) mode)
PulseTime\<x\><a id="PulseTime"></a>|Display the amount of `PulseTime` remaining on the corresponding Relay (enumerated)<BR>`<value>` Set the duration to keep the corresponding Relay `ON` when `Power<x> ON` command is issued. After this amount of time, the relay will be turned `OFF`.<BR>`0` / `OFF` = disable use of PulseTime for the corresponding Relay<BR>`1..111` = set PulseTime for the corresponding Relay in 0.1 second increments<BR>`112..64900` = set PulseTime for the corresponding Relay, offset by 100, in 1 second increments. Add 100 to desired interval in seconds, e.g., `PulseTime 113` = 13 seconds and `PulseTime 460` = 6 minutes (i.e., 360 seconds)<BR>
SwitchDebounce<a id="SwitchDebounce"></a>|User control over switch debounce timing <BR> `40..1000` = set switch debounce time in ms. Default is `40`
SwitchMode\<x\><a id="SwitchMode"></a>|[Switch mode](Buttons-and-Switches#switchmode) <BR> `0` = toggle *(default)* <BR> `1` = follow (0 = off, 1 = on) <BR> `2` = inverted follow (0 = on, 1 = off) <BR> `3` = pushbutton (default 1, 0 = toggle) <BR> `4` = inverted pushbutton (default 0, 1 = toggle) <BR> `5` = pushbutton with hold (default 1, 0 = toggle, Hold = hold) <BR> `6` = inverted pushbutton with hold (default 0, 1 = toggle, hold = hold) <BR> `7` = pushbutton toggle (0 = toggle, 1 = toggle)
See also| [`SetOption11`](#SetOption11) - Swap pushbutton single and double press functionality<BR>[`SetOption13`](#SetOption13) - Allow immediate action on single button press<BR>[`SetOption26`](#SetOption26) - Use indexes even when only one relay is present<BR>[`SetOption31`](#SetOption31) - Disable Wi-Fi LED status blinking<BR>[`SetOption32`](#SetOption32) - Set hold interval before sending `HOLD` action<BR>[`SetOption67`](#SetOption67) - Enable/Disable Buzzer
<a id="tb-management">Command | Parameters
:--- | :---
<a id="Delay"></a>Delay|`2..3600` = set delay between two backlog commands with 0.1 second increment
<a id="Emulation"></a>Emulation|`0` = disable emulation<BR>`1` = enable Belkin WeMo emulation for Alexa<BR>`2` = enable Hue Bridge emulation for Alexa
<a id="Event"></a>Event | Execute an event to trigger a rule as [documented](Rules#trigger)
<a id="FriendlyName"></a>FriendlyName\<x\>|`1` = Reset friendly name to firmware default<BR>`<value>` = set friendly name (32 char limit)
<a id="Gpios"></a>Gpios | Show list of available sensors and devices by name and index
<a id="Gpio"></a>Gpio | Show current GPIO usage for current module
<a id="Gpio"></a>Gpio\<x\>|`<sensor>` = configure [sensor](https://github.com/arendst/Sonoff-Tasmota/blob/0658ae19599e88432bbb20348f1d49279276acd7/sonoff/sonoff_template.h#L192) to Gpio\<x\>
<a id="I2Cscan"></a>I2Cscan | Scan I<sup>2</sup>C bus and show addresses for found devices
<a id="LogHost"></a>LogHost|`1`= reset [syslog](https://www.sigmdel.ca/michel/ha/rpi/syslog_en.html) host to firmware default (`SYS_LOG_HOST`)<BR>`<value>` = set syslog host (32 chars max)
<a id="LogPort"></a>LogPort|`1`= reset [syslog](https://www.sigmdel.ca/michel/ha/rpi/syslog_en.html) port to firmware default (`SYS_LOG_PORT`)<BR>`2..32766` = set syslog port
<a id="Modules"></a>Modules | Show available modules by name and index
<a id="Module"></a>Module | Displays active module by name and index<BR>`<x>` = switch to Module\<x\> and restart
<a id="NtpServer"></a>NtpServer\<x\> | NTP server setup (x= `1..3`)<BR>`0` = clear NtpServer\<x\> settings<BR>`1` = reset NtpServer\<x\> settings to firmware defaults<BR>`<value>` = set NtpServer\<x\> host or IP address (32 char limit)
<a id="OtaUrl"></a>OtaUrl | Display current OTA URL<BR> `1` = Reset OtaUrl to firmware default<BR> `url` = set address for OTA (100 char limit)
<a id="Pwm"></a>Pwm\<x\>|`0..1023` = set PWM value for channel
<a id="PwmFrequency"></a>PwmFrequency|`1` = reset PWM frequency to 880Hz<BR>`100..4000` = set PWM frequency (100Hz to 4kHz)
<a id="PwmRange"></a>PwmRange|`1` = reset maximum PWM range to 1023<BR>`255..1023` = set maximum PWM range
<a id="Reset"></a>Reset|`1` = reset device settings to firmware defaults and restart<BR>`2` = erase flash, reset device settings to firmware defaults and restart<BR> `3` = erase flash SDK parameters and restart<BR> `4` = reset device settings to firmware defaults but retain Wi-Fi credentials and restart<BR> `5` = erase all flash and reset parameters to firmware defaults but keep Wi-Fi settings and restart<BR>`6` = erase all flash and reset parameters to firmware defaults but keep Wi-Fi and MQTT settings and restart<BR>*(Erase of flash can take a few seconds to complete and there is no output during the erase process on the serial or web console)*<BR>`99` = reset device bootcount to zero
<a id="Restart"></a>Restart|`1` = restart device<BR>`99` = force restart device without configuration save
<a id="SaveData"></a>SaveData|`0` = save parameter changes only manually<BR>`1` = save parameter changes every second *(default)*<BR>`2..3600`= save parameter changes every x second
<a id="SerialLog"></a>SerialLog | Disable hardware serial bridge and<BR>`0` = disable serial logging<BR> `1` = show only error messages<BR> `2` = show error and info messages<BR>`3` = show error, info and debug messages<BR>`4` = show error, info and more debug messages<BR>`5` = show all messages
<a id="Sleep"></a>Sleep|`0` = turn sleep off<BR>`1..250` = set sleep duration in mSec to enable [energy saving](energy-saving) *(default = `50`)*
<a id="State"></a>State | Show current device state in `%prefix%/%topic%/RESULT` topic
<a id="Status"></a>Status | ` ` = show abbreviated [status information](JSON-Status-Responses#basic-response)<BR>`0` = show all status information (1 - 11)<BR>`1` = show device parameters information<BR>`2` = show firmware information<BR>`3` = show logging and telemetry information<BR>`4` = show memory information<BR>`5` = show network information<BR>`6` = show MQTT information<BR>`7` = show time information<BR>`8` = show connected sensor information<BR>`9` = show power thresholds *(only on modules with power monitoring)*<BR>`10` = same as `Status 8` *(retained for backwards compatibility)*<BR>`11` = show information equal to [`TelePeriod`](#teleperiod) state message
<a id="SysLog"></a>SysLog|`0` = disable syslog logging<BR> `1` = show only error messages<BR> `2` = show error and info messages<BR>`3` = show error, info and debug messages<BR>`4` = show error, info and more debug messages<BR>`5` = show all messages
<a id="Template"></a>Template | Show current [Template](Templates)<BR>`0` = create template from active module<BR>`1..71` = create template from a supported module<BR>`255` = merge current module and template settings into new template<BR>`{ ... }` = store template in a [JSON payload](Templates#explanation-of-template-properties)<BR>After setting a template using this command, you can activate the template by selection Module `0`, i.e., send the command `Module 0`
<a id="Time"></a>Time|`0` = enable NTP *(default)*<BR>`1` = format JSON message timestamp in ISO format<BR>`2` = format JSON message timestamp in both ISO and Epoch format<BR>`3` = format JSON message timestamp in Epoch format<BR>`<value>` = disable NTP and set UTC time as epoch value if greater than `1451602800` (January 1, 2016)
<a id="TimeSTD"></a><a id="TimeDST"></a>TimeSTD<BR>TimeDST | Set policies for the beginning of daylight saving time (DST) and return back to standard time (STD)<BR>`0` = reset parameters to firmware defaults<BR>`H`,`W`,`M`,`D`,`h`,`T`<BR> `H` = hemisphere (`0` = northern hemisphere / `1` = southern hemisphere)<BR> `W` = week (`0` = last week of month, `1..4` = first .. fourth)<BR> `M` = month (`1..12`)<BR> `D` = day of week (`1..7` `1` = sunday `7` = saturday)<BR> `h` = hour (`0..23`)<BR> `T` = timezone (`-780..780`) (offset from UTC in **MINUTES** - 780min/60min=13hrs)<BR>_Example:_ `TIMEDST 1,1,10,1,2,660`
<a id="Timezone"></a>Timezone|`-13..13` = set timezone offset from UTC in **HOURS**<BR>`99` = use timezone configured with `TimeDST` and `TimeSTD`
<a id="TuyaMCU"></a>TuyaMCU| ` ` = show current TuyaMCU FunctionId and DpId mapping<BR> `<functionId>,<dpId>` = Set TuyaMCU FunctionId and DpId mapping<BR> Details for FunctionId and DpId [here](https://github.com/arendst/Sonoff-Tasmota/wiki/TuyaMCU)
<a id="Upgrade"></a>Upgrade|`1` = download firmware from `OtaUrl` and restart<BR>`<value>` = download firmware from `OtaUrl` if \<value\> is higher than device version
<a id="Upload"></a>Upload|`1` = download firmware from `OtaUrl` and restart<BR>`<value>` = download firmware from `OtaUrl` if \<value\> is higher than device version
<a id="WebLog"></a>WebLog|`0` = disable web logging<BR> `1` = show only error messages<BR> `2` = show error and info messages<BR>`3` = show error, info and debug messages<BR>`4` = show error, info and more debug messages<BR>`5` = show all messages
See also | [`SetOption68`](#Setoption68) - PWM Channel control
### [Wi-Fi](Troubleshooting#Wi-Fi-issues-arduino-core-versions-and-espressif-sdk)
### Management
<a id="tb-wifi">Command | Parameters
:--- | :---
<a id="AP"></a>AP|`0` = switch to other Wi-Fi Access Point<BR>`1`= select Wi-Fi Access Point 1<BR>`2`= select Wi-Fi Access Point 2
<a id="Hostname"></a>Hostname|`1` = reset hostname to `MQTT_TOPIC-<4digits>` and restart<BR>`<value>` = set hostname (32 char limit) and restart. If hostname contains `%` it will be reset to the default instead.
<a id="IPAddress1"></a>IPAddress1|`0.0.0.0` = use dynamic IP address (DHCP)<BR>`XXX.XXX.XXX.XXX` = set static IP address
<a id="IPAddress2"></a>IPAddress2|`XXX.XXX.XXX.XXX` = set gateway IP address
<a id="IPAddress3"></a>IPAddress3|`XXX.XXX.XXX.XXX` = set subnet mask
<a id="IPAddress4"></a>IPAddress4|`XXX.XXX.XXX.XXX` = set DNS server IP address<BR>*follow IPAddress commands with `restart 1` to apply changes*
<a id="Password"></a>Password\<x\>|`1` = reset AP\<x\> Wi-Fi password to firmware default (`STA_PASS1`) and restart<BR>`<value>`= set AP\<x\> Wi-Fi password (64 char limit, **do not use special characters or white spaces in the password**) and restart. **Note that `Password` and `Password1` are equivalent commands.**
<a id="Ssid"></a>Ssid\<x\>|`1` = reset AP\<x\> Wi-Fi SSID to firmware default (`STA_SSID1` or `STA_SSID2`) and restart<BR>`<value>`= set AP\<x\> Wi-Fi SSID (32 char limit, **do not use special characters or white spaces in the SSID**) and restart
<a id="WebColor"></a>WebColor\<x\>|Web GUI colors<BR>`#RRGGBB` = Set web GUI color (x = `1..18`):<BR>`1` = Global text (Black)<BR>`2` = Global background (White)<BR>`3` = Form background (Greyish)<BR>`4` = Input text (Black)<BR>`5` = Input background (White)<BR>`6` = Console text (Black)<BR>`7` = Console background (White)<BR>`8` = Warning text (Red)<BR>`9` = Success text (Green)<BR>`10` = Button text (White)<BR>`11` = Button (Blueish)<BR>`12` = Button hovered over (Darker blueish)<BR>`13` = Restart/Reset/Delete button (Redish)<BR>`14` = Restart/Reset/Delete button hover (Darker reddish)<BR>`15` = Save button (Greenish)<BR>`16` = Save button hover (Darker greenish)<BR>`17` = Config timer tab text (White)<BR>`18` = Config timer tab background (Light grey)
<a id="WebPassword"></a>WebPassword | Show current web server password<BR>`0` = disable use of password for WebUI<BR>`1` = reset password to firmware default (`WEB_PASSWORD`)<BR>`<value>` = set WebUI password for user `WEB_USERNAME` (32 char limit)
<a id="WebRefresh"></a>WebRefresh|Web page refresh<BR>`1000..10000` = set refresh time in ms. Default is 2345<BR>Default WEB_USERNAME is `admin`.
<a id="WebSend"></a>WebSend | Send a command to Tasmota host. If a command starts with a `\` it will be used as a link.<BR>`[<host>:<port>,<user>:<password>] <command>`<BR>`<host>` = hostname or IP address.<BR>`<port>` = port for the device if not the default `80`<BR>`<user>` = enter username of the device you're sending the command to<BR>`<password>` = enter password of the device you're sending the command to<BR>`<command>` = command and payload<BR>*example: `[<ip>] POWER1 ON` sends `http://<ip>/cm?cmnd=POWER1 ON`*
<a id="WebSensor"></a>WebSensor\<x\>|Control display of sensor telemetry in the web UI<BR>`0` - Do not display sensor's telemetry<BR>`1` - Display sensor's telemetry (*default*)<BR>`<x>` = number corresponding to the sensor - listed in the `sns` section of the [supported sensor spreadsheet](https://docs.google.com/spreadsheets/d/e/2PACX-1vRBFqaP5QAFmT8iIYBxrn-EQp7-SrkxL6tb0OjpqtBxDEsmkiWCFei3sFyA_UXoqlbs3CqtEdOfC6Pa/pubhtml?gid=1029939700&single=true)<BR>`<x>` = `3` Energy telemetry<BR>Issue a `Status 4` to obtain a list of sensor types enabled in the firmware loaded on the device.
<a id="WebServer"></a>WebServer|`0` = stop web server<BR>`1` = start web server in user mode<BR>`2` = start web server in admin mode
<a id="WifiConfig"></a>WifiConfig|`0` - disable Wi-Fi configuration and reboot (used with alternate AP)<BR>`1` = set SmartConfig as the current configuration tool, start SmartConfig for 3 minutes, and then reboot and try to connect to your Wi-Fi network again<BR>`2` = set Wi-Fi Manager as the current configuration tool and start Wi-Fi Manager (web server at 192.168.4.1) for 3 minutes, and then reboot and try to connect to your Wi-Fi network again<BR>`3` = set WPS as the current configuration tool, try WPS for 3 minutes, and then reboot and try to connect to your Wi-Fi network again<BR>`4` = disable Wi-Fi configuration but retry other AP without rebooting<BR>`5` = disable Wi-Fi configuration and alternatively retry AP1 and AP2 until connected without rebooting<BR>`7` = start set Wi-Fi Manager (web server at 192.168.4.1) as the current configuration tool but restricted with the only option to reset device settings. _**This setting is recommended for devices without an external control/reset button**_.
See also | [`SetOption55`](#Setoption55) - mDNS service control<BR>[`SetOption56`](#Setoption56) - Wi-Fi network scan to select strongest signal on restart<BR>[`SetOption57`](#Setoption57) - Wi-Fi network re-scan, alternate AP
<a id="tb-management">Command|Parameters
:---|:---
Delay<a id="Delay"></a>|`2..3600` = set delay between two backlog commands with 0.1 second increment
Emulation<a id="Emulation"></a>|`0` = disable emulation<BR>`1` = enable Belkin WeMo emulation for Alexa<BR>`2` = enable Hue Bridge emulation for Alexa
Event<a id="Event"></a>|Execute an event to trigger a rule as [documented](Rules#trigger)
FriendlyName\<x\><a id="FriendlyName"></a>|`1` = Reset friendly name to firmware default<BR>`<value>` = set friendly name (32 char limit)
Gpios<a id="Gpios"></a>|Show list of available sensors and devices by name and index
Gpio<a id="Gpio"></a>|Show current GPIO usage for current module
Gpio\<x\><a id="Gpio"></a>|`<sensor>` = configure [sensor](https://github.com/arendst/Sonoff-Tasmota/blob/0658ae19599e88432bbb20348f1d49279276acd7/sonoff/sonoff_template.h#L192) to Gpio\<x\>
I2Cscan<a id="I2Cscan"></a>|Scan I<sup>2</sup>C bus and show addresses for found devices
LogHost<a id="LogHost"></a>|`1`= reset [syslog](https://www.sigmdel.ca/michel/ha/rpi/syslog_en.html) host to firmware default (`SYS_LOG_HOST`)<BR>`<value>` = set syslog host (32 chars max)
LogPort<a id="LogPort"></a>|`1`= reset [syslog](https://www.sigmdel.ca/michel/ha/rpi/syslog_en.html) port to firmware default (`SYS_LOG_PORT`)<BR>`2..32766` = set syslog port
Modules<a id="Modules"></a>|Show available modules by name and index
Module<a id="Module"></a>|Displays active module by name and index<BR>`<x>` = switch to Module\<x\> and restart
NtpServer\<x\><a id="NtpServer"></a>|NTP server setup (x= `1..3`)<BR>`0` = clear NtpServer\<x\> settings<BR>`1` = reset NtpServer\<x\> settings to firmware defaults<BR>`<value>` = set NtpServer\<x\> host or IP address (32 char limit)
OtaUrl<a id="OtaUrl"></a>|Display current OTA URL<BR> `1` = Reset OtaUrl to firmware default<BR> `url` = set address for OTA (100 char limit)
Pwm\<x\><a id="Pwm"></a>|`0..1023` = set PWM value for channel
PwmFrequency<a id="PwmFrequency"></a>|`1` = reset PWM frequency to 880Hz<BR>`100..4000` = set PWM frequency (100Hz to 4kHz)
PwmRange<a id="PwmRange"></a>|`1` = reset maximum PWM range to 1023<BR>`255..1023` = set maximum PWM range
Reset<a id="Reset"></a>|`1` = reset device settings to firmware defaults and restart<BR>`2` = erase flash, reset device settings to firmware defaults and restart<BR> `3` = erase flash SDK parameters and restart<BR> `4` = reset device settings to firmware defaults but retain Wi-Fi credentials and restart<BR> `5` = erase all flash and reset parameters to firmware defaults but keep Wi-Fi settings and restart<BR>`6` = erase all flash and reset parameters to firmware defaults but keep Wi-Fi and MQTT settings and restart<BR>*(Erase of flash can take a few seconds to complete and there is no output during the erase process on the serial or web console)*<BR>`99` = reset device bootcount to zero
Restart<a id="Restart"></a>|`1` = restart device<BR>`99` = force restart device without configuration save
SaveData<a id="SaveData"></a>|`0` = save parameter changes only manually<BR>`1` = save parameter changes every second *(default)*<BR>`2..3600`= save parameter changes every x second
SerialLog<a id="SerialLog"></a>|Disable hardware serial bridge and<BR>`0` = disable serial logging<BR> `1` = show only error messages<BR> `2` = show error and info messages<BR>`3` = show error, info and debug messages<BR>`4` = show error, info and more debug messages<BR>`5` = show all messages
Sleep<a id="Sleep"></a>|`0` = turn sleep off<BR>`1..250` = set sleep duration in mSec to enable [energy saving](energy-saving) *(default = `50`)*
State<a id="State"></a>|Show current device state in `%prefix%/%topic%/RESULT` topic
Status<a id="Status"></a>|` ` = show abbreviated [status information](JSON-Status-Responses#basic-response)<BR>`0` = show all status information (1 - 11)<BR>`1` = show device parameters information<BR>`2` = show firmware information<BR>`3` = show logging and telemetry information<BR>`4` = show memory information<BR>`5` = show network information<BR>`6` = show MQTT information<BR>`7` = show time information<BR>`8` = show connected sensor information<BR>`9` = show power thresholds *(only on modules with power monitoring)*<BR>`10` = same as `Status 8` *(retained for backwards compatibility)*<BR>`11` = show information equal to [`TelePeriod`](#teleperiod) state message
SysLog<a id="SysLog"></a>|`0` = disable syslog logging<BR> `1` = show only error messages<BR> `2` = show error and info messages<BR>`3` = show error, info and debug messages<BR>`4` = show error, info and more debug messages<BR>`5` = show all messages
Template<a id="Template"></a>|Show current [Template](Templates)<BR>`0` = create template from active module<BR>`1..71` = create template from a supported module<BR>`255` = merge current module and template settings into new template<BR>`{ ... }` = store template in a [JSON payload](Templates#explanation-of-template-properties)<BR>After setting a template using this command, you can activate the template by selection Module `0`, i.e., send the command `Module 0`
Time<a id="Time"></a>|`0` = enable NTP *(default)*<BR>`1` = format JSON message timestamp in ISO format<BR>`2` = format JSON message timestamp in both ISO and Epoch format<BR>`3` = format JSON message timestamp in Epoch format<BR>`<value>` = disable NTP and set UTC time as epoch value if greater than `1451602800` (January 1, 2016)
TimeSTD<BR>TimeDST<a id="TimeSTD"></a><a id="TimeDST"></a>|Set policies for the beginning of daylight saving time (DST) and return back to standard time (STD)<BR>`0` = reset parameters to firmware defaults<BR>`H`,`W`,`M`,`D`,`h`,`T`<BR> `H` = hemisphere (`0` = northern hemisphere / `1` = southern hemisphere)<BR> `W` = week (`0` = last week of month, `1..4` = first .. fourth)<BR> `M` = month (`1..12`)<BR> `D` = day of week (`1..7` `1` = sunday `7` = saturday)<BR> `h` = hour (`0..23`)<BR> `T` = timezone (`-780..780`) (offset from UTC in **MINUTES** - 780min/60min=13hrs)<BR>_Example:_ `TIMEDST 1,1,10,1,2,660`
Timezone<a id="Timezone"></a>|`-13..13` = set timezone offset from UTC in **HOURS**<BR>`99` = use timezone configured with `TimeDST` and `TimeSTD`
TuyaMCU<a id="TuyaMCU"></a>| ` ` = show current TuyaMCU FunctionId and DpId mapping<BR> `<functionId>,<dpId>` = Set TuyaMCU FunctionId and DpId mapping<BR> Details for FunctionId and DpId [here](https://github.com/arendst/Sonoff-Tasmota/wiki/TuyaMCU)
Upgrade<a id="Upgrade"></a>|`1` = download firmware from `OtaUrl` and restart<BR>`<value>` = download firmware from `OtaUrl` if \<value\> is higher than device version
Upload<a id="Upload"></a>|`1` = download firmware from `OtaUrl` and restart<BR>`<value>` = download firmware from `OtaUrl` if \<value\> is higher than device version
WebLog<a id="WebLog"></a>|`0` = disable web logging<BR> `1` = show only error messages<BR> `2` = show error and info messages<BR>`3` = show error, info and debug messages<BR>`4` = show error, info and more debug messages<BR>`5` = show all messages
See also|[`SetOption68`](#Setoption68) - PWM Channel control
### [Wi-Fi](Troubleshooting#Wi-Fi-issues-arduino-core-versions-and-espressif-sdk)
<a id="tb-wifi">Command|Parameters
:---|:---
AP<a id="AP"></a>|`0` = switch to other Wi-Fi Access Point<BR>`1`= select Wi-Fi Access Point 1<BR>`2`= select Wi-Fi Access Point 2
Hostname<a id="Hostname"></a>|`1` = reset hostname to `MQTT_TOPIC-<4digits>` and restart<BR>`<value>` = set hostname (32 char limit) and restart. If hostname contains `%` it will be reset to the default instead.
IPAddress1<a id="IPAddress1"></a>|`0.0.0.0` = use dynamic IP address (DHCP)<BR>`XXX.XXX.XXX.XXX` = set static IP address
IPAddress2<a id="IPAddress2"></a>|`XXX.XXX.XXX.XXX` = set gateway IP address
IPAddress3<a id="IPAddress3"></a>|`XXX.XXX.XXX.XXX` = set subnet mask
IPAddress4<a id="IPAddress4"></a>|`XXX.XXX.XXX.XXX` = set DNS server IP address<BR>*follow IPAddress commands with `restart 1` to apply changes*
Password\<x\><a id="Password"></a>|`1` = reset AP\<x\> Wi-Fi password to firmware default (`STA_PASS1`) and restart<BR>`<value>`= set AP\<x\> Wi-Fi password (64 char limit, **do not use special characters or white spaces in the password**) and restart. **Note that `Password` and `Password1` are equivalent commands.**
Ssid\<x\><a id="Ssid"></a>|`1` = reset AP\<x\> Wi-Fi SSID to firmware default (`STA_SSID1` or `STA_SSID2`) and restart<BR>`<value>`= set AP\<x\> Wi-Fi SSID (32 char limit, **do not use special characters or white spaces in the SSID**) and restart
WebColor\<x\><a id="WebColor"></a>|Web GUI colors<BR>`#RRGGBB` = Set web GUI color (x = `1..18`):<BR>`1` = Global text (Black)<BR>`2` = Global background (White)<BR>`3` = Form background (Greyish)<BR>`4` = Input text (Black)<BR>`5` = Input background (White)<BR>`6` = Console text (Black)<BR>`7` = Console background (White)<BR>`8` = Warning text (Red)<BR>`9` = Success text (Green)<BR>`10` = Button text (White)<BR>`11` = Button (Blueish)<BR>`12` = Button hovered over (Darker blueish)<BR>`13` = Restart/Reset/Delete button (Redish)<BR>`14` = Restart/Reset/Delete button hover (Darker reddish)<BR>`15` = Save button (Greenish)<BR>`16` = Save button hover (Darker greenish)<BR>`17` = Config timer tab text (White)<BR>`18` = Config timer tab background (Light grey)
WebPassword<a id="WebPassword"></a>|Show current web server password<BR>`0` = disable use of password for WebUI<BR>`1` = reset password to firmware default (`WEB_PASSWORD`)<BR>`<value>` = set WebUI password for user `WEB_USERNAME` (32 char limit)
WebRefresh<a id="WebRefresh"></a>|Web page refresh<BR>`1000..10000` = set refresh time in ms. Default is 2345<BR>Default WEB_USERNAME is `admin`.
WebSend<a id="WebSend"></a>|Send a command to Tasmota host. If a command starts with a `\` it will be used as a link.<BR>`[<host>:<port>,<user>:<password>] <command>`<BR>`<host>` = hostname or IP address.<BR>`<port>` = port for the device if not the default `80`<BR>`<user>` = enter username of the device you're sending the command to<BR>`<password>` = enter password of the device you're sending the command to<BR>`<command>` = command and payload<BR>*example: `[<ip>] POWER1 ON` sends `http://<ip>/cm?cmnd=POWER1 ON`*
WebSensor\<x\><a id="WebSensor"></a>|Control display of sensor telemetry in the web UI<BR>`0` - Do not display sensor's telemetry<BR>`1` - Display sensor's telemetry (*default*)<BR>`<x>` = number corresponding to the sensor - listed in the `sns` section of the [supported sensor spreadsheet](https://docs.google.com/spreadsheets/d/e/2PACX-1vRBFqaP5QAFmT8iIYBxrn-EQp7-SrkxL6tb0OjpqtBxDEsmkiWCFei3sFyA_UXoqlbs3CqtEdOfC6Pa/pubhtml?gid=1029939700&single=true)<BR>`<x>` = `3` Energy telemetry<BR>Issue a `Status 4` to obtain a list of sensor types enabled in the firmware loaded on the device.
WebServer<a id="WebServer"></a>|`0` = stop web server<BR>`1` = start web server in user mode<BR>`2` = start web server in admin mode
WifiConfig<a id="WifiConfig"></a>|`0` - disable Wi-Fi configuration and reboot (used with alternate AP)<BR>`1` = set SmartConfig as the current configuration tool, start SmartConfig for 3 minutes, and then reboot and try to connect to your Wi-Fi network again<BR>`2` = set Wi-Fi Manager as the current configuration tool and start Wi-Fi Manager (web server at 192.168.4.1) for 3 minutes, and then reboot and try to connect to your Wi-Fi network again<BR>`3` = set WPS as the current configuration tool, try WPS for 3 minutes, and then reboot and try to connect to your Wi-Fi network again<BR>`4` = disable Wi-Fi configuration but retry other AP without rebooting<BR>`5` = disable Wi-Fi configuration and alternatively retry AP1 and AP2 until connected without rebooting<BR>`7` = start set Wi-Fi Manager (web server at 192.168.4.1) as the current configuration tool but restricted with the only option to reset device settings. _**This setting is recommended for devices without an external control/reset button**_.
See also|[`SetOption55`](#Setoption55) - mDNS service control<BR>[`SetOption56`](#Setoption56) - Wi-Fi network scan to select strongest signal on restart<BR>[`SetOption57`](#Setoption57) - Wi-Fi network re-scan, alternate AP
### [MQTT](MQTT)
<a id="tb-mqtt">Command | Parameters
:--- | :---
<a id="ButtonRetain"></a>ButtonRetain|`0` = disable use of MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on button press
<a id="ButtonTopic"></a>ButtonTopic|`<value>` = set MQTT button topic (32 chars max)<BR>`0` = disable use of MQTT button topic<BR>`1` = set MQTT button topic to device `%topic%`<BR>`2` = reset MQTT button topic to firmware default (`MQTT_BUTTON_TOPIC`) _(default = `0`)_
<a id="FullTopic"></a>FullTopic|`1` = reset MQTT fulltopic to firmware default (`MQTT_FULLTOPIC`) and restart<BR>`<value>` = set MQTT fulltopic (100 chars max) using optional %topic% and %prefix% and restart
<a id="GroupTopic"></a>GroupTopic|`1` = reset MQTT group topic to firmware default (`MQTT_GRPTOPIC`) and restart<BR>`<value>` = set MQTT group topic (32 chars max) and restart
<a id="MqttClient"></a>MqttClient|`1` = reset MQTT client to firmware config (`MQTT_CLIENT_ID`) and restart<BR>`<value>` = set MQTT client (32 chars max) and restart.<BR>You can use wildcard `%06X` to replace with last six characters of MAC address.
<a id="MqttFingerprint"></a>MqttFingerprint | *TLS needs to be enabled in firmware for this command*<BR>`<value>` = set current fingerprint as 20 space separated bytes (59 chars max)
<a id="MqttHost"></a>MqttHost|`0` = clear MQTT host field and allow mDNS to find MQTT host<BR>`1` = reset MQTT host to firmware default (`MQTT_HOST`) and restart<BR>`<value>` = set MQTT host (32 chars max) and restart
<a id="MqttPassword"></a>MqttPassword|`0` = clear MQTT password<BR>`1` = reset MQTT password to firmware default (`MQTT_PASS`) and restart<BR>`<value>` = set MQTT password (32 chars max) and restart
<a id="MqttPort"></a>MqttPort|`1` = reset MQTT port to firmware default (`MQTT_PORT`) and restart<BR>`<value>` = set MQTT port between 2 and 32766 and restart
<a id="MqttRetry"></a>MqttRetry|`10..32000` = set MQTT connection retry timer in seconds *(default = `10`)*
<a id="MqttUser"></a>MqttUser|`0` = clear MQTT user name<BR>`1` = reset MQTT user name to firmware default (`MQTT_USER`) and restart<BR>`<value>` = set MQTT user name (32 chars max) and restart
<a id="PowerRetain"></a>PowerRetain | MQTT [power retain state](PowerOnState-Configuration#side-effects-with-using-mqtt-messages)<BR> `0` / `off` = disable MQTT power retain on status update *(default)* <BR> `1` / `on` = enable MQTT power retain on status update <BR>
<a id="Prefix1"></a>Prefix1|`1` = reset MQTT command subscription prefix to firmware default (`SUB_PREFIX`) and restart<BR>`<value>` = set MQTT command subscription prefix (10 chars max) and restart
<a id="Prefix2"></a>Prefix2|`1` = reset MQTT status prefix to firmware default (`PUB_PREFIX`) and restart<BR>`<value>` = set MQTT status prefix (10 chars max) and restart
<a id="Prefix3"></a>Prefix3|`1` = Reset MQTT telemetry prefix to firmware default (`PUB_PREFIX2`) and restart<BR>`<value>` = set MQTT telemetry prefix (10 chars max) and restart
<a id="Publish"></a>Publish|`<topic> <payload>` = MQTT publish any topic and optional payload
<a id="Publish2"></a>Publish2|`<topic> <payload>` = MQTT publish any topic and optional payload with retain flag
<a id="SensorRetain"></a>SensorRetain|`0` = disable use of sensor MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on message `tele/%topic%/SENSOR`
<a id="StateText1"></a>StateText1|`<value>` = set `OFF` state text (10 chars max)
<a id="StateText2"></a>StateText2|`<value>` = set `ON` state text (10 chars max)
<a id="StateText3"></a>StateText3|`<value>` = set `TOGGLE` state text (10 chars max)
<a id="StateText4"></a>StateText4|`<value>` = set `HOLD` state text (10 chars max)
<a id="SwitchRetain"></a>SwitchRetain|`0` = disable use of MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on switch press
<a id="Subscribe"></a>Subscribe|List all topics currently subscribed<BR>`<eventName>, <mqttTopic> [, <key>]`<BR>The `<key>` parameter is optional. It is specified to parse a key/value pair from a JSON payload in the MQTT message. In order to parse a value from a multi-level JSON pair, you can use one dot (`.`) syntax to split the key into sections.<BR><BR>Subscribes to an MQTT topic and assigns an [`Event`](#event) name to it. You must compile your own binary with `#define SUPPORT_MQTT_EVENT` in your `user_config_override.h` file.<BR><BR>**Examples:**<li>`Subscribe BkLight, stat/%topic%/POWER`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`Rule1 ON Event#BkLight=ON DO <command>ENDON`</li><li>`Subscribe DnTemp, stat/%topic%/SENSOR, DS18B20.Temperature`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;where the MQTT message payload is `{"Time":"2017-02-16T10:13:52", "DS18B20":{"Temperature":20.6}}`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`Rule1 ON Event#DnTemp>=21 DO <command> ENDON`</li>
<a id="SwitchTopic"></a>SwitchTopic|`<value>` = set MQTT switch topic (32 chars max)<BR>`0` = disable use of MQTT switch topic<BR>`1` = set MQTT switch topic to device `%topic%`<BR>`2` = reset MQTT switch topic to firmware default (`MQTT_SWITCH_TOPIC`) _(default = `0`)_<BR>[Read more](Buttons-and-switches) about this
<a id="TelePeriod"></a>TelePeriod|`0` = disable telemetry messages<BR>`1` = reset telemetry period to firmware default (`TELE_PERIOD`)<BR>`10..3600` = set telemetry period in seconds *(default = `300`)*
<a id="Topic"></a>Topic|`1` = reset MQTT topic to firmware default (`MQTT_TOPIC`) and restart<BR>`<value>` = set MQTT topic (32 chars max) **and** `ButtonTopic` and restart
<a id="Unsubscribe"></a>Unsubscribe|Unsubscribe from all topics currently subscribed using the [`Subscribe`](#subscribe) command<BR>`<eventName>` = unsubscribe from a specific MQTT topic<BR><BR>You must compile your own binary with `#define SUPPORT_MQTT_EVENT` in your `user_config_override.h` file.
See also | [`SetOption2`](#setoption2) - Add units to status messages<BR>[`SetOption4`](#setoption4) - Return MQTT response as RESULT or %COMMAND% topic<BR>[`SetOption10`](#setoption10) - Main topic change behaviour
### [Rules](Rules)
<a id="tb-mqtt">Command|Parameters
:---|:---
ButtonRetain<a id="ButtonRetain"></a>|`0` = disable use of MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on button press
ButtonTopic<a id="ButtonTopic"></a>|`<value>` = set MQTT button topic (32 chars max)<BR>`0` = disable use of MQTT button topic<BR>`1` = set MQTT button topic to device `%topic%`<BR>`2` = reset MQTT button topic to firmware default (`MQTT_BUTTON_TOPIC`) _(default = `0`)_
FullTopic<a id="FullTopic"></a>|`1` = reset MQTT fulltopic to firmware default (`MQTT_FULLTOPIC`) and restart<BR>`<value>` = set MQTT fulltopic (100 chars max) using optional %topic% and %prefix% and restart
GroupTopic<a id="GroupTopic"></a>|`1` = reset MQTT group topic to firmware default (`MQTT_GRPTOPIC`) and restart<BR>`<value>` = set MQTT group topic (32 chars max) and restart
MqttClient<a id="MqttClient"></a>|`1` = reset MQTT client to firmware config (`MQTT_CLIENT_ID`) and restart<BR>`<value>` = set MQTT client (32 chars max) and restart.<BR>You can use wildcard `%06X` to replace with last six characters of MAC address.
MqttFingerprint<a id="MqttFingerprint"></a>|*TLS needs to be enabled in firmware for this command*<BR>`<value>` = set current fingerprint as 20 space separated bytes (59 chars max)
MqttHost<a id="MqttHost"></a>|`0` = clear MQTT host field and allow mDNS to find MQTT host<BR>`1` = reset MQTT host to firmware default (`MQTT_HOST`) and restart<BR>`<value>` = set MQTT host (32 chars max) and restart
MqttPassword<a id="MqttPassword"></a>|`0` = clear MQTT password<BR>`1` = reset MQTT password to firmware default (`MQTT_PASS`) and restart<BR>`<value>` = set MQTT password (32 chars max) and restart
MqttPort<a id="MqttPort"></a>|`1` = reset MQTT port to firmware default (`MQTT_PORT`) and restart<BR>`<value>` = set MQTT port between 2 and 32766 and restart
MqttRetry<a id="MqttRetry"></a>|`10..32000` = set MQTT connection retry timer in seconds *(default = `10`)*
MqttUser<a id="MqttUser"></a>|`0` = clear MQTT user name<BR>`1` = reset MQTT user name to firmware default (`MQTT_USER`) and restart<BR>`<value>` = set MQTT user name (32 chars max) and restart
PowerRetain<a id="PowerRetain"></a>|MQTT [power retain state](PowerOnState-Configuration#side-effects-with-using-mqtt-messages)<BR> `0` / `off` = disable MQTT power retain on status update *(default)* <BR> `1` / `on` = enable MQTT power retain on status update <BR>
Prefix1<a id="Prefix1"></a>|`1` = reset MQTT command subscription prefix to firmware default (`SUB_PREFIX`) and restart<BR>`<value>` = set MQTT command subscription prefix (10 chars max) and restart
Prefix2<a id="Prefix2"></a>|`1` = reset MQTT status prefix to firmware default (`PUB_PREFIX`) and restart<BR>`<value>` = set MQTT status prefix (10 chars max) and restart
Prefix3<a id="Prefix3"></a>|`1` = Reset MQTT telemetry prefix to firmware default (`PUB_PREFIX2`) and restart<BR>`<value>` = set MQTT telemetry prefix (10 chars max) and restart
Publish<a id="Publish"></a>|`<topic> <payload>` = MQTT publish any topic and optional payload
Publish2<a id="Publish2"></a>|`<topic> <payload>` = MQTT publish any topic and optional payload with retain flag
SensorRetain<a id="SensorRetain"></a>|`0` = disable use of sensor MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on message `tele/%topic%/SENSOR`
StateText1<a id="StateText1"></a>|`<value>` = set `OFF` state text (10 chars max)
StateText2<a id="StateText2"></a>|`<value>` = set `ON` state text (10 chars max)
StateText3<a id="StateText3"></a>|`<value>` = set `TOGGLE` state text (10 chars max)
StateText4<a id="StateText4"></a>|`<value>` = set `HOLD` state text (10 chars max)
SwitchRetain<a id="SwitchRetain"></a>|`0` = disable use of MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on switch press
Subscribe<a id="Subscribe"></a>|List all topics currently subscribed<BR>`<eventName>, <mqttTopic> [, <key>]`<BR>The `<key>` parameter is optional. It is specified to parse a key/value pair from a JSON payload in the MQTT message. In order to parse a value from a multi-level JSON pair, you can use one dot (`.`) syntax to split the key into sections.<BR><BR>Subscribes to an MQTT topic and assigns an [`Event`](#event) name to it. You must compile your own binary with `#define SUPPORT_MQTT_EVENT` in your `user_config_override.h` file.<BR><BR>**Examples:**<li>`Subscribe BkLight, stat/%topic%/POWER`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`Rule1 ON Event#BkLight=ON DO <command>ENDON`</li><li>`Subscribe DnTemp, stat/%topic%/SENSOR, DS18B20.Temperature`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;where the MQTT message payload is `{"Time":"2017-02-16T10:13:52", "DS18B20":{"Temperature":20.6}}`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`Rule1 ON Event#DnTemp>=21 DO <command> ENDON`</li>
SwitchTopic<a id="SwitchTopic"></a>|`<value>` = set MQTT switch topic (32 chars max)<BR>`0` = disable use of MQTT switch topic<BR>`1` = set MQTT switch topic to device `%topic%`<BR>`2` = reset MQTT switch topic to firmware default (`MQTT_SWITCH_TOPIC`) _(default = `0`)_<BR>[Read more](Buttons-and-switches) about this
TelePeriod<a id="TelePeriod"></a>|`0` = disable telemetry messages<BR>`1` = reset telemetry period to firmware default (`TELE_PERIOD`)<BR>`10..3600` = set telemetry period in seconds *(default = `300`)*
Topic<a id="Topic"></a>|`1` = reset MQTT topic to firmware default (`MQTT_TOPIC`) and restart<BR>`<value>` = set MQTT topic (32 chars max) **and** `ButtonTopic` and restart
Unsubscribe<a id="Unsubscribe"></a>|Unsubscribe from all topics currently subscribed using the [`Subscribe`](#subscribe) command<BR>`<eventName>` = unsubscribe from a specific MQTT topic<BR><BR>You must compile your own binary with `#define SUPPORT_MQTT_EVENT` in your `user_config_override.h` file.
See also|[`SetOption2`](#setoption2) - Add units to status messages<BR>[`SetOption4`](#setoption4) - Return MQTT response as RESULT or %COMMAND% topic<BR>[`SetOption10`](#setoption10) - Main topic change behaviour
<a id="tb-rules">Command | Parameters
:--- | :---
<a id="Rule"></a>Rule\<x\> |There are 3 separate rule sets, each with a 511 character limit. Each rule set can contain multiple [rules](Rules#rule-syntax). Each of the rule sets can be enabled or disabled individually (x = `1..3`)<BR>`0` = disable Rule\<x\><BR>`1` = enable Rule\<x\><BR>`2` = toggle Rule\<x\><BR>`4` = disable one-shot detection (perform commands as long as trigger is met)<BR>`5` = enable one-shot (e.g., sometimes used for slow changing sensors like temperature) detection<BR>`6` = toggle one-shot detection<BR>`8` = disable stop-on-error after exception restart<BR>`9` = enable stop-on-error after exception restart<BR>`10` = toggle stop-on-error after exception restart<BR>`<value>` = define [Rule\<x\>](Rules)<BR>`+<value>` = append to [Rule\<x\>](Rules)<BR>`""` = clear Rule\<x\>
<a id="RuleTimer"></a>RuleTimer\<x\> | Up to eight timers to be used as countdown event (x = `1..8`)<BR>`0..32766` = set countdown rule timer in seconds
<a id="Mem"></a>Mem\<x\> | Manage up to 5 variables stored on flash (x = `1..5`)<BR>`Mem` returns all current values. `Mem<x>` returns the variable's current value.<BR>`<value>` = store a string value in a variable<BR>`"` = clear stored value in Mem\<x\>
<a id="Var"></a>Var\<x\> | Manage up to 5 variables stored in memory (x = `1..5`)<BR>`Var` returns all current values. `Var<x>` returns the variable's current value.<BR>`<string>` = store a string value in a variable<BR>`"` = clear stored value in Var\<x\>
<a id="Add"></a>Add\<x\>|`<value>` = add value to Var\<x\>
<a id="Sub"></a>Sub\<x\>|`<value>` = subtract value to Var\<x\>
<a id="Mult"></a>Mult\<x\>|`<value>` = multiply value to Var\<x\>
<a id="Scale"></a>Scale\<x\> | Scale value from a low and high limit to another low and high limits and save in Var\<x\><BR>`v` = value: the number to scale<BR>`fl` = fromLow: the lower bound of the values current range<BR>`fh` = fromHigh: the upper bound of the values current range<BR>`tl` = toLow: the lower bound of the values target range<BR>`th` = toHigh: the upper bound of the values target range
<a id="CalcRes"></a>CalcRes|Current calculation resolution<BR>`0..7` = set number of decimal places to be used in `Add`, `Sub`, `Mult` and `Scale`
### [Rules](Rules)
<a id="tb-rules">Command|Parameters
:---|:---
Rule\<x\><a id="Rule"></a>|There are 3 separate rule sets, each with a 511 character limit. Each rule set can contain multiple [rules](Rules#rule-syntax). Each of the rule sets can be enabled or disabled individually (x = `1..3`)<BR>`0` = disable Rule\<x\><BR>`1` = enable Rule\<x\><BR>`2` = toggle Rule\<x\><BR>`4` = disable one-shot detection (perform commands as long as trigger is met)<BR>`5` = enable one-shot (e.g., sometimes used for slow changing sensors like temperature) detection<BR>`6` = toggle one-shot detection<BR>`8` = disable stop-on-error after exception restart<BR>`9` = enable stop-on-error after exception restart<BR>`10` = toggle stop-on-error after exception restart<BR>`<value>` = define [Rule\<x\>](Rules)<BR>`+<value>` = append to [Rule\<x\>](Rules)<BR>`""` = clear Rule\<x\>
RuleTimer\<x\><a id="RuleTimer"></a>|Up to eight timers to be used as countdown event (x = `1..8`)<BR>`0..32766` = set countdown rule timer in seconds
Mem\<x\><a id="Mem"></a>|Manage up to 5 variables stored on flash (x = `1..5`)<BR>`Mem` returns all current values. `Mem<x>` returns the variable's current value.<BR>`<value>` = store a string value in a variable<BR>`"` = clear stored value in Mem\<x\>
Var\<x\><a id="Var"></a>|Manage up to 5 variables stored in memory (x = `1..5`)<BR>`Var` returns all current values. `Var<x>` returns the variable's current value.<BR>`<string>` = store a string value in a variable<BR>`"` = clear stored value in Var\<x\>
Add\<x\><a id="Add"></a>|`<value>` = add value to Var\<x\>
Sub\<x\><a id="Sub"></a>|`<value>` = subtract value to Var\<x\>
Mult\<x\><a id="Mult"></a>|`<value>` = multiply value to Var\<x\>
Scale\<x\><a id="Scale"></a>|Scale value from a low and high limit to another low and high limits and save in Var\<x\><BR>`v` = value: the number to scale<BR>`fl` = fromLow: the lower bound of the values current range<BR>`fh` = fromHigh: the upper bound of the values current range<BR>`tl` = toLow: the lower bound of the values target range<BR>`th` = toHigh: the upper bound of the values target range
CalcRes<a id="CalcRes"></a>|Current calculation resolution<BR>`0..7` = set number of decimal places to be used in `Add`, `Sub`, `Mult` and `Scale`
### Timers
To control a device locally 16 timers are programmable. They can be configured with the Timer\<x\> command following by a JSON payload with optional parameters. For example:
@ -253,81 +253,81 @@ Timer1 {"Arm":1,"Mode":2,"Time":"-2:23","Window":0,"Days":"11TW11S","Repeat":1,"
```
<a id="tb-timers">Command | Parameters
:--- | :---
<a id="Latitude"></a>Latitude|`<value>` = set latitude
<a id="Longitude"></a>Longitude|`<value>` = set longitude
<a id="Timers"></a>Timers | Timers control<BR> `0` = disable all timers<BR>`1` = enable all timers<BR>`2` = toggle all timers<BR>
<a id="Timer"></a>Timer\<x\> | Parameters for Timer\<x\> where x = `1..16`<BR>`0` = clear parameters for Timer\<x\><BR>`1..16` = copy Timer\<y\> parameters to Timer\<x\><BR>`{ "name":value ; .. }` = set all or individual parameters using [JSON payload](#timerJSON) with names and values of data pairs from the [table below](#timerJSON)
<a id="timerJSON"></a>JSON Name | JSON Value
:--- | :---
Arm |`0` = disarm or disable timer<BR>`1` = arm or enable timer
Mode |`0` = use clock time<BR>`1` = Use local sunrise time using `Longitude`, `Latitude` and `Time` offset<BR>`2` = use local sunset time using `Longitude`, `Latitude` and `Time` offset
Time |`hh:mm` = set time in hours `0 .. 23` and minutes `0 .. 59`<BR>`-hh:mm` = set time in offset hours `-11 .. 12` and minutes `0 .. 59` (used with `Mode 1` and `Mode 2`)
Window |`0..15` = add or subtract a random number of minutes to `Time`
Days |`SMTWTFS` = set day of weeks mask where `0` or `-` = OFF and any different character = ON
Repeat |`0` = allow timer only once<BR>`1` = repeat timer execution
Output |`1..16` = select an output to be used if no rule is enabled
Action |`0` = turn output OFF<BR> `1` = turn output ON<BR>`2` = TOGGLE output<BR>`3` = If the Tasmota [Rules](#rules) feature has been activated by compiling the code (activated by default in all pre-compiled Tasmota binaries), a rule with `Clock#Timer=<timer>` will be triggered if written and turned on by the user. If Rules are not compiled, BLINK output using [BlinkCount](#BlinkCount) parameters.
<a id="tb-timers">Command|Parameters
:---|:---
Latitude<a id="Latitude"></a>|`<value>` = set latitude
Longitude<a id="Longitude"></a>|`<value>` = set longitude
Timers<a id="Timers"></a>|Timers control<BR> `0` = disable all timers<BR>`1` = enable all timers<BR>`2` = toggle all timers<BR>
Timer\<x\><a id="Timer"></a>|Parameters for Timer\<x\> where x = `1..16`<BR>`0` = clear parameters for Timer\<x\><BR>`1..16` = copy Timer\<y\> parameters to Timer\<x\><BR>`{ "name":value ; .. }` = set all or individual parameters using [JSON payload](#timerJSON) with names and values of data pairs from the [table below](#timerJSON)
### [Sensor](Sensor-Configuration)
<a id="timerJSON"></a>JSON Name|JSON Value
:---|:---
Arm|`0` = disarm or disable timer<BR>`1` = arm or enable timer
Mode|`0` = use clock time<BR>`1` = Use local sunrise time using `Longitude`, `Latitude` and `Time` offset<BR>`2` = use local sunset time using `Longitude`, `Latitude` and `Time` offset
Time|`hh:mm` = set time in hours `0 .. 23` and minutes `0 .. 59`<BR>`-hh:mm` = set time in offset hours `-11 .. 12` and minutes `0 .. 59` (used with `Mode 1` and `Mode 2`)
Window|`0..15` = add or subtract a random number of minutes to `Time`
Days|`SMTWTFS` = set day of weeks mask where `0` or `-` = OFF and any different character = ON
Repeat|`0` = allow timer only once<BR>`1` = repeat timer execution
Output|`1..16` = select an output to be used if no rule is enabled
Action|`0` = turn output OFF<BR> `1` = turn output ON<BR>`2` = TOGGLE output<BR>`3` = If the Tasmota [Rules](#rules) feature has been activated by compiling the code (activated by default in all pre-compiled Tasmota binaries), a rule with `Clock#Timer=<timer>` will be triggered if written and turned on by the user. If Rules are not compiled, BLINK output using [BlinkCount](#BlinkCount) parameters.
### [Sensor](Sensor-Configuration)
Note: Information on sensors documented below is transmitted in the Tasmota telemetry message
<a id="tb-sensor">Command | Parameters
:--- | :---
<a id="AdcParam"></a>AdcParam|ADC0 analog input parameters for Steinhart-Hart formula NTC (Thermistor) or LDR (Light Dependent Resistor)<BR>`type`, `param1`, `param2`, `param3` = set default parameters based on current ADC0 input type<BR>`type` = `2..3`<BR>NTC: 2, Bridge Resistance, NTC Resistance, Beta Coefficient (e.g., `2,32000,10000,3350`)<BR>LDR: 3, Bridge Resistance, Lux Scalar, Lux Exponent (e.g., `3,10000,12518931,-1.405`)
<a id="Altitude"></a>Altitude|`-30000..30000` - altitude in meters
<a id="AmpRes"></a>AmpRes | Current sensor resolution<BR>`0..3` = maximum number of decimal places
<a id="Counter"></a>Counter\<x\>|`0` = reset Counter\<x\><BR> `1..64900` = preset Counter\<x\><BR>`-1..-64900` = decrease Counter\<x\><BR>`+1..+64900` = increase Counter\<x\><BR>In order to define and use a Counter, _**you must configure one of the free device GPIO as `Counter<x>`**_
<a id="CounterDebounce"></a>CounterDebounce|`0` = turn off counter debounce<BR> `1..3200` = set counter debounce time in msec
<a id="CounterType"></a>CounterType\<x\>|`0` = set Counter\<x\> as pulse Counter<BR>`1` = set Counter\<x\> as pulse Timer
<a id="EnergyRes"></a>EnergyRes | Energy sensor resolution<BR>`0..5` = maximum number of decimal places
<a id="HumRes"></a>HumRes | Humidity sensor resolution<BR>`0..3` = maximum number of decimal places
<a id="PressRes"></a>PressRes | Pressure sensor resolution<BR>`0..3` = maximum number of decimal places
<a id="Sensor13"></a>Sensor13 | [INA219](http://www.ti.com/product/INA219) low voltage current sensor calibration mode<BR>`0` = set INA219 calibration to max 32V and 2A<BR>`1` = set INA219 calibration to max 32V and 1A<BR>`2` = set INA219 calibration to max 16V and 0.4A
<a id="Sensor15"></a>Sensor15 | [Automatic Baseline Correction](https://github.com/arendst/Sonoff-Tasmota/blob/c97ea4d9176eb7e87abff5f963a0f1c60f0a5e52/sonoff/xsns_15_mhz19.ino#L47) for [MH-Z19B](MH-Z19B) CO<sub>2</sub> sensor<BR>`0` = disabled<BR>`1` = enabled *(default)*<BR>`2` = disable and start manual calibration from 400 ppm of CO<sub>2</sub><BR>`9` = reset sensor to factory defaults<BR>`1000` = sets measurement range to 1000ppm CO<sub>2</sub><BR>`2000` = sets measurement range to 2000ppm CO<sub>2</sub><BR>`3000` = sets measurement range to 3000ppm CO<sub>2</sub><BR>`5000` = sets measurement range to 5000ppm CO<sub>2</sub>
<a id="Sensor20"></a>Sensor20 | [Nova Fitness SDS011](Wemos-D1-Mini-and-Nova-Fitness-SDS011-Laser-Dust-Sensor) dust sensor.<BR>`1..255` = change working period in minutes
<a id="Sensor27"></a>Sensor27 | [APDS-9960](APDS-9960) sensor commands<BR>`0` = enable light level and proximity sensor / disable gestures *(default)* <BR> `1` = enable gesture mode/ disable light level and proximity sensor<BR> `2` = enable gestures with half gain / disable light and proximity sensor<BR>`3..255` = Set [ATIME register](APDS-9960#known-issues) for different integration times
<a id="Sensor34"></a>Sensor34 | [HX711 load cell](https://github.com/bogde/HX711) sensor calibration<BR>`1` = reset display to 0<BR>`2` = start calibration<BR>`2 <value>` = set reference weight in grams and start calibration<BR>`3` = show reference weight in grams<BR>`3 <value>` = set reference weight in grams<BR>`4` = show calibrated scale value<BR>`4 <value>` = set calibrated scale value<BR>`5` = show max weight in gram<BR>`5 <value>` = set max weight in grams<BR>`6` = show single item weight in grams<BR>`6 <value>` = set single item weight in grams. Once the item weight is set, when items are added to the scale, the telemetry message will report `Count` as the number of items on the scale.
<a id="Sensor53"></a>Sensor53 | [Smart Meter Interface](Smart-Meter-Interface)<BR>`r` = reset the driver with a new descriptor specified with the Tasmota [Scripting](Scripting-Language) language.<BR>`c<x> <value>` = set the driver to counter mode and preset counter (x = `1..5`) to `value`<BR>`d<x>` = disable data decoding and dump meter (x = `1..5`) data to the Console. This is used to decipher the meter's data format to define the variable encoding in the meter's descriptor.<BR>`d0` = disable data dump mode and revert to decoding mode.
<a id="TempRes"></a>TempRes | Temperature sensor resolution<BR>`0..3` = maximum number of decimal places
<a id="VoltRes"></a>VoltRes | Voltage sensor resolution<BR>`0..3` = maximum number of decimal places
<a id="WattRes"></a>WattRes | Power sensor resolution<BR>`0..3` = maximum number of decimal places
<a id="WeightRes"></a>WeightRes | Load cell sensor resolution<BR>`0..3` = maximum number of decimal places
See also | [`SetOption8`](#SetOption8) - Show temperature in Celsius *(default)* or Fahrenheit<BR>[`SetOption18`](#SetOption18) - Set status of signal light paired with CO<sub>2</sub> sensor<BR>[`SetOption24`](#SetOption24) - Set pressure units
<a id="tb-sensor">Command|Parameters
:---|:---
AdcParam<a id="AdcParam"></a>|ADC0 analog input parameters for Steinhart-Hart formula NTC (Thermistor) or LDR (Light Dependent Resistor)<BR>`type`, `param1`, `param2`, `param3` = set default parameters based on current ADC0 input type<BR>`type` = `2..3`<BR>NTC: 2, Bridge Resistance, NTC Resistance, Beta Coefficient (e.g., `2,32000,10000,3350`)<BR>LDR: 3, Bridge Resistance, Lux Scalar, Lux Exponent (e.g., `3,10000,12518931,-1.405`)
Altitude<a id="Altitude"></a>|`-30000..30000` - altitude in meters
AmpRes<a id="AmpRes"></a>|Current sensor resolution<BR>`0..3` = maximum number of decimal places
Counter\<x\><a id="Counter"></a>|`0` = reset Counter\<x\><BR> `1..64900` = preset Counter\<x\><BR>`-1..-64900` = decrease Counter\<x\><BR>`+1..+64900` = increase Counter\<x\><BR>In order to define and use a Counter, _**you must configure one of the free device GPIO as `Counter<x>`**_
CounterDebounce<a id="CounterDebounce"></a>|`0` = turn off counter debounce<BR> `1..3200` = set counter debounce time in msec
CounterType\<x\><a id="CounterType"></a>|`0` = set Counter\<x\> as pulse Counter<BR>`1` = set Counter\<x\> as pulse Timer
EnergyRes<a id="EnergyRes"></a>|Energy sensor resolution<BR>`0..5` = maximum number of decimal places
HumRes<a id="HumRes"></a>|Humidity sensor resolution<BR>`0..3` = maximum number of decimal places
PressRes<a id="PressRes"></a>|Pressure sensor resolution<BR>`0..3` = maximum number of decimal places
Sensor13<a id="Sensor13"></a>|[INA219](http://www.ti.com/product/INA219) low voltage current sensor calibration mode<BR>`0` = set INA219 calibration to max 32V and 2A<BR>`1` = set INA219 calibration to max 32V and 1A<BR>`2` = set INA219 calibration to max 16V and 0.4A
Sensor15<a id="Sensor15"></a>|[Automatic Baseline Correction](https://github.com/arendst/Sonoff-Tasmota/blob/c97ea4d9176eb7e87abff5f963a0f1c60f0a5e52/sonoff/xsns_15_mhz19.ino#L47) for [MH-Z19B](MH-Z19B) CO<sub>2</sub> sensor<BR>`0` = disabled<BR>`1` = enabled *(default)*<BR>`2` = disable and start manual calibration from 400 ppm of CO<sub>2</sub><BR>`9` = reset sensor to factory defaults<BR>`1000` = sets measurement range to 1000ppm CO<sub>2</sub><BR>`2000` = sets measurement range to 2000ppm CO<sub>2</sub><BR>`3000` = sets measurement range to 3000ppm CO<sub>2</sub><BR>`5000` = sets measurement range to 5000ppm CO<sub>2</sub>
Sensor20<a id="Sensor20"></a>|[Nova Fitness SDS011](Wemos-D1-Mini-and-Nova-Fitness-SDS011-Laser-Dust-Sensor) dust sensor.<BR>`1..255` = change working period in minutes
Sensor27<a id="Sensor27"></a>|[APDS-9960](APDS-9960) sensor commands<BR>`0` = enable light level and proximity sensor / disable gestures *(default)* <BR> `1` = enable gesture mode/ disable light level and proximity sensor<BR> `2` = enable gestures with half gain / disable light and proximity sensor<BR>`3..255` = Set [ATIME register](APDS-9960#known-issues) for different integration times
Sensor34<a id="Sensor34"></a>|[HX711 load cell](https://github.com/bogde/HX711) sensor calibration<BR>`1` = reset display to 0<BR>`2` = start calibration<BR>`2 <value>` = set reference weight in grams and start calibration<BR>`3` = show reference weight in grams<BR>`3 <value>` = set reference weight in grams<BR>`4` = show calibrated scale value<BR>`4 <value>` = set calibrated scale value<BR>`5` = show max weight in gram<BR>`5 <value>` = set max weight in grams<BR>`6` = show single item weight in grams<BR>`6 <value>` = set single item weight in grams. Once the item weight is set, when items are added to the scale, the telemetry message will report `Count` as the number of items on the scale.
Sensor53<a id="Sensor53"></a>|[Smart Meter Interface](Smart-Meter-Interface)<BR>`r` = reset the driver with a new descriptor specified with the Tasmota [Scripting](Scripting-Language) language.<BR>`c<x> <value>` = set the driver to counter mode and preset counter (x = `1..5`) to `value`<BR>`d<x>` = disable data decoding and dump meter (x = `1..5`) data to the Console. This is used to decipher the meter's data format to define the variable encoding in the meter's descriptor.<BR>`d0` = disable data dump mode and revert to decoding mode.
TempRes<a id="TempRes"></a>|Temperature sensor resolution<BR>`0..3` = maximum number of decimal places
VoltRes<a id="VoltRes"></a>|Voltage sensor resolution<BR>`0..3` = maximum number of decimal places
WattRes<a id="WattRes"></a>|Power sensor resolution<BR>`0..3` = maximum number of decimal places
WeightRes<a id="WeightRes"></a>|Load cell sensor resolution<BR>`0..3` = maximum number of decimal places
See also|[`SetOption8`](#SetOption8) - Show temperature in Celsius *(default)* or Fahrenheit<BR>[`SetOption18`](#SetOption18) - Set status of signal light paired with CO<sub>2</sub> sensor<BR>[`SetOption24`](#SetOption24) - Set pressure units
### [Power Monitoring](Power-Monitoring-Calibration)
### [Power Monitoring](Power-Monitoring-Calibration)
<a id="tb-powermon">Command | Parameters
:--- | :---
<a id="AmpRes"></a>AmpRes |Current sensor resolution<BR>`0..3` = maximum number of decimal places
<a id="CurrentHigh"></a>CurrentHigh|`0` = disable current high threshold *(default)*<BR>`<value>` = set current high threshold value in miliamps
<a id="CurrentLow"></a>CurrentLow|`0` = disable current low threshold *(default)*<BR>`<value>` = set current low threshold value in miliamps
<a id="CurrentSet"></a>CurrentSet|`<value>` = [calibrate](power-monitoring-calibration) current to target value in mA
<a id="EnergyRes"></a>EnergyRes | Energy sensor resolution<BR>`0..5` = maximum number of decimal places
<a id="EnergyReset"></a>EnergyReset | Show Energy Total, Yesterday and Today
<a id="EnergyReset1"></a>EnergyReset1|`0..42500` = ((p)re)set Energy Today in Wh
<a id="EnergyReset2"></a>EnergyReset2|`0..42500` = ((p)re)set Energy Yesterday in Wh
<a id="EnergyReset3"></a>EnergyReset3|`0..42500000` = ((p)re)set Energy Total in Wh
<a id="FreqRes"></a>FreqRes | Frequency sensor resolution<BR>`0..3` = maximum number of decimal places
<a id="FrequencySet"></a>FrequencySet|`<value>` = [calibrate](power-monitoring-calibration) frequency to a target value in Hz
<a id="MaxPower"></a>MaxPower|`0` - disable use maximum power monitoring<BR>`<value>` = set maximum allowed power in W
<a id="MaxPowerHold"></a>MaxPowerHold|`1` = set default time to 10 seconds to stay over MaxPower before power off<BR>`<value>` = set time in seconds to stay over MaxPower before power off
<a id="MaxPowerWindow"></a>MaxPowerWindow|`1` = set default time to 30 seconds to stay power off before re-applying power up to 5 times<BR>`<value>` = set time in seconds to stay power off before re-applying power up to 5 times
<a id="PowerDelta"></a>PowerDelta|`0` = disable reporting on power change<BR>`<value>` = set reporting on percentage power change to send an MQTT telemetry message
<a id="PowerHigh"></a>PowerHigh|`0` = disable power high threshold *(default)*<BR>`<value>` = set power high threshold value in W to send an MQTT telemetry message
<a id="PowerLow"></a>PowerLow|`0` = disable power low threshold *(default)*<BR>`<value>` = set power low threshold value in W to send an MQTT telemetry message
<a id="PowerSet"></a>PowerSet|`<value>` = [calibrate](power-monitoring-calibration) power to a target value in W
<a id="Status"></a>Status|`8` = show power usage<BR>`9` = show power thresholds
<a id="VoltageHigh"></a>VoltageHigh|`0` = disable voltage high threshold *(default)*<BR>`<value>` = set voltage high threshold value in V
<a id="VoltageLow"></a>VoltageLow|`0` = disable voltage low threshold *(default)*<BR>`<value>` = set voltage low threshold value in V
<a id="VoltageSet"></a>VoltageSet|`<value>` = [calibrate](power-monitoring-calibration) voltage to a target value in V
<a id="VoltRes"></a>VoltRes | Voltage sensor resolution<BR>`0..3` = maximum number of decimal places
<a id="WattRes"></a>WattRes | Power sensor resolution<BR>`0..3` = maximum number of decimal places
See Also | [`SetOption21`](#SetOption21) - Energy monitoring when power is off<BR>[`SetOption33`](#SetOption33) - Configure power monitoring Max_Power_Retry count number<BR>
<a id="tb-powermon">Command|Parameters
:---|:---
AmpRes<a id="AmpRes"></a>|Current sensor resolution<BR>`0..3` = maximum number of decimal places
CurrentHigh<a id="CurrentHigh"></a>|`0` = disable current high threshold *(default)*<BR>`<value>` = set current high threshold value in milliamps
CurrentLow<a id="CurrentLow"></a>|`0` = disable current low threshold *(default)*<BR>`<value>` = set current low threshold value in milliamps
CurrentSet<a id="CurrentSet"></a>|`<value>` = [calibrate](power-monitoring-calibration) current to target value in mA
EnergyRes<a id="EnergyRes"></a>|Energy sensor resolution<BR>`0..5` = maximum number of decimal places
EnergyReset<a id="EnergyReset"></a>|Show Energy Total, Yesterday and Today
EnergyReset1<a id="EnergyReset1"></a>|`0..42500` = ((p)re)set Energy Today in Wh
EnergyReset2<a id="EnergyReset2"></a>|`0..42500` = ((p)re)set Energy Yesterday in Wh
EnergyReset3<a id="EnergyReset3"></a>|`0..42500000` = ((p)re)set Energy Total in Wh
FreqRes<a id="FreqRes"></a>|Frequency sensor resolution<BR>`0..3` = maximum number of decimal places
FrequencySet<a id="FrequencySet"></a>|`<value>` = [calibrate](power-monitoring-calibration) frequency to a target value in Hz
MaxPower<a id="MaxPower"></a>|`0` - disable use maximum power monitoring<BR>`<value>` = set maximum allowed power in W
MaxPowerHold<a id="MaxPowerHold"></a>|`1` = set default time to 10 seconds to stay over MaxPower before power off<BR>`<value>` = set time in seconds to stay over MaxPower before power off
MaxPowerWindow<a id="MaxPowerWindow"></a>|`1` = set default time to 30 seconds to stay power off before re-applying power up to 5 times<BR>`<value>` = set time in seconds to stay power off before re-applying power up to 5 times
PowerDelta<a id="PowerDelta"></a>|`0` = disable reporting on power change<BR>`<value>` = set reporting on percentage power change to send an MQTT telemetry message
PowerHigh<a id="PowerHigh"></a>|`0` = disable power high threshold *(default)*<BR>`<value>` = set power high threshold value in W to send an MQTT telemetry message
PowerLow<a id="PowerLow"></a>|`0` = disable power low threshold *(default)*<BR>`<value>` = set power low threshold value in W to send an MQTT telemetry message
PowerSet<a id="PowerSet"></a>|`<value>` = [calibrate](power-monitoring-calibration) power to a target value in W
Status<a id="Status"></a>|`8` = show power usage<BR>`9` = show power thresholds
VoltageHigh<a id="VoltageHigh"></a>|`0` = disable voltage high threshold *(default)*<BR>`<value>` = set voltage high threshold value in V
VoltageLow<a id="VoltageLow"></a>|`0` = disable voltage low threshold *(default)*<BR>`<value>` = set voltage low threshold value in V
VoltageSet<a id="VoltageSet"></a>|`<value>` = [calibrate](power-monitoring-calibration) voltage to a target value in V
VoltRes<a id="VoltRes"></a>|Voltage sensor resolution<BR>`0..3` = maximum number of decimal places
WattRes<a id="WattRes"></a>|Power sensor resolution<BR>`0..3` = maximum number of decimal places
See Also|[`SetOption21`](#SetOption21) - Energy monitoring when power is off<BR>[`SetOption33`](#SetOption33) - Configure power monitoring Max_Power_Retry count number<BR>
### [Light](Lights)
<!---
@ -335,126 +335,127 @@ See Also | [`SetOption21`](#SetOption21) - Energy monitoring when power is off
-->
<a id="tb-lights">Command | Parameters
:--- | :---
<a id="Channel"></a>Channel\<x\>|`0..100` = set PWM channel dimmer value from 0 to 100%<BR>When [`SetOption68`](#setoption68) is set to `1`, numbering of channels is Relays first then PWM channels. [`Channel<x>`](#channel) will be aligned to [`Power<x>`](#power) numbering.<BR>&nbsp;&nbsp;**Example**: 2 Relays and 3 PWM<BR><ul><li>Relay1: `Power1`</li><li>Relay2: `Power2`</li><li>PWM1: `Power3` and `Channel3`</li><li>PWM2: `Power4` and `Channel4`</li><li>PWM3: `Power5` and `Channel5`</li></ul>
<a id="Color"></a>Color | Show color setting (hex or decimal depending on [`SetOption17`](#SetOption17))<BR> `r,g,b` = set color by decimal value (`0..255`)<BR>`#CWWW` = set hex color value for CT lights <BR>`#RRGGBB` = set hex color value for RGB lights<BR>`#RRGGBBWW` = set hex color value for RGBW lights<BR>`#RRGGBBCWWW` = set hex color value for RGBCCT lights (5 PWM channels)<BR><BR>[**White Blend Mode:**](white-blend-mode) _used for 4 channel (RGBW) and 5 channel (RGBWC) devices_. Enable with [`RGBWWTable`](#rgbwwtable) by setting the last PWM channel to zero (e.g., `RGBWWTable 255,255,255,<n>,0`) to lower the white channel intensity.
| | Set color to<BR>`1` = red<BR>`2` = green<BR>`3` = blue<BR>`4` = orange<BR>`5` = light green<BR>`6` = light blue<BR>`7` = amber<BR>`8` = cyan<BR>`9` = purple<BR>`10` = yellow<BR>`11` = pink<BR>`12` = white (using RGB channels)<BR>`+` = next color<BR>`-` = previous color
<a id="Color2"></a>Color2 | Same as `Color` but adjust to current `Dimmer` value
<a id="Color3"></a>Color3|`#RRGGBB` = set seconds clock hand hex color value *(only in `Scheme 5`)*
<a id="Color4"></a>Color4|`#RRGGBB` = set minutes clock hand hex color value *(only in `Scheme 5`)*
<a id="Color5"></a>Color5|`#RRGGBB` = set hour clock hand hex color value *(only in `Scheme 5`)*
<a id="Color6"></a>Color6|`#RRGGBB` = set clock hour marker hex color value *(only in `Scheme 5`)*
<a id="CT"></a>CT|`153..500` = set color temperature from 153 (cold) to 500 (warm) for CT lights<BR>`+` = increase CT value by 10<BR>`-` = decrease CT value by 10
<a id="Dimmer"></a>Dimmer|`0..100` = set dimmer value from 0 to 100%<BR>`+` = increase by 10<BR>`-` = decrease by 10
<a id="Fade"></a>Fade|`0` = do not use fade *(default)* <BR>`1` = use fade
<a id="HsbColor"></a>HsbColor|`<hue>,<sat>,<bri>` = set color by hue, saturation and brightness
<a id="HsbColor1"></a>HsbColor1|`0..360` = set hue
<a id="HsbColor2"></a>HsbColor2|`0..100` = set saturation
<a id="HsbColor3"></a>HsbColor3|`0..100` = set brightness
<a id="Led"></a>Led\<x\>|`#RRGGBB` = set Led\<x\> hex color value where `<x>` is the pixel number *(aplies only to addressable LEDs)*
<a id="LedTable"></a>LedTable|`0` = do not use [LED gamma correction](https://learn.adafruit.com/led-tricks-gamma-correction?view=all) *(default prior to 6.5.0.9)*<BR>`1` = use gamma correction *(default)*
<a id="Pixels"></a>Pixels|`1..512` = set amount of pixels in strip or ring and reset [`Rotation`](#rotation) *(applies only to addressable LEDs)*
<a id="RGBWWTable"></a>RGBWWTable `PWM1,PWM2,PWM3,PWM4,PWM5`|`0..255` PWM channel range. `255` is full range, any lower number will reduce the range of the channel. *Default: all channels use full intensity*.<BR><BR>Used to adjust the power of each LED in case some LEDs are brighter than others. This kind of adjustment is normally not required.<BR><BR>_Note: range adjustment is computed **after** Gamma correction._<BR><BR>Example: `RGBWWTable 64,64,64,64,64` limit maximum power to 25% for all channels.
<a id="Rotation"></a>Rotation|`<value>` = set amount of pixels to rotate (up to `Pixels` value) *(applies only to addressable LEDs)*
<a id="Scheme"></a>Scheme | Light effects<BR>`+` = next scheme<BR>`-` = previous scheme<BR>`0` = single color for LED light *(default)*<BR>`1` = start wake up sequence (same as [`Wakeup`](#wakeup))<BR>`2` = cycle up through colors using Speed option<BR>`3` = cycle down through colors using Speed option<BR>`4` = random cycle through colors using Speed and Fade
| | **The following schemes are usable only with addressable LEDs, e.g. WS281X, Neopixel**<BR>`5` = clock mode ([example](https://hackaday.io/project/28194-esp-and-ws2812-based-clock))<BR>`6` = candlelight pattern<BR>`7` = RGB pattern<BR>`8` = Christmas pattern<BR>`9` = Hannukah pattern<BR>`10` = Kwanzaa pattern<BR>`11` = rainbow pattern<BR>`12` = fire pattern
<a id="Speed"></a>Speed|`1..20` = set fade speed from fast `1` to very slow `20`<BR>`+` = increase speed<BR>`-` = decrease speed
<a id="Wakeup"></a>Wakeup | Start wake up sequence from OFF to stored `Dimmer` value<BR>`0..100` = Start wake up sequence from OFF to provided `Dimmer` value
<a id="WakeupDuration"></a>WakeupDuration|`1..3600` = set wake up duration in seconds
<a id="White"></a>White|`1..100` = set white channel brightness in single white channel lights (single W or RGBW lights)
<a id="Width1"></a>Width1|`0..4` = set LED group width *(only in `Scheme 6 - 12`)*
<a id="Width2"></a>Width2|`0..32` = set width of the seconds clock hand *(only in `Scheme 5`)*
<a id="Width3"></a>Width3|`0..32` = set width of the minutes clock hand *(only in `Scheme 5`)*
<a id="Width4"></a>Width4|`0..32` = set width of the hour clock hand *(only in `Scheme 5`)*
See also | [`SetOption15`](#SetOption15) - Set PWM control<BR>[`SetOption16`](#SetOption16) - Reverse Clock Scheme direction<BR>[`SetOption17`](#SetOption17) - Show [`Color`](#Color) string as hex or decimal<BR>[`SetOption20`](#SetOption20) - Update of Dimmer/Color/CT without turning power on<BR>[`SetOption37`](#SetOption37) - Color remapping for led channels<BR>[`SetOption68`](#Setoption68) - PWM Channel control
<a id="tb-lights">Command|Parameters
:---|:---
Channel\<x\><a id="Channel"></a>|`0..100` = set PWM channel dimmer value from 0 to 100%<BR>When [`SetOption68`](#setoption68) is set to `1`, numbering of channels is Relays first then PWM channels. [`Channel<x>`](#channel) will be aligned to [`Power<x>`](#power) numbering.<BR>&nbsp;&nbsp;**Example**: 2 Relays and 3 PWM<BR><ul><li>Relay1: `Power1`</li><li>Relay2: `Power2`</li><li>PWM1: `Power3` and `Channel3`</li><li>PWM2: `Power4` and `Channel4`</li><li>PWM3: `Power5` and `Channel5`</li></ul>
Color<a id="Color"></a>|Show color setting (hex or decimal depending on [`SetOption17`](#SetOption17))<BR> `r,g,b` = set color by decimal value (`0..255`)<BR>`#CWWW` = set hex color value for CT lights <BR>`#RRGGBB` = set hex color value for RGB lights<BR>`#RRGGBBWW` = set hex color value for RGBW lights<BR>`#RRGGBBCWWW` = set hex color value for RGBCCT lights (5 PWM channels)<BR><BR>[**White Blend Mode:**](white-blend-mode) _used for 4 channel (RGBW) and 5 channel (RGBWC) devices_. Enable with [`RGBWWTable`](#rgbwwtable) by setting the last PWM channel to zero (e.g., `RGBWWTable 255,255,255,<n>,0`) to lower the white channel intensity.
||Set color to<BR>`1` = red<BR>`2` = green<BR>`3` = blue<BR>`4` = orange<BR>`5` = light green<BR>`6` = light blue<BR>`7` = amber<BR>`8` = cyan<BR>`9` = purple<BR>`10` = yellow<BR>`11` = pink<BR>`12` = white (using RGB channels)<BR>`+` = next color<BR>`-` = previous color
Color2<a id="Color2"></a>|Same as `Color` but adjust to current `Dimmer` value
Color3<a id="Color3"></a>|`#RRGGBB` = set seconds clock hand hex color value *(only in `Scheme 5`)*
Color4<a id="Color4"></a>|`#RRGGBB` = set minutes clock hand hex color value *(only in `Scheme 5`)*
Color5<a id="Color5"></a>|`#RRGGBB` = set hour clock hand hex color value *(only in `Scheme 5`)*
Color6<a id="Color6"></a>|`#RRGGBB` = set clock hour marker hex color value *(only in `Scheme 5`)*
CT<a id="CT"></a>|`153..500` = set color temperature from 153 (cold) to 500 (warm) for CT lights<BR>`+` = increase CT value by 10<BR>`-` = decrease CT value by 10
Dimmer<a id="Dimmer"></a>|`0..100` = set dimmer value from 0 to 100%<BR>`+` = increase by 10<BR>`-` = decrease by 10
Fade<a id="Fade"></a>|`0` = do not use fade *(default)* <BR>`1` = use fade
HsbColor<a id="HsbColor"></a>|`<hue>,<sat>,<bri>` = set color by hue, saturation and brightness
HsbColor1<a id="HsbColor1"></a>|`0..360` = set hue
HsbColor2<a id="HsbColor2"></a>|`0..100` = set saturation
HsbColor3<a id="HsbColor3"></a>|`0..100` = set brightness
Led\<x\><a id="Led"></a>|`#RRGGBB` = set Led\<x\> hex color value where `<x>` is the pixel number *(aplies only to addressable LEDs)*
LedTable<a id="LedTable"></a>|`0` = do not use [LED gamma correction](https://learn.adafruit.com/led-tricks-gamma-correction?view=all) *(default prior to 6.5.0.9)*<BR>`1` = use gamma correction *(default)*
Pixels<a id="Pixels"></a>|`1..512` = set amount of pixels in strip or ring and reset [`Rotation`](#rotation) *(applies only to addressable LEDs)*
RGBWWTable `PWM1,PWM2,PWM3,PWM4,PWM5`<a id="RGBWWTable"></a>|`0..255` PWM channel range. `255` is full range, any lower number will reduce the range of the channel. *Default: all channels use full intensity*.<BR><BR>Used to adjust the power of each LED in case some LEDs are brighter than others. This kind of adjustment is normally not required.<BR><BR>_Note: range adjustment is computed **after** Gamma correction._<BR><BR>Example: `RGBWWTable 64,64,64,64,64` limit maximum power to 25% for all channels.
Rotation<a id="Rotation"></a>|`<value>` = set amount of pixels to rotate (up to `Pixels` value) *(applies only to addressable LEDs)*
Scheme<a id="Scheme"></a>|Light effects<BR>`+` = next scheme<BR>`-` = previous scheme<BR>`0` = single color for LED light *(default)*<BR>`1` = start wake up sequence (same as [`Wakeup`](#wakeup))<BR>`2` = cycle up through colors using Speed option<BR>`3` = cycle down through colors using Speed option<BR>`4` = random cycle through colors using Speed and Fade
||**The following schemes are usable only with addressable LEDs, e.g. WS281X, Neopixel**<BR>`5` = clock mode ([example](https://hackaday.io/project/28194-esp-and-ws2812-based-clock))<BR>`6` = candlelight pattern<BR>`7` = RGB pattern<BR>`8` = Christmas pattern<BR>`9` = Hannukah pattern<BR>`10` = Kwanzaa pattern<BR>`11` = rainbow pattern<BR>`12` = fire pattern
Speed<a id="Speed"></a>|`1..20` = set fade speed from fast `1` to very slow `20`<BR>`+` = increase speed<BR>`-` = decrease speed
Wakeup<a id="Wakeup"></a>|Start wake up sequence from OFF to stored `Dimmer` value<BR>`0..100` = Start wake up sequence from OFF to provided `Dimmer` value
WakeupDuration<a id="WakeupDuration"></a>|`1..3600` = set wake up duration in seconds
White<a id="White"></a>|`1..100` = set white channel brightness in single white channel lights (single W or RGBW lights)
Width1<a id="Width1"></a>|`0..4` = set LED group width *(only in `Scheme 6 - 12`)*
Width2<a id="Width2"></a>|`0..32` = set width of the seconds clock hand *(only in `Scheme 5`)*
Width3<a id="Width3"></a>|`0..32` = set width of the minutes clock hand *(only in `Scheme 5`)*
Width4<a id="Width4"></a>|`0..32` = set width of the hour clock hand *(only in `Scheme 5`)*
See also|[`SetOption15`](#SetOption15) - Set PWM control<BR>[`SetOption16`](#SetOption16) - Reverse Clock Scheme direction<BR>[`SetOption17`](#SetOption17) - Show [`Color`](#Color) string as hex or decimal<BR>[`SetOption20`](#SetOption20) - Update of Dimmer/Color/CT without turning power on<BR>[`SetOption37`](#SetOption37) - Color remapping for led channels<BR>[`SetOption68`](#Setoption68) - PWM Channel control
### [Sonoff RF Bridge](Sonoff-RF-Bridge-433)
<a id="tb-rfbridge">Command | Parameters
:--- | :---
<a id="RfCode"></a>RfCode |Show last sent 24-bit user code<BR>`1..8388607` = send 24-bit user code<BR>`#1..#7FFFFF` = send 24-bit hexadecimal user code using RfSync, RfLow and RfHigh timing
<a id="RfHigh"></a>RfHigh|`1` = reset high pulse time to 840 microseconds<BR>`2..32767` = set high pulse time in microseconds<BR>`#2..#7FFF` = set high pulse time in hexadecimal microseconds
<a id="RfHost"></a>RfHost | Show 16-bit host part of user code<BR>`1` = reset 16-bit host part of user code to 11802 (#2E1A)<BR>`2..32767` = set 16-bit host part of user code<BR>`#2..7FFF` = set 16-bit host part of user code in hexadecimal
<a id="RfKey"></a>RfKey\<x\> | Send learned or default RF data for RfKey\<x\> (x = `1 16`)<BR>`1` = send default RF data for RfKey\<x\> using RfSync, RfLow, RfHigh and RfHost parameters<BR>`2` = learn RF data for RfKey\<x\><BR>`3` = unlearn RF data for RfKey\<x\><BR>`4` = save RF data using RfSync, RfLow, RfHigh and last RfCode parameters<BR>`5` = show default or learned RF data
<a id="RfLow"></a>RfLow|`1` = reset low pulse time to 270 microseconds<BR>`2..32767` = set low pulse time in microseconds<BR>`#2..#7FFF` = set low pulse time in hexadecimal microseconds
<a id="RfRaw"></a>RfRaw | **This command only works when the firmware has been updated with [Portisch firmware](https://github.com/Portisch/RF-Bridge-EFM8BB1/releases).** Refer to the [Portisch wiki](https://github.com/Portisch/RF-Bridge-EFM8BB1/wiki) for details.<BR>`0` = Set iTead default firmware support and messages *(default on restart)*<BR> `1` = set Portisch firmware support and messages<BR> `166` or `AAA655` = start sniffing/reading RF signals disabling iTead default RF handling<BR> `167` or `AAA755` = stop sniffing/reading RF signals enabling iTead default RF handling<BR> `168` or `AAA855` = transmitting iTead default RF protocols<BR> `169` or `AAA955` = start sniffing and learning predefined protocols<BR> `176` or `AAB055` = bucket Transmitting using command 0xB0<BR> `177` or `AAB155` = start Bucket sniffing using command 0xB1<BR> `192` or `AAC000C055` = beep (`00C0` is the length of the sound)<BR> `255` or `AAFF55` = show Rf firmware version<BR> `<value>` = hexadecimal data to be sent to RF chip
<a id="RfSync"></a>RfSync|`1` = reset start sync pulse time to 8470 microseconds<BR>`2..32767` = set start sync pulse time in microseconds<BR>`#2..#7FFF` = set start sync pulse time in hexadecimal microseconds
See also | [`SetOption28`](#SetOption28) - Set RF received data format
<a id="tb-rfbridge">Command|Parameters
:---|:---
RfCode<a id="RfCode"></a>|Show last sent 24-bit user code<BR>`1..8388607` = send 24-bit user code<BR>`#1..#7FFFFF` = send 24-bit hexadecimal user code using RfSync, RfLow and RfHigh timing
RfHigh<a id="RfHigh"></a>|`1` = reset high pulse time to 840 microseconds<BR>`2..32767` = set high pulse time in microseconds<BR>`#2..#7FFF` = set high pulse time in hexadecimal microseconds
RfHost<a id="RfHost"></a>|Show 16-bit host part of user code<BR>`1` = reset 16-bit host part of user code to 11802 (#2E1A)<BR>`2..32767` = set 16-bit host part of user code<BR>`#2..7FFF` = set 16-bit host part of user code in hexadecimal
RfKey\<x\><a id="RfKey"></a>|Send learned or default RF data for RfKey\<x\> (x = `1 16`)<BR>`1` = send default RF data for RfKey\<x\> using RfSync, RfLow, RfHigh and RfHost parameters<BR>`2` = learn RF data for RfKey\<x\><BR>`3` = unlearn RF data for RfKey\<x\><BR>`4` = save RF data using RfSync, RfLow, RfHigh and last RfCode parameters<BR>`5` = show default or learned RF data
RfLow<a id="RfLow"></a>|`1` = reset low pulse time to 270 microseconds<BR>`2..32767` = set low pulse time in microseconds<BR>`#2..#7FFF` = set low pulse time in hexadecimal microseconds
RfRaw<a id="RfRaw"></a>|**This command only works when the firmware has been updated with [Portisch firmware](https://github.com/Portisch/RF-Bridge-EFM8BB1/releases).** Refer to the [Portisch wiki](https://github.com/Portisch/RF-Bridge-EFM8BB1/wiki) for details.<BR>`0` = Set iTead default firmware support and messages *(default on restart)*<BR> `1` = set Portisch firmware support and messages<BR> `166` or `AAA655` = start sniffing/reading RF signals disabling iTead default RF handling<BR> `167` or `AAA755` = stop sniffing/reading RF signals enabling iTead default RF handling<BR> `168` or `AAA855` = transmitting iTead default RF protocols<BR> `169` or `AAA955` = start sniffing and learning predefined protocols<BR> `176` or `AAB055` = bucket Transmitting using command 0xB0<BR> `177` or `AAB155` = start Bucket sniffing using command 0xB1<BR> `192` or `AAC000C055` = beep (`00C0` is the length of the sound)<BR> `255` or `AAFF55` = show Rf firmware version<BR> `<value>` = hexadecimal data to be sent to RF chip
RfSync<a id="RfSync"></a>|`1` = reset start sync pulse time to 8470 microseconds<BR>`2..32767` = set start sync pulse time in microseconds<BR>`#2..#7FFF` = set start sync pulse time in hexadecimal microseconds
See also|[`SetOption28`](#SetOption28) - Set RF received data format
### IRremote
See [Linux Infrared Remote Control (LIRC)](http://www.lirc.org/) for more information. Edit the [`IRremoteESP8266.h`](../tree/development/lib/) header in the `IRremoteESP8266-x.x.x/src` folder to disable (i.e., set to `false`) any unneeded/unwanted protocols and compile your own firmware. Every protocol included consumes program memory and increases the time to decode the IR signal. The air conditioner protocols are the most expensive memory-wise.
<a id="tb-irremote">Command | Parameters
:--- | :---
<a id="IRsend"></a>IRsend`<x>` |Send an IR remote control code as a decimal or hexadecimal string in a JSON payload. In order to send IR data, _**you must configure one of the free device GPIO as `IRsend (8)`. GPIO01 nor GPIO03 can be used.**_<BR>`<x>` [_optional_] = number of times the IR message is sent. If not specified or `0..1`, the message is sent only once (i.e., not repeated) _(default)_<BR>`>1` = emulate a long-press on the remote control, sending the message `<x>` times, or sending a repeat message for specific protocols (like NEC)<BR><BR>`{"Protocol":"<value>","Bits":<value>,"Data":<value>}`<BR><BR>`"Protocol"` (select one of the following):<ul><li>`"NEC"`</li><li>`"SONY"`</li><li>`"RC5"`</li><li>`"RC6"`</li><li>`"DISH"`</li><li>`"JVC"`</li><li>`"PANASONIC"`</li><li>`"SAMSUNG"`</li><li>`"PIONEER"`</li></ul>`"Bits":1..32` = required number of data bits<BR>&nbsp;&nbsp;&nbsp;&nbsp;for PANASONIC protocol this parameter is the the address, not the number of bits<BR><BR>`"Data":1..(2^32)-1` = data frame as 32 bit decimal.<BR>&nbsp;&nbsp;&nbsp;&nbsp;e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":2170978686}`<BR>**or**<BR>`"Data":0x1..0xFFFFFFFF` = data frame as 32 bit hexadecimal.<BR>&nbsp;&nbsp;&nbsp;&nbsp;e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":0x8166817E}`<BR><BR>Alternatively, you can send IR remote control codes using [RAW command encoding](IRSend-RAW-Encoding).<BR><BR>Information on [Receiving Infrared Data](Receiving-Infrared-Remote-Control-Data)
<a id="IRhvac"></a>IRhvac | Send HVAC IR remote control code as JSON payload<Br>`{"Vendor":"<value>","Power":<value>,"Mode":”<value>”, "FanSpeed":”<value>”,"Temp":<value>}`<BR>`"Vendor":"Toshiba"\|"Mitsubishi"\|"LG"\|"Fujitsu"`<BR>`"Power":0\|1`<BR>`"Mode":"Hot"\|"Cold"\|"Dry"\|"Auto"`<BR>`"FanSpeed":"1"\|"2"\|"3"\|"4"\|"5"\|"Auto"\|"Silence"` <BR>`"Temp":17..30`
| See also | [`SetOption29`](#SetOption29) - Set IR received data format<BR>[`SetOption38`](#SetOption38) - Set IR received protocol sensitivity<BR>[`SetOption58`](#SetOption58) - [IR Raw data in JSON payload](https://github.com/arendst/Sonoff-Tasmota/issues/2116#issuecomment-440716483)
<a id="tb-irremote">Command|Parameters
:---|:---
IRsend`<x>`<a id="IRsend"></a>|Send an IR remote control code as a decimal or hexadecimal string in a JSON payload. In order to send IR data, _**you must configure one of the free device GPIO as `IRsend (8)`. GPIO01 nor GPIO03 can be used.**_<BR>`<x>` [_optional_] = number of times the IR message is sent. If not specified or `0..1`, the message is sent only once (i.e., not repeated) _(default)_<BR>`>1` = emulate a long-press on the remote control, sending the message `<x>` times, or sending a repeat message for specific protocols (like NEC)<BR><BR>`{"Protocol":"<value>","Bits":<value>,"Data":<value>}`<BR><BR>`"Protocol"` (select one of the following):<ul><li>`"NEC"`</li><li>`"SONY"`</li><li>`"RC5"`</li><li>`"RC6"`</li><li>`"DISH"`</li><li>`"JVC"`</li><li>`"PANASONIC"`</li><li>`"SAMSUNG"`</li><li>`"PIONEER"`</li></ul>`"Bits":1..32` = required number of data bits<BR>&nbsp;&nbsp;&nbsp;&nbsp;for PANASONIC protocol this parameter is the the address, not the number of bits<BR><BR>`"Data":1..(2^32)-1` = data frame as 32 bit decimal.<BR>&nbsp;&nbsp;&nbsp;&nbsp;e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":2170978686}`<BR>**or**<BR>`"Data":0x1..0xFFFFFFFF` = data frame as 32 bit hexadecimal.<BR>&nbsp;&nbsp;&nbsp;&nbsp;e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":0x8166817E}`<BR><BR>Alternatively, you can send IR remote control codes using [RAW command encoding](IRSend-RAW-Encoding).<BR><BR>Information on [Receiving Infrared Data](Receiving-Infrared-Remote-Control-Data)
IRhvac<a id="IRhvac"></a>|Send HVAC IR remote control code as JSON payload<Br>`{"Vendor":"<value>","Power":<value>,"Mode":”<value>”, "FanSpeed":”<value>”,"Temp":<value>}`<BR>`"Vendor":"Toshiba"\|"Mitsubishi"\|"LG"\|"Fujitsu"`<BR>`"Power":0\|1`<BR>`"Mode":"Hot"\|"Cold"\|"Dry"\|"Auto"`<BR>`"FanSpeed":"1"\|"2"\|"3"\|"4"\|"5"\|"Auto"\|"Silence"` <BR>`"Temp":17..30`
|See also|[`SetOption29`](#SetOption29) - Set IR received data format<BR>[`SetOption38`](#SetOption38) - Set IR received protocol sensitivity<BR>[`SetOption58`](#SetOption58) - [IR Raw data in JSON payload](https://github.com/arendst/Sonoff-Tasmota/issues/2116#issuecomment-440716483)
### SetOption overview
<a id="tb-setoption">Command | Parameters
:---: | :---
<a id="SetOption0"></a>SetOption0|Save power state and use after restart (=SaveState)<BR> `0` = disable<BR> `1` = enable *(default)*
<a id="SetOption1"></a>SetOption1|Set [button multipress](Control-other-devices) mode to<BR> `0` = allow all button actions *(default)*<BR> `1` = restrict to single, double and hold actions (i.e., disable inadvertent reset due to long press)
<a id="SetOption2"></a>SetOption2|Add units to status messages<BR>`0` = disabled *(default)*<BR> `1` = enabled
<a id="SetOption3"></a>SetOption3|[MQTT](mqtt) <BR>`0` = disable MQTT<BR> `1` = enable MQTT *(default)*
<a id="SetOption4"></a>SetOption4|Return MQTT response as<BR> `0` = RESULT topic *(default)*<BR> `1` = %COMMAND% topic
<a id="SetOption8"></a>SetOption8|Show temperature in<BR> `0`= Celsius *(default)*<BR> `1` = Fahrenheit
<a id="SetOption10"></a>SetOption10|When the device MQTT topic changes <BR> `0` = remove retained message on old topic LWT *(default)*<BR> `1` = send "Offline" to old topic LWT
<a id="SetOption11"></a>SetOption11|Swap button single and double press [functionality](Control-other-devices#double-press--hold)<BR> `0` = disabled *(default)*<BR> `1` = enabled
<a id="SetOption12"></a>SetOption12|Configuration saving to flash option<BR>`0` = allow dynamic flash save slot rotation *(default)*<BR>`1` = use fixed eeprom flash slot
<a id="SetOption13"></a>SetOption13|Allow immediate action on single button press<BR>`0` = single, multi-press and hold button actions *(default)*<BR> `1` = only single press action for immediate response (i.e., disable multipress detection). Disable by holding for 4 x button hold time (see [`SetOption32`](#setoption32)).
<a id="SetOption15"></a>SetOption15|Set PWM control for LED lights<BR>`0` = basic PWM control<BR>`1` = control with [`Color`](#Color) or [`Dimmer`](#Dimmer) commands
<a id="SetOption16"></a>SetOption16|Set addressable LED Clock scheme parameter<BR> `0` = clock-wise mode *(default)*<BR> `1` = counter-clock-wise mode
<a id="SetOption17"></a>SetOption17|Show [`Color`](#Color) string as<BR> `0` = hex string *(default)*<BR> `1` = comma-separated decimal string
<a id="SetOption18"></a>SetOption18|Set status of signal light paired with [CO<sub>2</sub> sensor](#sensor14)<BR> `0` = disable light *(default)*<BR>`1` = enable light
<a id="SetOption19"></a>SetOption19|[Home Assistant](Home-Assistant) automatic discovery.<BR>***WARNING*** On version 6.4.1.x enabling may cause a watchdog reset if used on a device with a configured sensor <BR> `0` = disabled *(default)*<BR> `1` = enabled and also sets [`SetOption59`](#setoption59)`= 1`<BR>If you enable and then disable `SetOption19`, doing so does not set [`SetOption59`](#setoption59)`= 0` and does not revert to default `%prefix%/%topic%/` [`FullTopic`](#fulltopic)
<a id="SetOption20"></a>SetOption20|Update of Dimmer/Color/CT without turning power on<BR>`0` = disabled *(default)*<BR>`1` = enabled
<a id="SetOption21"></a>SetOption21|Energy monitoring when power is off<BR>`0` = disabled *(default)*<BR>`1` = enabled
<a id="SetOption24"></a>SetOption24|Set pressure units in<BR> `0` = hPa *(default)*<BR> `1` = mmHg
<a id="SetOption26"></a>SetOption26|Use indexes even when only one relay is present<BR> `0` = messages use POWER *(default)*<BR> `1` = messages use POWER1
<a id="SetOption28"></a>SetOption28|RF received data format<BR> `0` = hex *(default)*<BR> `1` = decimal
<a id="SetOption29"></a>SetOption29|IR received data format<BR> `0` = hex *(default)*<BR> `1` = decimal
<a id="SetOption30"></a>SetOption30|Enforce Home Assistant auto-discovery as light<BR> `0` = relays are announced as a switch and PWM as a light *(default)*<BR> `1` = both relays and PWM are announced as light
<a id="SetOption31"></a>SetOption31|Disable status LED blinking during Wi-Fi and MQTT connection problems.[`LedPower`](#LedPower) must be set to `0` for this feature to work.<BR>`0` = LED blinking enabled *(default)*<BR> `1` = LED blinking disabled
<a id="SetOption32"></a>SetOption32|Number of 0.1 seconds to hold button before sending `HOLD` action message.<BR> `1..100` to set button hold time *(default =`40`)*. This option also affects the time required to perform a firmware defaults reset (10x `HOLD` action time)
<a id="SetOption33"></a>SetOption33|Max power limit can be exceeded by number of seconds before the relay is turned off<BR> `1..250` = set number of seconds *(default = `5`)*
<a id="SetOption34"></a>SetOption34|**Unused from v6.6.0.10. Use [TuyaMCU](#TuyaMCU) command.**<BR>Set [Tuya dimmer device id](https://github.com/arendst/Sonoff-Tasmota/pull/4095). Use [SetOption66](#setoption66) to set the appropriate dimmer range.<BR> `0..255` = device id
<a id="SetOption36"></a>SetOption36|Boot loop defaults restoration control.<BR>`0` = disable boot loop control<BR> `1..200` = set number of boot loops (a restart caused by any exception or watchdog timer within less than `BOOT_LOOP_TIME` (default 10 seconds) before beginning to restore settings *(default = `1`)*. Once this number is reached, subsequent restarts will:<ul><li>1<sup>st</sup> restart: disable ESP8285 generic GPIOs interfering with flash SPI</li><li>2<sup>nd</sup> restart: disable rules causing boot loop</li><li>3<sup>rd</sup> restart: disable all rules</li><li>4<sup>th</sup> restart: reset user defined GPIOs to disable any attached peripherals</li><li>5<sup>th</sup> restart: reset module to Sonoff Basic (1)</li></ul>
<a id="SetOption37"></a>SetOption37|Color remapping for led channels, also provides an option for allowing independent handling of RGB and white channels.<BR>`0` = disabled<br>`1..119` = according to [this table](SetOption37---Color-channel-mapping)<br>`120..127` = invalid (results in same as `0`)<br>`128..255` = same as `0..127` but with independent channel handling enabled
<a id="SetOption38"></a>SetOption38|`6..255 ` = set IRReceive protocol detection sensitivity minimizing UNKNOWN protocols
<a id="SetOption39"></a>SetOption39|Control handling of invalid power measurements. Power monitoring chips like the HLW8032 (Blitzwolf SHP5) and CSE7766 (Sonoff S31, Sonoff POW R2) occasionally report invalid power measurements for load values below 5W. In these cases, it sometimes reports a valid load.<BR>`0` = reset to default on next restart.<BR>`1..255` = number of invalid power readings before reporting that there is no load *(default = `128`)*. For example, to discard all loads below 6W, set to `1`. Tasmota will report no load if the power draw is below 6W.
<a id="SetOption40"></a>SetOption40|Stop detecting any input change on the button GPIO.<BR>`0..250` = button hold time in 0.1 seconds *(default = `1`)* after which button functionality is disabled.<BR><BR>This setting is only active when [`SetOption1 1`](#setoption1) AND [`SetOption13 0`](#setoption13) are set. **This disables all long press functionality**.<BR><BR>Example: `Backlog SetOption1 1; SetOption13 0; SetOption40 10` - discard any button press over 1 second<BR><BR>Newer [Sonoff T1](Sonoff-T1) light switches appear to activate the GPIO intermittently for over many seconds without a user touching the button (i.e., [ghost switching](../issues/5449)).
<a id="SetOption41"></a>SetOption41|**Unused from v6.6.0.10. Use [TuyaMCU](#TuyaMCU) command.**<BR>`0..8` = set the number of relays for the Tuya Dimmer (54) module. *(default = `0`)*
<a id="SetOption42"></a>SetOption42|`0..255` = set over-temperature (Celsius only) threshold resulting in power off on all energy monitoring devices *(default = `90`)*
<a id="SetOption43"></a>SetOption43|`0..255` = set Tuya dimmer maximum value as explained [here](https://github.com/arendst/Sonoff-Tasmota/wiki/Tuya-Dimmer-and-Tuya-Switches-(based-on-serial-MCU))<BR>After Tasmota v6.6.0.7 this is used over [SetOption66](#SetOption66)
<a id="SetOption44"></a>SetOption44|**Unused from v6.6.0.10. Use [TuyaMCU](#TuyaMCU) command.**<BR>`0..255` = set Tuya serial voltage function id as explained [here](https://github.com/arendst/Sonoff-Tasmota/wiki/Tuya-Dimmer-and-Tuya-Switches-(based-on-serial-MCU))
<a id="SetOption45"></a>SetOption45|**Unused from v6.6.0.10. Use [TuyaMCU](#TuyaMCU) command.**<BR>`0..255` = set Tuya serial current function id as explained [here](https://github.com/arendst/Sonoff-Tasmota/wiki/Tuya-Dimmer-and-Tuya-Switches-(based-on-serial-MCU))
<a id="SetOption46"></a>SetOption46|**Unused from v6.6.0.10. Use [TuyaMCU](#TuyaMCU) command.**<BR>`0..255` = set Tuya serial power function id as explained [here](https://github.com/arendst/Sonoff-Tasmota/wiki/Tuya-Dimmer-and-Tuya-Switches-(based-on-serial-MCU))
<a id="SetOption51"></a>SetOption51|View extra pins for ESP8285 in Module Config<BR>**WARNING** Do not use on ESP8266 devices!!!<BR>`0` = disable *(default)*<BR> `1` = enable
<a id="SetOption52"></a>SetOption52|Control display of optional time offset from UTC in JSON payloads<BR>`0` = disable *(default)*<BR> `1` = enable
<a id="SetOption53"></a>SetOption53|Display hostname and IP address in GUI<BR>`0` = disable *(default)*<BR> `1` = enable
<a id="SetOption54"></a>SetOption54|Apply [`SetOption20`](#SetOption20) settings to commands from Tuya device<BR>`0` = disable *(default)*<BR> `1` = enable
<a id="SetOption55"></a>SetOption55|mDNS service<BR>`0` = disable *(default)* <BR> `1` = enable
<a id="SetOption56"></a>SetOption56|Wi-Fi network scan to select strongest signal on restart (network has to be visible)<BR>`0` = disable *(default)*<BR> `1` = enable
<a id="SetOption57"></a>SetOption57|Wi-Fi network re-scan every 44 minutes with alternate to +10dB stronger signal if detected (only visible networks)<BR>`0` = disable *(default)*<BR> `1` = enable
<a id="SetOption58"></a>SetOption58|[IR Raw data in JSON payload](https://github.com/arendst/Sonoff-Tasmota/issues/2116#issuecomment-440716483)<BR>`0` = disable *(default)*<BR> `1` = enable
<a id="SetOption59"></a>SetOption59|Send `tele/%topic%/STATE` in addition to `stat/%topic%/RESULT` for commands: [`State`](#State), [`Power`](#Power) and any command causing a light to be turned on.<BR>`0` = disable *(default)*<BR> `1` = enable
<a id="SetOption60"></a>SetOption60|Enable normal sleep instead of [dynamic sleep](Dynamic%20Sleep)<BR> `0` = dynamic sleep *(default)*<BR> `1` = sleep
<a id="SetOption61"></a>SetOption61|Force [local operation](https://github.com/arendst/Sonoff-Tasmota/pull/4562#issuecomment-446230001) when [`ButtonTopic`](#ButtonTopic) or [`SwitchTopic`](#SwitchTopic) is set.<BR>`0` = disable *(default)*<BR> `1` = enable
<a id="SetOption62"></a>SetOption62|`0` = disable *(default)*<BR> `1` = don't use retain flag on `HOLD` messages
<a id="SetOption63"></a>SetOption63|`0` = Scan relay power feedback state at restart *(default)*<BR> `1` = Disable relay power feedback state scanning at restart
<a id="SetOption64"></a>SetOption64|`0` = sensor name index separator is "-" (hyphen) *(default)*<BR> `1` = sensor name index separator is "_" (underscore)<br>*Affects sensor names in tele messages*
<a id="SetOption65"></a>SetOption65|**Unused from v6.6.0.10. Use [TuyaMCU](#TuyaMCU) command.**<BR>`0` = enable Tuya Serial dimmer *(default)*<BR>`1` = disable Tuya Serial dimmer and behave as switch.
<a id="SetOption66"></a>SetOption66|Unused after v6.6.0.7 use [SetOption43](#SetOption43) instead.<BR>`0` = Tuya dimmer range range 1 - 100 *(default)*<BR>`1` = Tuya dimmer range 1 - 255
<a id="SetOption67"></a>SetOption67|`0` = disable Sonoff iFan03 buzzer<BR>`1` = enable Sonoff iFan03 buzzer *(default)*
<a id="SetOption68"></a>SetOption68|`0` = Treat [PWM](#pwm) as a single light *(default)*<BR>`1` = Treat [PWM](#pwm) as separate channels. In this mode, use [`Power<x>`](#power) to turn lights on and off, and [`Channel<x>`](#channel) to change the value of each channel.<BR>[`Color`](#color) still works to set all channels at once.<BR>Note: a change will trigger a restart.
<a id="SetOption69"></a>SetOption69|`0` = Disable Tuya Dimmer 10% lower limit<BR>`1` = Enable Tuya Dimmer 10% lower limit *(default)*<BR>By default Tuya dimmers won't dim below 10% because some don't function very well when dimmed below 10%.
<a id="tb-setoption">Command|Parameters
:---:|:---
SetOption0<a id="SetOption0"></a>|Save power state and use after restart (=SaveState)<BR> `0` = disable<BR> `1` = enable *(default)*
SetOption1<a id="SetOption1"></a>|Set [button multipress](Control-other-devices) mode to<BR> `0` = allow all button actions *(default)*<BR> `1` = restrict to single, double and hold actions (i.e., disable inadvertent reset due to long press)
SetOption2<a id="SetOption2"></a>|Add units to status messages<BR>`0` = disabled *(default)*<BR> `1` = enabled
SetOption3<a id="SetOption3"></a>|[MQTT](mqtt) <BR>`0` = disable MQTT<BR> `1` = enable MQTT *(default)*
SetOption4<a id="SetOption4"></a>|Return MQTT response as<BR> `0` = RESULT topic *(default)*<BR> `1` = %COMMAND% topic
SetOption8<a id="SetOption8"></a>|Show temperature in<BR> `0`= Celsius *(default)*<BR> `1` = Fahrenheit
SetOption10<a id="SetOption10"></a>|When the device MQTT topic changes <BR> `0` = remove retained message on old topic LWT *(default)*<BR> `1` = send "Offline" to old topic LWT
SetOption11<a id="SetOption11"></a>|Swap button single and double press [functionality](Control-other-devices#double-press--hold)<BR> `0` = disabled *(default)*<BR> `1` = enabled
SetOption12<a id="SetOption12"></a>|Configuration saving to flash option<BR>`0` = allow dynamic flash save slot rotation *(default)*<BR>`1` = use fixed eeprom flash slot
SetOption13<a id="SetOption13"></a>|Allow immediate action on single button press<BR>`0` = single, multi-press and hold button actions *(default)*<BR> `1` = only single press action for immediate response (i.e., disable multipress detection). Disable by holding for 4 x button hold time (see [`SetOption32`](#setoption32)).
SetOption15<a id="SetOption15"></a>|Set PWM control for LED lights<BR>`0` = basic PWM control<BR>`1` = control with [`Color`](#Color) or [`Dimmer`](#Dimmer) commands
SetOption16<a id="SetOption16"></a>|Set addressable LED Clock scheme parameter<BR> `0` = clock-wise mode *(default)*<BR> `1` = counter-clock-wise mode
SetOption17<a id="SetOption17"></a>|Show [`Color`](#Color) string as<BR> `0` = hex string *(default)*<BR> `1` = comma-separated decimal string
SetOption18<a id="SetOption18"></a>|Set status of signal light paired with [CO<sub>2</sub> sensor](#sensor14)<BR> `0` = disable light *(default)*<BR>`1` = enable light
SetOption19<a id="SetOption19"></a>|[Home Assistant](Home-Assistant) automatic discovery.<BR>***WARNING*** On version 6.4.1.x enabling may cause a watchdog reset if used on a device with a configured sensor <BR> `0` = disabled *(default)*<BR> `1` = enabled and also sets [`SetOption59`](#setoption59)`= 1`<BR>If you enable and then disable `SetOption19`, doing so does not set [`SetOption59`](#setoption59)`= 0` and does not revert to default `%prefix%/%topic%/` [`FullTopic`](#fulltopic)
SetOption20<a id="SetOption20"></a>|Update of Dimmer/Color/CT without turning power on<BR>`0` = disabled *(default)*<BR>`1` = enabled
SetOption21<a id="SetOption21"></a>|Energy monitoring when power is off<BR>`0` = disabled *(default)*<BR>`1` = enabled
SetOption24<a id="SetOption24"></a>|Set pressure units in<BR> `0` = hPa *(default)*<BR> `1` = mmHg
SetOption26<a id="SetOption26"></a>|Use indexes even when only one relay is present<BR> `0` = messages use POWER *(default)*<BR> `1` = messages use POWER1
SetOption28<a id="SetOption28"></a>|RF received data format<BR> `0` = hex *(default)*<BR> `1` = decimal
SetOption29<a id="SetOption29"></a>|IR received data format<BR> `0` = hex *(default)*<BR> `1` = decimal
SetOption30<a id="SetOption30"></a>|Enforce Home Assistant auto-discovery as light<BR> `0` = relays are announced as a switch and PWM as a light *(default)*<BR> `1` = both relays and PWM are announced as light
SetOption31<a id="SetOption31"></a>|Disable status LED blinking during Wi-Fi and MQTT connection problems.[`LedPower`](#LedPower) must be set to `0` for this feature to work.<BR>`0` = LED blinking enabled *(default)*<BR> `1` = LED blinking disabled
SetOption32<a id="SetOption32"></a>|Number of 0.1 seconds to hold button before sending `HOLD` action message.<BR> `1..100` to set button hold time *(default =`40`)*. This option also affects the time required to perform a firmware defaults reset (10x `HOLD` action time)
SetOption33<a id="SetOption33"></a>|Max power limit can be exceeded by number of seconds before the relay is turned off<BR> `1..250` = set number of seconds *(default = `5`)*
SetOption34<a id="SetOption34"></a>|**Unused from v6.6.0.10. Use [TuyaMCU](#TuyaMCU) command.**<BR>Set [Tuya dimmer device id](https://github.com/arendst/Sonoff-Tasmota/pull/4095). Use [SetOption66](#setoption66) to set the appropriate dimmer range.<BR> `0..255` = device id
SetOption36<a id="SetOption36"></a>|Boot loop defaults restoration control.<BR>`0` = disable boot loop control<BR> `1..200` = set number of boot loops (a restart caused by any exception or watchdog timer within less than `BOOT_LOOP_TIME` (default 10 seconds) before beginning to restore settings *(default = `1`)*. Once this number is reached, subsequent restarts will:<ul><li>1<sup>st</sup> restart: disable ESP8285 generic GPIOs interfering with flash SPI</li><li>2<sup>nd</sup> restart: disable rules causing boot loop</li><li>3<sup>rd</sup> restart: disable all rules</li><li>4<sup>th</sup> restart: reset user defined GPIOs to disable any attached peripherals</li><li>5<sup>th</sup> restart: reset module to Sonoff Basic (1)</li></ul>
SetOption37<a id="SetOption37"></a>|Color remapping for led channels, also provides an option for allowing independent handling of RGB and white channels.<BR>`0` = disabled<br>`1..119` = according to [this table](SetOption37---Color-channel-mapping)<br>`120..127` = invalid (results in same as `0`)<br>`128..255` = same as `0..127` but with independent channel handling enabled
SetOption38<a id="SetOption38"></a>|`6..255 ` = set IRReceive protocol detection sensitivity minimizing UNKNOWN protocols
SetOption39<a id="SetOption39"></a>|Control handling of invalid power measurements. Power monitoring chips like the HLW8032 (Blitzwolf SHP5) and CSE7766 (Sonoff S31, Sonoff POW R2) occasionally report invalid power measurements for load values below 5W. In these cases, it sometimes reports a valid load.<BR>`0` = reset to default on next restart.<BR>`1..255` = number of invalid power readings before reporting that there is no load *(default = `128`)*. For example, to discard all loads below 6W, set to `1`. Tasmota will report no load if the power draw is below 6W.
SetOption40<a id="SetOption40"></a>|Stop detecting any input change on the button GPIO.<BR>`0..250` = button hold time in 0.1 seconds *(default = `1`)* after which button functionality is disabled.<BR><BR>This setting is only active when [`SetOption1 1`](#setoption1) AND [`SetOption13 0`](#setoption13) are set. **This disables all long press functionality**.<BR><BR>Example: `Backlog SetOption1 1; SetOption13 0; SetOption40 10` - discard any button press over 1 second<BR><BR>Newer [Sonoff T1](Sonoff-T1) light switches appear to activate the GPIO intermittently for over many seconds without a user touching the button (i.e., [ghost switching](../issues/5449)).
SetOption41<a id="SetOption41"></a>|**Unused from v6.6.0.10. Use [TuyaMCU](#TuyaMCU) command.**<BR>`0..8` = set the number of relays for the Tuya Dimmer (54) module. *(default = `0`)*
SetOption42<a id="SetOption42"></a>|`0..255` = set over-temperature (Celsius only) threshold resulting in power off on all energy monitoring devices *(default = `90`)*
SetOption43<a id="SetOption43"></a>|`0..255` = set Tuya dimmer maximum value as explained [here](https://github.com/arendst/Sonoff-Tasmota/wiki/Tuya-Dimmer-and-Tuya-Switches-(based-on-serial-MCU))<BR>After Tasmota v6.6.0.7 this is used over [SetOption66](#SetOption66)
SetOption44<a id="SetOption44"></a>|**Unused from v6.6.0.10. Use [TuyaMCU](#TuyaMCU) command.**<BR>`0..255` = set Tuya serial voltage function id as explained [here](https://github.com/arendst/Sonoff-Tasmota/wiki/Tuya-Dimmer-and-Tuya-Switches-(based-on-serial-MCU))
SetOption45<a id="SetOption45"></a>|**Unused from v6.6.0.10. Use [TuyaMCU](#TuyaMCU) command.**<BR>`0..255` = set Tuya serial current function id as explained [here](https://github.com/arendst/Sonoff-Tasmota/wiki/Tuya-Dimmer-and-Tuya-Switches-(based-on-serial-MCU))
SetOption46<a id="SetOption46"></a>|**Unused from v6.6.0.10. Use [TuyaMCU](#TuyaMCU) command.**<BR>`0..255` = set Tuya serial power function id as explained [here](https://github.com/arendst/Sonoff-Tasmota/wiki/Tuya-Dimmer-and-Tuya-Switches-(based-on-serial-MCU))
SetOption51<a id="SetOption51"></a>|View extra pins for ESP8285 in Module Config<BR>**WARNING** Do not use on ESP8266 devices!!!<BR>`0` = disable *(default)*<BR> `1` = enable
SetOption52<a id="SetOption52"></a>|Control display of optional time offset from UTC in JSON payloads<BR>`0` = disable *(default)*<BR> `1` = enable
SetOption53<a id="SetOption53"></a>|Display hostname and IP address in GUI<BR>`0` = disable *(default)*<BR> `1` = enable
SetOption54<a id="SetOption54"></a>|Apply [`SetOption20`](#SetOption20) settings to commands from Tuya device<BR>`0` = disable *(default)*<BR> `1` = enable
SetOption55<a id="SetOption55"></a>|mDNS service<BR>`0` = disable *(default)* <BR> `1` = enable
SetOption56<a id="SetOption56"></a>|Wi-Fi network scan to select strongest signal on restart (network has to be visible)<BR>`0` = disable *(default)*<BR> `1` = enable
SetOption57<a id="SetOption57"></a>|Wi-Fi network re-scan every 44 minutes with alternate to +10dB stronger signal if detected (only visible networks)<BR>`0` = disable *(default)*<BR> `1` = enable
SetOption58<a id="SetOption58"></a>|[IR Raw data in JSON payload](https://github.com/arendst/Sonoff-Tasmota/issues/2116#issuecomment-440716483)<BR>`0` = disable *(default)*<BR> `1` = enable
SetOption59<a id="SetOption59"></a>|Send `tele/%topic%/STATE` in addition to `stat/%topic%/RESULT` for commands: [`State`](#State), [`Power`](#Power) and any command causing a light to be turned on.<BR>`0` = disable *(default)*<BR> `1` = enable
SetOption60<a id="SetOption60"></a>|Enable normal sleep instead of [dynamic sleep](Dynamic%20Sleep)<BR> `0` = dynamic sleep *(default)*<BR> `1` = sleep
SetOption61<a id="SetOption61"></a>|Force [local operation](https://github.com/arendst/Sonoff-Tasmota/pull/4562#issuecomment-446230001) when [`ButtonTopic`](#ButtonTopic) or [`SwitchTopic`](#SwitchTopic) is set.<BR>`0` = disable *(default)*<BR> `1` = enable
SetOption62<a id="SetOption62"></a>|`0` = disable *(default)*<BR> `1` = don't use retain flag on `HOLD` messages
SetOption63<a id="SetOption63"></a>|`0` = Scan relay power feedback state at restart *(default)*<BR> `1` = Disable relay power feedback state scanning at restart
SetOption64<a id="SetOption64"></a>|`0` = sensor name index separator is "-" (hyphen) *(default)*<BR> `1` = sensor name index separator is "_" (underscore)<br>*Affects sensor names in tele messages*
SetOption65<a id="SetOption65"></a>|**Unused from v6.6.0.10. Use [TuyaMCU](#TuyaMCU) command.**<BR>`0` = enable Tuya Serial dimmer *(default)*<BR>`1` = disable Tuya Serial dimmer and behave as switch.
SetOption66<a id="SetOption66"></a>|Unused after v6.6.0.7 use [SetOption43](#SetOption43) instead.<BR>`0` = Tuya dimmer range range 1 - 100 *(default)*<BR>`1` = Tuya dimmer range 1 - 255
SetOption67<a id="SetOption67"></a>|`0` = disable Sonoff iFan03 buzzer<BR>`1` = enable Sonoff iFan03 buzzer *(default)*
SetOption68<a id="SetOption68"></a>|`0` = Treat [PWM](#pwm) as a single light *(default)*<BR>`1` = Treat [PWM](#pwm) as separate channels. In this mode, use [`Power<x>`](#power) to turn lights on and off, and [`Channel<x>`](#channel) to change the value of each channel.<BR>[`Color`](#color) still works to set all channels at once.<BR>Note: a change will trigger a restart.
SetOption69<a id="SetOption69"></a>|`0` = Disable Tuya Dimmer 10% lower limit<BR>`1` = Enable Tuya Dimmer 10% lower limit *(default)*<BR>By default Tuya dimmers won't dim below 10% because some don't function very well when dimmed below 10%.
### Serial Bridge
Both Hardware and Software Serial Bridge are supported.
@ -464,101 +465,101 @@ Information received by Tasmota over the serial bridge is captured automatically
Expect possible communication errors when additional sensors are configured.
<a id="tb-serial">Command | Parameters
:--- | :---
<a id="Baudrate"></a>Baudrate|`1` = set hardware serial bridge to default baud rate of 115200 bps<BR>`<value>` = set baud rate. The set rate will be a multiple of 300. The maximum baud rate possible is 19,660,500.
<a id="SBaudrate"></a>SBaudrate|`1` = set software serial bridge to default baud rate of 9600 bps<BR>`<value>` = set baud rate. The set rate will be a multiple of 300. The maximum baud rate possible is 19,660,500.
<a id="SerialDelimiter"></a>SerialDelimiter|`<value>` = set serial delimiter to [escape character code](https://en.wikipedia.org/wiki/Escape_character#ASCII_escape_character) or ASCII character<a> </a>`1..127` = set serial delimiter to [decimal ASCII](http://www.asciichart.com/)<BR>`128` = only allow ASCII characters 32 to 127 in response text<BR>`129..255` = disable serial delimiter
<a id="SerialSend"></a>SerialSend|`<value>` = disable serial logging and send text to serial port ending with `\n`
<a id="SerialSend2"></a>SerialSend2|`<value>` = disable serial logging and send text to serial port
<a id="SerialSend3"></a>SerialSend3|`<value>` = disable serial logging, replace escape characters and send text to serial port
<a id="SerialSend4"></a>SerialSend4|`<value>` = disable serial logging and send binary data to serial port. Data in serial response messages is encoded as hex strings.
<a id="SerialSend5"></a>SerialSend5|`<value>` = disable serial logging and send hex text to serial port. Data in serial response messages is encoded as hex strings.
<a id="SSerialSend"></a>SSerialSend|`<value>` = send text to software serial port ending with `\n`
<a id="SSerialSend2"></a>SSerialSend2|`<value>` = send text to software serial port
<a id="SSerialSend3"></a>SSerialSend3|`<value>` = replace escape characters and send text to software serial port
<a id="SSerialSend4"></a>SSerialSend4|`<value>` = send binary data to software serial port. Data in serial response messages is encoded as hex strings.
<a id="SSerialSend5"></a>SSerialSend5|`<value>` = send hex text to software serial port. Data in serial response messages is encoded as hex strings.
<a id="tb-serial">Command|Parameters
:---|:---
Baudrate<a id="Baudrate"></a>|`1` = set hardware serial bridge to default baud rate of 115200 bps<BR>`<value>` = set baud rate. The set rate will be a multiple of 300. The maximum baud rate possible is 19,660,500.
SBaudrate<a id="SBaudrate"></a>|`1` = set software serial bridge to default baud rate of 9600 bps<BR>`<value>` = set baud rate. The set rate will be a multiple of 300. The maximum baud rate possible is 19,660,500.
SerialDelimiter<a id="SerialDelimiter"></a>|`<value>` = set serial delimiter to [escape character code](https://en.wikipedia.org/wiki/Escape_character#ASCII_escape_character) or ASCII character<a> </a>`1..127` = set serial delimiter to [decimal ASCII](http://www.asciichart.com/)<BR>`128` = only allow ASCII characters 32 to 127 in response text<BR>`129..255` = disable serial delimiter
SerialSend<a id="SerialSend"></a>|`<value>` = disable serial logging and send text to serial port ending with `\n`
SerialSend2<a id="SerialSend2"></a>|`<value>` = disable serial logging and send text to serial port
SerialSend3<a id="SerialSend3"></a>|`<value>` = disable serial logging, replace escape characters and send text to serial port
SerialSend4<a id="SerialSend4"></a>|`<value>` = disable serial logging and send binary data to serial port. Data in serial response messages is encoded as hex strings.
SerialSend5<a id="SerialSend5"></a>|`<value>` = disable serial logging and send hex text to serial port. Data in serial response messages is encoded as hex strings.
SSerialSend<a id="SSerialSend"></a>|`<value>` = send text to software serial port ending with `\n`
SSerialSend2<a id="SSerialSend2"></a>|`<value>` = send text to software serial port
SSerialSend3<a id="SSerialSend3"></a>|`<value>` = replace escape characters and send text to software serial port
SSerialSend4<a id="SSerialSend4"></a>|`<value>` = send binary data to software serial port. Data in serial response messages is encoded as hex strings.
SSerialSend5<a id="SSerialSend5"></a>|`<value>` = send hex text to software serial port. Data in serial response messages is encoded as hex strings.
### MP3 Player
The MP3 Player driver is based on the one from DFRobot. They named it [DFPlayer mini](https://www.dfrobot.com/wiki/index.php/DFPlayer_Mini_SKU:DFR0299). All MP3 Players with the identical Serial Control Command structure can be used.
<a id="tb-mp3">Command | Parameters
:--- | :---
<a id="MP3DAC"></a>MP3DAC|`0` = DAC on *(default)*<BR>`1` = DAC off
<a id="MP3Device"></a>MP3Device | Specify playback device<BR>`1` = USB<BR>`2` = SD Card *(default (also defaults on reset or power cycle))*
<a id="MP3EQ"></a>MP3EQ | Set equalizer mode:<BR>`0` = normal<BR>`1` = pop<BR>`2` = rock<BR>`3` = jazz<BR>`4` = classic<BR>`5` = bass)
<a id="MP3Pause"></a>MP3Pause | Pause
<a id="MP3Play"></a>MP3Play | Play, works as a normal play on a real MP3 Player, starts at first mp3 file
<a id="MP3Reset"></a>MP3Reset | Reset the mp3 player to defaults
<a id="MP3Stop"></a>MP3Stop | Stop
<a id="MP3Track"></a>MP3Track|`x` = play track \<x\>
<a id="MP3Volume"></a>MP3Volume|`0..100` = set Volume
<a id="tb-mp3">Command|Parameters
:---|:---
MP3DAC<a id="MP3DAC"></a>|`0` = DAC on *(default)*<BR>`1` = DAC off
MP3Device<a id="MP3Device"></a>|Specify playback device<BR>`1` = USB<BR>`2` = SD Card *(default (also defaults on reset or power cycle))*
MP3EQ<a id="MP3EQ"></a>|Set equalizer mode:<BR>`0` = normal<BR>`1` = pop<BR>`2` = rock<BR>`3` = jazz<BR>`4` = classic<BR>`5` = bass)
MP3Pause<a id="MP3Pause"></a>|Pause
MP3Play<a id="MP3Play"></a>|Play, works as a normal play on a real MP3 Player, starts at first mp3 file
MP3Reset<a id="MP3Reset"></a>|Reset the mp3 player to defaults
MP3Stop<a id="MP3Stop"></a>|Stop
MP3Track<a id="MP3Track"></a>|`x` = play track \<x\>
MP3Volume<a id="MP3Volume"></a>|`0..100` = set Volume
### [Domoticz](Domoticz)
<a id="tb-domoticz">Command | Parameters
:--- | :---
<a id="DomoticzIdx"></a>DomoticzIdx\<x\> |Show Domoticz Relay idx \<x\> (x = `1..4`)<BR>`0` = disable use of Relay idx \<x\> *(default)*<BR>`<value>` = Show Relay idx \<x\>
<a id="DomoticzKeyIdx"></a>DomoticzKeyIdx\<x\> | Show Domoticz Key idx \<x\> (x = `1..4`)<BR>`0` = disable use of Key idx \<x\> *(default)*<BR>`<value>` = Show Key idx \<x\> (to use enable [ButtonTopic](#buttontopic))
<a id="DomoticzSensorIdx"></a>DomoticzSensorIdx\<x\> | Show Domoticz Sensor idx \<x\> (x = `1..5`)<BR>`0` = disable use of Sensor idx \<x\> *(default)*<BR>`<value>` = Show Sensor idx \<x\>
<a id="DomoticzSwitchIdx"></a>DomoticzSwitchIdx\<x\> | Show Domoticz Switch idx \<x\> (x = `1..4`)<BR>`0` = disable use of Switch idx \<x\> *(default)*<BR>`<value>` = Show Switch idx \<x\> (to use enable [SwitchTopic](#switchtopic))
<a id="DomoticzUpdateTimer"></a>DomoticzUpdateTimer | Show current update timer value in seconds<BR>`0` = disable sending interim Domoticz status *(default)*<BR>`1..3600` = send status to Domoticz in defined intervals
<a id="tb-domoticz">Command|Parameters
:---|:---
<a id="DomoticzIdx"></a>DomoticzIdx\<x\>|Show Domoticz Relay idx \<x\> (x = `1..4`)<BR>`0` = disable use of Relay idx \<x\> *(default)*<BR>`<value>` = Show Relay idx \<x\>
<a id="DomoticzKeyIdx"></a>DomoticzKeyIdx\<x\>|Show Domoticz Key idx \<x\> (x = `1..4`)<BR>`0` = disable use of Key idx \<x\> *(default)*<BR>`<value>` = Show Key idx \<x\> (to use enable [ButtonTopic](#buttontopic))
<a id="DomoticzSensorIdx"></a>DomoticzSensorIdx\<x\>|Show Domoticz Sensor idx \<x\> (x = `1..5`)<BR>`0` = disable use of Sensor idx \<x\> *(default)*<BR>`<value>` = Show Sensor idx \<x\>
<a id="DomoticzSwitchIdx"></a>DomoticzSwitchIdx\<x\>|Show Domoticz Switch idx \<x\> (x = `1..4`)<BR>`0` = disable use of Switch idx \<x\> *(default)*<BR>`<value>` = Show Switch idx \<x\> (to use enable [SwitchTopic](#switchtopic))
<a id="DomoticzUpdateTimer"></a>DomoticzUpdateTimer|Show current update timer value in seconds<BR>`0` = disable sending interim Domoticz status *(default)*<BR>`1..3600` = send status to Domoticz in defined intervals
### [KNX](KNX-Features)
<a id="tb-knx">Command | Parameters
:--- | :---
<a id="KnxTx_Cmnd"></a>KnxTx_Cmnd\<x\>|`0` or `1` = send command using slot \<x\> set in KNX Menu at KNX_TX
<a id="KnxTx_Val"></a>KnxTx_Val\<x\>|`<value>` = send float value using slot \<x\> set in KNX Menu at KNX_TX
<a id="KNX_ENABLED"></a>KNX_ENABLED | Status of KNX Communications<BR>`0` = set to Disable<BR>`1` = set to Enable
<a id="KNX_ENHANCED"></a>KNX_ENHANCED | Status of Enhanced mode for KNX Communications<BR>`0` = set to Disable<BR>`1` = set to Enable
<a id="KNX_PA"></a>KNX_PA | KNX Physical Address<BR>`0.0.0` = address not set<BR>`x.x.x` = set the device address (example `1.1.0`)
<a id="KNX_GA"></a>KNX_GA | Return the amount of Group Address to Send Data/Commands configured
<a id="KNX_GA"></a>KNX_GA\<x\> | Setup Group Address to Send Data/Commands (\<x\> = KNX Group Address number)<BR>`1` = return configuration of GA\<x\><BR>`<option>, <area>, <line>, <member>` to set configuration of GA\<x\><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`<option>` = [see table below for OPTION list](#knxJSON)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`<area>, <line>, <member>` = KNX Address to Send Data/Commands<BR>
<a id="KNX_CB"></a>KNX_CB | Return the amount of Group Address to Receive Data/Commands configured
<a id="KNX_CB"></a>KNX_CB\<x\> | Setup Group Address to Receive Data/Commands <BR>`1` = return configuration of CB\<x\><BR>`<option>, <area>, <line>, <member>` to set configuration of CB\<x\><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`<option>` = [see table below for OPTION list](#knxJSON)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`<area>, <line>, <member>` = KNX Address to Receive Data/Commands
OPTION
<a id="knxJSON"></a> OPTION Value| OPTION| OPTION Value
:---| ---| :---| ---
1| Relay 1| 17| TEMPERATURE
2| Relay 2| 18| HUMIDITY
3| Relay 3| 19| ENERGY_VOLTAGE
4| Relay 4| 20| ENERGY_CURRENT
5| Relay 5| 21| ENERGY_POWER
6| Relay 6| 22| ENERGY_POWERFACTOR
7| Relay 7| 23| ENERGY_DAILY
8| Relay 8| 24| ENERGY_START
9| Button 1| 25| ENERGY_TOTAL
10| Button 2| 26| KNX_SLOT1
11| Button 3| 27| KNX_SLOT2
12| Button 4| 28| KNX_SLOT3
13| Button 5| 29| KNX_SLOT4
14| Button 6| 30| KNX_SLOT5
15| Button 7| 255| EMPTY
16| Button 8 |
<a id="tb-knx">Command|Parameters
:---|:---
KnxTx_Cmnd\<x\><a id="KnxTx_Cmnd"></a>|`0` or `1` = send command using slot \<x\> set in KNX Menu at KNX_TX
KnxTx_Val\<x\><a id="KnxTx_Val"></a>|`<value>` = send float value using slot \<x\> set in KNX Menu at KNX_TX
KNX_ENABLED<a id="KNX_ENABLED"></a>|Status of KNX Communications<BR>`0` = set to Disable<BR>`1` = set to Enable
KNX_ENHANCED<a id="KNX_ENHANCED"></a>|Status of Enhanced mode for KNX Communications<BR>`0` = set to Disable<BR>`1` = set to Enable
KNX_PA<a id="KNX_PA"></a>|KNX Physical Address<BR>`0.0.0` = address not set<BR>`x.x.x` = set the device address (example `1.1.0`)
KNX_GA<a id="KNX_GA"></a>|Return the amount of Group Address to Send Data/Commands configured
KNX_GA\<x\><a id="KNX_GA"></a>|Setup Group Address to Send Data/Commands (\<x\> = KNX Group Address number)<BR>`1` = return configuration of GA\<x\><BR>`<option>, <area>, <line>, <member>` to set configuration of GA\<x\><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`<option>` = [see table below for OPTION list](#knxJSON)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`<area>, <line>, <member>` = KNX Address to Send Data/Commands<BR>
KNX_CB<a id="KNX_CB"></a>|Return the amount of Group Address to Receive Data/Commands configured
KNX_CB\<x\><a id="KNX_CB"></a>|Setup Group Address to Receive Data/Commands <BR>`1` = return configuration of CB\<x\><BR>`<option>, <area>, <line>, <member>` to set configuration of CB\<x\><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`<option>` = [see table below for OPTION list](#knxJSON)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`<area>, <line>, <member>` = KNX Address to Receive Data/Commands
<a id="knxJSON"></a><BR>OPTION|OPTION<BR>Value|<BR>OPTION|OPTION<BR>Value
:---|---|:---|---
1|Relay 1|17|TEMPERATURE
2|Relay 2|18|HUMIDITY
3|Relay 3|19|ENERGY_VOLTAGE
4|Relay 4|20|ENERGY_CURRENT
5|Relay 5|21|ENERGY_POWER
6|Relay 6|22|ENERGY_POWERFACTOR
7|Relay 7|23|ENERGY_DAILY
8|Relay 8|24|ENERGY_START
9|Button 1|25|ENERGY_TOTAL
10|Button 2|26|KNX_SLOT1
11|Button 3|27|KNX_SLOT2
12|Button 4|28|KNX_SLOT3
13|Button 5|29|KNX_SLOT4
14|Button 6|30|KNX_SLOT5
15|Button 7|255|EMPTY
16|Button 8|
### [Displays](Displays)
<a id="tb-displays">Command | Parameters
|:--- | :---
<a id="Display"> </a> Display | Show current display setting as a JSON payload
<a id="DisplayAddress"> </a> DisplayAddress | `0..255` Set display module address
<a id="DisplayDimmer"> </a> DisplayDimmer | `0` Turn the display off<BR> `1..100` Turn the display on<BR>`0..100` Set display luminosity *(only on 8x8 Dot-Matrix displays)*
<a id="DisplayMode"> </a> DisplayMode | `0..5` Set to display [predefined content](Displays#displaymode-parameters) according to display type
<a id="DisplayModel"> </a> DisplayModel | Set display model:<BR>`1` = [I<sup>2</sup>C LCD Display](https://learn.adafruit.com/i2c-spi-lcd-backpack) (default addresses `0x27`, `0x3F`)<BR>`2` = [SSD1306](https://learn.adafruit.com/monochrome-oled-breakouts/arduino-library-and-examples) OLED 128x32/128x64 (default I<sup>2</sup>C addresses `0x3C`, `0x3D`)<BR>`3` = [HT16K33](https://www.adafruit.com/product/1427) 8x8 Dot-Matrix<BR>`4` = [ILI9341](https://www.adafruit.com/product/1770) TFT LCD<BR>`5` = [2.9 inch E-Paper Display](https://www.waveshare.com/wiki/2.9inch_e-Paper_Module) 296x128 (software 3-wire SPI)<BR>`6` = [4.2 inch E-Paper Display](https://www.waveshare.com/wiki/4.2inch_e-Paper_Module) 400x300 (software 3-wire SPI)<BR>`7` = [SH1106](https://www.ebay.de/itm/1-3-OLED-Display-Weis-SH1106-128x64-I2C-Modul-Arduino-Raspberry-Pi/162572755829?hash=item25da176375:g:hdgAAOSwQKZdQZ10) OLED 128x64 (default I<sup>2</sup>C address `0x3c`)<BR>`8` = [ILI9488](https://www.buydisplay.com/default/lcd-3-5-inch-320x480-tft-display-module-optl-touch-screen-w-breakout-board) TFT 480x320 (capacitive touch, hardware 3-wire SPI)<BR>`9` = [SSD1351](https://www.ebay.de/itm/1-5-128x128-OLED-Display-Modul-RGB-SPI-Interface-Arduino-Raspberry-Pi/123256209315?hash=item1cb2a47fa3:g:WtsAAOSwZb5bTfjF) color OLED 128x128 (hardware 3-wire SPI)<BR>`10` = [RA8867](https://www.buydisplay.com/default/spi-7-inch-tft-lcd-dislay-module-1024x600-ra8876-optl-touch-screen-panel) TFT LCD 1024x600 (capacitive touch, hardware 4-wire SPI)
<a id="DisplayRefresh"> </a> DisplayRefresh | `1..7` Set time in seconds to update predefined content when using `DisplayMode` &ne; `0`
<a id="DisplaySize"> </a> DisplaySize | `1..4` Set display scale-up size *(SSD1306 and ILI9341 only)*
<a id="DisplayRotate"> </a> DisplayRotate | Set rotation angle<BR> `0` = 0°<BR> `1` = 90°<BR> `2` = 180°<BR> `3` = 270°
<a id="DisplayText"> </a> DisplayText | `<value>` - See [DisplayText use](Displays#displaytext-use)
<a id="DisplayCols"> </a> DisplayCols | `1..44` Set number of display columns *(for display modes>0)*
<a id="DisplayRows"> </a> DisplayRows | `1..32` Set number of display rows *(for display modes>0)*
<a id="DisplayFont"> </a> DisplayFont | Specify the current font<BR>`0` use classic GFX font<BR>`1` = 12<BR>`2` = 24<BR>`3` = 8 (opt)<BR>`7` use RA8876 internal font
<a id="DisplayWidth"> </a> DisplayWidth | Specify the display width in pixels *(SSD1306 only)*
<a id="DisplayHeight"> </a> DisplayHeight | Specify the display height in pixels *(SSD1306 only)*
<a id="tb-displays">Command|Parameters
|:--- |:---
Display<a id="Display"></a>|Show current display setting as a JSON payload
DisplayAddress<a id="DisplayAddress"></a>|`0..255` Set display module address
DisplayDimmer<a id="DisplayDimmer"></a>|`0` Turn the display off<BR> `1..100` Turn the display on<BR>`0..100` Set display luminosity *(only on 8x8 Dot-Matrix displays)*
DisplayMode<a id="DisplayMode"></a>|`0..5` Set to display [predefined content](Displays#displaymode-parameters) according to display type
DisplayModel<a id="DisplayModel"></a>|Set display model:<BR>`1` = [I<sup>2</sup>C LCD Display](https://learn.adafruit.com/i2c-spi-lcd-backpack) (default addresses `0x27`, `0x3F`)<BR>`2` = [SSD1306](https://learn.adafruit.com/monochrome-oled-breakouts/arduino-library-and-examples) OLED 128x32/128x64 (default I<sup>2</sup>C addresses `0x3C`, `0x3D`)<BR>`3` = [HT16K33](https://www.adafruit.com/product/1427) 8x8 Dot-Matrix<BR>`4` = [ILI9341](https://www.adafruit.com/product/1770) TFT LCD<BR>`5` = [2.9 inch E-Paper Display](https://www.waveshare.com/wiki/2.9inch_e-Paper_Module) 296x128 (software 3-wire SPI)<BR>`6` = [4.2 inch E-Paper Display](https://www.waveshare.com/wiki/4.2inch_e-Paper_Module) 400x300 (software 3-wire SPI)<BR>`7` = [SH1106](https://www.ebay.de/itm/1-3-OLED-Display-Weis-SH1106-128x64-I2C-Modul-Arduino-Raspberry-Pi/162572755829?hash=item25da176375:g:hdgAAOSwQKZdQZ10) OLED 128x64 (default I<sup>2</sup>C address `0x3c`)<BR>`8` = [ILI9488](https://www.buydisplay.com/default/lcd-3-5-inch-320x480-tft-display-module-optl-touch-screen-w-breakout-board) TFT 480x320 (capacitive touch, hardware 3-wire SPI)<BR>`9` = [SSD1351](https://www.ebay.de/itm/1-5-128x128-OLED-Display-Modul-RGB-SPI-Interface-Arduino-Raspberry-Pi/123256209315?hash=item1cb2a47fa3:g:WtsAAOSwZb5bTfjF) color OLED 128x128 (hardware 3-wire SPI)<BR>`10` = [RA8867](https://www.buydisplay.com/default/spi-7-inch-tft-lcd-dislay-module-1024x600-ra8876-optl-touch-screen-panel) TFT LCD 1024x600 (capacitive touch, hardware 4-wire SPI)
DisplayRefresh<a id="DisplayRefresh"></a>|`1..7` Set time in seconds to update predefined content when using `DisplayMode` &ne; `0`
DisplaySize<a id="DisplaySize"></a>|`1..4` Set display scale-up size *(SSD1306 and ILI9341 only)*
DisplayRotate<a id="DisplayRotate"></a>|Set rotation angle<BR> `0` = 0°<BR> `1` = 90°<BR> `2` = 180°<BR> `3` = 270°
DisplayText<a id="DisplayText"></a>|`<value>` - See [DisplayText use](Displays#displaytext-use)
DisplayCols<a id="DisplayCols"></a>|`1..44` Set number of display columns *(for display modes>0)*
DisplayRows <a id="DisplayRows"></a>|`1..32` Set number of display rows *(for display modes>0)*
DisplayFont<a id="DisplayFont"></a>|Specify the current font<BR>`0` use classic GFX font<BR>`1` = 12<BR>`2` = 24<BR>`3` = 8 (opt)<BR>`7` use RA8876 internal font
DisplayWidth<a id="DisplayWidth"></a>|Specify the display width in pixels *(SSD1306 only)*
DisplayHeight<a id="DisplayHeight"></a>|Specify the display height in pixels *(SSD1306 only)*