5.0 KiB
Tasmota Console Commands Documentation
This document provides detailed information about the console commands used in the network_configuration.json file, particularly focusing on the SetOptions commands.
Console Section in network_configuration.json
The console section in the network_configuration.json file allows you to configure various Tasmota device settings through the TasmotaManager script. These settings are applied to all devices during the version check process.
"console": {
"SwitchRetain": "Off",
"ButtonRetain": "Off",
"PowerOnState": "3",
"PowerRetain": "On",
"SetOption1": "0",
"SetOption3": "1",
"SetOption13": "0",
"SetOption19": "0",
"SetOption32": "8",
"SetOption53": "1",
"SetOption73": "1",
"rule1": "on button1#state=10 do power0 toggle endon",
"Rule1": "1"
}
MQTT Retain Settings
| Command | Values | Description |
|---|---|---|
SwitchRetain |
On, Off |
Controls whether MQTT retain flag is used on switch press messages. Default: Off |
ButtonRetain |
On, Off |
Controls whether MQTT retain flag is used on button press messages. Default: Off |
PowerRetain |
On, Off |
Controls whether MQTT retain flag is used on power state messages. Default: Off |
Power Settings
| Command | Values | Description |
|---|---|---|
PowerOnState |
0 to 4 |
Controls the power state when the device is powered up:0 = Off1 = On2 = Toggle3 = Last state (default)4 = Turn on if off after restart |
SetOptions
SetOptions are special commands that control various aspects of Tasmota device behavior. Below are the SetOptions currently used in the configuration:
| Command | Values | Description |
|---|---|---|
SetOption1 |
0, 1 |
Controls whether a button press toggles power or sends a MQTT message:0 = toggle power (default)1 = send MQTT message |
SetOption3 |
0, 1 |
Controls MQTT enabled/disabled:0 = disable MQTT1 = enable MQTT (default) |
SetOption13 |
0, 1 |
Controls whether a button press clears retained messages:0 = disable (default)1 = enable |
SetOption19 |
0, 1 |
Controls Home Assistant auto-discovery:0 = disable (default)1 = enable |
SetOption32 |
1 to 250 |
Time in minutes to hold relay latching power before reset. Default: 1 |
SetOption53 |
0, 1 |
Controls display of hostname and IP address in GUI:0 = disable (default)1 = enable |
SetOption73 |
0, 1 |
Controls whether HTTP cross-origin resource sharing is enabled:0 = disable (default)1 = enable |
Additional SetOptions
Here are some other useful SetOptions that can be added to the configuration:
| Command | Values | Description |
|---|---|---|
SetOption0 |
0, 1 |
Save power state and use after restart:0 = disable1 = enable (default) |
SetOption4 |
0, 1 |
Return MQTT response as RESULT or %COMMAND%:0 = RESULT (default)1 = %COMMAND% |
SetOption8 |
0, 1 |
Show temperature in Celsius or Fahrenheit:0 = Celsius (default)1 = Fahrenheit |
SetOption10 |
0, 1 |
When the device restarts, the LWT message is sent:0 = disable (default)1 = enable |
SetOption11 |
0, 1 |
Swap button single and double press functionality:0 = disable (default)1 = enable |
SetOption20 |
0, 1 |
Update of Hass discovery messages:0 = disable (default)1 = enable |
SetOption30 |
0, 1 |
Enforce Home Assistant auto-discovery as light:0 = disable (default)1 = enable |
SetOption31 |
0, 1 |
Disable status LED blinking during Wi-Fi and MQTT connection issues:0 = LED enabled (default)1 = LED disabled |
SetOption36 |
0 to 255 |
Boot loop control:0 = disable (default)1 to 200 = enable with number of boot loops before entering safe mode |
SetOption52 |
0, 1 |
Control display of optional time offset from UTC in JSON messages:0 = disable (default)1 = enable |
SetOption65 |
0, 1 |
Device recovery using fast power cycle detection:0 = disable (default)1 = enable |
SetOption80 |
0, 1 |
Enable Alexa support for devices with an ESP8266 over 1M flash:0 = disable1 = enable (default) |
SetOption82 |
0, 1 |
Reduce the CT range from 153..500 to 200..380 to accommodate with Alexa:0 = CT ranges from 153 to 500 (default)1 = CT ranges from 200 to 380 (Alexa compatible) |
Rules
Rules allow you to create simple automations directly on the Tasmota device.
| Command | Values | Description |
|---|---|---|
rule1 |
Rule expression | Defines the first rule. Example: on button1#state=10 do power0 toggle endon |
Rule1 |
0, 1 |
Enables or disables rule1:0 = disable (default)1 = enable |
For more information about Tasmota commands, visit the official Tasmota documentation.