## How to Use
Tasmota provides three powerful man machine interfaces for issuing commands: **MQTT**, **web** and **serial**
Every command **used without a parameter (payload) returns the current setting**.
* `Power` will return the status of Relay1
Instead of `0` you can use `off` or `false` and instead of `1` you can use `on` or `true`.
* `Power ON` turns Relay1 on
* `Power1 1` also turns Relay1 on
* `Power1 True` also turns Relay1 on
Replace `` in a command with the appropriate index number. Leave it empty to use the first available.
* `Power1` and `Power` both control Relay1
In commands with `x..y` value parameters use a number from `x` to `y` range.
When a command mentions resetting to *"firmware default"* it means the setting will revert to the one in the flashed binary file. If you used `user_config_override.h` at compile time it will revert to those.
> [!NOTE]
> Beside results initiated by a command (synchronous) you can get asynchronous results initiated by rule trigger, telemetry event, commands from other source or changed device values.
Simply put, other messages may precede messages published as a result of your commands.
> [!EXAMPLE] 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.
### ...with MQTT
To send commands and view responses you'll need an [MQTT client](http://www.hivemq.com/blog/seven-best-mqtt-client-tools).
Commands over MQTT are issued by using `cmnd/%topic%/` where `%topic%` is the topic of the device you're sending the command to. If there is no `` (an empty MQTT message/payload), a query is sent for current status of the ``.
See [MQTT](MQTT) article to find out more.
### ...with Web Requests
Commands can be executed via web (HTTP) requests, for example:
```
http:///cm?cmnd=Power%20TOGGLE
http:///cm?cmnd=Power%20On
http:///cm?cmnd=Power%20off
http:///cm?user=admin&password=joker&cmnd=Power%20Toggle
```
> [!NOTE] Any spaces or special characters must be replaced with their [ASCII hex codes](https://www.rapidtables.com/code/text/ascii-table.html). You must precede each hex code with `%`.
Most used ones are: `space` = `%20` `;` = `%3B`
If you have set a password for web user interface access, this must be included (in plaintext) in the URL of the HTTP request, like so:
```
http:///cm?&user=&password=&cmnd=Power%20On
```
### ...in Console in the Web UI
**Console** menu in the web UI is a convenient place to send commands and it behaves similar to a terminal connection via serial bridge.
### ...over Serial Bridge
If you flashed the device via serial method you can connect to it with a terminal application (e.g. [Termite](https://www.compuphase.com/software_termite.htm) or Arduino IDE Serial Monitor) to issue commands and follow responses. This is a practical way to do a `Backlog` setup of your new device.
*The serial interface is set to 115200 bps except for devices that require a different baudrate.
### ...the Power of Backlog
`Backlog` command allows executing up to 30 consecutive commands with a single command line. Each command is separated by a semicolon (";"). `Backlog` is a useful feature to avoid numerous restarts when setting up a new device. You can use it to:
Set up both Wi-Fi AP's
```console
Backlog SSID1 ; Password1 ; SSID2 ; Password2
```
Configure MQTT broker address, MQTT credentials, device topic and activate a few custom options
```console
Backlog MqttHost ; MqttUser ; MqttPassword ; Topic ; SetOption53 1; PowerRetain on
```
For specific relay control, using backlog like a script
```console
Backlog Status 1; Power2 on; Delay 20; Power2 off; Status 4
```
When using [web](#web) requests *(You have to encode "space" as '%20' and ";" as '%3B')*
```http
http:///cm?user=admin&password=joker&cmnd=Backlog%20Power%20Toggle%3BPower1%20ff
```
#### Clear Backlog queue
A `Backlog` command without an argument clears an possible existing `Backlog` queue.
E.g. in case of command _`Backlog Power1 OFF; Delay 600; Power1 ON`_ the usage of an additional `Backlog` command without any argument within the delay time of 1 minute will delete the whole queue _`Power1 OFF; Delay 600; Power1 ON`_. Therefore `Power1 ON` command will not be executed and the relay would remain off.
## Command List
> [!WARNING] If you're using Tasmota versions earlier than v7.1 some of the commands might not work. Note that availability of some features and their associated commands is dependent on the options selected during the firmware compilation. Please consult the [builds](Builds) table for a reference of which features are available for each firmware variant.
### Control
Command|Parameters
:---|:---
Backlog|List of commands to be executed in sequence separated by `;`
See [Using Backlog](#the-power-of-backlog) for examples.
BlinkCount|Number of relay toggles ([blinks](#power)) **(does not control the status LED)**
`0` = blink many times before restoring power state
`1..32000` = set number of blinks *(default = `10`)*
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)**
ButtonDebounce|User control over button debounce timing
`40..1000` = set button debounce time in milliseconds *(default = `50`)*
Buzzer|`0` = stop active buzzer cycle
`,,,` = [read more...](peripherals/Buzzer)
`2,3` - Beep twice with 300 milliseconds duration and 100 milliseconds pause
`2,3,4` - Beep twice with 300 milliseconds duration and 400 milliseconds pause
`1,2,3,0xF54` (0000 0000 0000 0000 0000 1111 0101 0100). Each `1` bit beeps for 200 milliseconds and each bounded `0` bit pauses for 300 milliseconds
DevGroupShare|Set incoming and outgoing shared item mask.
`,` (default = 0xFFFFFFFF,0xFFFFFFFF)
1 = Power, 2 = Light brightness, 4 = Light fade/speed, 8 = Light scheme, 16 = Light color, 32 = Minimum brightness
FanSpeed|Fan speed control *(iFan02/iFan03 only)*
`0` = turn fan OFF
`1..3` = set fan speed
`+` = increase fan speed
`-` = decrease fan speed
Interlock|Relay interlock mode and group selection.
`0` = disable relay interlock for all relays (i.e., each relay is self-locking) *(default)*
`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
`1,2 3,4` = Group Relay1 and Relay2 in group 1 and Relay3 and Relay4 in group 2 (_note the space between the two groups_)
`1,2,3` = group Relay1, Relay2 and Relay3 in a single interlock group
`1 3 2,4` = Relay1 is in group 1, Relay3 in group 2, Relay2 and Relay4 in group 3
LedMask|Set a [bitmask](https://en.wikipedia.org/wiki/Mask_(computing)#Masking_bits_to_1) specifiying which relays control the LED indicator. [Read more...](LedMask)
`` = [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)_
*[LedState](#ledstate) must be enabled (i.e., `!= 0`) in order for `LedMask` to take effect.*
LedPower|LED power state as on or off
`0` = turn LED OFF and set `LedState 0`
`1` = turn LED ON and set `LedState 8`
`2` = toggle LED and set `LedState 0`
(Use `Backlog LedPower 0; SetOption31 1` to disable LED even when Wi-Fi or MQTT is not connected)
LedPower|LED power state control. **Enabled only when LedLink(i) is configured**
`0` = turn LED OFF and set `LedState 0`
`1` = turn LED ON and set `LedState 0`
`2` = toggle LED and set `LedState 0`
LedState|Manage LED state
`0` = disable use of LED as much as possible
`1` = show power state on LED (LED on when power on) *(default)* *(inverted for Sonoff Touch/T1)*
`2` = show MQTT subscriptions as a LED blink
`3` = show power state and MQTT subscriptions as a LED blink
`4` = show MQTT publications as a LED blink
`5` = show power state and MQTT publications as a LED blink
`6` = show all MQTT messages as a LED blink
`7` = show power state and MQTT messages as a LED blink
`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` due to a software function_
Power0|Control the power state simultaneously for all relays on the device
`0` / `off` = turn OFF
`1` / `on` = turn ON
`2` / `toggle` = if relay is `ON` switch to `OFF` and vice versa
Power|Control the corresponding Relay (enumerated) power state and also restart PulseTime
`0` / `off` / `false` = turn OFF
`1` / `on` / `true` = turn ON
`2` / `toggle` = if relay is `ON` switch to `OFF` and vice versa
`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)
`4` / `blinkoff` = stop blink sequence and return relay power to pre-blink state
PowerOnState|Control relay state when the device is _**powered up**_. [More information](PowerOnState)
`0` / `OFF` = keep relay(s) OFF after power up
`1` / `ON` = turn relay(s) ON after power up
`2` / `TOGGLE` = toggle relay(s) from last saved state
`3` = switch relay(s) to their last saved state *(default)*
`4` = turn relay(s) ON and disable further relay control
`5` = after a `PulseTime` period turn relay(s) ON (acts as inverted [`PulseTime`](Commands#pulsetime) mode)
PulseTime|Display the amount of `PulseTime` remaining on the corresponding Relay (enumerated)
`` Set the duration to keep the corresponding Relay `ON` when `Power ON` command is issued. After this amount of time, the relay will be turned `OFF`.
`0` / `OFF` = disable use of PulseTime for the corresponding Relay
`1..111` = set PulseTime for the corresponding Relay in 0.1 second increments
`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)
SwitchDebounce|User control over switch debounce timing
`40..1000` = set switch debounce time in milliseconds *(default = `50`)*
SwitchMode|[Switch mode](Buttons-and-Switches#switchmode)
`0` = toggle *(default)*
`1` = follow (0 = off, 1 = on)
`2` = inverted follow (0 = on, 1 = off)
`3` = pushbutton (default 1, 0 = toggle)
`4` = inverted pushbutton (default 0, 1 = toggle)
`5` = pushbutton with hold (default 1, 0 = toggle, Hold = hold)
`6` = inverted pushbutton with hold (default 0, 1 = toggle, hold = hold)
`7` = pushbutton toggle (0 = toggle, 1 = toggle)
See also|[`SetOption1`](#setoption1) - Set button multipress mode
[`SetOption11`](#setoption11) - Swap pushbutton single and double press functionality
[`SetOption13`](#setoption13) - Allow immediate action on single button press
[`SetOption26`](#setoption26) - Use indexes even when only one relay is present
[`SetOption31`](#setoption31) - Disable Wi-Fi LED status blinking
[`SetOption32`](#setoption32) - Set hold interval before sending `HOLD` action
[`SetOption40`](#setoption40) - Stop detecting any input change on button GPIO
[`SetOption67`](#setoption67) - Enable/Disable Buzzer
### Management
Command|Parameters
:---|:---
Delay|`2..3600` = set delay between two backlog commands with 0.1 second increment
DeepSleepTime|Time to enter [deep sleep mode](DeepSleep)
`0` = disable deep sleep mode *(default)*
`10..86400` = set deep sleep mode time period in seconds
Emulation|`0` = disable emulation *(default)*
`1` = enable Belkin WeMo emulation for [Alexa](integrations/Alexa)
`2` = enable Hue Bridge emulation for [Alexa](integrations/Alexa)
FriendlyName|`1` = Reset friendly name to firmware default
`` = set friendly name (32 char limit)
Gpios|Show list of available [components](Components#components-list) by name and index
`255` / `All` Show list of all [components](Components#components-list) by name and index
Gpio|Show current [component](Components#components-list) assignments of the Module's configurable GPIO
`255` / `All` Show [component](Components#components-list) assignments for all the devices available GPIO
Gpio|_For built-in Modules only. This command does not work for devices configured with a Template._
`` = assign a [component](Components) to `Gpio`
I2Cscan|Scan I2C bus and show addresses for found devices
I2CDriver|Enable / Disable I2C sensor drivers. [Read more...](I2CDevices)
LogHost|`1` = reset [syslog](https://www.sigmdel.ca/michel/ha/rpi/syslog_en.html) host to firmware default (`SYS_LOG_HOST`)
`` = set syslog host (32 chars max)
LogPort|`1` = reset [syslog](https://www.sigmdel.ca/michel/ha/rpi/syslog_en.html) port to firmware default (`SYS_LOG_PORT`)
`2..32766` = set syslog port
Modules|Show available modules by name and index
Module|Displays active module by name and index
`` = switch to Module and restart
`0` = switch to defined [template](Templates) and restart
MqttLog|`0` = disable logging via MQTT *(default)*
`1` = show only error messages
`2` = show error and info messages
`3` = show error, info and debug messages
`4` = show error, info and more debug messsages
NtpServer|NTP server setup (x= `1..3`)
`0` = clear NtpServer settings
`1` = reset NtpServer settings to firmware defaults
`` = set NtpServer host or IP address (32 char limit)
OtaUrl|Display current OTA URL
`1` = Reset OtaUrl to firmware default
`url` = set address for OTA (100 char limit)
Pwm|`0..1023` = set PWM value for channel
PwmFrequency|`1` = reset PWM frequency to 880Hz
`100..4000` = set PWM frequency (100Hz to 4kHz)
PwmRange|`1` = reset maximum PWM range to 1023
`255..1023` = set maximum PWM range
Reset|`1` = reset device settings to firmware defaults and restart
`2` = erase flash, reset device settings to firmware defaults and restart
`3` = erase System Parameter Area in flash (Wi-Fi calibration and related data) and restart
`4` = reset device settings to firmware defaults but retain Wi-Fi credentials and restart
`5` = erase all flash and reset parameters to firmware defaults but keep Wi-Fi settings and restart
`6` = erase all flash and reset parameters to firmware defaults but keep Wi-Fi and MQTT settings and restart
*(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)*
`99` = reset device bootcount to zero
Restart|`1` = restart device with configuration saved to flash
`99` = force restart device without configuration save
_For debug and testing stack trace dumps only:_
`-1` = force an Exception (28) crash
`-2` = force a Soft WDT reset (after a freeze of 2 seconds)
`-3` = force an OS watchdog reset (after a freeze of 120 seconds, **caution!**)
SaveData|`0` = save parameter changes only manually, e.g. with `Restart 1`
`1` = save parameter changes every second *(default)*
`2..3600` = save parameter changes every x second
SerialLog|Disable hardware serial bridge and
`0` = disable serial logging
`1` = show only error messages
`2` = show error and info messages *(default)*
`3` = show error, info and debug messages
`4` = show error, info and more debug messages
`SerialLog` will be disabled automatically 10 minutes after the device reboots.
Sleep|`0` = turn sleep off
`1..250` = set sleep duration in milliseconds to enable [energy saving](Energy-Saving) *(default = `50`)*
State|Display current device state and publish to `%prefix%/%topic%/RESULT` topic »5.12.0
Status|` ` = show abbreviated [status information](JSON-Status-Responses#basic-response)
`0` = show all status information (1 - 11)
`1` = show device parameters information
`2` = show firmware information
`3` = show logging and telemetry information
`4` = show memory information
`5` = show network information
`6` = show MQTT information
`7` = show time information
`8` = show connected sensor information
`9` = show power thresholds *(only on modules with power monitoring)*
`10` = same as `Status 8` *(retained for backwards compatibility)*
`11` = show information equal to [`TelePeriod`](#teleperiod) state message
`12` = in case of crash to dump the call stack saved in RT memory
SysLog|`0` = disable syslog logging *(default)*
`1` = show only error messages
`2` = show error and info messages
`3` = show error, info and debug messages
`4` = show error, info and more debug messages
Template|Show current [Template](Templates)
`0` = create template from active module
`x` = create template from a [supported module](Modules)
`255` = merge current module and template settings into new template
`{ ... }` = store template in a [JSON payload](Templates#explanation-of-template-properties)
Does not activate the template. To activate use `Module 0`.
Time|`0` = enable NTP *(default)*
`1` = format JSON message timestamp in ISO format
`2` = format JSON message timestamp in both ISO and Epoch format
`3` = format JSON message timestamp in Epoch format
`` = disable NTP and set UTC time as epoch value if greater than `1451602800` (January 1, 2016)
TimeSTD
TimeDST|Set policies for the beginning of daylight saving time (DST) and return back to standard time (STD) »5.14.0
`0` = reset parameters to firmware defaults
`H`,`W`,`M`,`D`,`h`,`T`
`H` = hemisphere (`0` = northern hemisphere / `1` = southern hemisphere)
`W` = week (`0` = last week of month, `1..4` = first .. fourth)
`M` = month (`1..12`)
`D` = day of week (`1..7` `1` = sunday `7` = saturday)
`h` = hour (`0..23`)
`T` = timezone (`-780..780`) (offset from UTC in **MINUTES** - 780min / 60min=13hrs)
_Example:_ `TIMEDST 1,1,10,1,2,660`
Timezone|`-13..+13` = set timezone offset from UTC in hours
`-13:00..+13:00` = set timezone offset from UTC in hours and minutes
`99` = use timezone configured with `TimeDST` and `TimeSTD`
TuyaMCU|Used to map functions in TuyaMCU
`,` = [read more...](TuyaMCU)
`,0` = remove setting for fnId
Upgrade|`1` = download firmware from `OtaUrl` and restart
`` = download firmware from `OtaUrl` if \ is higher than device version
Upload|`1` = download firmware from `OtaUrl` and restart
`` = download firmware from `OtaUrl` if \ is higher than device version
WebLog|`0` = disable web logging
`1` = show only error messages
`2` = show error and info messages *(default)*
`3` = show error, info and debug messages
`4` = show error, info and more debug messages
See also|[`SetOption68`](#setoption68) - PWM Channel control
[`SetOption76`](#setoption76) - DeepSleep disable bootcount incrementing
### Wi-Fi
Command|Parameters
:---|:---
AP|`0` = switch to other Wi-Fi Access Point
`1`= select Wi-Fi Access Point 1
`2`= select Wi-Fi Access Point 2
CORS|`"` = disable CORS (Cross Origin Resource Sharing) (default)
`*` = enable CORS for all locations
`value` = Enable CORS for location. This needs to be complete url ex: `http://tasui.shantur.com`
Hostname|`1` = reset hostname to `MQTT_TOPIC-<4digits>` and restart
`` = set hostname (32 char limit) and restart. If hostname contains `%` it will be reset to the default instead.
**_If using MQTT to issue this command, if it is used with the device `GroupTopic`, the command will not be executed._**
IPAddress<x>|Set networking IP (`XXX.XXX.XXX.XXX`) addresses
`IPAddress1` = set device IP address
`IPAddress3` = set subnet mask
`IPAddress4` = set DNS server IP address
*follow IPAddress commands with `restart 1` to apply changes*
Password|`` = `1..2`
`` = set AP Wi-Fi password and restart
`1` = reset AP Wi-Fi password to firmware default (`STA_PASS1` or `STA_PASS2`) and restart
Passwords are limited to 64 characters. **Do not use special characters or white spaces in the password**.
**Note that `Password` and `Password1` are equivalent commands.**
Ssid|`` = `1..2`
`` = set AP Wi-Fi SSID and restart
`1` = reset AP Wi-Fi SSID to firmware default (`STA_SSID1` or `STA_SSID2`) and restart
SSID are limited to 32 characters. **Do not use special characters or white spaces in the SSID**
WebColor|Configure Web GUI colors (x = `1..19`)
`#RRGGBB` = Set color for `WebColor`
`1` = Global text (Black)
`2` = Global background (White)
`3` = Form background (Greyish)
`4` = Input text (Black)
`5` = Input background (White)
`6` = Console text (Black)
`7` = Console background (White)
`8` = Warning text (Red)
`9` = Success text (Green)
`10` = Button text (White)
`11` = Button (Blueish)
`12` = Button hovered over (Darker blueish)
`13` = Restart/Reset/Delete button (Redish)
`14` = Restart/Reset/Delete button hover (Darker reddish)
`15` = Save button (Greenish)
`16` = Save button hover (Darker greenish)
`17` = Config timer tab text (White)
`18` = Config timer tab background (Light grey)
`19` = Module title and FriendlyName text (Whiteish)
[User themes](WebUI#themes)
WebPassword|Show current web server password
`0` = disable use of password for web UI
`1` = reset password to firmware default (`WEB_PASSWORD`)
`` = set web UI password (32 char limit) for user `WEB_USERNAME` *(Default WEB_USERNAME = `admin`)*
WebRefresh|Web page refresh
`1000..10000` = set refresh time in milliseconds *(default = `2345`)*
WebSend|Send a command to Tasmota host over http. If a command starts with a `\` it will be used as a link.
`[:,:] `
`` = hostname or IP address.
`` = port for the device if not the default `80`
`` = enter username of the device you're sending the command to
`` = enter password of the device you're sending the command to
`` = command and payload
*example: `[] POWER1 ON` sends `http:///cm?cmnd=POWER1 ON`*
WebSensor|Control display of sensor telemetry in the web UI
`0` - Do not display sensor's telemetry
`1` - Display sensor's telemetry (*default*)
`` = 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)
`` = `3` Energy telemetry
Issue a `Status 4` to obtain a list of sensor types enabled in the firmware loaded on the device.
WebServer|`0` = stop web server
`1` = start web server in user mode
`2` = start web server in admin mode
WifiConfig|`0` - disable Wi-Fi Manager and reboot (used with alternate AP)
`2` = set [Wi-Fi Manager](https://github.com/tzapu/WiFiManager/blob/master/README.md#how-it-works) as the current configuration tool and start Wi-Fi Manager (web server at 192.168.4.1) for 3 minutes, then reboot and try to connect Wi-Fi network
`4` = disable Wi-Fi Manager but retry the other AP without rebooting
`5` = disable Wi-Fi Manager and wait until that AP is available again without rebooting
`6` = Wi-Fi parameters can only be entered via commands in the serial console
`7` = set [Wi-Fi Manager](https://github.com/tzapu/WiFiManager/blob/master/README.md#how-it-works) (web server at 192.168.4.1) as the current configuration tool restricted with the only option to reset settings.
_This setting is recommended for devices without an external control/reset button_.
_No longer supported_
`1` = set [SmartConfig](https://community.particle.io/t/smart-config-the-missing-manual-now-available/442) ([Android](https://play.google.com/store/apps/details?id=com.iotmaker&hl=en_US)/iOS) as the current configuration tool, start SmartConfig for 3 minutes and reboot and try to connect to Wi-Fi
`3` = set [WPS](https://en.wikipedia.org/wiki/Wi-Fi_Protected_Setup) as configuration tool, try WPS for 3 minutes and reboot and try to connect to Wi-Fi
[WifiPower](WifiPower)|set Wi-Fi transmit power level in decibel-milliwatts (dBm) *(default = `17`)*
See also|[`SetOption55`](#setoption55) - mDNS service control
[`SetOption56`](#setoption56) - Wi-Fi network scan to select strongest signal on restart
[`SetOption57`](#setoption57) - Wi-Fi network re-scan, alternate AP
### MQTT
Command|Parameters
:---|:---
ButtonRetain|`0` = disable use of MQTT retain flag *(default)*
`1` = enable MQTT retain flag on button press
ButtonTopic|`` = set MQTT button topic (32 chars max)
`0` = disable use of MQTT button topic
`1` = set MQTT button topic to device `%topic%`
`2` = reset MQTT button topic to firmware default (`MQTT_BUTTON_TOPIC`) *(default = `0`)*
_If using MQTT to issue this command, if it is published to the device `GroupTopic`, the command will not be executed._
FullTopic|`1` = reset MQTT fulltopic to firmware default (`MQTT_FULLTOPIC`) and restart
`` = set MQTT fulltopic (100 chars max) and restart. Use of [optional %prefix%, %topic%, %hostname%, and %id% substitution tokens](MQTT#mqtt-topic-definition) is allowed.
*If using MQTT to issue this command, if it is published to the device `GroupTopic`, _you must ensure uniqueness of the resulting fulltopic on each destination device by using one or more of these substitution tokens._*
GroupTopic|`1` = reset MQTT group topic to firmware default (`MQTT_GRPTOPIC`) and restart
`` = set MQTT group topic (32 chars max) and restart
MqttClient|`1` = reset MQTT client to firmware config (`MQTT_CLIENT_ID`) and restart
`` = set MQTT client (32 chars max) and restart.
You can use the `%06X` substitution token to replace with last six characters of MAC address.
_If using MQTT to issue this command, if it is used with the device `GroupTopic`, the command will not be executed._
MqttFingerprint|*TLS needs to be enabled in firmware for this command* »5.13.1
`` = set current fingerprint as 20 space separated bytes (59 chars max)
MqttHost|`0` = clear MQTT host field and allow mDNS to find MQTT host
`1` = reset MQTT host to firmware default (`MQTT_HOST`) and restart
`` = set MQTT host (32 chars max) and restart (do NOT use `.local`)
MqttPassword|`0` = clear MQTT password
`1` = reset MQTT password to firmware default (`MQTT_PASS`) and restart
`` = set MQTT password (32 chars max) and restart
MqttPort|`1` = reset MQTT port to firmware default (`MQTT_PORT`) and restart
`` = set MQTT port between 2 and 32766 and restart
MqttRetry|`10..32000` = set MQTT connection retry timer in seconds *(default = `10`)*
MqttUser|`0` = clear MQTT user name
`1` = reset MQTT user name to firmware default (`MQTT_USER`) and restart
`` = set MQTT user name (32 chars max) and restart
PowerRetain|MQTT [power retain state](PowerOnState#side-effects-with-using-mqtt-messages)
`0` / `off` = disable MQTT power retain on status update *(default)*
`1` / `on` = enable MQTT power retain on status update
Prefix1|`1` = reset MQTT command subscription prefix to firmware default (`SUB_PREFIX`) and restart
`` = set MQTT command subscription prefix (10 chars max) and restart
Prefix2|`1` = reset MQTT status prefix to firmware default (`PUB_PREFIX`) and restart
`` = set MQTT status prefix (10 chars max) and restart
Prefix3|`1` = Reset MQTT telemetry prefix to firmware default (`PUB_PREFIX2`) and restart
`` = set MQTT telemetry prefix (10 chars max) and restart
Publish|`` = MQTT publish any topic and optional payload »5.13.0
Publish2|`` = MQTT publish any topic and optional payload with retain flag
SensorRetain|`0` = disable use of sensor MQTT retain flag *(default)*
`1` = enable MQTT retain flag on message `tele/%topic%/SENSOR`
StateText1|`` = set `OFF` state text (10 chars max)
StateText2|`` = set `ON` state text (10 chars max)
StateText3|`` = set `TOGGLE` state text (10 chars max)
StateText4|`` = set `HOLD` state text (10 chars max)
SwitchRetain|`0` = disable use of MQTT retain flag *(default)*
`1` = enable MQTT retain flag on switch press
Subscribe|Subscribes to an MQTT topic and assigns an Event name to it.
`, [, ]` = [Read more...](Subscribe-&-Unsubscribe)
` ` = list all topics currently subscribed
SwitchTopic|`` = set MQTT switch topic (32 chars max)
`0` = disable use of MQTT switch topic
`1` = set MQTT switch topic to device `%topic%`
`2` = reset MQTT switch topic to firmware default (`MQTT_SWITCH_TOPIC`) *(default = `0`)*
[Read more](Buttons-and-Switches) about this.
_If using MQTT to issue this command, if it is used with the device `GroupTopic`, the command will not be executed._
TelePeriod|`0` = disable telemetry messages
`1` = reset telemetry period to firmware default (`TELE_PERIOD`)
`10..3600` = set telemetry period in seconds *(default = `300`)*
Topic|`1` = reset MQTT topic to firmware default (`MQTT_TOPIC`) and restart
`` = set MQTT topic (32 chars max) **and** `ButtonTopic` and restart.
*If using MQTT to issue this command, if it is used with the device `GroupTopic`, the command will not be executed. (Mqtt Topic can't be equal to Mqtt Client)*
Unsubscribe|Unsubscribe from topics subsribed to with [`Subscribe`](#subscribe)
` ` = unsubscribe all topics
`` = unsubscribe from a specific MQTT topic
See also|[`SetOption3`](#setoption3) - Disable//Enable MQTT
[`SetOption4`](#setoption4) - Return MQTT response as `RESULT` or `%COMMAND%` topic
[`SetOption10`](#setoption10) - Main topic change behavior
### Rules
Command|Parameters
:---|:---
Add|`` = add value to Var ([example](Rule-Cookbook#arithmetic-commands-to-be-used-with-vars))
CalcRes|Current calculation resolution
`0..7` = set number of decimal places to be used in `Add`, `Sub`, `Mult` and `Scale`
Event|Execute an event to trigger a rule as [documented](Rules#trigger) »5.13.0
Mem|Manage up to 16 variables stored on flash (x = `1..16`)
`Mem` returns all current values. `Mem` returns the variable's current value.
`` = store a string value in a variable
`"` = clear stored value in Mem
Mult|`` = multiply value to Var ([example](Rule-Cookbook#arithmetic-commands-to-be-used-with-vars))
Rule|Rules. [Read more...](Rules)
`0` = disable Rule
`1` = enable Rule
`2` = toggle Rule
`4` = disable one-shot detection (perform commands as long as trigger is met)
`5` = enable one-shot (e.g., sometimes used for slow changing sensors like temperature) detection
`6` = toggle one-shot detection
`8` = disable stop-on-error after exception restart
`9` = enable stop-on-error after exception restart
`10` = toggle stop-on-error after exception restart
`` = define Rule
`+` = append to Rule
`"` = clear Rule
RuleTimer|Up to eight timers to be used as countdown event (x = `1..8`) »5.13.0
`0..32766` = set countdown rule timer in seconds
Scale|Scale value from a low and high limit to another low and high limits and save in Var ([example](Rule-Cookbook#arithmetic-commands-to-be-used-with-vars))
`v` = value: the number to scale
`fl` = fromLow: the lower bound of the value’s current range
`fh` = fromHigh: the upper bound of the value’s current range
`tl` = toLow: the lower bound of the value’s target range
`th` = toHigh: the upper bound of the value’s target range
Sub|`` = subtract value to Var ([example](Rule-Cookbook#arithmetic-commands-to-be-used-with-vars))
Var|Manage up to 16 variables stored in memory (x = `1..16`)
`Var` returns all current values. `Var` returns the variable's current value.
`` = store a string value in a variable
`"` = clear stored value in Var
### Timers
» v5.13.1
Command|Parameters
:---|:---
Timers|Timers control
`0` = disable all timers
`1` = enable all timers
`2` = toggle all timers
Timer|Parameters for Timer where x = `1..16`
`0` = clear parameters for Timer
`1..16` = copy Timer\ parameters to Timer
`{ "name":value ; .. }` = set all or individual parameters using JSON payload with names and values of data pairs from the [table](Timers#json-payload-anatomy)
> [!Note]
> Information on sensors documented below is transmitted in the Tasmota telemetry message
### Sensors
Command|Parameters
:---|:---
AdcParam|ADC0 analog input tuning parameters
`, , , `
`` values:
`2` = Temperature [Steinhart-Hart thermistor equation](https://en.wikipedia.org/wiki/Steinhart%E2%80%93Hart_equation) parameters:
- `` = NTC Voltage bridge resistor in Ohms *(default = `32000`)*
`` = NTC Resistance in Ohms *(default = `10000`)*
`` = NTC Beta Coefficient *(default = `3350`)*
`3` = Light [Lux equation](https://www.allaboutcircuits.com/projects/design-a-luxmeter-using-a-light-dependent-resistor/) parameters:
- `` = LDR Voltage bridge resistor in Ohms *(default = `10000`)*
`` = LDR Lux Scalar *(default = `12518931`)*
`` = LDR Lux Exponent *(default = `-1.4050`)*
Altitude|`-30000..30000` - altitude in meters
AmpRes|Current sensor resolution
`0..3` = maximum number of decimal places
Counter|`0` = reset Counter
`1..64900` = preset Counter
`-1..-64900` = decrease Counter
`+1..+64900` = increase Counter
In order to define and use a Counter, _**you must configure one of the free device GPIO as `Counter`**_
CounterDebounce|`0` = turn off counter debounce
`1..3200` = set counter debounce time in milliseconds
CounterType|`0` = set Counter as pulse Counter
`1` = set Counter as pulse Timer
HumRes|Humidity sensor resolution
`0..3` = maximum number of decimal places
PressRes|Pressure sensor resolution
`0..3` = maximum number of decimal places
Sensor13|[INA219](http://www.ti.com/product/INA219) low voltage current sensor calibration mode
`0` = set INA219 calibration to max 32V and 2A
`1` = set INA219 calibration to max 32V and 1A
`2` = set INA219 calibration to max 16V and 0.4A
Sensor15|[Automatic Baseline Correction](https://github.com/arendst/Tasmota/blob/c97ea4d9176eb7e87abff5f963a0f1c60f0a5e52/sonoff/xsns_15_mhz19.ino#L47) for [MH-Z19B](/peripherals/MH-Z19B) CO2 sensor
`0` = disabled
`1` = enabled *(default)*
`2` = disable and start manual calibration from 400 ppm of CO2
`9` = reset sensor to factory defaults
`1000` = sets measurement range to 1000ppm CO2
`2000` = sets measurement range to 2000ppm CO2
`3000` = sets measurement range to 3000ppm CO2
`5000` = sets measurement range to 5000ppm CO2
Sensor20|[Nova Fitness SDS011](/peripherals/SDS011) dust sensor.
1..255` = number of seconds before TelePeriod to poll the sensor
Sensor27|[APDS-9960](/peripherals/APDS-9960) sensor commands
`0` = enable light level and proximity sensor / disable gestures *(default)*
`1` = enable gesture mode/ disable light level and proximity sensor
`2` = enable gestures with half gain / disable light and proximity sensor
`3..255` = Set [ATIME register](/peripherals/APDS-9960#known-issues) for different integration times
Sensor29|MCP23008 / MCP23017 I2C GPIO Expander configuration. [Read more...](/peripherals/MCP230xx)
`Reset` = reset all pins
x = `1..6`
`1` = INPUT mode, no reporting, no pull-up
`2` = INPUT mode, report on CHANGE, pull-up enabled
`3` = INPUT mode, report on LOW, pull-up enabled
`4` = INPUT mode, report on HIGH, pull-up enabled
`5` = OUTPUT mode (if enabled by `#define USE_MCP230xx_OUTPUT`)
`6` = inverted OUTPUT mode (if enabled by `#define USE_MCP230xx_OUTPUT`)
`pin,pinmode{,intpullup\|outstate{,repmode}}`
[Continue reading...](/peripherals/MCP230xx#device-configuration)
Sensor34|
[HX711 load cell](https://github.com/bogde/HX711) sensor calibration
`1` = reset display to 0
`2` = start calibration
`2` `` = set reference weight in grams and start calibration
`3` = show reference weight in grams
`3` `` = set reference weight in grams
`4` = show calibrated scale value
`4` `` = set calibrated scale value
`5` = show max weight in gram
`5` `` = set max weight in grams
`6` = show single item weight in grams
`6` `` = 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
`7` = save current weight to be used as start weight on restart
`8` `0/1`
`0` = disable JSON message on weight change over 4 grams
`1` = enable JSON message on weight change (see below)
`9` `` = set minimum delta to trigger JSON message (see above).
`0` = 4 grams (old default)
`1..100` = set delta to 0-99 grams
`101-255` = set delta to 110-1650 grams (10g increments)
Sensor50|[PAJ7620](/peripherals/PAJ7620) gesture sensor
`0` = sensor muted, no readings in Tasmota
`1`= gesture mode
`2` = proximity mode
`3` = corner mode
`4` = PIN mode
`5` = cursor mode
Sensor53|[Smart Meter Interface](/peripherals/Smart-Meter-Interface)
`r` = reset the driver with a new descriptor specified with the Tasmota [Scripting](Scripting-Language) language.
`c` = preset counter (x = `1..5`) to `value` when the driver is set to counter mode
`d` = 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.
`d0` = disable data dump mode and revert to decoding mode.
SpeedUnit|[TX20/TX23](/peripherals/TX2x) anemometer speed unit
`1` = m/s
`2`= km/h
`3` = kn
`4` = mph
`5` = ft/s
`6` = yd/s
TempRes|Temperature sensor resolution
`0..3` = maximum number of decimal places
TempOffset|`-12.6..12.6` = Set calibraton offset value for reported temperature telemetry
This setting affects **all** temperature sensors on the device.
VoltRes|Voltage sensor resolution
`0..3` = maximum number of decimal places
WattRes|Power sensor resolution
`0..3` = maximum number of decimal places
WeightRes|Load cell sensor resolution
`0..3` = maximum number of decimal places
See also|[`SetOption8`](#setoption8) - Show temperature in Celsius *(default)* or Fahrenheit
[`SetOption18`](#setoption18) - Set status of signal light paired with CO2 sensor
[`SetOption24`](#setoption24) - Set pressure units
### Power Monitoring
Command|Parameters
:---|:---
AmpRes|Current sensor resolution
`0..3` = maximum number of decimal places
CurrentCal| `1100..32767` *(default = `3500`)*
Set calibration offset value for reported `Current` telemetry
Allows finer calibration for HLW8012, HJL01, and BL0937 energy monitoring devices
CurrentHigh|`0` = disable current high threshold *(default)*
`` = set current high threshold value in milliamps
CurrentLow|`0` = disable current low threshold *(default)*
`` = set current low threshold value in milliamps
CurrentSet|`` = [calibrate](Power-Monitoring-Calibration) current to target value in mA
EnergyRes|Energy sensor resolution
`0..5` = maximum number of decimal places
EnergyReset<x>|`0..42500` (for `3`, Total, upper limit is `4250000`) in watt-hours (Wh)
x = `1..5`
`1` `` = ((p)re)set values for Today
`2` `` = ((p)re)set values for Yesterday
`3` `` = ((p)re)set values for Total
`4` ``{,``} = ((p)re)set tariff period values for Totals
`5` ``{,``} = ((p)re)set tariff period values for Exported
FreqRes|Frequency sensor resolution
`0..3` = maximum number of decimal places
FrequencySet|`` = [calibrate](Power-Monitoring-Calibration) frequency to a target value in Hz
MaxPower|`0` - disable use maximum power monitoring
`` = set maximum allowed power in watts
MaxPowerHold|`1` = set default time to 10 seconds to stay over MaxPower before power off
`` = set time in seconds to stay over MaxPower before power off
MaxPowerWindow|`1` = set default time to 30 seconds to stay power off before re-applying power up to 5 times
`` = set time in seconds to stay power off before re-applying power up to 5 times
ModuleAddress|Set the address of a PZEM module
`1..3` = the last octet of the PZEM-004T serial address
`
Prior to setting the module address, the PZEM **_must be connected_** to **both** RX and TX, **and** AC voltage.
Connect one PZEM at a time and issue this command. Repeat for each PZEM to be connected for multi-phase monitoring.
_The command without an argument cannot be used to read the address of the connected PZEM._
PowerCal| `4000..32767` *(default = `12530`)*
Set calibration offset value for reported `Power` telemetry reading
Allows finer calibration for HLW8012, HJL01, and BL0937 energy monitoring devices
PowerDelta|Set maximum delta for energy monitoring devices to report on active power load change while the relay is ON. `PowerDelta` will not report when the relay turns off. »5.13.0
`0` = disable reporting on power change
`1..100` = set reporting on percentage power change to send an MQTT telemetry message
`101..32000` = set reporting on absolute power change to send an MQTT telemetry message (offset by 100, e.g., `101`=1W, `207`=107W)
PowerHigh|`0` = disable power high threshold *(default)*
`` = set power high threshold value in watts to send an MQTT telemetry message
PowerLow|`0` = disable power low threshold *(default)*
`` = set power low threshold value in watts to send an MQTT telemetry message
PowerSet|`` = [calibrate](Power-Monitoring-Calibration) power to a target value in watts »5.12.0
Status|`8` = show power usage
`9` = show power thresholds
Tariff<x>|P1 Smart Meter tariff configuration
x = `1, 2, 9`
`1` `STD,DST` Start times for off-peak tariff
`2` `STD,DST` End times for off-peak tariff
`9` `0/1`
`0` = use Start/End times also on weekends.
`1` = use off-peak tariff all weekend.
`STD` and `DST` may be specified as:
`` = `0..23` or
`` = `00:00..23:59` or
`` = `0..1439` (since midnight)
If both `Tariff1` STD and `Tariff2` STD are equal, all tariffs are disabled.
VoltageCal|Set calibration offset value for reported `Voltage` telemetry reading `1000..32767` *(default = `1950`)*
Allows finer calibration for HLW8012, HJL01, and BL0937 energy monitoring devices
VoltageHigh|`0` = disable voltage high threshold *(default)*
`` = set voltage high threshold value in V
VoltageLow|`0` = disable voltage low threshold *(default)*
`` = set voltage low threshold value in V
VoltageSet|`` = [calibrate](Power-Monitoring-Calibration) voltage to a target value in V »5.12.0
VoltRes|Voltage sensor resolution
`0..3` = maximum number of decimal places
WattRes|Power sensor resolution
`0..3` = maximum number of decimal places
See Also|[`SetOption21`](#setoption21) - Energy monitoring when power is off
[`SetOption33`](#setoption33) - Configure power monitoring Max_Power_Retry count number
[`SetOption39`](#setoption39) - Control handling of invalid power measurements
[`SetOption72`](#setoption72) - Set reference used for total energy
### Light
Command|Parameters
:---|:---
Channel|`0..100` = set PWM channel dimmer value from 0 to 100% »5.13.0
`+` = increase by 10
`-` = decrease by 10
When [`SetOption68`](#setoption68) is set to `1` `Channel` will follow `Power` numbering with Relays first then PWM.
**Example**:
2 Relays and 3 PWM: Relay1 = `Power1`; Relay2 = `Power2`; PWM1 = `Power3` and `Channel3`; PWM2 = `Power4` and `Channel4`; PWM3 = `Power5` and `Channel5`
Color|x = `1..6`
`1` = Set color
`2` = Set color adjusted to current `Dimmer` value
`3` = Set clock seconds hand color *([Scheme](#Scheme) `5` only)*
`4` = Set clock minutes hand color *([Scheme](#Scheme) `5` only)*
`5` = Set clock hour hand color *([Scheme](#Scheme) `5` only)*
`6` = Set clock hour marker color
``
`r,g,b` = set color by decimal value (`0..255`)
`#CWWW` = set hex color value for CT lights
`#RRGGBB` = set hex color value for RGB lights
`#RRGGBBWW` = set hex color value for RGBW lights
`#RRGGBBCWWW` = set hex color value for RGBCCT lights (5 PWM channels)
**Note**:
Just append an `=` instead of the remaining color codes, this way they wont get changed. For example a command like `Color #00ff=` would update the RGB part to disable red and enable geen, but would omit to update blue or any white channel.
|Set color to
`1` = red
`2` = green
`3` = blue
`4` = orange
`5` = light green
`6` = light blue
`7` = amber
`8` = cyan
`9` = purple
`10` = yellow
`11` = pink
`12` = white (using RGB channels)
`+` = next color
`-` = previous color
CT|`153..500` = set color temperature from 153 (cold) to 500 (warm) for CT lights
`+` = increase CT value by 10
`-` = decrease CT value by 10
Dimmer|`0..100` = set dimmer value from 0 to 100%
`+` = increase by 10
`-` = decrease by 10
Dimmer<x>|**Commands available only when `SetOption37 >= 128`** ([#6819](https://github.com/arendst/Tasmota/pull/6819))
`` same as in `Dimmer`
`Dimmer0 ` - set dimming for all channels
`Dimmer1 ` - set dimming for RGB channels
`Dimmer2 ` - set dimming for white channels
DimmerRange|Change dimming range. *Works only with TuyaMCU and PS_16_DZ serial dimmers.*
`,` = set dimming range from minimum to maximum value
***Does not change [`Dimmer`](#dimmer) command behavior***
Fade|`0` = do not use fade *(default)*
`1` = use fade
HsbColor|`,,` = set color by hue, saturation and brightness
HsbColor2|`0..100` = set saturation
HsbColor3|`0..100` = set brightness
Led|`#RRGGBB` = set hex color value where `` is the pixel number of the LED
*(applies only to addressable LEDs)*
LedTable|`0` = do not use [LED gamma correction](https://learn.adafruit.com/led-tricks-gamma-correction?view=all) *(default «6.5.0.9)*
`1` = use gamma correction *(default »6.5.0.9)*
Pixels|`1..512` = set amount of pixels in strip or ring and reset [`Rotation`](#rotation) *(applies only to addressable LEDs)*
RGBWWTable|Control compensation of unbalanced PWM channels or [White Blend Mode](White-Blend-Mode)
`PWM1,PWM2,PWM3,PWM4,PWM5` = channel range with values `0..255` *(default =`255,255,255,255,255`)*
Range adjustment is computed **after** Gamma correction.
Rotation|`` = set amount of pixels to rotate (up to `Pixels` value) *(applies only to addressable LEDs)*
Scheme|Light effects
`+` = next scheme
`-` = previous scheme
`0` = single color for LED light *(default)*
`1` = start wake up sequence (same as [`Wakeup`](#wakeup))
`2` = cycle up through colors using Speed option
`3` = cycle down through colors using Speed option
`4` = random cycle through colors using Speed and Fade
|**Following schemes are usable only with addressable LEDs, e.g. WS281X, Neopixel**
`5` = clock mode ([example](https://hackaday.io/project/28194-esp-and-ws2812-based-clock))
`6` = candlelight pattern
`7` = RGB pattern
`8` = Christmas pattern
`9` = Hanukkah pattern
`10` = Kwanzaa pattern
`11` = rainbow pattern
`12` = fire pattern
Speed|`1..40` = set fade speed from fast `1` to very slow `40`
`+` = increase speed
`-` = decrease speed
The `Speed` value represents the time in 0.5s to fade from 0 to 100% (or the reverse). Example: `Speed 4` takes 2.0s to fade from full brightness to black, or 0.5s to move from 75% to 100%.
Wakeup|Start wake up sequence from OFF to stored `Dimmer` value
`0..100` = Start wake up sequence from OFF to provided `Dimmer` value
WakeupDuration|`1..3000` = set wake up duration in seconds
White|
`1..100` = set white channel brightness in single white channel lights (single W or RGBW lights)
Width<x>|x = `1..4`
`1` - `0..4` = LED group width *([Scheme](#Scheme) `6..12` only)*
`2` - `0..32` = seconds hand width *([Scheme](#Scheme) `5` only)*
`3` - `0..32` = minutes hand width *([Scheme](#Scheme) `5` only)*
`4` - `0..32` = hour hand width *([Scheme](#Scheme) `5` only)*
See also|[`SetOption15`](#setoption15), [`SetOption16`](#setoption16), [`SetOption17`](#setoption17), [`SetOption20`](#setoption20), [`SetOption37`](#setoption37) and [`SetOption68`](#setoption68)
### RF Bridge
Command|Parameters
:---|:---
RfCode|Show last sent 24-bit user code
`1..8388607` = send 24-bit user code
`#1..#7FFFFF` = send 24-bit hexadecimal user code using RfSync, RfLow and RfHigh timing
RfHigh|`1` = reset high pulse time to 840 microseconds
`2..32767` = set high pulse time in microseconds
`#2..#7FFF` = set high pulse time in hexadecimal microseconds
RfHost|Show 16-bit host part of user code
`1` = reset 16-bit host part of user code to 11802 (#2E1A)
`2..32767` = set 16-bit host part of user code
`#2..7FFF` = set 16-bit host part of user code in hexadecimal
RfKey|Send learned or default RF data for RfKey (x = `1 – 16`)
`1` = send default RF data for RfKey using RfSync, RfLow, RfHigh and RfHost parameters
`2` = learn RF data for RfKey
`3` = unlearn RF data for RfKey
`4` = save RF data using RfSync, RfLow, RfHigh and last RfCode parameters
`5` = show default or learned RF data
`6` = send learned RF data
RfLow|`1` = reset low pulse time to 270 microseconds
`2..32767` = set low pulse time in microseconds
`#2..#7FFF` = set low pulse time in hexadecimal microseconds
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.
[Learning and Decoding RF Codes with Portisch Firmware](/devices/Sonoff-RF-Bridge-433#portisch-firmware-specific-usage)
`0` = Set iTead default firmware support and messages *(default on restart)*
`1` = set Portisch firmware support and messages
`166` or `AAA655` = start sniffing/reading RF signals disabling iTead default RF handling
`167` or `AAA755` = stop sniffing/reading RF signals enabling iTead default RF handling
`168` or `AAA855` = transmitting iTead default RF protocols
`169` or `AAA955` = start sniffing and learning predefined protocols
`176` or `AAB055` = bucket Transmitting using command 0xB0
`177` or `AAB155` = start Bucket sniffing using command 0xB1
`192` or `AAC000C055` = beep (`00C0` is the length of the sound)
`255` or `AAFF55` = show Rf firmware version (result AA02FF means Version 02)
`` = hexadecimal data to be sent to RF chip. This must be immediately followed by the `RfRaw 0` command (e.g., `Backlog RfRaw ; RfRaw 0`
RfSync|`1` = reset start sync pulse time to 8470 microseconds
`2..32767` = set start sync pulse time in microseconds
`#2..#7FFF` = set start sync pulse time in hexadecimal microseconds
See also|[`SetOption28`](#setoption28) - Set RF received data format
### IR Remote
Command|Parameters
:---|:---
IRsend``|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.**_
`` [_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)_
`>1` = emulate a long-press on the remote control, sending the message `` times, or sending a repeat message for specific protocols (like NEC)
`{"Protocol":"","Bits":,"Data":}`
`"Protocol"` (select one of the following):
- `"NEC"`
- `"SONY"`
- `"RC5"`
- `"RC6"`
- `"DISH"`
- `"JVC"`
- `"PANASONIC"`
- `"SAMSUNG"`
- `"PIONEER"`
for PANASONIC protocol this parameter is the the address, not the number of bits
`"Data":1..(2^32)-1` = data frame as 32 bit decimal.
e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":2170978686}`
**or**
`"Data":0x1..0xFFFFFFFF` = data frame as 32 bit hexadecimal.
e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":0x8166817E}`
Alternatively, you can send IR remote control codes using [RAW command encoding](IRSend-RAW-Encoding).
Information on [Receiving Infrared Data](Receiving-Infrared-Remote-Control-Data)
IRhvac|Send HVAC IR remote control code as JSON payload
`{"Vendor":"","Power":,"Mode":””, "FanSpeed":””,"Temp":}`
`"Vendor":"Toshiba"\|"Mitsubishi"\|"LG"\|"Fujitsu"`
`"Power":0\|1`
`"Mode":"Hot"\|"Cold"\|"Dry"\|"Auto"`
`"FanSpeed":"1"\|"2"\|"3"\|"4"\|"5"\|"Auto"\|"Silence"`
`"Temp":17..30`
|See also|[`SetOption29`](#setoption29) - Set IR received data format
[`SetOption38`](#setoption38) - Set IR received protocol sensitivity
[`SetOption58`](#setoption58) - [IR Raw data in JSON payload](https://github.com/arendst/Tasmota/issues/2116#issuecomment-440716483)
### SetOptions
Command|Parameters
:---:|:---
SetOption0|Save power state and use after restart (=SaveState)
`0` = disable
`1` = enable *(default)*
SetOption1|Set [button multipress](Buttons-and-Switches#multi-press-functions) mode to
`0` = allow all button actions *(default)*
`1` = restrict to single, double and hold actions (i.e., disable inadvertent reset due to long press)
SetOption3|[MQTT](MQTT)
`0` = disable MQTT
`1` = enable MQTT *(default)*
SetOption4|Return MQTT response as
`0` = RESULT topic *(default)*
`1` = %COMMAND% topic
SetOption8|Show temperature in
`0`= Celsius *(default)*
`1` = Fahrenheit
SetOption10|When the device MQTT topic changes
`0` = remove retained message on old topic LWT *(default)*
`1` = send "Offline" to old topic LWT
SetOption11|Swap button single and double press [functionality](Control-other-devices#double-press--hold)
`0` = disabled *(default)*
`1` = enabled
SetOption12|Configuration saving to flash option
`0` = allow dynamic flash save slot rotation *(default)*
`1` = use fixed eeprom flash slot
SetOption13|Allow immediate action on single button press
`0` = single, multi-press and hold button actions *(default)*
`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|Set PWM control for LED lights
`0` = basic PWM control
`1` = control with [`Color`](#Color) or [`Dimmer`](#Dimmer) commands _(default)_
SetOption16|Set addressable LED Clock scheme parameter
`0` = clock-wise mode *(default)*
`1` = counter-clock-wise mode
SetOption17|Show [`Color`](#Color) string as
`0` = hex string *(default)*
`1` = comma-separated decimal string
SetOption18|Set status of signal light paired with [CO2 sensor](#sensor14)
`0` = disable light *(default)*
`1` = enable light
The light will be green below `CO2_LOW` and red above `CO2_HIGH` (transition yellow/orange between). The default levels are: 800ppm for low and 1200ppm for high but these can be set in `user_config_override.h`.
SetOption19|[Home Assistant](integrations/Home-Assistant) automatic discovery.
***WARNING*** On version 6.4.1.x enabling may cause a watchdog reset if used on a device with a configured sensor
`0` = disabled *(default)*
`1` = enabled and also sets [`SetOption59 1`](#setoption59)
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|Update of Dimmer/Color/CT without turning power on
`0` = disabled *(default)*
`1` = enabled
SetOption21|Energy monitoring when power is off
`0` = disabled *(default)*
`1` = enabled
SetOption24|Set pressure units
`0` = hPa *(default)*
`1` = mmHg
SetOption26|Use indexes even when only one relay is present
`0` = messages use POWER *(default)*
`1` = messages use POWER1
SetOption28|RF received data format
`0` = hex *(default)*
`1` = decimal
SetOption29|IR received data format
`0` = hex *(default)*
`1` = decimal
SetOption30|Enforce Home Assistant auto-discovery as light
`0` = relays are announced as a switch and PWM as a light *(default)*
`1` = both relays and PWM are announced as light
SetOption31|Set status LED blinking during Wi-Fi and MQTT connection problems.
_[`LedPower`](#LedPower) must be set to `0` for this feature to work_
`0` = Enabled *(default)*
`1` = Disabled
SetOption32|Number of 0.1 seconds to hold button before sending `HOLD` action message.
`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|Number of seconds for which the maximum power limit can be exceeded before the relay is turned off
`1..250` = set number of seconds *(default = `5`)*
SetOption34|`0..255` = set [Backlog](#backlog) inter-command delay in milliseconds *(default = `200`)*
SetOption36|Boot loop defaults restoration control.
`0` = disable boot loop control
`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:
- 1st restart: disable ESP8285 generic GPIOs interfering with flash SPI
- 2nd restart: disable rules causing boot loop
- 3rd restart: disable all rules
- 4th restart: reset user defined GPIOs to disable any attached peripherals
- 5th restart: reset module to Sonoff Basic (1)
SetOption37|Color remapping for led channels, also provides an option for allowing independent handling of RGB and white channels. Setting changes require a device reboot.
`0` = disabled
`1..119` = according to [this table](SetOption37)
`120..127` = invalid (results in same as `0`)
`128..255` = same as `0..127` but with independent channel handling enabled
SetOption38|`6..255 ` = set IRReceive protocol detection sensitivity minimizing UNKNOWN protocols
SetOption39|Control handling of invalid power measurements. [Read more...](Power-Monitoring-Calibration#known-issues)
`0` = reset to default on next restart
`1..255` = number of invalid power readings before reporting no load *(default =`128`)*.
SetOption40|Stop detecting input change on the button GPIO. Solves [#5449](https://github.com/arendst/Tasmota/issues/5449)
Active only when [`SetOption1 1`](#setoption1) and [`SetOption13 0`](#setoption13). **This disables all long press functionality.**
`0..250` = button hold time in 0.1 seconds after which button functionality is disabled.*(default =`1`)*
Example: `Backlog SetOption1 1; SetOption13 0; SetOption40 10` - discard any button press over 1 second
SetOption42|
`0..255` = set over-temperature (Celsius only) threshold resulting in power off on all energy monitoring devices *(default = `90`)*
SetOption43|**Deprecated** in favor of [`DimmerRange`](#DimmerRange)
`0..255` = set maximum dimming value ([details](TuyaMCU#dimming-range)) *(default = `100`)*
Available for Tuya and PS_16_DZ dimmers
SetOption51|Enable GPIO9 and GPIO10 component selections in Module Configuration
:rotating_light: **WARNING** Do not use on ESP8266 devices! :rotating_light:
`0` = disable *(default)*
`1` = enable
SetOption52|Control display of optional time offset from UTC in JSON payloads
`0` = disable *(default)*
`1` = enable
SetOption53|Display hostname and IP address in GUI
`0` = disable *(default)*
`1` = enable
SetOption54|Apply [`SetOption20`](#setoption20) settings to commands from Tuya device
`0` = disable *(default)*
`1` = enable
SetOption55|mDNS service
`0` = disable *(default)*
`1` = enable
SetOption56|Wi-Fi network scan to select strongest signal on restart (network has to be visible)
`0` = disable *(default)*
`1` = enable
SetOption57|Wi-Fi network re-scan every 44 minutes with alternate to +10dB stronger signal if detected (only visible networks)
`0` = disable *(default)*
`1` = enable
SetOption58|[IR Raw data in JSON payload](https://github.com/arendst/Tasmota/issues/2116#issuecomment-440716483)
`0` = disable *(default)*
`1` = enable
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.
`0` = disable *(default)*
`1` = enable
SetOption60|Set sleep mode
`0` = [dynamic sleep](Dynamic-Sleep) *(default)*
`1` = normal sleep
SetOption61|Force [local operation](https://github.com/arendst/Tasmota/pull/4562#issuecomment-446230001) when [`ButtonTopic`](#ButtonTopic) or [`SwitchTopic`](#SwitchTopic) is set.
`0` = disable *(default)*
`1` = enable
SetOption62|Set retain on Button or Switch hold messages
`0` = disable *(default)*
`1` = don't use retain flag on `HOLD` messages
SetOption63|Set relay state feedback scan at restart ([#5594](https://github.com/arendst/Tasmota/issues/5594), [#5663](https://github.com/arendst/Tasmota/issues/5663))
`0` = Scan relay power feedback state at restart *(default)*
`1` = Disable relay power feedback state scanning at restart
SetOption64|Switch between `-` or `_` as sensor name separator
`0` = sensor name index separator is `-` _(hyphen)_ *(default)*
`1` = sensor name index separator is `_` _(underscore)_
*Affects DS18X20, DHT, BMP and SHT3X sensor names in tele messages*
SetOption65|Device recovery using [fast power cycle detection](Fast-power-cycle-device-recovery)
`0` = enabled *(default)*
`1` = disabled
SetOption66|Set publishing TuyaReceived to MQTT
`0` = disable publishing `TuyaReceived` over MQTT *(default)*
`1` = enable publishing `TuyaReceived` over MQTT
SetOption67|iFan03 Buzzer control
`0` = disable Sonoff iFan03 buzzer *(default)*
`1` = enable Sonoff iFan03 buzzer
SetOption68|Multi-channel PWM instead of a single light
`0` = Treat [PWM](#pwm) as a single light *(default)*
`1` = Treat [PWM](#pwm) as separate channels. In this mode, use [`Power`](#power) to turn lights on and off, and [`Channel`](#channel) to change the value of each channel.
[`Color`](#color) still works to set all channels at once.
***Requires restart after change***
SetOption69|**Deprecated** in favor of [DimmerRange](#DimmerRange)
By default Tuya dimmers won't dim below 10% because some don't function very well that way.
`0` = disable Tuya dimmer 10% lower limit
`1` = enable Tuya dimmer 10% lower limit *(default)*
SetOption71|Set DDS238 Modbus register for active energy
`0` = set primary register *(default)*
`1` = set alternate register
SetOption72|Set reference used for total energy
`0` = use firmware counter *(default)*
`1` = use energy monitor (e.g., PZEM-0xx, SDM120, SDM630, DDS238, DDSU666) hardware counter
SetOption73|*Deprecated in version 7.1.2.4 in favor of CORS command*
Set HTTP Cross-Origin Resource Sharing (CORS)
`0` = disable CORS *(default)*
`1` = enable CORS
SetOption74|Enable internal pullup for single DS18x20 sensor
`0` = disabled *(default)*
`1` = internal pullup enabled
SetOption75|Set grouptopic behaviour ([#6779](https://github.com/arendst/Tasmota/issues/6779))
`0` = GroupTopic using FullTopic replacing %topic% _(default)_
`1` = GroupTopic is `cmnd/%grouptopic%/`
SetOption76|Bootcount incrementing when [DeepSleep](DeepSleep) is enabled ([#6930](https://github.com/arendst/Tasmota/issues/6930))
`0` = disable bootcount incrementing _(default)_
`1` = enable bootcount incrementing
SetOption77|Do not power off if a slider is moved to far left
`0` = disabled _(default)_
`1` = enabled
SetOption80|[Blinds and shutters](Blinds-and-Shutters) support
`0` = disable blinds and shutters support *(default)*
`1` = enable blinds and shutters support
SetOption81|Set PCF8574 component behavior for all ports
`0` = set as regular state *(default)*
`1` = set as inverted state
SetOption82|Reduce the CT range from 153..500 to 200.380 to accomodate with Alexa range
`0` = CT ranges from 153 to 500 *(default)*
`1` = CT ranges from 200 to 380 (although you can still set in from 153 to 500)
SetOption83|Uses Zigbee device friendly name instead of 16 bits short addresses as JSON key when reporting values and commands
`0` = JSON key as short address
`1` = JSON key as friendly name
See [`ZigbeeName ,`](#zigbeename)
SetOption84|(Experimental) When using AWS IoT, sends a device shadow update (alternative to retained)
`0` = don't update device shadow (default)
`1` = update device shadow
Note: if the `Topic` contains `'/'` they are replaced with `'_'`
SetOption85|Enable device group support.
### Serial Bridge
Both hardware and software Serial Bridge are supported.
Hardware Serial Bridge uses `GPIO1 (Tx)` and `GPIO3 (Rx)` or `GPIO13 (Tx)` and `GPIO15 (Rx)` pins of your device.
Software Serial Bridge can use any other GPIO to be configured as components `Serial Tx` and `Serial Rx` (or `SerBr Tx` and `SerBr Rx`). If `Tx` and `Rx` components are not assigned in the Template or Module, `GPIO1` and `GPIO3` will be used. Note that changing serial logging ([`SerialLog`](#seriallog) 0) will disable the hardware Serial Bridge.
Information received by Tasmota over the serial bridge is captured automatically. Before data will be received, a properly formatted [`SerialSend` or `SSerialSend`](#SerialSend) command must be executed. This must be done any time the device restarts (e.g., via a `System#Boot` triggered rule). This command is required in order to set how the expected serial data will be formatted and interpreted (i.e., which <x> option). A `{"SSerialReceived":{"Data":""}}` message will be posted. You can use [a rule](Rule-Cookbook#switch-relays-via-serial-interface) to process the string which will be contained in `SSerialReceived#Data`.
Expect possible communication errors when additional sensors are configured.
Command|Parameters
:---|:---
Baudrate|`1` = set hardware serial bridge to default baud rate of 115200 bps
`` = set baud rate. The set rate will be a multiple of 300. The maximum baud rate possible is 19,660,500.
SBaudrate|`1` = set software serial bridge to default baud rate of 9600 bps
`` = set baud rate. The set rate will be a multiple of 300. The maximum baud rate possible is 19,660,500.
SerialConfig|`value` = set serial protocol using [data/parity/stop](https://en.wikipedia.org/wiki/Serial_port#Settings) conventional notation (example: `8N1` or `702`)
`0..23` = set serial protocol (`3` equals `8N1`)
SerialDelimiter|`` = set serial delimiter to [escape character code](https://en.wikipedia.org/wiki/Escape_character#ASCII_escape_character) or ASCII character
`1..127` = set serial delimiter to [decimal ASCII](http://www.asciichart.com/)
`128` = only allow ASCII characters 32 to 127 in response text
`129..255` = disable serial delimiter
SerialSend<x>|``
Disable serial logging and send using hardware serial
x = `1..5`
`1` = send appending `\n` (newline) ()
`2` = send
`3` = replace escape characters and send
`4` = send as binary. Data in serial response messages is encoded as hex strings
`5` = send as hex. Data in serial response messages is encoded as hex strings
SSerialSend<x>|``
Send using software serial protocol
x = `1..5`
`1` = send appending `\n` (newline) ()
`2` = send
`3` = replace escape characters and send
`4` = send as binary data. Data in serial response messages is encoded as hex strings
`5` = send as hex. Data in serial response messages is encoded as hex strings
TuyaSend<x>|Send data to MCU with [TuyaMCU](TuyaMCU)
x = `1..4`
`TuyaSend1 ,` = send boolean (`0`/`1`) data type to dpId (1 byte max length)
`TuyaSend2 ,` = send integer data to dpId (4 bytes max length)
`TuyaSend2 ,<0xAABBCCDD>` = send 4 byte data to dpId (4 bytes max length)
`TuyaSend3 ,` = send any data type to dpId (unknown max length)
`TuyaSend4 ,` = send enumerated (`0`/`1`/`2`/`3`/`4`/`5`) data type to dpId (1 byte max length)
### MP3 Player
» v6.6.0
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.
Command|Parameters
:---|:---
MP3DAC|`0` = DAC on *(default)*
`1` = DAC off
MP3Device|Specify playback device
`1` = USB
`2` = SD Card *(default (also defaults on reset or power cycle))*
MP3EQ|Set equalizer mode:
`0` = normal
`1` = pop
`2` = rock
`3` = jazz
`4` = classic
`5` = bass)
MP3Play|Play, works as a normal play on a real MP3 Player, starts at first MP3 file
MP3Reset|Reset the MP3 player to defaults
MP3Volume|`0..100` = set Volume
### Domoticz
Command|Parameters
:---|:---
DomoticzIdx|Show Domoticz Relay idx (x = `1..4`)
`0` = disable use of Relay idx *(default)*
`` = Show Relay idx
DomoticzKeyIdx|Show Domoticz Key idx (x = `1..4`)
`0` = disable use of Key idx *(default)*
`` = Show Key idx (to use enable [ButtonTopic](#buttontopic))
DomoticzSensorIdx|Show Domoticz Sensor idx (x = `1..5`)
`0` = disable use of Sensor idx *(default)*
`` = Show Sensor idx
DomoticzSwitchIdx|Show Domoticz Switch idx (x = `1..4`)
`0` = disable use of Switch idx *(default)*
`` = Show Switch idx (to use enable [SwitchTopic](#switchtopic))
DomoticzUpdateTimer|Show current update timer value in seconds
`0` = disable sending interim Domoticz status *(default)*
`1..3600` = send status to Domoticz in defined intervals
### KNX
Command|Parameters
:---|:---
KnxTx_Cmnd|`0` or `1` = send command using slot set in KNX Menu at KNX_TX
KnxTx_Val|`` = send float value using slot set in KNX Menu at KNX_TX
KNX_ENABLED|Status of KNX Communications
`0` = set to Disable
`1` = set to Enable
KNX_ENHANCED|Status of Enhanced mode for KNX Communications
`0` = set to Disable
`1` = set to Enable
KNX_PA|KNX Physical Address
`0.0.0` = address not set
`x.x.x` = set the device address (example `1.1.0`)
KNX_GA|Return the amount of Group Address to Send Data/Commands configured
KNX_GA|Setup Group Address to Send Data/Commands ( = KNX Group Address number)
`1` = return configuration of GA
`, , , ` to set configuration of GA
`` = [see table below for OPTION list](#knxJSON)
`, , ` = KNX Address to Send Data/Commands
KNX_CB|Return the amount of Group Address to Receive Data/Commands configured
KNX_CB|Setup Group Address to Receive Data/Commands
`1` = return configuration of CB
`, , , ` to set configuration of CB
`` = [see table below for OPTION list](#knxJSON)
`, , ` = KNX Address to Receive Data/Commands
OPTION|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|
### Displays
» v6.3.0
Command|Parameters
:--- |:---
Display|Show current display setting as a JSON payload
DisplayAddress|`0..255` Set display module address
DisplayDimmer|`0` Turn the display off
`1..100` Turn the display on
`0..100` Set display luminosity *(only on 8x8 Dot-Matrix displays)*
DisplayMode|`0..5` Set to display [predefined content](Displays#displaymode-parameters) according to display type
DisplayModel|Set display model:
`1` = [I2C LCD Display](https://learn.adafruit.com/i2c-spi-lcd-backpack) (default addresses `0x27`, `0x3F`)
`2` = [SSD1306](https://learn.adafruit.com/monochrome-oled-breakouts/arduino-library-and-examples) OLED 128x32/128x64 (default I2C addresses `0x3C`, `0x3D`)
`3` = [HT16K33](https://www.adafruit.com/product/1427) 8x8 Dot-Matrix
`4` = [ILI9341](https://www.adafruit.com/product/1770) TFT LCD
`5` = [2.9 inch E-Paper Display](https://www.waveshare.com/wiki/2.9inch_e-Paper_Module) 296x128 (software 3-wire SPI)
`6` = [4.2 inch E-Paper Display](https://www.waveshare.com/wiki/4.2inch_e-Paper_Module) 400x300 (software 3-wire SPI)
`7` = [SH1106](https://www.ebay.com/itm/1-3-SH1106-I2C-IIC-128X64-OLED-LCD-LED-Display-Module-Board-For-Arduino-BLUE/391701761596) OLED 128x64 (default I2C address `0x3c`)
`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)
`9` = [SSD1351](https://www.ebay.com/itm/3-3V-5V-General-1-5inch-RGB-OLED-Display-Module-128x128-SSD1351-SPI-Interface/253655550921) color OLED 128x128 (hardware 3-wire SPI)
`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|`1..7` Set time in seconds to update predefined content when using `DisplayMode` ≠ `0`
DisplaySize|`1..4` Set display scale-up size *(SSD1306 and ILI9341 only)*
DisplayRotate|Set rotation angle
`0` = 0°
`1` = 90°
`2` = 180°
`3` = 270°
DisplayText|`` - See [DisplayText use](Displays#displaytext-use)
DisplayCols|`1..44` Set number of display columns *(for display modes>0)*
DisplayRows |`1..32` Set number of display rows *(for display modes>0)*
DisplayFont|Specify the current font
`0` use classic GFX font
`1` = 12
`2` = 24
`3` = 8 (opt)
`7` use RA8876 internal font
DisplayWidth|Specify the display width in pixels *(SSD1306 only)*
DisplayHeight|Specify the display height in pixels *(SSD1306 only)*
### Stepper Motors
:---|:---
MotorMIS|`1,2,4,8,16` Set micro stepping increment - 1/1 (full steps) to 1/16 *(default = `1`)*
MotorSPR|`integer` Set the number of steps the given motor needs for one revolution *(default = `200`)*
This is dependent on the type of motor and micro stepping. Most common motors are 1.8° per step.
MotorRPM|`1..300` Set revolutions per minute *(default = `30`)*
MotorMove|`integer` Move the motor the given number of steps (positive values: clockwise, negative values: counterclockwise)
MotorRotate|`integer` Rotate the motor the given number of degrees (positive values: clockwise, negative values: counterclockwise)
MotorTurn|`float` Spin the motor the given number of turns (positive values: clockwise, negative values: counterclockwise)
### Blinds, Shutters and Roller Shades
Command
(x = `1..4`)|Parameters
:---|:---
ShutterButton<x>|` `
Assign a button to control the shutter. For more details please refer to [Blinds and Shutters](Blinds-and-Shutters) support
``
`0`: disable buttons for this shutter
`1..4`: Button number
`` `up`/`down`/`updown`: function to assign to the button
`` `1`/`0`: enable/disable MQTT publish for button hold action
For example:To control shutter #1 by two buttons: `Backlog ShutterButton1 1 up 1; ShutterButton1 2 down 1` assigns button #1 to act as an "up" button and button #2 to act as an "down" button for shutter #1 including MQTT publish.To control shutter #1 by a single button: `ShutterButton1 1 updown 0` assigns button #1 to act as an "up and down" button.
ShutterCalibration<x>|Granular shutter position calibration. The measured opening position of the shutter at the 30, 50, 70, 90, and 100 percent opened locations. For example: `ShutterCalibration 23 38 56 74 82`
ShutterCloseDuration<x>| `1..255` *(default = `10`)*
time, in seconds, it takes to fully close the shutter. A fraction of a second can be specified (e.g. `45.7`).
ShutterClose<x>|Engage the relay to close the shutter. This action can be requested at any time. Number of shutter can be the index or the arguement
ShutterFrequency<x>|`0..10,000`Hz *(default = `1000`)*
the maximum frequency at which the stepper motor can operate reliably. Typically this is up to 2,000Hz with a 12V power supply and up to 5,000Hz with a 24V power supply.
ShutterEnableEndStopTime<x>|`0` = no additional shutter end stop time *(default)*
`1` = 1 s additional shutter end stop time
ShutterInvert<x>|`0` = use default shutter positioning (`0` = Closed, `100` = Open)
`1` = invert shutter positioning (`100` = Closed, `0` = Open) (e.g., if used with KNX)
ShutterLock<x>|`0` = unlock shutter positioning *(default)*
`1` = lock shutter positioning
ShutterMotorDelay<x>|`0.00 .. 12.75` *(default = `0`)*
time, in seconds, it takes the motor to start moving once power is turned on; i.e., motor lag time.
When used with stepper motors, this setting defines the ramp up/down speed (i.e., acceleration/deceleration) before the motor reaches its target speed for gradual starting and stopping.
ShutterOpenDuration<x>|`1..255` *(default = `10`)*
time, in seconds, it takes to fully open the shutter. A fraction of a second can be specified (e.g. `45.7`).
ShutterOpen<x>|Engage the relay to open the shutter. This action can be requested at any time. Number of shutter can be index or the arguement
ShutterPosition<x>|`0..100`, `UP`, `DOWN`, `STOP`
A shutter position change can be requested at any time. The shutter will stop and revert or update to the requested position. The shutter's actual position will be saved _**after**_ the movement is completed. In this case, the position will be restored during reboot. An interruption during shutter movement (e.g., a device restart) will lose the current position.
ShutterRelay<x>|``
`0` = disable this and all higher numbered shutters
`1,3,5,7,...` (must be an odd number) = `Relay` component used to open the shutter. This relay's mate, the next higher numbered relay, closes the shutter. Depending on the shutter mode, the relays may need to be interlocked using the [`Interlock`](Commands#interlock) command.
**The `ShutterRelay` command must be executed first before any other shutter commands for `Shutter` can be executed.**
ShutterSetClose<x>|shutter closed position. `ShutterPosition` will be reset to fully closed value (e.g., `0` when `ShutterInvert = 0`, `100` otherwise).
ShutterSetHalfway<x>| `0..100` *(default = `50`)*
Define shutter half open position (in percent)
ShutterStop<x>|Disengage the relays to stop the shutter. Number of shutter can be the index or the arguement
See also| [`SetOption80`](#setoption80) - Enable shutter support
### Zigbee
See the [Complete Zigbee guide](Zigbee)
Command|Parameters
:---|:---
||Options to specify a Zigbee device: ``:
`` the short address of the Zigbee device on the network, ex: `0x1234`
`` the permanent IEEE address of the Zigbee device (64 bits), ex: `0x00158D00041160C5`
`` the number of the device in the internal list (starts at 1), ideal for enumerating devices, ex: `1`
`` friednly name set with `ZbName`, ex: `Room_Light`
ZbForget|Removes a device from the Tasmota flash memory. To be used for devices that are no more used and are still visible in `ZbStatus`
``
ZbName|Sets or reads the Zigbee device friendly name (up to 32 characters).
`,` sets the new friendly name
`,` (empty name) clears the friendly name
`` displays the current friendly name
See [`SetOption83 1`](#setoption83) to enable friendly names as JSON keys instead of short addresses
ZbPermitJoin|Sets new device pairing mode
`0` = disable pairing
`1` = enable pairing for 60 seconds
`99` = enable pairing until device reboot
- :warning: Leaving your Zigbee network pairing open to join will allow any Zigbee device to connect and retrieve your network encryption key. This can lead to a compromise of your Zigbee network.
ZbSend|`{ "Device":"", "Endpoint":"", "Send":{"":} }`
`` the short address of the Zigbee device on the network.
`` the target endpoint on the device ([identifying endpoints](Zigbee#identifying-target-device-endpoints))
`"":` the command and parameters to send ([Zigbee Device Commands](Zigbee#supported-zigbee-device-commands))
Note: Use [`ZigbeeZCLSend`](#ZigbeeZCLSend) to send a raw form low-level message
Ex: `ZigbeeSend { "Device":"0x1234", "Endpoint":"0x03", "Send":{"Power":"on"} }`
ZbStatus<x>|Display Zigbee devices seen on the network since boot
`` (optional)
` ` = all devices
This command provides three levels of increasing detail according to ``
`ZbStatus1` Display Short Address, and Friendly Name
`ZbStatus2` Also include Manufacturer ID and Model ID
`ZbStatus3` Also include a list of endpoints and the clusterIds supported by each endpoint
Ex: `ZbStatus3 1` requests all details for device number 1
The information requested may exceed the maximum result size allowed by Tasmota. In this case, the output will be truncated. To get all of the desired information, request results for a specific device individually.
Zigbee debug functions.
:warning: :warning: :warning: **Do not use unless you know exactly what you are doing.** :warning: :warning: :warning:
Command|Parameters
:---|:---
ZbProbe|Probe a Zigbee device to get additional information including its IEEEaddress, vendor and model names, endpoints, and supported clusters per endpoint.
``
A device probe is performed automatically when a new Zigbee device connects.
Battery powered Zigbee devices can generally not be probed because they are in sleep mode most of the time.
ZbRead|Read Zigbee device attributes
`{ "Device":"", "Endpoint":"", "Cluster":"", "Read":[] }`
`` the short address of the Zigbee device on the network.
`` the target endpoint on the device ([identifying endpoints](Zigbee#identifying-target-device-endpoints))
`` the cluster number of the attributes
`` requested attributes array
Ex: `ZbRead { "device":"0x69CF", "endpoint":"0x03", "cluster":"0x0006", "read":["0x0000"] }`
ZbReset|`1` = perform a factory reset and reconfiguration of the CC2530 chip.
**You will need to re-pair all Zigbee devices**
ZbSave|Forces saving the Zigbee device information to Flash. Auto-saving happens 10 seconds after a new Device parameter was changed, this command is normally not useful
ZbZCLSend|Send a raw ZCL message to a Zigbee device. This is a low-level command, and requires to manually build the ZCL parameters. Most common usage will be provided as high-level functions.
一键复制
编辑
Web IDE
原始数据
按行查看
历史