You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Commands.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ LedPower<x\>|LED<x\> power state control. **Enabled only when LedLink(i) is conf
106
106
LedState<aid="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>`8` = LED on when Wi-Fi and MQTT are connected.<BR>_*Cannot* be issued directly and is only activated when `LedPower` is switched from `0` to `1` due to a software function_
107
107
Power0<aid="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
108
108
Power<x\><aid="power"></a>|Control the corresponding Relay (enumerated) power state and also restart PulseTime<x\><BR> `0` / `off` / `false` = turn OFF <BR> `1` / `on` / `true` = 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
109
-
PowerOnState<aid="poweronstate"></a>|Control relay state when the device is _**powered up**_. [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)
109
+
PowerOnState<aid="poweronstate"></a>|Control relay state when the device is _**powered up**_. [More information](PowerOnState)<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)
110
110
PulseTime<x\><aid="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>
111
111
SwitchDebounce<aid="switchdebounce"></a>|User control over switch debounce timing <BR>`40..1000` = set switch debounce time in milliseconds *(default = `50`)*
MqttPort<aid="mqttport"></a>|`1` = reset MQTT port to firmware default (`MQTT_PORT`) and restart<BR>`<value>` = set MQTT port between 2 and 32766 and restart
188
188
MqttRetry<aid="mqttretry"></a>|`10..32000` = set MQTT connection retry timer in seconds *(default = `10`)*
189
189
MqttUser<aid="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
190
-
PowerRetain<aid="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>
190
+
PowerRetain<aid="powerretain"></a>|MQTT [power retain state](PowerOnState#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>
191
191
Prefix1<aid="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
192
192
Prefix2<aid="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
193
193
Prefix3<aid="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
Someone asked me on here a more detailed explanation of how to do this, so I thought I would post (as best as I can recall) how to do it with a Windows PC.
3
+
4
+
- The Sonoff RF Bridge firmware is uploaded Like any other ESP device. Please refer to the [flashing](Flashing) instructions.
5
+
6
+
- Ensure the switch on your RF Bridge is switched of the OFF position (change it back to ON position AFTER flashing your Bridge).
7
+
8
+
- Connect up your USB serial adapter to the correct pins on the bridge. Hold DOWN the pairing button while connecting the USB serial adapter to your computer (the bridge should now go into the correct mode where you can flash it). (Pin out etc on the below image)
9
+

10
+
11
+
- At the top right of the Arduio IDE software, click on the right arrow (UPLOAD) to upload the firmware. This should take about 2-3 minutes as it compiles the firmware then uploads it.
12
+
13
+
When compete, disconnect the cables etc, switch the switch back to the ON position (away from the 5 pin header) and it should now be working as you expect.
If MQTT is defined and [`PowerRetain`](Commands#powerretain) is used the last state will be stored permanently in MQTT database.
156
+
157
+
|Command | Description |
158
+
|-|-|
159
+
[`PowerRetain`](Commands#powerretain) | Show current MQTT power retain state.<BR> `0` / `off` = disable MQTT power retain on status update *(default)* <BR> `1` / `on` = enable MQTT power retain on status update
160
+
161
+
**BUT**, a message in your MQTT broker flagged as 'retained' will ***_always_ override the `PowerOnState`***.
162
+
163
+
This is usually the main cause for "ghost switching". Learn more in [MQTT retained messages explained](http://www.steves-internet-guide.com/mqtt-retained-messages-example/). Check out [this tutorial](https://www.youtube.com/watch?v=31IyfM1gygo) for troubleshooting switch ghosting.
164
+
165
+
### Clearing Retained Messages
166
+
To check, if there is a retain flag set for the switch's power topic, monitor `cmnd/+/power` in a MQTT client (recommended [MQTT.fx](https://mqttfx.jensd.de/) for Windows or [Eclipse Mosquitto](https://mosquitto.org/) in linux).
167
+
168
+
You can use [Tasmota Device Manager](https://github.com/jziolkowski/tdm) to clear all retained messages for selected device with a single click.
Copy file name to clipboardExpand all lines: PowerOnState.md
+1-25Lines changed: 1 addition & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,4 @@
1
-
## Side effects with using MQTT messages
2
-
3
-
If MQTT is defined and [`PowerRetain`](Commands#powerretain) is used the last state will be stored permanently in MQTT database.
4
-
5
-
|Command | Description |
6
-
|-|-|
7
-
[`PowerRetain`](Commands#powerretain) | Show current MQTT power retain state.<BR> `0` / `off` = disable MQTT power retain on status update *(default)* <BR> `1` / `on` = enable MQTT power retain on status update
8
-
9
-
**BUT**, a message in your MQTT broker flagged as 'retained' will ***_always_ override the `PowerOnState`***.
10
-
11
-
This is usually the main cause for "ghost switching". Learn more in [MQTT retained messages explained](http://www.steves-internet-guide.com/mqtt-retained-messages-example/). Check out [this tutorial](https://www.youtube.com/watch?v=31IyfM1gygo) for troubleshooting switch ghosting.
12
-
13
-
### Clearing Retained Messages
14
-
To check, if there is a retain flag set for the switch's power topic, monitor `cmnd/+/power` in a MQTT client (recommended [MQTT.fx](https://mqttfx.jensd.de/) for Windows or [Eclipse Mosquitto](https://mosquitto.org/) in linux).
15
-
16
-
You can use [Tasmota Device Manager](https://github.com/jziolkowski/tdm) to clear all retained messages for selected device with a single click.
Copy file name to clipboardExpand all lines: help/FAQ.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -211,7 +211,7 @@ You can disable status LED blinking using:
211
211
`Backlog LedPower 0; SetOption31 1`
212
212
213
213
### My device randomly switches on and off. Do I have ghosts in my house?
214
-
Most of the issues with random, or "ghost", switching are related to MQTT retain settings. In short, your MQTT broker is retaining a message with the POWER status of the device which gets applied on reboots. [Solution here](PowerOnState-Configuration#side-effects-with-using-mqtt-messages)
214
+
Most of the issues with random, or "ghost", switching are related to MQTT retain settings. In short, your MQTT broker is retaining a message with the POWER status of the device which gets applied on reboots. [Solution here](PowerOnState#side-effects-with-using-mqtt-messages)
215
215
216
216
In some cases, adding a switch to a device causes ghost switching. In this case, you may need to add a [low pass filter](https://www.youtube.com/watch?v=aq8_os6g13s&ab_channel=DrZzs) to dampen any spikes on the input. In the case of the Sonoff T1, a modification to [change the filter capacitor](https://github.com/arendst/Tasmota/issues/5449#issuecomment-478471697) on the PCB may be required.
0 commit comments