-
Notifications
You must be signed in to change notification settings - Fork 37
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
AP Selection with Nuki Hub? #348
Comments
When the ESP loses connection your settings in Nuki Hub determine how the ESP reacts. Because Wifi reconnection by the ESP can be unreliable I have Nuki Hub configured to reboot on connection loss. You could play with this setting to see if it helps. It sounds like your AVM system might be a bit agressive in kicking clients with a possibly better connection to another AP off an AP, hoping it will connect to the AP with a stronger connection. Does the AVM have functionality to create a second SSID on only certain AP's on 2.4ghz that operates outside of the mesh? You could then connect the ESP to that network |
Thank you for your information! With my ESP8266 (WLED) I have no problems in the home network, but with ESP32 I have to adjust the configuration in the Nuki Hub so that they restart automatically if the connection is lost. That's really strange: My M5Stack-StampS3 shows the best Wi-Fi signal strength according to the router. The ESP32-S3 sometimes connects to the furthest and weakest signal after a restart, even though the router and another access point are much closer. Due to the fact that the ESP32 does not connect to the strongest AP, the problem probably is caused by AVM. As a workaround, I've now housed the M5Stack-StampS3 in a case to dampen the signal. Pretty crazy, right? On the other hand, I've optimized the antennas of my ESP8266. |
According to AVM (German Link), if WiFi devices do not support WiFi Mesh Steering, the Mesh Master cannot control them. To specifically connect these devices to a particular Mesh Repeater, you need to disable settings adoption in the Mesh Repeater and set up a separate wireless network name for it. That could be an option, but I consider it suboptimal because it renders this repeater unusable for mesh devices. |
To give a bit background to this: We're using the Wifi stack provided by Espressif for the ESP32. It's more or less a black box, you give a few parameters like ssid and PSK, the rest it handles on its own. It is unfortunately a bit flaky, and we unfortunately have limited control over that. What I can always recommend: Get an ESP with a LAN connection, it's much more stable than Wifi. |
Could you optionally pass a BSSID to the WiFi stack? |
Wifi connection and setup is completely handled by https://github.com/tzapu/WiFiManager. There are a handfull of open and closed issues about BSSID/Mesh, which all conclude ESP's just connect to the first BSSID/AP it finds and not necessarily the best. There is a long open PR tzapu/WiFiManager#1469 to include an option to automatically connect to the best BSSID. I don't see that being merged any time soon. @technyon: What do you think about updating WifiManager to latest (2.0.17) with the relevant parts of tzapu/WiFiManager#1469 included and a checkbox in Nuki hub to enable connecting to the best BSSID? Willing to do the work here. Downside is diverting from the unmodified/supported version of WifiManager. Edit: I see WifiManager is already modified in Nuki Hub, so adding some extra stuff specific to Nuki Hub does not add that much complexity in maintenance. |
See PR #349 |
What about just enable this option, no need to put it into the UI. I don't see a reason why you wouldn't connect to the "best" AP ... meaning the one with the strongest signal I guess. The Wifimanager code has some custom modifications made by me, for example the wifi configuration page is locked by username/password if credentials are configured. This needs to be applied again in the updated wifi manager code. |
Hi, just a thought... if a user only has one AP, the connection setup would be faster since the search for other APs can be skipped. Therefore, I find this option beneficial unless the search for the best AP is not time-critical. Since many users (myself included) frequently experience connection drops with ESP32 modules and a restart is then necessary, I consider a fast boot process important. Unfortunately, I don't have a LAN connection within the BLE range of the Nuki. |
I already ported your customizations to 2.0.17.
Agree with @jolichter on making this an optional feature because of the added complexity and slowing of the time until the connection is up (it seems to be about 2 seconds extra) which is not necessary for all users. |
Background: I frequently encounter the issue of an ESP32 attempting to connect to a distant access point with a weak signal, despite the presence of one or two nearby access points. While I utilize mesh networking with AVM (Fritz!Box) devices, ESP32s, unfortunately, lack support for mesh (seamless roaming).
Therefore, I'm curious: Does the Nuki Hub offer a feature like scanning to automatically choose the nearest or strongest access point when multiple access points share the same SSID?
see e.g.: github.com/espressif/arduino-esp32
The text was updated successfully, but these errors were encountered: