Hi, newbie here with first venture into IoT.
Trying to get a Sonoff S20 working (UK version made Dec 2016). I followed the YouTube video
https://www.youtube.com/watch?v=-JxPWA-qxAk as far as 11:40. All seemed to go well but the S20 does not make contact with my wi-fi access point.
Arduino IDE
Installed v1.8.2 under Windows 7 64bit
Edited PubSubClient.h and changed Line #define MQTT_MAX_PACKET_SIZE 128 to #define MQTT_MAX_PACKET_SIZE 512
Installed esp8266 by ESP8266 Community (version 2.3.0)
Installed PubSubClient v 2.6.0
Installed ArduinoJson v 5.8.4
Downloaded Tasmota 4.1.3 from Git
Network:
Vigor router at 192.168.1.1 with DHCP
Fixed IP Address to MAC Address Strict Bind temporarily disabled
Vigor is cabled linked to a TP-Link Wi-Fi Access Point
TP-Link is at 192.168.1.17
Has DHCP disabled
Channel: Auto
Mode:
11bgn mixed
Channel Width: auto
Wireless Radio Enabled
SSID Broadcast Enabled
MAC filtering is temporarily disabled
Security is WPA2-PSK and AES
Tasmota config
#define WIFI_IP_ADDRESS "0.0.0.0" // [IpAddress1] Set to 0.0.0.0 for using DHCP or IP address
#define WIFI_GATEWAY "192.168.1.17" // {IpAddress2] If not using DHCP set Gateway IP address
#define WIFI_SUBNETMASK "255.255.255.0" // [IpAddress3] If not using DHCP set Network mask
#define WIFI_DNS "212.23.6.100" // [IpAddress4] If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY)
#define STA_SSID1 "xxxx xxxx-xxx" // [Ssid1] Wifi SSID - 20 chars long has blanks and hyphens
#define STA_PASS1 "xxxxxxxxx" // [Password1] Wifi password - 13 chars with digits, letters special chars
#define STA_SSID2 "" // [Ssid2] Optional alternate AP Wifi SSID
#define STA_PASS2 "" // [Password2] Optional alternate AP Wifi password
Note: SSID and Password were copied/pasted from the TP-Link - not retyped
As per the YouTube video disabled:
//#define USE_DOMOTICZ - home automation system
https://www.domoticz.com///#define USE_I2C - I2C using library wire
//#define USE_IR_REMOTE - Send IR remote commands using library IRremoteESP8266 and ArduinoJson
//#define USE_WS2812_CTYPE 1 - WS2812 Color type (0 - RGB, 1 - GRB)
As per video in Arduino IDE:
Under Tools\Board and selected Generic ESP8266 Module
Under Tools\Flash size set to 1M 64k
Under Tools\Port set to COM21
Flashing:
Flashing went OK with no error messages and 100% downloaded.
I did not solder a header but held a header in the holes with constant pressure.
Unplugged USB cable and replugged in. S20 flashes
Results:
S20 does not appear in the TP-Link Wireless Statics page where connected devices are listed with their MAC address
Tried:
1. Setting #define WIFI_IP_ADDRESS to "192.168.1.29" - this should be the next available address issued by the Vigor
2. Accessing 192.168.1.29 from a browser - times out
3. Plugging S20 into a power socket - every 30 seconds it repeats a cycle of LEDs flashing for 12 secs or so, then the relay clicking.
4. Pressed the S20 reset button - goes off - press again it starts to repeat the cycle but the relay does not click anymore
5. Checked the S20 PCB - all solder joints look neat
6. Disabling the wi-fi security - still no access
7. Pinging 192.168.1.29 - times out
Note: phones and tablets are quite happy accessing the wifi access point and being configured using DHCP on the vigor.
Questions:
1. Any idea what is wrong?
2. Can I test without plugging into a wall socket? - i.e. just unplug and replug the USB cable
3. Is tasmota OK with WPA2-PSK and AES security?
4. Does #define WIFI_IP_ADDRESS "0.0.0.0" when set refer to the desired IP address for the S20?
Thank you for reading this long post but I tried to include anything that may be relevant.
Alan