Overview
A Sonoff device running the Tasmota firmware can be configured using the web console.
Commands
Command | Description | Example |
---|---|---|
PulseTime | Set the relay to turn off after a number of seconds +100. | > PulseTime 400 (turn off after 5 minutes) > PulseTime 1300 (turn off after 20 minutes [20*60+100] ) |
SwitchMode | Set the switch mode of the device 0=Togle 1=Follow 2=Follow Inverted ... | > SwitchMode 1 > SwitchMode1 1 >SwitchMode2 1 |
LedState | Set the LED 0 = Disable the LED 1 = Show power state on led ... | > LedState 0 (disable LED) (attempt to disable all leds)
|
TelePeriod | Display/Configure Telemetry Period in seconds from 10 to 3600 > TelePeriod - Show current telemetry period in seconds > TelePeriod <sec> | > TelePeriod > TelePeriod 60 |
Timezone | -13..13 = set timezone99 = use timezone configured with TimeDST and TimeSTD | > Timezone -4 |
TimeSTD TimeDST | Set standard (STD) and daylight saving (DST) timezones0 = reset timezone parameters to firmware defaultsH ,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 | DST starts Mar 10, 2019 - Daylight Saving Time Started DST Ends Nov 3, 2019 - Daylight Saving Time Ends
-4*60 = -240 > TimeDST 0,2,3,1,2,-240 -5*60 = -300 > TimeSTD 0,1,11,1,2,-300 |
Set Timezone for Eastern Canada | TimeSTD 0,1,11,1,2,-300 TimeDST 0,2,3,1,2,-240 TimeZone 99 | |
Rule0 | List all rules | |
Rule1 | Displays Rule 1 | |
PowerOnState = 1 | Turn power(s) ON after power up | |
Rule Examples
Rule | Description |
---|---|
RULE1 ON Power1#state=0 DO ruletimer1 10 ENDON ON rules#timer=1 DO Power1 1 ENDON RULE1 1 | Turns the power back on after 10 seconds |
Web Commands
Command | URL | Description |
---|---|---|
Get Status 10 | http://sonoff/cm?user=USER&password=PASS&cmnd=status%2010 | Output status: {
} |
Set TimeDST | http://sonoff/cm?user=USER&password=PASS&cmnd=TimeDST%200,2,3,1,2,0,-240 | |
Get Status 8 - POWER | http://sonoff/cm?user=USER&password=PASS&cmnd=status%208 curl "http://sonoff/cm?user=USER&password=PASS&cmnd=status%208" | { "StatusSNS": { "Time": "2024-05-02T15:28:33", "ENERGY": { "TotalStartTime": "2024-05-01T21:11:33", "Total": 1.081, "Yesterday": 0.312, "Today": 0.77, "Power": 39, "ApparentPower": 68, "ReactivePower": 56, "Factor": 0.57, "Voltage": 123, "Current": 0.557 } } } |
Reference
Reference | URL |
---|---|
Sonoff-Tasmota Commands | https://tasmota.github.io/docs/Commands/ |