Bluetooth library for Oral B devices
Project description
OralB BLE
Bluetooth library for Oral B devices
Installation
Install this via pip (or your favourite package manager):
pip install oralb-ble
Usage
oralb-ble is a passive parser for Oral-B toothbrush BLE advertisements.
It does not connect to the device — it decodes the manufacturer data that the
brush broadcasts while in use.
Feed each advertisement you receive into OralBBluetoothDeviceData.update()
and read the resulting SensorUpdate:
from home_assistant_bluetooth import BluetoothServiceInfo
from oralb_ble import OralBBluetoothDeviceData
# A BLE advertisement captured from an Oral-B IO Series 6.
service_info = BluetoothServiceInfo(
name="Oral-B Toothbrush",
address="78:DB:2F:C2:48:BE",
rssi=-63,
manufacturer_data={220: b"\x062k\x02r\x00\x00\x01\x01\x00\x04"},
service_uuids=[],
service_data={},
source="local",
)
parser = OralBBluetoothDeviceData()
update = parser.update(service_info)
print(update.title)
# 'IO Series 48BE'
for key, value in update.entity_values.items():
print(f"{key.key}: {value.native_value}")
# time: 0
# sector: no sector
# number_of_sectors: 4
# sector_timer: 0
# toothbrush_state: idle
# pressure: normal
# mode: sensitive
# signal_strength: -63
for key, value in update.binary_entity_values.items():
print(f"{key.key}: {value.native_value}")
# brushing: False
The parser is stateful per device: keep the same OralBBluetoothDeviceData
instance across advertisements from the same toothbrush so that derived
fields (sector_timer, toothbrush_state) stay accurate.
For real-world advertisement collection see Home Assistant's bluetooth integration — that is the primary consumer of this library.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
Credits
This package was created with Cookiecutter and the browniebroke/cookiecutter-pypackage project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oralb_ble-1.1.3.tar.gz.
File metadata
- Download URL: oralb_ble-1.1.3.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9e4d979618ec9d623025d87e8df7aec61a532ba98ade81a260bb30e440a95c9
|
|
| MD5 |
904b47cd30c25c8738b45c89ce1ae4a8
|
|
| BLAKE2b-256 |
8e0052f11143115b7b883370f76e477ecc0135020ab12ace40b9aa83bc6985fd
|
Provenance
The following attestation bundles were made for oralb_ble-1.1.3.tar.gz:
Publisher:
ci.yml on Bluetooth-Devices/oralb-ble
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oralb_ble-1.1.3.tar.gz -
Subject digest:
a9e4d979618ec9d623025d87e8df7aec61a532ba98ade81a260bb30e440a95c9 - Sigstore transparency entry: 2210325973
- Sigstore integration time:
-
Permalink:
Bluetooth-Devices/oralb-ble@38417a96d23ea1d62129b286fdd65164f2088981 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Bluetooth-Devices
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@38417a96d23ea1d62129b286fdd65164f2088981 -
Trigger Event:
push
-
Statement type:
File details
Details for the file oralb_ble-1.1.3-py3-none-any.whl.
File metadata
- Download URL: oralb_ble-1.1.3-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd8f418d7b176c0da006e324ddafe7e276b2533a43c83000657f1bcf6b85d285
|
|
| MD5 |
03ee59bcc9605164aebc0e4d1b49fd22
|
|
| BLAKE2b-256 |
83151f148d581a36989a8517dfbdca01f0fd0e542881455ca17759192d9fe55a
|
Provenance
The following attestation bundles were made for oralb_ble-1.1.3-py3-none-any.whl:
Publisher:
ci.yml on Bluetooth-Devices/oralb-ble
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oralb_ble-1.1.3-py3-none-any.whl -
Subject digest:
bd8f418d7b176c0da006e324ddafe7e276b2533a43c83000657f1bcf6b85d285 - Sigstore transparency entry: 2210325993
- Sigstore integration time:
-
Permalink:
Bluetooth-Devices/oralb-ble@38417a96d23ea1d62129b286fdd65164f2088981 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Bluetooth-Devices
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@38417a96d23ea1d62129b286fdd65164f2088981 -
Trigger Event:
push
-
Statement type: