Skip to content

cliffkujala/ha-pressensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pressensor Home Assistant Integration

A native Home Assistant integration for the Pressensor Bluetooth pressure transducer, commonly used for real-time espresso extraction pressure monitoring on E61 group head machines.

Features

  • Auto-discovery via Bluetooth — HA will detect your Pressensor automatically
  • Works through Bluetooth Proxies — any ESPHome Bluetooth proxy in range will relay the connection
  • Real-time pressure in millibar (convertible to bar via HA unit settings)
  • Temperature readings (sent every 16th pressure notification)
  • Battery level with state restore across disconnects
  • Connection status binary sensor
  • Zero Pressure button — calibrate the pressure reading to zero from HA

Installation

Manual Installation

  1. Copy the custom_components/pressensor folder to your Home Assistant config/custom_components/ directory
  2. Restart Home Assistant
  3. The Pressensor should be auto-discovered if Bluetooth is set up — check Settings → Devices & Services for a new discovery notification
  4. If not auto-discovered, go to Settings → Devices & Services → Add Integration and search for "Pressensor"

HACS (Custom Repository)

  1. In HACS, add this as a custom repository (Integration type)
  2. Install the "Pressensor" integration
  3. Restart Home Assistant

Setup

During setup you will be asked to select your Pressensor from a list of discovered Bluetooth devices. Make sure the device is powered on and within Bluetooth range of your Home Assistant host or an ESPHome Bluetooth Proxy before starting.

No credentials, API keys, or additional configuration parameters are required.

If your Pressensor is not discovered automatically, pull a shot of espresso or use the blind filter in order to apply pressure to the sensor, which should wake it up, then go to Settings → Devices & Services → Add Integration and search for "Pressensor".

Requirements

  • Home Assistant with the Bluetooth integration enabled
  • A Bluetooth adapter on your HA host, or one or more ESPHome Bluetooth Proxies in range of the Pressensor
  • A Pressensor device with battery installed

Entities

Entity Type Description
Pressure Sensor Real-time group head pressure (mbar)
Temperature Sensor Group temperature (°C, updated every ~16th reading)
Battery Sensor Battery percentage (0–100%)
Connected Binary Sensor BLE connection status
Zero Pressure Button Calibrate the pressure reading to zero
Reconnect Button Manually trigger a BLE connection attempt
Connection Enabled Switch Enable/disable the BLE connection (config)

Supported Devices

No other pressure transducers are currently supported.

Data Updates

The integration uses an advertisement-driven connection model:

  1. The Pressensor sends a BLE advertisement
  2. Home Assistant detects the advertisement and connects automatically
  3. Pressure data arrives via BLE GATT notifications in real time
  4. Temperature is included with every 16th pressure notification
  5. Battery level is read on each connection and checked daily

Once connected, the integration maintains a persistent BLE connection — the device stays connected and streams data continuously. The device does not sleep while an active BLE connection is held. In practice this consumes roughly 1% of the CR2032 battery per day, giving an estimated battery life of several months.

A 5-minute fallback poll ensures connectivity if an advertisement is missed.

Sharing the device with other apps

BLE devices only support one connection at a time. While HA is connected, the official Pressensor iOS/Android app cannot connect. To free the device for use with other apps, turn off the Connection Enabled switch in HA. This disconnects HA and stops it from reconnecting automatically. Turn the switch back on when you want HA to resume monitoring.

Automation Examples

Auto-tare scale and start timer on extraction

Detects a 200 mbar (0.2 bar) pressure rise — indicating the pump has engaged — then tares a Bluetooth scale and starts its timer automatically.

automation:
  - alias: "Auto-tare and start timer on extraction"
    trigger:
      - platform: template
        value_template: >
          {{ (states('sensor.prs12345_pressure') | float(0))
             - (state_attr('sensor.prs12345_pressure', 'old_state') | float(
                 trigger.from_state.state | default(0) | float(0)))
             >= 200 }}
    condition:
      - condition: template
        value_template: >
          {{ (as_timestamp(now()) -
              as_timestamp(states.sensor.prs12345_pressure.last_changed)) < 1 }}
    action:
      - service: button.press
        target:
          entity_id: button.acaia_lunar_tare
      - service: button.press
        target:
          entity_id: button.acaia_lunar_start_stop

Low battery notification

automation:
  - alias: "Pressensor low battery"
    trigger:
      - platform: numeric_state
        entity_id: sensor.prs12345_battery
        below: 15
    action:
      - service: notify.mobile_app
        data:
          title: "Pressensor"
          message: "Battery is low ({{ states('sensor.prs12345_battery') }}%). Replace the CR2032."

Replace prs12345 with your device's actual entity ID prefix.

Known Limitations

  • Exclusive Bluetooth connection — While this integration is connected to your Pressensor, you won't be able to use the official app, as BLE devices only support one connection at a time. Use the Connection Enabled switch to temporarily release the device for other apps
  • Persistent connection — The integration maintains a continuous BLE connection. The device does not sleep while connected. Battery consumption is approximately 1% per day (~several months of battery life)
  • Bluetooth range — The device must be within BLE range of your HA host or an ESPHome Bluetooth Proxy (~10 m line of sight, less through walls)
  • Temperature update frequency — Temperature is only sent every 16th pressure notification, so it updates less frequently than pressure
  • Single device per entry — Each Pressensor requires its own integration config entry

Troubleshooting

Device not discovered

  • Ensure the Pressensor has a fresh CR2032 battery installed
  • Confirm your HA host has a working Bluetooth adapter, or that an ESPHome Bluetooth Proxy is within range
  • Bring the device closer to the Bluetooth adapter or proxy
  • Cycle your espresso machine to apply pressure and wake the device, then check Settings -> Devices & Services for a new discovery

Connection drops frequently

  • Place an ESPHome Bluetooth Proxy closer to the Pressensor
  • Reduce interference from other Bluetooth or Wi-Fi devices
  • The device intentionally disconnects when idle to save battery — this is normal behavior

Readings appear stale or unavailable

  • The device may be asleep. Cycle your espresso machine to apply pressure and wake it, or press the Reconnect button in HA
  • Check the Connected binary sensor — if it shows Off, the device is not currently streaming data

Battery reads 0% or unavailable

  • Replace the CR2032 battery
  • After replacing, cycle your espresso machine to wake the device, then press the Reconnect button in HA

Removal

  1. Go to Settings → Devices & Services
  2. Find the Pressensor integration
  3. Click the three-dot menu and select Delete
  4. Restart Home Assistant

If installed via HACS, you can also uninstall the integration from HACS after removing it from Devices & Services.

BLE Protocol Reference

Based on the official Pressensor BLE protocol documentation.

  • Advertising name: starts with PRS
  • Pressure Service UUID: 873ae82a-4c5a-4342-b539-9d900bf7ebd0
  • Uses standard Battery Service (0x180F)
  • Pressure notifications: signed 16-bit big-endian millibar values
  • Temperature piggybacks on every 16th pressure notification

Credits

About

Custom Home Assistant integration for the Pressensor Bluetooth pressure transducer

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages