Skip to content

Commit

Permalink
fix(bluetooth-classic): increase default interval
Browse files Browse the repository at this point in the history
The previous default values caused strain on the adapter, which led to
it going haywire after a while on many Pi Zeros. This change improves
the experience for new users, while still leaving it up for
configuration if people want to push their hardware more.

Closes #351
  • Loading branch information
mKeRix committed Feb 13, 2021
1 parent 8ce1ca4 commit ce64847
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/integrations/bluetooth-classic.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ Try to pair your Apple Watch to a Bluetooth device such as headphones/speakers f
| `addresses` | Array | | List of Bluetooth MAC addresses that should be tracked. You can usually find them in the device settings. |
| `minRssi` | Number _or_ [detailed config](#minimum-rssi) | | Limits the RSSI at which a device is still reported if configured. Remember, the RSSI is the inverse of the sensor attribute distance, so for a cutoff at 10 you would configure -10. |
| `hciDeviceId` | Number | `0` | ID of the Bluetooth device to use for the inquiries, e.g. `0` to use `hci0`. |
| `interval` | Number | `6` | The interval at which the Bluetooth devices are queried in seconds. |
| `scanTimeLimit` | Number | `2` | The maximum time allowed for completing a device query in seconds. This should be set lower than the interval. |
| `interval` | Number | `10` | The interval at which the Bluetooth devices are queried in seconds. |
| `scanTimeLimit` | Number | `6` | The maximum time allowed for completing a device query in seconds. This should be set lower than the interval. |
| `timeoutCycles` | Number | `2` | The number of completed query cycles after which collected measurements are considered obsolete. The timeout in seconds is calculated as `max(addresses, clusterDevices) * interval * timeoutCycles`. |
| `preserveState` | Boolean | `false` | Whether the last recorded distance should be preserved when the inquiries switch is turned off or not. |
| `inquireFromStart` | Boolean | `true` | Whether the [Inquiries Switch](#inquiries-switch) is turned on when room-assistant is started or not. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ export class BluetoothClassicConfig {
addresses: string[] = [];
minRssi?: number | { [address: string]: number };
hciDeviceId = 0;
interval = 6;
scanTimeLimit = 2;
interval = 10;
scanTimeLimit = 6;
timeoutCycles = 2;
preserveState = false;
inquireFromStart = true;
Expand Down

0 comments on commit ce64847

Please sign in to comment.