bleparser 3.7.1__tar.gz → 4.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. {bleparser-3.7.1 → bleparser-4.0.1}/LICENSE +1 -0
  2. {bleparser-3.7.1/package/bleparser.egg-info → bleparser-4.0.1}/PKG-INFO +71 -5
  3. bleparser-3.7.1/PKG-INFO → bleparser-4.0.1/README.md +61 -17
  4. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/__init__.py +313 -83
  5. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/acconeer.py +29 -38
  6. bleparser-4.0.1/package/bleparser/airmentor.py +142 -0
  7. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/almendo.py +16 -22
  8. bleparser-4.0.1/package/bleparser/altbeacon.py +52 -0
  9. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/amazfit.py +38 -23
  10. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/atc.py +8 -15
  11. bleparser-4.0.1/package/bleparser/beckett.py +246 -0
  12. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/bluemaestro.py +20 -17
  13. bleparser-4.0.1/package/bleparser/blustream.py +42 -0
  14. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/bparasite.py +9 -20
  15. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/bthome.py +92 -32
  16. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/bthome_const.py +108 -10
  17. bleparser-4.0.1/package/bleparser/chefiq.py +69 -0
  18. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/const.py +6 -2
  19. bleparser-4.0.1/package/bleparser/eddystone_tlm.py +66 -0
  20. bleparser-4.0.1/package/bleparser/govee.py +305 -0
  21. bleparser-4.0.1/package/bleparser/grundfos.py +58 -0
  22. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/helpers.py +3 -3
  23. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/hhcc.py +10 -31
  24. bleparser-4.0.1/package/bleparser/holyiot.py +101 -0
  25. bleparser-4.0.1/package/bleparser/hormann.py +63 -0
  26. bleparser-4.0.1/package/bleparser/ibeacon.py +51 -0
  27. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/inkbird.py +9 -20
  28. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/inode.py +11 -22
  29. bleparser-4.0.1/package/bleparser/jaalee.py +71 -0
  30. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/jinou.py +5 -16
  31. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/kegtron.py +5 -15
  32. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/kkm.py +11 -23
  33. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/laica.py +5 -8
  34. bleparser-4.0.1/package/bleparser/michelin.py +71 -0
  35. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/mikrotik.py +11 -15
  36. bleparser-4.0.1/package/bleparser/minew.py +47 -0
  37. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/miscale.py +20 -26
  38. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/moat.py +6 -16
  39. bleparser-4.0.1/package/bleparser/mocreo.py +142 -0
  40. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/oral_b.py +5 -16
  41. bleparser-4.0.1/package/bleparser/oras.py +96 -0
  42. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/qingping.py +16 -21
  43. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/relsib.py +26 -24
  44. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/ruuvitag.py +28 -32
  45. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/sensirion.py +9 -21
  46. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/sensorpush.py +5 -16
  47. bleparser-4.0.1/package/bleparser/senssun.py +50 -0
  48. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/smartdry.py +21 -27
  49. bleparser-4.0.1/package/bleparser/sonoff.py +129 -0
  50. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/switchbot.py +5 -16
  51. bleparser-4.0.1/package/bleparser/teltonika.py +129 -0
  52. bleparser-4.0.1/package/bleparser/thermobeacon.py +82 -0
  53. bleparser-4.0.1/package/bleparser/thermopro.py +43 -0
  54. bleparser-4.0.1/package/bleparser/thermosafer.py +26 -0
  55. bleparser-4.0.1/package/bleparser/tilt.py +49 -0
  56. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/xiaogui.py +7 -15
  57. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/xiaomi.py +714 -133
  58. bleparser-3.7.1/README.md → bleparser-4.0.1/package/bleparser.egg-info/PKG-INFO +83 -2
  59. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser.egg-info/SOURCES.txt +15 -0
  60. {bleparser-3.7.1 → bleparser-4.0.1}/setup.cfg +7 -2
  61. bleparser-3.7.1/package/bleparser/airmentor.py +0 -83
  62. bleparser-3.7.1/package/bleparser/altbeacon.py +0 -79
  63. bleparser-3.7.1/package/bleparser/govee.py +0 -147
  64. bleparser-3.7.1/package/bleparser/ibeacon.py +0 -76
  65. bleparser-3.7.1/package/bleparser/jaalee.py +0 -60
  66. bleparser-3.7.1/package/bleparser/teltonika.py +0 -75
  67. bleparser-3.7.1/package/bleparser/thermopro.py +0 -55
  68. bleparser-3.7.1/package/bleparser/tilt.py +0 -75
  69. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/brifit.py +0 -0
  70. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser/thermoplus.py +0 -0
  71. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser.egg-info/dependency_links.txt +0 -0
  72. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser.egg-info/requires.txt +0 -0
  73. {bleparser-3.7.1 → bleparser-4.0.1}/package/bleparser.egg-info/top_level.txt +0 -0
  74. {bleparser-3.7.1 → bleparser-4.0.1}/pyproject.toml +0 -0
@@ -1,6 +1,7 @@
1
1
  MIT License
2
2
 
3
3
  Copyright (c) 2022 Ernst Klamer
4
+ Copyright (c) 2025 Custom components for Home Assistant
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
7
  of this software and associated documentation files (the "Software"), to deal
@@ -1,17 +1,24 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: bleparser
3
- Version: 3.7.1
3
+ Version: 4.0.1
4
4
  Summary: Parser for passive BLE advertisements
5
5
  Home-page: https://github.com/Ernst79/bleparser
6
6
  Author: Ernst79
7
7
  Author-email: e.klamer@gmail.com
8
8
  Project-URL: Bug Tracker, https://github.com/Ernst79/bleparser/issues
9
9
  Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Classifier: Programming Language :: Python :: 3.15
10
15
  Classifier: License :: OSI Approved :: MIT License
11
16
  Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.8
17
+ Requires-Python: >=3.11
13
18
  Description-Content-Type: text/markdown
14
19
  License-File: LICENSE
20
+ Requires-Dist: pycryptodomex
21
+ Dynamic: license-file
15
22
 
16
23
  # BLE parser for passive BLE advertisements
17
24
 
@@ -23,6 +30,11 @@ This pypi package is parsing BLE advertisements to readable data for several sen
23
30
  pip install bleparser
24
31
  ```
25
32
 
33
+ The passive parsers and parser fixtures are synchronized with
34
+ [`custom-components/ble_monitor` at `51bf13b994a1`](https://github.com/custom-components/ble_monitor/commit/51bf13b994a1f9c8b72c345401f48d81dd96f984).
35
+ Home Assistant integration code and active Bluetooth key-retrieval tools are not
36
+ included. The package remains standalone and supports Python 3.11 through 3.15.
37
+
26
38
  ## Supported sensors
27
39
 
28
40
  Supported sensor brands
@@ -31,31 +43,47 @@ Supported sensor brands
31
43
  - Air Mentor
32
44
  - Amazfit
33
45
  - ATC (custom firmware for Xiaomi/Qingping sensors)
46
+ - Beckett
34
47
  - BlueMaestro
48
+ - Blustream
35
49
  - Brifit
36
50
  - BTHome
37
51
  - b-parasite
52
+ - Chef iQ
53
+ - Eddystone-TLM
38
54
  - Govee
55
+ - Grundfos
39
56
  - HHCC
57
+ - HolyIOT
58
+ - Hormann
40
59
  - Inkbird
41
60
  - iNode
42
61
  - Jaalee
43
62
  - Jinou
44
63
  - Kegtron
45
64
  - KKM
65
+ - Laica
66
+ - Michelin
46
67
  - Mikrotik
68
+ - Minew
47
69
  - Moat
70
+ - Mocreo
48
71
  - Oral-B
72
+ - Oras
49
73
  - Qingping
50
74
  - Relsib
51
75
  - Ruuvitag
52
76
  - Sensirion
53
77
  - SensorPush
78
+ - Senssun
54
79
  - SmartDry
80
+ - Sonoff
55
81
  - Switchbot
56
82
  - Teltonika
83
+ - Thermobeacon (including Brifit and Thermoplus)
57
84
  - Thermoplus
58
85
  - Thermopro
86
+ - Thermosafer
59
87
  - Tilt
60
88
  - Xiaogui (Scale)
61
89
  - Xiaomi (MiBeacon)
@@ -72,6 +100,19 @@ ble_parser = BleParser()
72
100
  sensor_msg, tracker_msg = ble_parser.parse_raw_data(data)
73
101
  ```
74
102
 
103
+ For an HCI event containing multiple legacy or extended advertisement reports,
104
+ use `parse_raw_data_reports` to receive all recognized reports:
105
+
106
+ ```python
107
+ for sensor_msg, tracker_msg in ble_parser.parse_raw_data_reports(data):
108
+ print(sensor_msg, tracker_msg)
109
+ ```
110
+
111
+ `parse_raw_data` continues to return one `(sensor_msg, tracker_msg)` pair (the
112
+ first recognized report), or `(None, None)` when nothing is recognized.
113
+ Truncated reports are ignored, and malformed reports are logged at debug level
114
+ without discarding other complete reports in the event.
115
+
75
116
  You can set optional parameters, the example below shows all possible input parameters with default values.
76
117
 
77
118
  ```python
@@ -101,11 +142,17 @@ sensor_data, tracker_data = self.parse_advertisement(
101
142
  )
102
143
  ```
103
144
 
104
- `service_data_list` and `man_spec_data_list` have to be in a list, as a BKE advertisement can contain multiple service data/manufacturer specific data packets.
145
+ `service_data_list` and `man_spec_data_list` have to be in a list, as a BLE advertisement can contain multiple service data/manufacturer specific data packets.
105
146
 
106
147
  **report_unknown**
107
148
 
108
- Report unknown sensors. Can be set to `Acconeer`, `Air Mentor`, `Amazfit`, `ATC`, `b-parasite`, `BlueMaestro`, `Brifit`, `BTHome`, `Govee`, `HHCC`, `Inkbird`, `iNode`, `Jaalee`, `Jinou`, `Kegtron`, `KKM`, `Mikrotik`, `Moat`, `Mi Scale`, `Oral-B`, `Qingping`, `Relsib`, `Ruuvitag`, `SensorPush`, `Sensirion`, `SmartDry`, `Switchbot`, `Teltonika`, `Thermoplus`, `Thermopro`, `Tilt`, `Xiaogui` or `Xiaomi` to report unknown sensors of a specific brand to the logger. You can set it to `Other` to report all unknown advertisements to the logger. Default: `False`
149
+ Report unknown sensors. Can be set to `Acconeer`, `Air Mentor`, `Amazfit`, `ATC`, `b-parasite`, `BlueMaestro`, `BTHome`, `Govee`, `HHCC`, `Inkbird`, `iNode`, `Jaalee`, `Jinou`, `Kegtron`, `KKM`, `Mikrotik`, `Moat`, `Mi Scale`, `Oral-B`, `Qingping`, `Relsib`, `Ruuvitag`, `SensorPush`, `Sensirion`, `SmartDry`, `Switchbot`, `Teltonika`, `Thermopro`, `Tilt`, `Xiaogui` or `Xiaomi` to report unknown sensors of a specific brand to the logger. You can set it to `Other` to report all unknown advertisements to the logger. Default: `False`
150
+
151
+ Additional `report_unknown` names are `Beckett`, `Blustream`, `Chef iQ`,
152
+ `Eddystone`, `Grundfos`, `HolyIOT`, `Hormann`, `Minew`, `Sonoff`,
153
+ `Thermobeacon`, and `Thermosafer`. Brifit and Thermoplus
154
+ advertisements now use the upstream `Thermobeacon` firmware name; use
155
+ `report_unknown="Thermobeacon"` for these devices.
109
156
 
110
157
  **discovery**
111
158
 
