Omron BLE BPM (HEM-7142T2) Custom Integration

Hello, I created a custom component to integrate an Omron BLE blood pressure monitor with Home Assistant.
Currently, only the HEM-7142T2 model is supported, as it is the model I personally own.

Installation

  • You can install this integration by adding the repository to HACS.
  • After installation, the device will be discovered automatically.
  • During the initial setup, you need to pair the device once.
    Press and hold the Bluetooth button on the blood pressure monitor to enter pairing mode, then register the device in Home Assistant.

3 Likes

This is great! Unfortunately it doesn’t seem to provide any sensor data for my model (HEM-7382T1). I tried a couple similar models but no luck. Hopefully I can do some digging a bit later on.

Traceback (most recent call last):
  File "/usr/local/lib/python3.14/site-packages/bleak_esphome/backend/client.py", line 77, in _async_wrap_bluetooth_operation
    return await func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/site-packages/bleak_esphome/backend/client.py", line 710, in start_notify
    await self._client.bluetooth_gatt_write_descriptor(
    ...<3 lines>...
    )
  File "/usr/local/lib/python3.14/site-packages/aioesphomeapi/client.py", line 1150, in bluetooth_gatt_write_descriptor
    await self._bluetooth_gatt_write(
    ...<5 lines>...
    )
  File "/usr/local/lib/python3.14/site-packages/aioesphomeapi/client.py", line 1172, in _bluetooth_gatt_write
    await self._send_bluetooth_message_await_response(
    ...<5 lines>...
    )
  File "/usr/local/lib/python3.14/site-packages/aioesphomeapi/client.py", line 713, in _send_bluetooth_message_await_response
    raise BluetoothGATTAPIError(BluetoothGATTError.from_pb(resp))
aioesphomeapi.core.BluetoothGATTAPIError: Bluetooth GATT Error address=E2:D5:36:37:92:63 handle=33 error=259 description=Unknown error
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/config/custom_components/omron/omron_ble/parser.py", line 434, in async_poll
    record = await self._driver.get_latest_record(transport)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/omron/omron_ble/omron_driver.py", line 687, in get_latest_record
    indexed = await self._get_latest_via_index(transport)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/omron/omron_ble/omron_driver.py", line 782, in _get_latest_via_index
    await transport.open_memory_session()
  File "/config/custom_components/omron/omron_ble/omron_driver.py", line 243, in open_memory_session
    await self._subscribe_notify_channels()
  File "/config/custom_components/omron/omron_ble/omron_driver.py", line 128, in _subscribe_notify_channels
    await self._client.start_notify(uuid, self._on_notify_channel_data)
  File "/usr/local/lib/python3.14/site-packages/bleak/__init__.py", line 846, in start_notify
    await self._backend.start_notify(
        characteristic, wrapped_callback, bluez=bluez, cb=cb, **kwargs
    )
  File "/usr/local/lib/python3.14/site-packages/bleak_esphome/backend/client.py", line 104, in _async_wrap_bluetooth_operation
    raise BleakError(str(ex)) from ex
bleak.exc.BleakError: Bluetooth GATT Error address=E2:D5:36:37:92:63 handle=33 error=259 description=Unknown error

I suspect this error is due to either the Bluetooth Proxy configuration or a pairing issue. Please check your current settings and, if they differ from the setup below, update them and try again. Also, could you confirm if the pairing process was completed successfully? If you have any additional logs, please share them with me as well.

  • Please run a test on the 1.2.9 pre-release version.
esp32_ble_tracker:
  scan_parameters:
    active: true

bluetooth_proxy:
  active: true

I downloaded the latest pre-release and changed those settings. Still not providing any sensor data though. The device seems to think its paired, it says “okay” on the screen. Maybe I need to try other models to see if i can get some more info. Here’s the esphome logs:

