I have two Wemos D1 Mini’s controlling a watering system for plants on my patio. They have near identical ESPhome code. They are 12 feet apart from each other and 20 feet direct line of site from an access point (Unifi). The left plant Wemos D1 Mini connects all the time with no issues. The right one will not stay connected to WiFi. I even swapped out the Wemos D1 Mini to a new board, same issue. I’m powering both of them using a single12V 2A power supply with a separate step down converter for each D1 Mini that brings the voltage down to 5V (checked with mutli-meter) and hooked to the 5V pin.
When I power it using the USB it works. When I power it using the 12V power adaptor through the step converter (measured at the D1 Mini at 4.95V hooked to the 5V pin) it doesn’t work and the blue LED flashes on the D1 Mini.
Here’s my code:
Left D1 Mini (works all the time)
esphome:
name: patio-flower-pot-waterer-left
friendly_name: Patio flower pot waterer-left
platform: ESP8266
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxxxxxxxxxxxxxxx"
ota:
- platform: esphome
password: "xxxxxxxxxxxxxxxx"
wifi:
ssid: "Phillips_IoT"
password: "xxxxxxxx"
#Static IP
manual_ip:
static_ip: 192.168.1.76
gateway: 192.168.1.1
subnet: 255.255.255.0
#Turn Off Power Save Mode
power_save_mode: none
fast_connect: on
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Patio-Flower-Pot-Waterer"
password: "xxxxxxxxx"
captive_portal:
sensor:
- platform: adc
pin: A0
name: "Patio Plant Soil Moisture-Left"
device_class: moisture
accuracy_decimals: 2
update_interval: 1s
unit_of_measurement: "%"
icon: "mdi:water-percent"
filters:
- calibrate_linear:
- 0.62402 -> 0.0
- 0.27311 -> 100.0
- sliding_window_moving_average:
window_size: 3
send_every: 5
- clamp:
min_value: 0
max_value: 100
on_value_range:
- above: 40
then:
- switch.turn_off: pump
# - below: 20
# then:
# - switch.turn_on: pump
switch:
- platform: gpio
pin: D1
name: "Patio Planter Pump-Left"
restore_mode: RESTORE_DEFAULT_OFF
id: pump
#ESPhome restart
- platform: restart
name: "Patio Flower Pot Waterer Restart-Left"
binary_sensor:
#Lower Water Level
- platform: gpio
pin:
number: D5
mode: INPUT_PULLUP
name: "Bucket Empty-Left"
filters:
- delayed_on_off: 2s
on_press:
then:
- switch.turn_off: pump
# device_class: none
#Upper Water Level
- platform: gpio
pin:
number: D6
mode: INPUT_PULLUP
inverted: true
name: "Bucket Full-Left"
# device_class: none
Right D1 Mini (Doesn’t work)
esphome:
name: patio-flower-pot-waterer-right
friendly_name: Patio flower pot waterer-right
platform: ESP8266
board: d1_mini
#esp8266:
# board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxxxxxxxxxxxxx"
ota:
- platform: esphome
password: "xxxxxxxxxxxxxxxxxx"
wifi:
ssid: "Phillips_IoT"
password: "xxxxxxxxxxx"
#Static IP
manual_ip:
static_ip: 192.168.1.78
gateway: 192.168.1.1
subnet: 255.255.255.0
#Turn Off Power Save Mode
power_save_mode: none
fast_connect: on
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Patio-Flower-Pot-Waterer-Right"
password: "xxxxxxx"
captive_portal:
sensor:
- platform: adc
pin: A0
name: "Patio Plant Soil Moisture-Right"
device_class: moisture
accuracy_decimals: 2
update_interval: 1s
unit_of_measurement: "%"
icon: "mdi:water-percent"
filters:
- calibrate_linear:
- 0.7184 -> 0.0
- 0.4225 -> 100.0
- sliding_window_moving_average:
window_size: 3
send_every: 5
- clamp:
min_value: 0
max_value: 100
on_value_range:
- above: 40
then:
- switch.turn_off: pump
# - below: 20
# then:
# - if:
# condition:
# - binary_sensor.is_off: empty
# then:
# - switch.turn_on: pump
switch:
- platform: gpio
pin: D1
name: "Patio Planter Pump-Right"
restore_mode: RESTORE_DEFAULT_OFF
id: pump
#ESPhome restart
- platform: restart
name: "Patio Flower Pot Waterer Restart-Right"
binary_sensor:
#Lower Water Level
- platform: gpio
id: empty
pin:
number: D5
mode: INPUT_PULLUP
name: "Bucket Empty-Right"
filters:
- delayed_on_off: 2s
on_press:
then:
- switch.turn_off: pump
# device_class: none
#Upper Water Level
- platform: gpio
pin:
number: D6
mode: INPUT_PULLUP
inverted: true
name: "Bucket Full-Right"
# device_class: none
I’m pulling my hair out trying to figure it out. Any help would be appreciated.