devWaves / SwitchBot-MQTT-BLE-ESP32

Allows for multiple SwitchBot bots and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Temperature, Motion, Contact sensors
MIT License
531 stars 66 forks source link

ability to set wifi channel? #87

Closed aptalca closed 1 year ago

aptalca commented 1 year ago

Hi, I flashed an esp32dev board with this code and it is working great (thanks so much).

However, I noticed that with my 3 APs running on wifi channels 1, 6, and 11 with the same ssid, the board always connects to the AP running on channel 1, even though the one running on channel 11 is in the same room as the board. It results in having poor signal.

I tried reboots but it insists on connecting to the channel 1 AP.

Is there any way to ensure it connects to the closest AP? Or perhaps set the channel it should use?

Thanks

devWaves commented 1 year ago

nothing I can do. The library I use is https://github.com/plapointe6/EspMQTTClient and there doesn't seem to be any channel options. You can always create an issue there if you want

Are you using meshed routers? if so you can usually set a bind for the router which AP to connect to

You can block the MAC address on the other 2 routers and it should connect to the one you want