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.
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…
the two routers are at 1 meter distance and wire connected (LAN to LAN port) since I’m doing these testings.
INFO Reading configuration /config/esphome/saletta_temp_sensor.yaml...
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
[13:25:30][D][wifi:324]: Starting scan...
[13:25:36][D][wifi:339]: Found networks:
[13:25:36][D][wifi:389]: - [redacted] [redacted]▂▄▆█
[13:25:36][W][wifi:394]: No matching network found!
[13:25:41][D][wifi:324]: Starting scan...
[13:25:47][D][wifi:339]: Found networks:
[13:25:47][D][wifi:389]: - [redacted] [redacted]▂▄▆█
[13:25:47][D][wifi:389]: - [redacted] [redacted]▂▄▆█
[13:25:47][W][wifi:394]: No matching network found!
[13:25:52][D][wifi:324]: Starting scan...
[13:25:58][D][wifi:339]: Found networks:
[13:25:58][D][wifi:341]: No network found!
[13:26:03][D][wifi:324]: Starting scan...
[13:26:09][I][wifi:116]: Starting fallback AP!
[13:26:09][C][wifi:161]: Setting up AP...
[13:26:09][C][wifi:163]: AP SSID: 'Sensor Saletta Temp'
[13:26:09][C][wifi:164]: AP Password: '7ta8GtVGagir'
[13:26:09][C][wifi:173]: IP Address: 192.168.4.1
[13:26:10][D][wifi:339]: Found networks:
[13:26:10][D][wifi:341]: No network found!
[13:26:15][D][wifi:324]: Starting scan...
[13:26:21][D][wifi:339]: Found networks:
[13:26:21][D][wifi:341]: No network found!
[13:26:26][D][wifi:324]: Starting scan...
[13:26:32][D][wifi:339]: Found networks:
[13:26:32][D][wifi:389]: - [redacted] [redacted]▂▄▆█
[13:26:32][W][wifi:394]: No matching network found!
[13:26:37][D][wifi:324]: Starting scan...
[13:26:43][D][wifi:339]: Found networks:
[13:26:43][D][wifi:389]: - [redacted] [redacted]▂▄▆█
[13:26:43][W][wifi:394]: No matching network found!
[13:26:48][D][wifi:324]: Starting scan...
[13:26:54][D][wifi:339]: Found networks:
[13:26:54][D][wifi:389]: - [redacted] [redacted]▂▄▆█
[13:26:54][W][wifi:394]: No matching network found!
[13:26:59][D][wifi:324]: Starting scan...
[13:27:05][D][wifi:339]: Found networks:
[13:27:05][D][wifi:341]: No network found!
[13:27:10][D][wifi:324]: Starting scan...
[13:27:16][D][wifi:339]: Found networks:
[13:27:16][D][wifi:389]: - [redacted] [redacted]▂▄▆█
[13:27:16][W][wifi:394]: No matching network found!
[13:27:21][D][wifi:324]: Starting scan...
[13:27:26][D][wifi:339]: Found networks:
[13:27:26][D][wifi:389]: - [redacted] [redacted]▂▄▆█
[13:27:27][W][wifi:394]: No matching network found!
[13:27:32][D][wifi:324]: Starting scan...
[13:27:37][D][wifi:339]: Found networks:
[13:27:37][D][wifi:341]: No network found!
[13:27:42][D][wifi:324]: Starting scan...
[13:27:48][D][wifi:339]: Found networks:
[13:27:48][D][wifi:341]: No network found!
[13:27:53][D][wifi:324]: Starting scan...
[13:27:59][D][wifi:339]: Found networks:
[13:27:59][D][wifi:341]: No network found!
[13:28:04][D][wifi:324]: Starting scan...
I tried to flash another D1 mini with esphome-flasher. Now the D1 sees the network but still cannot connect to.
Using 'COM3' as serial port.
Connecting....
Detecting chip type... ESP826 %)Writing at 0x00044000... (100 %)Wrote 401952 bytes (278885 compressed) at 0x00000000 in 7.1 seconds (effective 454.9 kbit/s)...
Hash of data verified.
Leaving...
Hard Resetting...
Done! Flashing is complete!
Showing logs:
[14:51:21][I][logger:166]: Log initialized
[14:51:21][C][ota:366]: There have been 2 suspected unsuccessful boot attempts.
[14:51:21][I][app:029]: Running through setup()...
[14:51:21][C][dht:011]: Setting up DHT...
[14:51:21][C][wifi:033]: Setting up WiFi...
[14:51:22][D][wifi:324]: Starting scan...
[14:51:27][D][wifi:339]: Found networks:
[14:51:27][D][wifi:389]: - 'FRITZ!BoxMyNet_LR' (8C:6D:50:8F:44:A0) ▂▄▆█
[14:51:27][D][wifi:389]: - 'Disappinted 2.0' (78:94:B4:8A:24:83) ▂▄▆█
[14:51:27][D][wifi:389]: - 'WOW FI - FASTWEB' (E2:19:54:9B:8C:44) ▂▄▆█
[14:51:28][D][wifi:389]: - 'FASTWEB-GA3ADQ' (E0:19:54:9B:8C:44) ▂▄▆█
[14:51:28][D][wifi:389]: - 'Home&Life SuperWiFi-024969' (78:B2:13:2B:A3:03) ▂▄▆█
[14:51:28][W][wifi:394]: No matching network found!
[14:51:33][D][wifi:324]: Starting scan...
[14:51:38][D][wifi:339]: Found networks:
[14:51:38][I][wifi:385]: - 'Dungeon' (18:A6:F7:05:F5:A2) ▂▄▆█
[14:51:38][D][wifi:386]: Channel: 3
[14:51:38][D][wifi:387]: RSSI: -53 dB
[14:51:38][D][wifi:389]: - 'Disappinted 2.0' (78:94:B4:8A:24:83) ▂▄▆█
[14:51:38][I][wifi:194]: WiFi Connecting to 'Dungeon'...
[14:51:41][W][dht:162]: Requesting data from DHT failed!
[14:51:41][W][dht:060]: Invalid readings! Please check your wiring (pull-up resistor, pin number) and consider manually specifying the DHT model using the model option.
[14:51:41][D][sensor:092]: 'Saletta Temperature': Sending state nan °C with 1 decimals of accuracy
[14:51:41][D][sensor:092]: 'Saletta Humidity': Sending state nan % with 0 decimals of accuracy
[14:51:42][W][wifi_esp8266:444]: Event: Disconnected ssid='Dungeon' bssid=18:A6:F7:05:F5:A2 reason='Auth Expired'
[14:51:42][W][wifi:485]: Error while connecting to network.
[14:51:42][W][wifi:522]: Restarting WiFi adapter...
[14:51:42][I][wifi:194]: WiFi Connecting to 'Dungeon'...
[14:51:48][W][wifi_esp8266:441]: Event: Disconnected ssid='Dungeon' reason='Probe Request Unsuccessful'
[14:51:48][W][wifi:485]: Error while connecting to network.
[14:51:48][W][wifi:522]: Restarting WiFi adapter...
[14:51:53][D][wifi:324]: Starting scan...
[14:51:59][D][wifi:339]: Found networks:
[14:51:59][I][wifi:385]: - 'Dungeon' (18:A6:F7:05:F5:A2) ▂▄▆█
[14:51:59][D][wifi:386]: Channel: 3
[14:51:59][D][wifi:387]: RSSI: -50 dB
[14:51:59][D][wifi:389]: - 'Disappinted 2.0' (78:94:B4:8A:24:83) ▂▄▆█
[14:51:59][D][wifi:389]: - 'FRITZ!BoxMyNet_EXT' (80:3F:5D:67:76:69) ▂▄▆█
[14:51:59][I][wifi:194]: WiFi Connecting to 'Dungeon'...
[14:52:02][W][wifi_esp8266:444]: Event: Disconnected ssid='Dungeon' bssid=18:A6:F7:05:F5:A2 reason='Auth Expired'
[14:52:02][W][wifi:485]: Error while connecting to network.
[14:52:02][W][wifi:522]: Restarting WiFi adapter...
[14:52:02][I][wifi:194]: WiFi Connecting to 'Dungeon'...
[14:52:04][W][wifi_esp8266:444]: Event: Disconnected ssid='Dungeon' bssid=18:A6:F7:05:F5:A2 reason='Auth Expired'
[14:52:04][W][wifi:485]: Error while connecting to network.
[14:52:04][W][wifi:522]: Restarting WiFi adapter...
[14:52:09][D][wifi:324]: Starting scan...
[14:52:11][W][dht:162]: Requesting data from DHT failed!
[14:52:11][W][dht:060]: Invalid readings! Please check your wiring (pull-up resistor, pin number) and consider manually specifying the DHT model using the model option.
[14:52:11][D][sensor:092]: 'Saletta Temperature': Sending state nan °C with 1 decimals of accuracy
[14:52:11][D][sensor:092]: 'Saletta Humidity': Sending state nan % with 0 decimals of accuracy
[14:52:15][D][wifi:339]: Found networks:
[14:52:15][I][wifi:385]: - 'Dungeon' (18:A6:F7:05:F5:A2) ▂▄▆█
[14:52:15][D][wifi:386]: Channel: 3
[14:52:15][D][wifi:387]: RSSI: -48 dB
[14:52:15][D][wifi:389]: - 'Disappinted 2.0' (78:94:B4:8A:24:83) ▂▄▆█
[14:52:15][D][wifi:389]: - 'FRITZ!BoxMyNet_LR' (8C:6D:50:8F:44:A0) ▂▄▆█
[14:52:15][D][wifi:389]: - 'FRITZ!BoxMyNet' (18:0F:76:BC:EE:D2) ▂▄▆█
[14:52:15][I][wifi:194]: WiFi Connecting to 'Dungeon'...
[14:52:21][W][wifi_esp8266:441]: Event: Disconnected ssid='Dungeon' reason='Probe Request Unsuccessful'
[14:52:21][W][wifi:485]: Error while connecting to network.
[14:52:21][W][wifi:522]: Restarting WiFi adapter...
[14:52:21][I][wifi:194]: WiFi Connecting to 'Dungeon'...
[14:52:21][I][wifi:116]: Starting fallback AP!
[14:52:21][C][wifi:161]: Setting up AP...
[14:52:21][C][wifi:163]: AP SSID: 'Saletta T-H Fallback Hotspot'
[14:52:21][C][wifi:164]: AP Password: 'LyM8fY73ZnRL'
[14:52:22][C][wifi:173]: IP Address: 192.168.4.1
[14:52:28][W][wifi_esp8266:441]: Event: Disconnected ssid='Dungeon' reason='Probe Request Unsuccessful'
[14:52:28][W][wifi:485]: Error while connecting to network.
[14:52:33][D][wifi:324]: Starting scan...
[14:52:39][D][wifi:339]: Found networks:
[14:52:39][D][wifi:389]: - 'Disappinted 2.0' (78:94:B4:8A:24:83) ▂▄▆█
[14:52:39][D][wifi:389]: - 'FRITZ!BoxMyNet_EXT' (80:3F:5D:67:76:69) ▂▄▆█
[14:52:39][W][wifi:394]: No matching network found!
[14:52:41][W][dht:162]: Requesting data from DHT failed!
[14:52:41][W][dht:060]: Invalid readings! Please check your wiring (pull-up resistor, pin number) and consider manually specifying the DHT model using the model option.
[14:52:41][D][sensor:092]: 'Saletta Temperature': Sending state nan °C with 1 decimals of accuracy
[14:52:41][D][sensor:092]: 'Saletta Humidity': Sending state nan % with 0 decimals of accuracy
[14:52:44][D][wifi:324]: Starting scan...
I’m spit balling here: I know there are imitation boards out there. Could it be that? Alternatively, could there be an issue with your ESPHome installation (say a dependency giving issues but not visibly so besides the symptoms)?
Found this.
That points to this
It little bit like your problems that your experience.
Is your d1 unshielded. Maybe there is a hardware issue that make it work poorly with some router.
/Mattias
You shouldn’t use channel 3. The accepted 2.4GHz channels to avoid overlap are 1, 6 and 11. What channel is the other router running? It’s possible that with two so close together, there’s a lot of interference.
Are you certain you have the password right?
Nothing. I followed all your suggestions. Made a brand new installation of everything. Factory reset of main router and secondary router. I ordered a genuine D1 mini. I will try to install it and see if it’s the quality of the components. I will post the results.
Thank you all for your support until now.
Another idea: can you swap your routers, meaning make the other one the primary and see if the issue moves with the router or not? I’m working from the assumption that (one of your many) D1s still connect fine to the primary router (you said so very early so not sure if that’s still the case).
Troon’s first post is correct. The gateway: value should be your 192.168.1.1 router, and NOT the access point.
This is the fact That makes me crazy: connecting to the main router is no issue. Connecting to the AP simply doesn’t go with this mini. As I told above I have 2 smart sockets a strip lead and my phone connecting flowlessly with the AP
sensor:
If I put 192.168.1.1 in the LAN configuration of the router my whole LAN goes crazy.
I think I expressed myself badly. I mean: swap the configurations of the two routers, so that the secondary is now the primary with the name of the primary’s AP (in other words, the primary that works now is the AP that the secondary was before).
There’s something odd here. In the other posts you mention 192.168.1.1
and here it’s 192.168.0.1
– which is a different segment.
Echoing what Troon and Fred said: your gateway for all devices should be 192.168.1.1
regardless of the AP it’s connecting to – assuming you only have one logical network. The secondary router, while it has a fixed IP (normally), routes to the primary (also the gateway). There are obviously other ways to set up networks but I’m assuming the typical home setup here.
(Disclaimer: I’m by no means a CISCO certified engineer and though I think I understand some networking basics, feel free to point out any mistakes.)
This is the last configuration of my sensor:
esphome:
name: saletta_t-h
platform: ESP8266
board: d1_mini
wifi:
ssid: "Dungeon"
password: "xxxxxxxxxx"
manual_ip:
static_ip: 192.168.1.100
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Saletta T-H Fallback Hotspot"
password: "LyM8fY73ZnRL"
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
and this is the resume of the configuration of my AP.
I flashed the D1 mini again with the last configuration via USB on the RPI4.
Still cannot get connection.
Clear all the flash of your d1-mini. This will do it HA SwitchPlate HASPone: DIY In-Wall Touchscreen Home Assistant Controller - #1907 by luma
Humor me, change your SSID to all lower case, and change that accordingly also for your d1 mini. I had a similar case in the past where i bumped into a strange issue like that. Can’t hurt to try. (was also with a d1 mini)
Review the IP address assignment for your Access Point.
Your graphic image shows 192.168 .0 .1.
It should be something like 192.168 .1 .nnn.
Your D1 mini has 192.168 .1 .xxx.
Your AP should have 192.168 .1 .nnn.
Thanks for this reply. Now I reset the AP which has now IP 192.168.1.2
I reflashed the d1 mini which now has has static IP 192.168.1.50
I can connect to the AP with the PC and surf internet.
What am I doing wrong with the d1 mini?
Last update: I flashed a new d1 mini from AZDelivery and connected like charm. No issue. It was the expressif clone.