Be Smart, Go Local.

Xiaomi Linptech Seat Pressure Sensor PS1BB Review and ESPHome Setup

AliExpress Reviews: Xiaomi/Linptech Pressure Sensor PS1BB Setup and Review. Reliable, off the shelf solution for triggering automations from your office chair.

About two years ago, I wrote a DIY guide for creating your very own smart pressure sensor by using a cheap door sensor and a simple seat pressure sensor. The guide is still relevant today, as the method is the same and the components even cheaper. You can even use an Aqara Water Leak sensor instead of a door sensor and simply attach the wires to the sensor on the bottom.

Xiaomi Linptech PS1BB Pressure Sensor - Featured Image

In this article, I am sharing my experience and setup process for an off-the-shelf solution for a pressure sensor. This device is known as the Xiaomi Linptech PS1BB Pressure Sensor. It’s designed to go under your office chair, sofa, bed and detect whether there is a person present. It uses Bluetooth to communicate and is available in several lengths, with the shortest band priced at about $27 on AliExpress.

Technical Specification

  • Name: Xiaomi/Linptech Pressure Sensor
  • Model: PS1BB
  • Connectivity: Bluetooth Low Energy (BLE)
  • Battery: 1xCR2032
  • Battery Life: 3 years
  • Controller Size (with cable): 134x26x11mm
  • Pressure Band Length: 40cm/120cm/180cm
  • Price: $27.55-$41.14 AliExpress

Package Contents and Disassembly

The Linptech PS1BB Pressure Sensor came in a large square box containing the pressure band, controller and a user manual. The battery is preinstalled, protected with a small foil to prevent contact and drainage. The box was completely banged up from shipping, but the device remained intact. I bought the 40cm band version, to test in my office chair.

Xiaomi Linptech PS1BB Pressure Sensor - Package Content
Xiaomi Linptech Pressure Sensor PS1BB

The controller cover is easily removed by pulling it upwards. The device is powered by a single CR2032 battery with a life of 3 years. There’s a small pairing button next to it, which is quite clicky and responsive. This button requires a press for connecting the device to the app anytime you need to make configuration changes.

Xiaomi Linptech PS1BB Pressure Sensor - Open Battery
Xiaomi Linptech Pressure Sensor PS1BB Battery

The Linptech PS1BB Pressure Sensor is powered by the TLSR8250 [Datasheet] Bluetooth module, commonly found in many Xiaomi devices. This is a very customizable chip, more notably known for the option to be converted to Zigbee. For example, check out how to convert the Xiaomi LYWSD03MMC and Qingping CGDK2 temperature sensors.

There is no custom Zigbee firmware for the PS1BB at the moment. Operating as a BLE module, it’s very low power, which is what allows this device to have a 3 year battery life on such a small coin cell battery.

Xiaomi Linptech PS1BB Pressure Sensor - Open Module
Xiaomi Linptech Pressure Sensor PS1BB Module

Home Assistant Integration

The Xiaomi/Linptech PS1BB Pressure Sensor is not supported natively in Home Assistant. It is also not supported in ESPHome’s Xiaomi BLE component, so it requires other ways to add it to Home Assistant. As with all things Home Assistant, there is no such thing as cannot be integrated. After a lot of trial and error, I found you can use this device with HA in two ways:

  • Passive BLE Monitor: Custom component for Home Assistant that passively monitors many different BLE devices of several different brands. The Linptech PS1BB is supported and can be easily integrated after obtaining the bind key OR
  • MIOT BLE Platform: Custom component for ESPHome that follows the Mi protocol specification, with quite a different implementation from ESPHome’s Xiaomi platform. It can integrate almost any MI device, by automatically obtaining the bind key. Just like any ESPHome device, it requires creating custom sensors for Home Assistant in the configuration.

The Passive BLE Monitor component is quite capable and reliable, with a huge library of devices. If you are not tech savvy user, I suggest you use this integration as it’s easier, simpler and can be installed from HACS. The sensor works flawlessly with this component.

As I like to keep third-party integrations in Home Assistant to a minimum, I decided to use ESPHome and simply attach the MIOT BLE platform as an external component. Before the device can be added through any integration, the Mi Protocol bind key is required.

Obtaining the bind key

