Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sonoff basic cannot connect to wifi #432

Closed
whxciotw opened this issue Jun 10, 2019 · 8 comments
Closed

sonoff basic cannot connect to wifi #432

whxciotw opened this issue Jun 10, 2019 · 8 comments

Comments

@whxciotw
Copy link

whxciotw commented Jun 10, 2019

Operating environment/Installation (Hass.io/Docker/pip/etc.):
Docker + Hassio 0.94.1 + Esphome 1.13.5

ESP (ESP32/ESP8266, Board/Sonoff):
Sonoff Basic

Affected component:

Description of problem:
Sonoff cannot connect to wifi ssid

Problem-relevant YAML-configuration entries:

esphome:
  name: sideboard_light
  platform: ESP8266
  board: esp01_1m


wifi:
  ssid: Calmdown
  password: xxxxxxxxxx
  fast_connect: true  
  # manual_ip:
  #   static_ip: 192.168.19.88
  #   gateway: 192.168.19.1
  #   subnet: 255.255.255.0  
# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

binary_sensor:
 - platform: gpio
   pin:
     number: GPIO0
     mode: INPUT_PULLUP
     inverted: True
   id: btn
   internal: true
   on_press:
     - switch.toggle: relay

switch:
 - platform: gpio
   name: sideboard_light
   icon: mdi:lightbulb-outline
   pin: GPIO12
   id: relay

status_led:
 pin:
   number: GPIO13
   inverted: true

Traceback (if applicable):

[01:42:05][W][wifi:394]: Timeout while connecting to WiFi.
[01:42:05][I][wifi:164]: WiFi Connecting to 'Calmdown'...
[01:42:05][W][wifi_esp8266:354]: Event: Disconnected ssid='Calmdown' bssid=D8:C8:E9:97:85:21 reason='Association Leave'
[01:42:05][W][wifi:400]: Error while connecting to network.
[01:42:05][W][wifi:431]: Restarting WiFi adapter...
[01:42:10][I][wifi:164]: WiFi Connecting to 'Calmdown'...
[01:42:40][W][wifi:394]: Timeout while connecting to WiFi.
[01:42:41][I][wifi:164]: WiFi Connecting to 'Calmdown'...
[01:42:41][W][wifi_esp8266:354]: Event: Disconnected ssid='Calmdown' bssid=D8:C8:E9:97:85:21 reason='Association Leave'
[01:42:41][W][wifi:400]: Error while connecting to network.
[01:42:41][W][wifi:431]: Restarting WiFi adapter...
[01:42:46][I][wifi:164]: WiFi Connecting to 'Calmdown'...
[01:42:58][W][wifi_esp8266:354]: Event: Disconnected ssid='Calmdown' bssid=D8:C8:E9:97:85:21 reason='Handshake Failed'
[01:42:59][W][wifi:400]: Error while connecting to network.
[01:42:59][W][wifi:431]: Restarting WiFi adapter...
[01:42:59][I][wifi:164]: WiFi Connecting to 'Calmdown'...
[01:43:29][W][wifi:394]: Timeout while connecting to WiFi.
[01:43:34][I][wifi:164]: WiFi Connecting to 'Calmdown'...
[01:43:34][W][wifi_esp8266:354]: Event: Disconnected ssid='Calmdown' bssid=D8:C8:E9:97:85:21 reason='Association Leave'
[01:43:34][W][wifi:400]: Error while connecting to network.
[01:43:34][W][wifi:431]: Restarting WiFi adapter...
[01:43:34][I][wifi:164]: WiFi Connecting to 'Calmdown'...
[01:44:04][W][wifi:394]: Timeout while connecting to WiFi.
[01:44:09][I][wifi:164]: WiFi Connecting to 'Calmdown'...
[01:44:09][W][wifi_esp8266:354]: Event: Disconnected ssid='Calmdown' bssid=D8:C8:E9:97:85:21 reason='Association Leave'

Additional information and things you've tried:

  1. specify the static IP address or not, sonoff still cannot connect to wifi
  2. same sonoff basic with tasmota or espurna will not face this issue
  3. if i connect sonoff basic via USB TTL(3.3v), it works fine to connect wifi, but failed when plug into 220V
@redskinhu
Copy link

redskinhu commented Jun 11, 2019

Hello

Try to remove binary_sensor component and test it. Yes, it sounds weird but try it.
See: #187

@smoothunit
Copy link

Exactly the same issue after upgrade. Manually flashed and older version and connected in 5 seconds.

@whxciotw
Copy link
Author

Hello

Try to remove binary_sensor component and test it. Yes, it sounds weird but try it.
See: #187

i tried, but still doesn't work. what's more, if i connect sonoff basic via USB TTL(3.3v), it works fine to connect wifi, but failed when plug into 220V

@whxciotw
Copy link
Author

whxciotw commented Jun 14, 2019

it works now, because I remove both binary sensor and status led, just like below.
but it is really weird. I hope this issue will be fixed in the future releases.
thanks.

esphome:
  name: sideboard_light
  platform: ESP8266
  board: esp01_1m


wifi:
  ssid: Calmdown
  password: xxxxxxxxxx
  fast_connect: true  
  # manual_ip:
  #   static_ip: 192.168.19.88
  #   gateway: 192.168.19.1
  #   subnet: 255.255.255.0  
# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

switch:
 - platform: gpio
   name: sideboard_light
   icon: mdi:lightbulb-outline
   pin: GPIO12
   id: relay

@ultratoto14
Copy link

ultratoto14 commented Jun 18, 2019

Had the same problem, only on a subset of my sonoffs. Only basic ones.
Have been fixed by removing the GPIO0 button from the config file. Keeping Status in binary sensor works for me

esphome:
  name: multiprise_bureau
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: HOMELAND
  password: xxxxxxx

api:

logger:

ota:

binary_sensor:
#  - platform: gpio
#    pin:
#      number: GPIO0
#      mode: INPUT_PULLUP
#      inverted: True
#    name: "Multiprise Bureau - Button"
#    on_press:
#      - switch.toggle: fakebutton
  - platform: status
    name: "Multiprise Bureau - Status"

With GPIO0 used, always No Network Found.

@ultratoto14
Copy link

Just a small addition, worked on 1.13.4 fails after, 1.13.5 and 1.13.6

@ultratoto14
Copy link

Checked the differrences between 1.13.4 and 1.13.5.
When reverting this wifi fix #627 i'm able to connect again even if the GPIO0 is set in config file.

@OttoWinter
Copy link
Member

Moving the discussion to #455

@esphome esphome locked and limited conversation to collaborators Jun 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants