[BT] Continuous active scanning when adaptive scanning is false (#1448)

Set `interval` and `intervalacts` to the minimum when adaptive scanning is deactivated. When the user encounters a situation on which a device is not detected due to adaptive scanning, we set the gateway to continuous active to maximize the chance to detect the device.
This commit is contained in:
Florian authored and GitHub committed 2023-02-10 17:05:52 -06:00
1 parent 159d362f2a
commit 7c0fafd48e
2 files changed
+11 -4

No files matched your search

+3 -1
View File
@@ -137,13 +137,15 @@ The gateway will publish only the detected sensors like Mi Flora, Mi jia, LYWSD0
## Setting if the gateway use adaptive scanning
Adaptive scanning lets the gateway decide for you the best passive `interval` and active `intervalacts` scan interval, depending on the characteristics of your devices.
The gateway retrieves your devices' information from [Theengs Decoder](https://decoder.theengs.io) and adapts its parameters accordingly.
The gateway retrieves your devices' information from [Theengs Decoder](https://decoder.theengs.io) and adapts its parameters accordingly if a device that requires it is detected.
For example a door or a PIR sensor will require continuous scanning, so if detected the gateway is going to reduce its time between scans to the minimum. Or your devices may also require active scanning to retrieve data, in this case the gateway will also trigger active scans at regular intervals.
If you want to change this characteristic (default:true):
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"adaptivescan":false}'`
Setting Adaptive scanning to `false` will automatically put the gateway to continuous active scanning.
::: tip
With Home Assistant, this command is directly available through MQTT auto discovery as a switch into the HASS OpenMQTTGateway device entities list.
:::