Every Xiaomi device is encrypted, so for a receiver to understand the packets a device sends, it first needs to decrypt them. This requires a 32-character hexadecimal (16-byte) key to effectively decrypt the BLE data. There are several ways to obtain the Xiaomi bind key for your device. I like to use the token extractor tool, a method I’ve shared in my Xiaomi Battery Presence Sensor review. For the general user, this method is the simplest way of obtaining the bind key. It works nicely for the PS1BB too:

  1. Download the Mi Home app from the App Store | PlayStore
  2. Make an account and set the server to Chinese Mainland (important!)
    • Since there is confusion about this: You do NOT need to create an account by picking China during registration. You only need to change the REGION inside the app once you’ve made your account in your own country.
    • I highly suggest you use a throwaway e-mail account, as you won’t be using this device with the Xiaomi app anyway (hopefully)
  3. Pair the Xiaomi/Linptech Pressure Sensor via Bluetooth and add it to the app
  4. On your computer, download and run the token_extractor tool
    • Windows: token_extractor.exe
    • Linux terminal: bash <(curl -L https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/raw/master/run.sh)
  5. Enter your Mi Home login credentials in the terminal window
  6. Leavy the server field empty and press enter to check all servers
  7. The tool will print the BLE KEY in the terminal:
    Xiaomi Linptech PS1BB Pressure Sensor - Obtaining the BLE KEY
  8. Copy and save all device info in .txt file somewhere
  9. Done!

Creating an ESPHome config

In my own smart home, I like to use ESP32 boards scattered around to capture BLE packets. This allows such great flexibility in terms of range and positioning, that would not be possible with a built-in adapter. Bluetooth is notoriously short ranged and prone to interference, so using ESP32s mitigates these issues to an extent.

As of January 2024, ESPHome is not capable of passing BLE keys to unsupported devices. This is possible for devices supported in the official Xiaomi BLE component only, but not others. Therefore, the BLE key needs to be passed upon request back to the device via the custom MIOT component I mentioned earlier.

If there is a way to pass 16-byte BLE keys to unsupported devices natively with ESPHome, I’d love to hear it! Please share your thoughts in the comments bellow.

After testing several configurations, I found this is the code that works great for using this device in Home Assistant via ESPHome with the MIOT external component:

esphome:
  name: esp32-ble-tracker
  friendly_name: ESP32 BLE Tracker
esp32:
  board: esp32dev
  framework:
    type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
  encryption:
    key: "XXXXXXXXXX"
ota:
  - platform: esphome
    password: "XXXXXXXXXX"
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: "esp32-ble-tracker"
    password: "XXXXXXXXXX"
captive_portal:

external_components:
  - source: github://dentra/esphome-components
miot:
  on_miot_advertise:
    mac_address: "A4:C1:38:74:59:E0"
    bindkey: "de49d51921530d2582b4f5XXXXXXXXXX" #REPLACE KEY
    then:
      - lambda: |-
          if (x.id == 0x483C) {
            bool pressure_present = (x.data[0] == 1);
            id(pressure_state).publish_state(pressure_present);
          }
          if (x.id == 0x4C03) {
            if (x.data.size() == 1) {
              uint8_t battery = x.data[0];
              id(battery_level).publish_state(battery);
            }
          }
binary_sensor:
  - platform: template
    name: "Pressure State"
    id: pressure_state
    device_class: occupancy
sensor:
  - platform: template
    name: "Battery Level"
    id: battery_level
    unit_of_measurement: "%"
    icon: "mdi:battery"

About the available sensors

Once the device was added to Home Assistant, the two sensors I’ve configured became available immediately in Home Assistant. I’ve managed to add the main pressure detect entity and the battery level. Here’s how it looks like in Home Assistant.

Xiaomi Linptech PS1BB Pressure Sensor - Added to Home Assistant
Xiaomi/Linptech Pressure Sensor PS1BB Added to Home Assistant

Now, the Xiaomi app has several more sensors available for the Linptech PS1BB pressure sensor. Most of these are arbitrary, and simply include internal time counters for triggering automations within the Xiaomi Home app. These are advertised as packets and available in the Passive BLE Monitor integration, but I see no reason to include them via ESPHome. Here’s my logic as to why.

  • Pressure Detected Timer: Simple timer delay in seconds for the ON state (detected) before automations are triggered in the Xiaomi app. Can be done natively within Home Assistant.
  • Pressure Not Detected Timer: Simple timer delay in seconds for the OFF state (not detected) before automations are triggered in the Xiaomi app. Can be done natively within Home Assistant automations.

