-
Notifications
You must be signed in to change notification settings - Fork 56
Too aggressive settings for bluetooth proxies with WiFi + BT support #67
Comments
+1, why was I do see this number referenced in home assistant community forums a lot, but I don't see any explanation. I can understand increasing |
Why is 1100 was chosen to match closer the passive ble advertisment intervals of various sensors, in order to catch as many of them as possible. It was tested thoroughly when bluetooth proxy was introduced, and based on results achieved, this seemed the most appropriate value at that time. |
Shouldn't the interval be set to something which is not at all very close to the interval of the sensor? If the channel hopping interval is close to the sensor's interval there must be a high risk that the proxy is consistently on the wrong channel when the sensor updates, causing long outages? Do you agree setting |
In my experiments, having Didn't notice any kind of WiFi connectivity issues with Stable connectivity depends on many factors, not just how Please try with more value pairs, I'd start with something around |
I only have a couple of devices which I want to connect to, so I unfortunately can't make a good test tracking sensors. My WiFi setup is similar to yours; I have 3 UniFi APs. With 1100/1100, it was a 100% failure to connect to WiFi. Should I run some WiFi test, maybe try pinging the devices or something like that? |
I agree with @nagyrobi 's reasoning for setting Seems like we are making a tradeoff between detecting BLE signals vs OTA updatability over WiFi. I prefer bluetooth proxies functioning at their "max performance" since that leads to better data. Optimize for the common case :) OTA updates rarely happen, so no need to sacrifice device performance for them. @emontnemery I'm surprised you are using WiFi bluetooth proxies. WiFi and bluetooth interfere a lot. Ideally you use ethernet instead. But FYI you can probably workaround this issue by using ESPHome safe mode. button:
- platform: safe_mode
name: Safe Mode Boot
entity_category: diagnostic When you wish to do an OTA update, press the safe mode button in Home Assistant. This will reboot your ESP with BLE scanning completely disabled. Then you can do OTA update via ESPHome with no interference. With this safe mode setup, you can keep |
I think all of the above discussion is missing the critical piece of information of what hardware each user is using. Having aggressive BLE settings will cause more power draw to the ESP. If the hardware itself does not have the power available for this type of setup, of course you will have unstable connections. I personally have not had much luck with 1100/1100 working well on an M5 Atom Lite, but it's entirely possible for the same settings to work fine on supporting hardware with more power bandwidth and perhaps a less crowded 2.4GHz area. |
The 1100ms settings make sense for Ethernet but its a problem for Wi-Fi coexistence. The HA issue queue has reports of frequent drops with the 1100ms setting which goes away when returned to the defaults. I keep having to tell users to adjust their settings back to the defaults for stable operation. I think we should adjust the Wi-Fi ones back to the defaults and leave the Ethernet ones with 1100ms |
What is the DTIM set to for the Wi-Fi network that has this issue? setting it to 1 seems to make it more stable but I still get drops |
With Ethernet I had good results even with double advert interval: Note: I experimented all the above with passive mode, and PR #6 was made when active mode wasn't even known it's possible... I agree that active mode may need totally other values, however, I only have passive sensors to experiment with, and these work reliably with |
PR #6 set very aggressive settings for BT proxies, without explaining why:
With these settings, I can't get a bluetooth proxy with WiFi + BT support to successfully connect and stay connected to my WLAN.
For reference, the default settings are:
With the default settings, a bluetooth proxy with WiFi + BT support connects and stays connected to the WLAN.
If the settings are changed, the documentation should also be updated: https://esphome.io/components/bluetooth_proxy.html#complete-sample-recommended-configuration
The text was updated successfully, but these errors were encountered: