D1 mini not connecting to AP esphome

Hello everyone, I’m quite desperate here and need some advice since I have troubles connecting a simple DHT22 sensor + D1 mini to my AP downstairs.
If i connect it to the main router there is no issue. When I try to connect it to my secondary router, the D1 mini doesn’t find the network.
I read almost all the topics and tried several combinations but I still don’t succeed.
The secondary router is a TP Link WR940N with dhcp disabled and set to IP 192.168.1.2 while the main sercom Router is 192.168.1.1
I can access to the secondary router with a PC connected to the main WIFI Network. I can access to the secondary router with my smartphone.
This is my last edited yaml configuration file uploades on the D1 mini.
Any help is much appreciated.
Thank you

esphome:
  name: saletta_temp_sensor
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "Dungeon"
  password: "xxxxxxxxx"

  manual_ip:
    # Set this to the IP of the ESP
    static_ip: 192.168.1.100
    # Set this to the IP address of the router. Often ends with .1
    gateway: 192.168.1.2
    # The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: 255.255.255.0

    
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Saletta Temp Sensor"
    password: "szx2EpE8Zwyc"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

sensor:
  - platform: dht
    pin: D2
    temperature:
      name: "Saletta Temperature"
    humidity:
      name: "Saletta Humidity"
    update_interval: 30s
    model: DHT22

Hidden SSID??

[quote=“HBK1, post:2, topic:303836, full:true”]
Hidden SSID??
[/quote]

Do both routers have the same or different ssid’s?

You don’t have dns set.

What does your log say?

Router 1 is main router. Raspberry is connected here on wired lan. DNS 192.168.1.1
DHCP starting from 192.168.1.10
WI-FI network is called Disappinted 2.0

Router 2 is secondary router. Connected via cable to main router. DNS 192.168.1.2 . DHCP disabled. Wi-Fi network of secondary router is Dungeon.

INFO Reading configuration /config/esphome/saletta_temp_sensor.yaml...
INFO Starting log output from temp_humidity_saletta.local using esphome API
WARNING Error resolving IP address of temp_humidity_saletta.local. Is it connected to WiFi?
WARNING (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips)
WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -5] No address associated with

I mean the log from the esp device. Available by the wired serial.

Thanks for your time. Here you have a piece of my log at the serial port of my raspberry Pi

INFO Reading configuration /config/esphome/saletta_temp_sensor.yaml...
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
[23:09:38][D][wifi:339]: Found networks:
[23:09:38][D][wifi:341]:   No network found!
[23:09:39][D][dht:048]: Got Temperature=21.7°C Humidity=55.1%
[23:09:39][D][sensor:092]: 'Saletta Temperature': Sending state 21.70000 °C with 1 decimals of accuracy
[23:09:39][D][sensor:092]: 'Saletta Humidity': Sending state 55.10000 % with 0 decimals of accuracy
[23:09:43][D][wifi:324]: Starting scan...
[23:09:49][D][wifi:339]: Found networks:
[23:09:49][D][wifi:389]: - 'Disappinted 2.0'[redacted] (78:94:B4:8A:24:83) [redacted]▂▄▆█
[23:09:49][W][wifi:394]: No matching network found!
[23:09:54][D][wifi:324]: Starting scan...
[23:10:00][D][wifi:339]: Found networks:
[23:10:00][D][wifi:389]: - 'Disappinted 2.0'[redacted] (78:94:B4:8A:24:83) [redacted]▂▄▆█
[23:10:00][W][wifi:394]: No matching network found!
[23:10:05][D][wifi:324]: Starting scan...
[23:10:09][D][dht:048]: Got Temperature=21.7°C Humidity=55.1%
[23:10:09][D][sensor:092]: 'Saletta Temperature': Sending state 21.70000 °C with 1 decimals of accuracy
[23:10:09][D][sensor:092]: 'Saletta Humidity': Sending state 55.10000 % with 0 decimals of accuracy
[23:10:11][D][wifi:339]: Found networks:
[23:10:11][D][wifi:389]: - 'Disappinted 2.0'[redacted] (78:94:B4:8A:24:83) [redacted]▂▄▆█
[23:10:11][D][wifi:389]: - 'Home&Life SuperWiFi-039175'[redacted] (14:2E:5E:64:B6:61) [redacted]▂▄▆█
[23:10:11][W][wifi:394]: No matching network found!

Hmmmmi assume that Dugeon is in range at that point?

Try turning off 5Ghz on the Dungeon router and make 100% sure you have the ssid spelled correctly.

The d1 mini is now 1 meter far away from the router. I also tried with bssid of the Dungeon network but the d1 mini simply doesn’ see it.
I tried with another d1 mini: same result. Connection possible to main router but no chances with the secondary router

did turning off 5GHz make any difference?

The tplink router is 2,4 ghz only. I could connect 2 tekin plugs and 1 Wi-Fi strip led through smart life tuya integration to the Dungeon network and then to Home Assistant without problems.

I am out of ideas sorry.

Thanks for your time!

Try reflashing.

Set security to WPA/WPA2
Version and encryption to: Auto
Make sure that your channel width is set to 20MHz.
Try using a fixed channel
don’t use spaces on your SSID or password.

1 Like

Hi laca75tn I followed your instructions but still do not see the router😢

Reflashed but still not seeing the Wi-Fi network

If your secondary router is set up as an access point, and not actually doing any routing, you should set the gateway to 192.168.1.1.

That doesn’t explain why it can’t see the network though.

Please post the D1 boot log you get when connected via USB and in range of the Dungeon network, unless that is what you have already posted above.

1 Like

Isn’t that what we have here> D1 mini not connecting to AP esphome - #7 by markus3 (although I never got a clear answer as to whether it was in range at that time)

Yes, that confirmation is what I was trying to get too…