This shows you the differences between two versions of the page.
| projects:sonoff-s20-esp8266-wifi-smart-socket [2017-09-30 21:20] – created trinitor | projects:sonoff-s20-esp8266-wifi-smart-socket [2017-11-21 19:34] (current) – trinitor | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Sonoff S20 ESP8266 WiFi Smart Socket ====== | ====== Sonoff S20 ESP8266 WiFi Smart Socket ====== | ||
| + | |||
| + | |Description | ||
| + | |Project Owner |Trinitor | | ||
| + | |Project Start |2017-09-31 | | ||
| + | |Status | ||
| ===== Overview ===== | ===== Overview ===== | ||
| Line 31: | Line 36: | ||
| * {{https:// | * {{https:// | ||
| - | ===== Flash ===== | + | ===== Arduino IDE Config |
| - | * download ESPEasy | + | * Preferences |
| - | * https://github.com/letscontrolit/ESPEasy/ | + | * Additional Board Manager URLs: http://arduino.esp8266.com/stable/package_esp8266com_index.json |
| - | * pip install esptool | + | * Tools -> Board -> Board Manager |
| - | * hold down the button and plugin the USB port = flash mode | + | * add esp8266 |
| - | * esptool.py --port / | + | |
| - | ===== Network Config | + | ===== Tasmota Firmware |
| - | * Connect to device AP: | + | git clone https:// |
| - | * SSID: ESP_Easy_0 | + | edit settings in Sonoff-Tasmota/ |
| - | * password: configesp | + | < |
| - | * browse to http://192.168.4.1 | + | #define STA_SSID1 |
| - | * configure wireless LAN settings | + | #define STA_PASS1 |
| + | #define STA_SSID2 | ||
| + | #define STA_PASS2 | ||
| + | #define SYS_LOG_HOST | ||
| + | #define OTA_URL | ||
| + | #define MQTT_HOST | ||
| + | #define MQTT_USER | ||
| + | #define MQTT_PASS | ||
| + | #define WEB_PASSWORD | ||
| + | #define FRIENDLY_NAME | ||
| + | </ | ||
| - | ===== Basic Config ===== | + | ===== ESP8266 Board config |
| - | * connect to normal | + | To gain as much code space as possible from the available 1M flash memory Tasmota provides a linker file without SPIFFS area |
| - | * browse to http://192.168.11.x | + | < |
| - | * Config | + | cp Sonoff-S20-Tasmota/Sonoff-Tasmota/arduino/ |
| - | * Unit Name: power01 | + | cp Sonoff-S20-Tasmota/ |
| - | * Admin Password: xxx | + | |
| - | * Hardware | + | |
| - | * Wifi Status Led: GPIO-13 (D7) | + | |
| - | * Pin mode 0 (D3): Input | + | |
| - | * Devices | + | |
| - | * 1 | + | |
| - | * Device: Switch input | + | |
| - | * Name: Button | + | |
| - | * Enabled: Checked | + | |
| - | * Internal PullUp: Checked | + | |
| - | * 1st GPIO: GPIO-0 (D3) | + | |
| - | * Value 1: State | + | |
| - | * 2 | + | |
| - | * Device: Switch input | + | |
| - | * Name: Relay | + | |
| - | * Enabled: Checked | + | |
| - | * Internal PullUp: Unchecked | + | |
| - | * 1st GPIO: GPIO-12 (D6) | + | |
| - | * Value 1: State | + | |
| - | * Tools | + | |
| - | * Advanced | + | |
| - | * Rules: Checked | + | |
| - | * Rules | + | |
| - | * Rule Set 1 | + | |
| - | * < | + | |
| - | on Button# | + | |
| - | if [Relay# | + | |
| - | gpio,12,1 | + | |
| - | else | + | |
| - | gpio,12,0 | + | |
| - | endif | + | |
| - | endon | + | |
| </ | </ | ||
| - | ===== Test ===== | + | ===== Flash ===== |
| - | + | * Upload Using: Serial | |
| - | * press hardware button | + | * Flash Mode: DOUT |
| - | * curl "http:// | + | * Flash Frequency: 40MHz |
| - | * curl "http:// | + | * CPU Frequency: 80MHz |
| + | * Flash Size: 1M (no SPIFFS) | ||
| + | * Debug Port: Disabled | ||
| + | * Debug Level: None | ||
| + | * Reset Method: ck | ||
| + | * Upload Speed: 115200 | ||
| + | * Port: Your COM port connected to sonoff | ||