However, there are a few sensors available in the app that can be useful, yet are not advertised via the BLE packets of the Linptech PS1BB. It is also possible I am missing something, I just don’t know how. I sniffed all data and all that I’m getting are those sensors, along with the two I already created. The Passive BLE Monitor integration also has only those, and is missing the following:

  • Current pressure: Measures the applied pressure on a scale from 0-15. In the app, it seems to work correctly and can be a fun in automations. Unfortunately, it is not advertised anywhere in any BLE packets as far as I can see.
  • Pressure Trigger Threshold: The app also allows you to set the pressure trigger threshold, which is unfortunately not possible with the Passive BLE monitor or the MIOT component. Needs to be set in the app (default: 6)
  • Pressure Confirmation Time: Simple timer before the sensor changes state from OFF to ON. Needs to be set in the app (default: 0)
  • No Pressure Confirmation Time: Simple timer before the sensor changes state from ON to OFF. Needs to be set in the app (default: 10)
  • Indicator light: The ability to turn ON or OFF the small indicator light on the controller. Needs to be set in the app.

With that said, the main pressure state entity works flawlessly in Home Assistant. Pressure is detected immediately and it remains for 10 seconds by default in a detected state.

Final Thoughts

The Xiaomi Linptech PS1BB Pressure Sensor is a simple binary contact band for detecting whether or not you are sitting in your chair, sofa or laying in bed. It’s small and seamless enough to be hidden out of sight, which is very relevant for this particular application. Here’s how it looked liked under my chair cushion before I hid it from sight in the corner:

Xiaomi Linptech PS1BB Pressure Sensor - Installed under Chair
Linptech PS1BB Installed before tucking it away

I have experienced no false triggers whatsoever with this device. I left the trigger threshold to the default value and installed it under my office chair, turning on the main PC whenever it detects me sitting down. So far, it has yet to fail.

With that said, I am inclined to note that this is a better solution for detecting a person sitting compared to my DIY guide. The sensor used in my guide appears to have a variable performance for many people and it gets easily bent out of shape, often causing false positive triggers.

If this is a device that would be beneficial to your smart home as a trigger, I can comfortably recommend the Xiaomi Linptech PS11B Pressure Sensor. It’s available on AliExpress only and costs from $27.55-$41.14, depending on the band length you choose.

Xiaomi Linptech PS1BB Pressure Sensor - Where to Buy

Linptech PS1BB Pressure Sensor

Bluetooth Low Energy

1xCR2032

40cm, 120cm, 180cm

ESPHome, Passive BLE Monitor

7 thoughts on “Xiaomi Linptech Seat Pressure Sensor PS1BB Review and ESPHome Setup”

  1. Great write up as always. Love your content. I noticed a small error on the specs. The largest sensor version is 180cm vs 160cm. I just ordered this version.

    Reply
  2. Another outstanding feature, thank you and bravo for your amazing contribution!!

    While reading through the article I was thinking of another scenario that I’ve been struggling with and many others as well: door sensors and steel frames. It’s a nightmare because of the steel frames the magnetic contact doesn’t work reliably. Now I’m wondering if maybe this sensor could work as a door sensor as well? What do you think?

    Reply
    • Thanks for the feedback!
      It could work, but I’m thinking that band will get quickly worn out from a metal door slamming against it.
      Maybe it needs to be cushioned somehow. I would still try my luck with different door sensors first.
      Cheers

      Reply
  3. Thank you for your thoughts! The door itself is a light wooden door but the door frames in the walls are made from steel. This is something not so common anymore today I think but in older buildings this was used. When I searched online I found others struggling with the same problem that the steel frame would have an impact on the magnetic field because it magnetises itself from the door sensor magnet it seems. I haven’t investigated this further so far and indeed I was also thinking of trying more sensor/magnet combinations. My experience for now has been with the tiny Aqara door sensors only. When I find more time I will then probably also experiment with the pressure sensor and hopefully eventually find a reliable solution for my doors. One more thing I like about the pressure sensor is that – if it would work well for doors (and maybe windows also), the band from an esthetical perspective would allow to put the controller further away from the door frame.

    Reply
  4. I’m kinda changing the topic a bit, but if you ever find a smaller squarish highly-sensitive version of something of that I would be very interested in knowing so to use it as a drop-in apartment mailbox sensor.

    Reply

Leave a Comment