@@ -119,6 +166,15 @@ Boolean. Most sensors send multipe advertisements with the exact same data, to i
119
166
 
120
167
  List with MAC addresses or UUIDs of devices that are being parsed, if `discovery` is set to `False`. If `discovery` is set to `True`, all supported sensors will be parsed. Default: `[]`
121
168
 
169
+ The MAC addresses should be in bytes.
170
+ ```python
171
+ sensor_whitelist=[bytes.fromhex("A4:C1:38:56:53:84".replace(":", ""))],
172
+ ```
173
+
174
+ For iBeacon, AltBeacon, and Tilt sensor data, whitelist the beacon UUID as
175
+ bytes rather than only its MAC address. A whitelisted UUID also allows devices
176
+ whose MAC address changes.
177
+
122
178
  **tracker_whitelist**
123
179
 
124
180
  List with devices (MAC addresses or UUIDs) to track. Default: `[]`
@@ -127,6 +183,11 @@ List with devices (MAC addresses or UUIDs) to track. Default: `[]`
127
183
 
128
184
  Dictionary with mac + encryption key pairs, for sensors that require an encryption key to decrypt the payload. Default: `{}`
129
185
 
186
+ The mac and encryption key pairs should be in bytes.
187
+ ```python
188
+ aeskeys={bytes.fromhex("A4:C1:38:56:53:84".replace(":", "")): bytes.fromhex("a115210eed7a88e50ad52662e732a9fb") for mac, aeskey in AESKEYS.items()},
189
+ ```
190
+
130
191
  ## Result
131
192
 
132
193
  The parser result are two two dictionaries, one with sensor data (e.g. temperature readings) and one with tracking data.
@@ -154,6 +215,11 @@ The output of `sensor_msg` is:
154
215
 
155
216
  If the advertisements can be parsed, it will always show the `rssi`, `mac`, `type`, `packet`, `firmware` and `data` fields. Additional fields with the measurements, like `temperature` and `humidity` will be available depending on the sensor type.
156
217
 
218
+ Sensor and tracker results now also include `local_name` (an empty string when
219
+ the advertisement has no valid UTF-8 local name). Measurement names and values
220
+ follow the pinned upstream parser, including newer BTHome measurements and
221
+ device-specific corrections.
222
+
157
223
  ### Parsing tracker data
158
224
 
159
225
  A minimal example for tracking BLE devices is shown below. To prevent tracking of all devices that pass by, you will have to specify a whitelist with devices that you want to track. This needs to be a list with MAC addresses in lower case, without `:`.
@@ -1,18 +1,3 @@
1
- Metadata-Version: 2.1
2
- Name: bleparser
3
- Version: 3.7.1
4
- Summary: Parser for passive BLE advertisements
5
- Home-page: https://github.com/Ernst79/bleparser
6
- Author: Ernst79
7
- Author-email: e.klamer@gmail.com
8
- Project-URL: Bug Tracker, https://github.com/Ernst79/bleparser/issues
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.8
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE
15
-
16
1
  # BLE parser for passive BLE advertisements
17
2
 
