From 650d1c7e46e2c73440563579fd79bcd732fa9acd Mon Sep 17 00:00:00 2001 From: Hannes Gehrold Date: Sat, 13 Jan 2024 00:54:09 +0100 Subject: [PATCH 1/2] Elaborate on iBeacon configuration --- docs/Commands.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/docs/Commands.md b/docs/Commands.md index cbc0a2ac64..6819ba4121 100644 --- a/docs/Commands.md +++ b/docs/Commands.md @@ -1016,6 +1016,21 @@ See also|[`SetOption157`](#setoption157) - Hide/Show sensitive data ### BLE ESP32 +Tasmota keeps track of iBeacon devices in a list with up to 32 slots where each device is uniquely identified by these attributes: + +- `UUID` +- `Major` +- `Minor` + +Once all 32 slots are used up, additional devices will not be added until at least one slot is freed up again. + +Devices are added to the list as soon as BLE iBeacon advertisements are received from a yet unknown beacon.
+Any additional advertisements override the device's entry until a reporting period (see [IBeaconPeriod](#ibeaconperiod)) has passed and an MQTT message is sent based on the last advertisement's data. + +Device entries expire automatically if no iBeacon advertisements were received within a certain timeframe (see [IBeaconTimeout](#ibeacontimeout)).
+Upon expiry, Tasmota creates an MQTT message with the `RSSI` value set to `0000`. +
+ Command|Parameters :---|:--- BLEAddrFilter|Set BLE Address type filter.
`BLEAddrFilter` = show filter level
`BLEAddrFilter n` = set BLE address type filter 0..3 - default 3. Ignores BLE address types > filter value. Set 0 to ONLY see public addresses. @@ -1029,11 +1044,11 @@ BLEName|Read or write the name of a BLE device. BLEOp|Perform a simple active BLE operation (read/write/notify).
see separate description in source code BLEPeriod|Set the period for publish of BLE data
`` = set interval in seconds BLEScan|Cause/Configure BLE a scan
`BLEScan0 0..1` = enable or disable Active scanning. (an active scan will gather extra data from devices, including name)
`BLEScan` = Trigger a 20s scan now if in BLEMode1
`BLEScan n` = Trigger a scan now for n seconds if in BLEMode1 -IBEACON|Show or set enable for the iBeacon driver
`IBEACON` = Display 0|1
`IBEACON 0` = disable
`IBEACON 1` = enable. -IBEACONclear|Clear iBeacon list -IBEACONonlyaliased|Show or set OnlyAliased for the iBeacon driver
`IBEACONonlyaliased` = Display 0|1
`IBEACONonlyaliased 0` = enable iBeacon to hear ALL BLE devices
`IBEACONonlyaliased 1` = enable iBeacon to hear ONLY devices with valid BLEAlias
`IBEACONonlyaliased 2` = enable iBeacon to hear ONLY devices with valid BLEAlias starting `iB` -IBEACONperiod|Display or Set the period for publish of iBeacon data
`IBEACONperiod` = display interval
`IBEACONperiod ss` = set interval in seconds -IBEACONtimeout|Display or Set the timeout for iBeacon devices
`IBEACONtimeout` = display timeout
`IBEACONtimeout ss` = set timeout in seconds +IBeacon|Show or set enable for the iBeacon driver
`IBeacon` = Get current state
`IBeacon 0` = disable
`IBeacon 1` = enable. +IBeaconClear|Clears the list of iBeacon devices +IBeaconOnlyAliased|Shows or sets OnlyAliased for the iBeacon driver
`IBeaconOnlyAliased` = Get current state
`IBeaconOnlyAliased 0` = enable iBeacon to hear ALL BLE devices
`IBeaconOnlyAliased 1` = enable iBeacon to hear ONLY devices with valid BLEAlias
`IBeaconOnlyAliased 2` = enable iBeacon to hear ONLY devices with valid BLEAlias starting `iB` +IBeaconPeriod|Displays or sets the period at which iBeacon data will be published.
`IBeaconPeriod` = Get current interval (defaults to 10)
`IBeaconPeriod ` = Interval in seconds +IBeaconTimeout|Displays or sets the timeout after which iBeacon devices are automatically expunged from the iBeacon device list.
`IBeaconTimeout` = Get current timeout (defaults to 30)
`IBeaconTimeout ` = Timeout in seconds ### BLE MI Sensors From 8265802cde6fe322792bf82f45c6cd234c9e46a3 Mon Sep 17 00:00:00 2001 From: Hannes Gehrold Date: Sat, 13 Jan 2024 01:22:34 +0100 Subject: [PATCH 2/2] Minor formatting and spelling improvements --- docs/Commands.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Commands.md b/docs/Commands.md index 6819ba4121..a32e27e98c 100644 --- a/docs/Commands.md +++ b/docs/Commands.md @@ -1044,11 +1044,11 @@ BLEName|Read or write the name of a BLE device. BLEOp|Perform a simple active BLE operation (read/write/notify).
see separate description in source code BLEPeriod|Set the period for publish of BLE data
`` = set interval in seconds BLEScan|Cause/Configure BLE a scan
`BLEScan0 0..1` = enable or disable Active scanning. (an active scan will gather extra data from devices, including name)
`BLEScan` = Trigger a 20s scan now if in BLEMode1
`BLEScan n` = Trigger a scan now for n seconds if in BLEMode1 -IBeacon|Show or set enable for the iBeacon driver
`IBeacon` = Get current state
`IBeacon 0` = disable
`IBeacon 1` = enable. +IBeacon|Enable or disable the iBeacon driver
`IBeacon` = Get current state
`IBeacon 0` = Disable
`IBeacon 1` = Enable IBeaconClear|Clears the list of iBeacon devices IBeaconOnlyAliased|Shows or sets OnlyAliased for the iBeacon driver
`IBeaconOnlyAliased` = Get current state
`IBeaconOnlyAliased 0` = enable iBeacon to hear ALL BLE devices
`IBeaconOnlyAliased 1` = enable iBeacon to hear ONLY devices with valid BLEAlias
`IBeaconOnlyAliased 2` = enable iBeacon to hear ONLY devices with valid BLEAlias starting `iB` -IBeaconPeriod|Displays or sets the period at which iBeacon data will be published.
`IBeaconPeriod` = Get current interval (defaults to 10)
`IBeaconPeriod ` = Interval in seconds -IBeaconTimeout|Displays or sets the timeout after which iBeacon devices are automatically expunged from the iBeacon device list.
`IBeaconTimeout` = Get current timeout (defaults to 30)
`IBeaconTimeout ` = Timeout in seconds +IBeaconPeriod|Displays or sets the period at which iBeacon data will be published.
`IBeaconPeriod` = Get current interval (defaults to `10`)
`IBeaconPeriod ` = Interval in seconds +IBeaconTimeout|Displays or sets the timeout after which iBeacon devices are automatically expunged from the iBeacon device list.
`IBeaconTimeout` = Get current timeout (defaults to `30`)
`IBeaconTimeout ` = Timeout in seconds ### BLE MI Sensors