Edited, layouted and hyperlinked

blakadder 2019-02-23 11:48:17 +01:00
parent 0e1e3ecaf5
commit 7be186d078
1 changed files with 17 additions and 9 deletions

@ -1,19 +1,27 @@
The main button on a Sonoff-Tasmota flashed module provides the following functionalities:
If your device has one, the built in hardware push button offers a lot of functionality. Keep in mind that if you have changed [ButtonTopic](commands#buttontopic), [SetOption2](commands#setoption2), [SetOption11](commands#setoption11) or [SetOption13](commands#setoption13) some functionality will be changed or removed.
- **1 short press:** Toggles the relay either directly or by sending a MQTT message like ```cmnd/sonoff/POWER1 ON```. This will blink the LED twice and sends a MQTT status message like ```stat/sonoff/POWER1 ON```. If ```cmnd/sonoff/ButtonRetain on``` has been used the MQTT message will also contain the MQTT retain flag.
### 1 short press
Toggles the relay, either directly or by sending a MQTT message like ```cmnd/sonoff/POWER1 ON```. This will blink the LED twice and sends a MQTT status message like ```stat/sonoff/POWER1 ON```. If ```cmnd/sonoff/ButtonRetain on``` has been used the MQTT message will also contain the MQTT retain flag.
- **2 short presses:** Toggles the relay 2 if available on the device. This will blink the LED twice and sends a MQTT status message like ```stat/sonoff/POWER2 on```.
### 2 short presses
Toggles the second relay (if available on the device). This will blink the LED twice and sends a MQTT status message like ```stat/sonoff/POWER2 on```.
- **3 short presses:** Start Wi-Fi smartconfig allowing for SSID and Password configuration using an Android mobile phone with the [ESP8266 SmartConfig](https://play.google.com/store/apps/details?id=com.cmmakerclub.iot.esptouch) app. The LED will blink during the config period. A single button press during this period will abort and restart sonoff.
### 3 short presses
Start Wi-Fi smart config allowing for SSID and password configuration using an Android mobile phone with the [ESP8266 SmartConfig](https://play.google.com/store/apps/details?id=com.cmmakerclub.iot.esptouch) app. The LED will blink during the config period. A single button press during this period will abort and restart the device.
- **4 short presses:** Start Wi-Fi manager providing an Access Point with IP address 192.168.4.1 and a web server allowing the configuration of Wi-Fi. The LED will blink during the config period. A single button press during this period will abort and restart sonoff.
### 4 short presses
Start Wi-Fi manager providing an Access Point with IP address 192.168.4.1 and a web server allowing the configuration of Wi-Fi. The LED will blink during the config period. A single button press during this period will abort and restart the device.
- **5 short presses:** Start Wi-Fi Protected Setup (WPS) allowing for SSID and Password configuration using the router's WPS button or webpage. The LED will blink during the config period. A single button press during this period will abort and restart sonoff.
### 5 short presses
Start Wi-Fi Protected Setup (WPS) allowing for SSID and password configuration using the router's WPS button or web page. The LED will blink during the config period. A single button press during this period will abort and restart the device.
- **6 short presses:** Will restart the module
### 6 short presses
Restart the device.
- **7 short presses:** Start OTA download of firmware. The green LED is lit during the update
### 7 short presses
Start OTA download of firmware using [OtaUrl](commands#otaurl). The green LED is lit during the update.
- **Pressing the button for over 40 seconds:** Reset settings to defaults as defined in ```user_config.h``` and restarts the device
### Pressing the button for over 40 seconds
Reset settings to firmware defaults as defined in ```my_user_config.h``` and ```user_config_override.h``` and restart the device.
The button is usually connected to `GPIO0` *(NodeMCU pin D3)*