A month or so ago I set up a WeMos board to operate 4 relays via HA. All worked fine except poor connectivity due to the location. No problem, I would just order another access point for better signal.
About 2 weeks ago the system went from poor connectivity to no connectivity. No problem I thought, it will all be fixed with a new access point.
Today I relocated another access point but there was still no connectivity … odd … I pulled the WeMos board out of the enclosure so all peripherals were gone - still no connectivity. I thought I had killed the board so hooked u a brand new WeMos and programmed it - no connectivity!
At this point I suspected the code programmed onto the WeMos via ESPHome … but recall that this worked before.
I have now confirmed that all 4 i/o assignments in the code work but for some reason or other I can only have two active at a time. I can comment out any two gpio assignments and the board connects to wifi. As soon as I have 3 or more gpio’s assigned, the board no longer connects to wifi. No other changes!
This is the ESPHome code programmed on the WeMos chip/board:
esphome:
name: wemos_esp8266_1
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret wifi_iot_ssid
password: !secret wifi_iot_password
fast_connect: true # required when using a hidden network
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Wemos Esp8266 1 Fallback Hotspot"
password: "ZU8JEmHrsxIL"
# use_address: 192.168.50.120
# manual_ip:
# static_ip: 192.168.50.207
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
binary_sensor:
# - platform: gpio
# pin:
# number: GPIO0
# mode: INPUT_PULLUP
# inverted: True
# name: "Sonoff Basic 10 Button"
# on_press:
# - switch.toggle: relay
# - platform: gpio
# pin:
# number: GPIO3
# mode: INPUT_PULLUP
# inverted: True
# name: "Sonoff Basic 10a Button"
# on_press:
# - switch.toggle: relay
# - platform: gpio
# pin:
# number: GPIO3
# mode: INPUT_PULLUP
# inverted: True
# name: "wemos_esp8266_1 gpio 03"
# on_click:
# min_length: 50ms
# max_length: 500ms
# then:
# - switch.toggle: relay1
switch:
# - platform: gpio
# name: "wemos_esp8266_1_gpio 4"
# pin: GPIO4
# id: relay1
- platform: gpio
name: "wemos_esp8266_1_gpio 5"
pin: GPIO5
id: relay2
# this is the main water shutoff valve. If the switch is on then water can flow
- platform: gpio
name: "wemos_esp8266_1_gpio 12"
pin: GPIO12
id: relay4
- platform: gpio
name: "wemos_esp8266_1_gpio 14"
pin: GPIO14
id: relay3
status_led:
pin:
number: GPIO13
inverted: yes
in this code, I have 3 gpio’s enabled to operate relays and the board will not connect to the wifi network. if I comment out one of the remaining gpio assignments, it will connect just fine.
Anybody know what is going on ?