[17:52:55.552][I][bluetooth_proxy:071]: [0] [E2:D5:36:37:92:63] Connecting v3 with cache
[17:52:55.554][D][esp32_ble_tracker:169]: connecting: 0, discovered: 1, disconnecting: 0
[17:52:55.554][D][esp32_ble_tracker:899]: Stopping scan to make connection
[17:52:55.554][D][esp32_ble_tracker:907]: Promoting client to connect
[17:52:55.554][D][esp32_ble_tracker:943]: Setting coexistence to Bluetooth to make connection.
[17:52:55.555][I][esp32_ble_client:125]: [0] [E2:D5:36:37:92:63] 0x01 Connecting
[17:52:55.556][D][esp32_ble_client:231]: [0] [E2:D5:36:37:92:63] medium conn params
[17:52:55.556][D][esp32_ble_tracker:169]: connecting: 1, discovered: 0, disconnecting: 0
[17:52:56.606][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_CONNECT_EVT
[17:52:56.606][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_OPEN_EVT
[17:52:56.606][I][esp32_ble_client:343]: [0] [E2:D5:36:37:92:63] Connection open
[17:52:56.606][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 0
[17:52:56.616][D][esp32_ble_tracker:947]: Setting coexistence preference to balanced.
[17:52:56.617][D][esp32_ble_client:410]: [0] [E2:D5:36:37:92:63] cfg_mtu status 0, mtu 247
[17:52:56.622][D][esp-idf:000][BTU_TASK]: W (1131178) BT_BTM: Security Manager: BTM_SetEncryption busy, enqueue request
[17:52:56.928][W][esp32_ble:615][BTC_TASK]: Ignoring unexpected GAP event type: 9
[17:52:56.988][W][esp32_ble:615][BTC_TASK]: Ignoring unexpected GAP event type: 9
[17:52:57.038][W][esp32_ble:615][BTC_TASK]: Ignoring unexpected GAP event type: 9
[17:52:57.038][W][esp32_ble:615][BTC_TASK]: Ignoring unexpected GAP event type: 9
[17:52:57.038][I][esp32_ble_client:570]: [0] [E2:D5:36:37:92:63] auth complete addr: E2:D5:36:37:92:63
[17:52:57.120][D][esp32_ble_client:575]: [0] [E2:D5:36:37:92:63] auth success type = 1 mode = 1
[17:52:57.130][I][esp32_ble_client:166]: [0] [E2:D5:36:37:92:63] Disconnecting (conn_id: 0).
[17:52:57.130][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 1
[17:52:57.130][D][esp-idf:000][BTU_TASK]: W (1131685) BT_HCI: hci cmd send: disconnect: hdl 0x0, rsn:0x13
[17:52:57.140][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_CLOSE_EVT
[17:52:57.145][D][bluetooth_proxy.connection:376]: [0] [E2:D5:36:37:92:63] Close, reason=0x00, freeing slot
[17:52:57.146][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 0
[17:52:57.192][D][esp-idf:000][BTU_TASK]: W (1131737) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x16 dev_find 1
[17:52:57.325][I][bluetooth_proxy:071]: [0] [E2:D5:36:37:92:63] Connecting v3 with cache
[17:52:57.332][D][esp32_ble_tracker:169]: connecting: 0, discovered: 1, disconnecting: 0
[17:52:57.336][D][esp32_ble_tracker:899]: Stopping scan to make connection
[17:52:57.336][D][esp32_ble_tracker:907]: Promoting client to connect
[17:52:57.340][D][esp32_ble_tracker:943]: Setting coexistence to Bluetooth to make connection.
[17:52:57.354][I][esp32_ble_client:125]: [0] [E2:D5:36:37:92:63] 0x01 Connecting
[17:52:57.356][D][esp32_ble_client:231]: [0] [E2:D5:36:37:92:63] medium conn params
[17:52:57.356][D][esp32_ble_tracker:169]: connecting: 1, discovered: 0, disconnecting: 0
[17:52:57.413][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_CONNECT_EVT
[17:52:57.418][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_OPEN_EVT
[17:52:57.418][I][esp32_ble_client:343]: [0] [E2:D5:36:37:92:63] Connection open
[17:52:57.418][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 0
[17:52:57.434][D][esp32_ble_tracker:947]: Setting coexistence preference to balanced.
[17:52:57.500][D][esp-idf:000][BTU_TASK]: W (1131997) BT_BTM: Security Manager: BTM_SetEncryption busy, enqueue request
[17:52:57.607][I][esp32_ble_client:570]: [0] [E2:D5:36:37:92:63] auth complete addr: E2:D5:36:37:92:63
[17:52:57.608][D][esp32_ble_client:575]: [0] [E2:D5:36:37:92:63] auth success type = 1 mode = 1
[17:52:57.715][D][esp32_ble_client:410]: [0] [E2:D5:36:37:92:63] cfg_mtu status 0, mtu 247
[17:53:18.516][I][esp32_ble_client:166]: [0] [E2:D5:36:37:92:63] Disconnecting (conn_id: 0).
[17:53:18.519][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 1
[17:53:18.520][D][esp-idf:000][BTU_TASK]: W (1153071) BT_HCI: hci cmd send: disconnect: hdl 0x0, rsn:0x13
[17:53:18.530][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_CLOSE_EVT
[17:53:18.530][D][bluetooth_proxy.connection:376]: [0] [E2:D5:36:37:92:63] Close, reason=0x00, freeing slot
[17:53:18.531][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 0
[17:53:18.593][D][esp-idf:000][BTU_TASK]: W (1153102) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x16 dev_find 1

I reinstalled and restarted everything. Now the pairing fails.

[18:15:33.030][I][bluetooth_proxy:071]: [0] [C4:7C:8D:6D:DC:12] Connecting v3 with cache
[18:15:33.080][D][esp32_ble_tracker:169]: connecting: 0, discovered: 1, disconnecting: 0
[18:15:33.081][D][esp32_ble_tracker:899]: Stopping scan to make connection
[18:15:33.081][D][esp32_ble_tracker:907]: Promoting client to connect
[18:15:33.081][D][esp32_ble_tracker:943]: Setting coexistence to Bluetooth to make connection.
[18:15:33.081][I][esp32_ble_client:125]: [0] [C4:7C:8D:6D:DC:12] 0x00 Connecting
[18:15:33.081][D][esp32_ble_client:231]: [0] [C4:7C:8D:6D:DC:12] medium conn params
[18:15:33.134][D][esp32_ble_tracker:169]: connecting: 1, discovered: 0, disconnecting: 0
[18:15:35.026][D][esp32_ble_client:211]: [0] [C4:7C:8D:6D:DC:12] ESP_GATTC_CONNECT_EVT
[18:15:35.027][D][esp32_ble_client:211]: [0] [C4:7C:8D:6D:DC:12] ESP_GATTC_OPEN_EVT
[18:15:35.027][I][esp32_ble_client:343]: [0] [C4:7C:8D:6D:DC:12] Connection open
[18:15:35.035][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 0
[18:15:35.035][D][esp32_ble_tracker:947]: Setting coexistence preference to balanced.
[18:15:35.071][D][esp32_ble_client:410]: [0] [C4:7C:8D:6D:DC:12] cfg_mtu status 0, mtu 23
[18:15:35.271][I][esp32_ble_client:166]: [0] [C4:7C:8D:6D:DC:12] Disconnecting (conn_id: 0).
[18:15:35.282][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 1
[18:15:35.333][D][esp-idf:000][BTU_TASK]: W (2489863) BT_HCI: hci cmd send: disconnect: hdl 0x0, rsn:0x13
[18:15:35.334][D][esp32_ble_client:211]: [0] [C4:7C:8D:6D:DC:12] ESP_GATTC_CLOSE_EVT
[18:15:35.334][D][bluetooth_proxy.connection:376]: [0] [C4:7C:8D:6D:DC:12] Close, reason=0x00, freeing slot
[18:15:35.370][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 0
[18:15:35.370][D][esp-idf:000][BTU_TASK]: W (2489885) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x16 dev_find 1
[18:15:58.102][I][bluetooth_proxy:071]: [0] [E2:D5:36:37:92:63] Connecting v3 without cache
[18:15:58.107][D][esp32_ble_tracker:169]: connecting: 0, discovered: 1, disconnecting: 0
[18:15:58.119][D][esp32_ble_tracker:899]: Stopping scan to make connection
[18:15:58.119][D][esp32_ble_tracker:907]: Promoting client to connect
[18:15:58.120][D][esp32_ble_tracker:943]: Setting coexistence to Bluetooth to make connection.
[18:15:58.120][I][esp32_ble_client:125]: [0] [E2:D5:36:37:92:63] 0x01 Connecting
[18:15:58.127][D][esp32_ble_client:231]: [0] [E2:D5:36:37:92:63] fast conn params
[18:15:58.165][D][esp32_ble_tracker:169]: connecting: 1, discovered: 0, disconnecting: 0
[18:15:58.198][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_CONNECT_EVT
[18:15:58.201][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_OPEN_EVT
[18:15:58.270][I][esp32_ble_client:343]: [0] [E2:D5:36:37:92:63] Connection open
[18:15:58.271][D][esp32_ble_client:207]: [0] [E2:D5:36:37:92:63] Searching for services
[18:15:58.271][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 0
[18:15:58.271][D][esp32_ble_tracker:947]: Setting coexistence preference to balanced.
[18:15:58.281][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_SEARCH_CMPL_EVT
[18:15:58.281][D][esp32_ble_client:231]: [0] [E2:D5:36:37:92:63] medium conn params
[18:15:58.281][I][esp32_ble_client:463]: [0] [E2:D5:36:37:92:63] Service discovery complete
[18:15:58.281][I][esp32_ble_client:570]: [0] [E2:D5:36:37:92:63] auth complete addr: E2:D5:36:37:92:63
[18:15:58.398][D][esp32_ble_client:575]: [0] [E2:D5:36:37:92:63] auth success type = 1 mode = 1
[18:15:58.398][D][esp-idf:000][BTU_TASK]: W (2512836) BT_L2CAP: l2cble_start_conn_update, the last connection update command still pending.
[18:15:58.398][D][esp32_ble_client:410]: [0] [E2:D5:36:37:92:63] cfg_mtu status 0, mtu 247
[18:15:58.626][I][esp32_ble_client:166]: [0] [E2:D5:36:37:92:63] Disconnecting (conn_id: 0).
[18:15:58.684][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 1
[18:15:58.713][D][esp-idf:000][BTU_TASK]: W (2513215) BT_HCI: hci cmd send: disconnect: hdl 0x0, rsn:0x13
[18:15:58.713][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_CLOSE_EVT
[18:15:58.713][D][bluetooth_proxy.connection:376]: [0] [E2:D5:36:37:92:63] Close, reason=0x00, freeing slot
[18:15:58.782][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 0
[18:15:58.783][D][esp-idf:000][BTU_TASK]: W (2513306) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x16 dev_find 1
[18:15:58.817][I][bluetooth_proxy:071]: [0] [E2:D5:36:37:92:63] Connecting v3 with cache
[18:15:58.818][D][esp32_ble_tracker:169]: connecting: 0, discovered: 1, disconnecting: 0
[18:15:58.830][D][esp32_ble_tracker:899]: Stopping scan to make connection
[18:15:58.830][D][esp32_ble_tracker:907]: Promoting client to connect
[18:15:58.830][D][esp32_ble_tracker:943]: Setting coexistence to Bluetooth to make connection.
[18:15:58.830][I][esp32_ble_client:125]: [0] [E2:D5:36:37:92:63] 0x01 Connecting
[18:15:58.837][D][esp32_ble_client:231]: [0] [E2:D5:36:37:92:63] medium conn params
[18:15:58.874][D][esp32_ble_tracker:169]: connecting: 1, discovered: 0, disconnecting: 0
[18:15:58.989][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_CONNECT_EVT
[18:15:58.989][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_OPEN_EVT
[18:15:58.989][I][esp32_ble_client:343]: [0] [E2:D5:36:37:92:63] Connection open
[18:15:58.989][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 0
[18:15:58.990][D][esp32_ble_tracker:947]: Setting coexistence preference to balanced.
[18:15:58.990][I][esp32_ble_client:570]: [0] [E2:D5:36:37:92:63] auth complete addr: E2:D5:36:37:92:63
[18:15:59.133][D][esp32_ble_client:575]: [0] [E2:D5:36:37:92:63] auth success type = 1 mode = 1
[18:15:59.133][D][esp32_ble_client:410]: [0] [E2:D5:36:37:92:63] cfg_mtu status 0, mtu 247
[18:16:21.138][I][esp32_ble_client:166]: [0] [E2:D5:36:37:92:63] Disconnecting (conn_id: 0).
[18:16:21.142][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 1
[18:16:21.153][D][esp-idf:000][BTU_TASK]: W (2535733) BT_HCI: hci cmd send: disconnect: hdl 0x0, rsn:0x13
[18:16:21.225][D][esp32_ble_client:211]: [0] [E2:D5:36:37:92:63] ESP_GATTC_CLOSE_EVT
[18:16:21.226][D][bluetooth_proxy.connection:376]: [0] [E2:D5:36:37:92:63] Close, reason=0x00, freeing slot
[18:16:21.226][D][esp32_ble_tracker:169]: connecting: 0, discovered: 0, disconnecting: 0
[18:16:21.232][D][esp-idf:000][BTU_TASK]: W (2535787) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x16 dev_find 1

I may not have been clear enough. I meant to ask for the HA logs, not the ESP logs. If there are any missing HA logs that weren’t shared before, or if you can capture them now, could you please provide the full HA log from when the error occurred?

And if you don’t mind, could you register this as a GitHub issue? It would be easier to track our progress there.

1 Like

I'll give this a try later today, Omron in their wisdom are now forcing the use of their cloud in order to extract YOUR data, presumably to try and force more premium subscriptions, all they did in my case was consider alternative software stacks or worse case reverse engineer it myself.

1 Like

Given their target audience are health professionals and usually sick people, that is understandable. Their marketing people are your obstacle, and as a owner of some of their products and a wish to extract and collate MY data in a convenient fashion, am frustrated and bewildered why they cannot see the added benefits of documenting their protocols may offer the ability to increase sales. This is not a new thing, but in an ever increasing widely connected world, a narrow minded outdated concept.