18
3
  This pypi package is parsing BLE advertisements to readable data for several sensors and can be used for device tracking (by (fixed) MAC address or by UUID). The parser was originally developed as part of the [BLE monitor custom component for Home Assistant](https://github.com/custom-components/ble_monitor), but can now be used for other implementations. The package does NOT take care of the data collecting of the BLE advertisements, you can use other packages like [aioblescan](https://github.com/frawau/aioblescan) or [bleson](https://bleson.readthedocs.io/en/latest/index.html) to do that part. An example is given in the [examples folder](https://github.com/Ernst79/bleparser/tree/master/examples).
@@ -23,6 +8,11 @@ This pypi package is parsing BLE advertisements to readable data for several sen
23
8
  pip install bleparser
24
9
  ```
25
10
 
11
+ The passive parsers and parser fixtures are synchronized with
12
+ [`custom-components/ble_monitor` at `51bf13b994a1`](https://github.com/custom-components/ble_monitor/commit/51bf13b994a1f9c8b72c345401f48d81dd96f984).
13
+ Home Assistant integration code and active Bluetooth key-retrieval tools are not
14
+ included. The package remains standalone and supports Python 3.11 through 3.15.
15
+
26
16
  ## Supported sensors
27
17
 
28
18
  Supported sensor brands
@@ -31,31 +21,47 @@ Supported sensor brands
31
21
  - Air Mentor
32
22
  - Amazfit
33
23
  - ATC (custom firmware for Xiaomi/Qingping sensors)
24
+ - Beckett
34
25
  - BlueMaestro
26
+ - Blustream
35
27
  - Brifit
36
28
  - BTHome
37
29
  - b-parasite
30
+ - Chef iQ
31
+ - Eddystone-TLM
38
32
  - Govee
33
+ - Grundfos
39
34
  - HHCC
35
+ - HolyIOT
36
+ - Hormann
40
37
  - Inkbird
41
38
  - iNode
42
39
  - Jaalee
43
40
  - Jinou
44
41
  - Kegtron
45
42
  - KKM
43
+ - Laica
44
+ - Michelin
46
45
  - Mikrotik
46
+ - Minew
47
47
  - Moat
48
+ - Mocreo
48
49
  - Oral-B
50
+ - Oras
49
51
  - Qingping
50
52
  - Relsib
51
53
  - Ruuvitag
52
54
  - Sensirion
53
55
  - SensorPush
56
+ - Senssun
54
57
  - SmartDry
58
+ - Sonoff
55
59
  - Switchbot
56
60
  - Teltonika
61
+ - Thermobeacon (including Brifit and Thermoplus)
57
62
  - Thermoplus
58
63
  - Thermopro
64
+ - Thermosafer
59
65
  - Tilt
60
66
  - Xiaogui (Scale)
61
67
  - Xiaomi (MiBeacon)
@@ -72,6 +78,19 @@ ble_parser = BleParser()
72
78
  sensor_msg, tracker_msg = ble_parser.parse_raw_data(data)
73
79
  ```
74
80
 
81
+ For an HCI event containing multiple legacy or extended advertisement reports,
82
+ use `parse_raw_data_reports` to receive all recognized reports:
83
+
84
+ ```python
85
+ for sensor_msg, tracker_msg in ble_parser.parse_raw_data_reports(data):
86
+ print(sensor_msg, tracker_msg)
87
+ ```
88
+
89
+ `parse_raw_data` continues to return one `(sensor_msg, tracker_msg)` pair (the
90
+ first recognized report), or `(None, None)` when nothing is recognized.
91
+ Truncated reports are ignored, and malformed reports are logged at debug level
92
+ without discarding other complete reports in the event.
93
+
75
94
  You can set optional parameters, the example below shows all possible input parameters with default values.
76
95
 
77
96
  ```python
@@ -101,11 +120,17 @@ sensor_data, tracker_data = self.parse_advertisement(
101
120
  )
102
121
  ```
103
122
 
104
- `service_data_list` and `man_spec_data_list` have to be in a list, as a BKE advertisement can contain multiple service data/manufacturer specific data packets.
123
+ `service_data_list` and `man_spec_data_list` have to be in a list, as a BLE advertisement can contain multiple service data/manufacturer specific data packets.
105
124
 
106
125
  **report_unknown**
107
126
 
108
- Report unknown sensors. Can be set to `Acconeer`, `Air Mentor`, `Amazfit`, `ATC`, `b-parasite`, `BlueMaestro`, `Brifit`, `BTHome`, `Govee`, `HHCC`, `Inkbird`, `iNode`, `Jaalee`, `Jinou`, `Kegtron`, `KKM`, `Mikrotik`, `Moat`, `Mi Scale`, `Oral-B`, `Qingping`, `Relsib`, `Ruuvitag`, `SensorPush`, `Sensirion`, `SmartDry`, `Switchbot`, `Teltonika`, `Thermoplus`, `Thermopro`, `Tilt`, `Xiaogui` or `Xiaomi` to report unknown sensors of a specific brand to the logger. You can set it to `Other` to report all unknown advertisements to the logger. Default: `False`
127
+ Report unknown sensors. Can be set to `Acconeer`, `Air Mentor`, `Amazfit`, `ATC`, `b-parasite`, `BlueMaestro`, `BTHome`, `Govee`, `HHCC`, `Inkbird`, `iNode`, `Jaalee`, `Jinou`, `Kegtron`, `KKM`, `Mikrotik`, `Moat`, `Mi Scale`, `Oral-B`, `Qingping`, `Relsib`, `Ruuvitag`, `SensorPush`, `Sensirion`, `SmartDry`, `Switchbot`, `Teltonika`, `Thermopro`, `Tilt`, `Xiaogui` or `Xiaomi` to report unknown sensors of a specific brand to the logger. You can set it to `Other` to report all unknown advertisements to the logger. Default: `False`
128
+
129
+ Additional `report_unknown` names are `Beckett`, `Blustream`, `Chef iQ`,
130
+ `Eddystone`, `Grundfos`, `HolyIOT`, `Hormann`, `Minew`, `Sonoff`,
131
+ `Thermobeacon`, and `Thermosafer`. Brifit and Thermoplus
132
+ advertisements now use the upstream `Thermobeacon` firmware name; use
133
+ `report_unknown="Thermobeacon"` for these devices.
109
134
 
110
135
  **discovery**
111
136
 
@@ -119,6 +144,15 @@ Boolean. Most sensors send multipe advertisements with the exact same data, to i
119
144
 
120
145
  List with MAC addresses or UUIDs of devices that are being parsed, if `discovery` is set to `False`. If `discovery` is set to `True`, all supported sensors will be parsed. Default: `[]`
121
146
 
147
+ The MAC addresses should be in bytes.
148
+ ```python
149
+ sensor_whitelist=[bytes.fromhex("A4:C1:38:56:53:84".replace(":", ""))],
150
+ ```
151
+
152
+ For iBeacon, AltBeacon, and Tilt sensor data, whitelist the beacon UUID as
153
+ bytes rather than only its MAC address. A whitelisted UUID also allows devices
154
+ whose MAC address changes.
155
+
122
156
  **tracker_whitelist**
123
157
 
124
158
  List with devices (MAC addresses or UUIDs) to track. Default: `[]`
@@ -127,6 +161,11 @@ List with devices (MAC addresses or UUIDs) to track. Default: `[]`
127
161
 
128
162
  Dictionary with mac + encryption key pairs, for sensors that require an encryption key to decrypt the payload. Default: `{}`
129
163
 
164
+ The mac and encryption key pairs should be in bytes.
165
+ ```python
166
+ aeskeys={bytes.fromhex("A4:C1:38:56:53:84".replace(":", "")): bytes.fromhex("a115210eed7a88e50ad52662e732a9fb") for mac, aeskey in AESKEYS.items()},
167
+ ```
168
+
130
169
  ## Result
131
170
 
132
171
  The parser result are two two dictionaries, one with sensor data (e.g. temperature readings) and one with tracking data.
@@ -154,6 +193,11 @@ The output of `sensor_msg` is:
154
193
 
155
194
  If the advertisements can be parsed, it will always show the `rssi`, `mac`, `type`, `packet`, `firmware` and `data` fields. Additional fields with the measurements, like `temperature` and `humidity` will be available depending on the sensor type.
156
195
 
196
+ Sensor and tracker results now also include `local_name` (an empty string when
197
+ the advertisement has no valid UTF-8 local name). Measurement names and values
198
+ follow the pinned upstream parser, including newer BTHome measurements and
199
+ device-specific corrections.
200
+
157
201
  ### Parsing tracker data
158
202
 
159
203
  A minimal example for tracking BLE devices is shown below. To prevent tracking of all devices that pass by, you will have to specify a whitelist with devices that you want to track. This needs to be a list with MAC addresses in lower case, without `:`.