logo elektroda
logo elektroda
X
logo elektroda

[CB3S/BK7231N] Heckermann Wifi Door Window Sensor, Model: PB69 - teardown, chang

nihildiximus  13 5391 Cool? (+3)
Listen:

TL;DR LABEL_AI_GENERATED

  • Heckermann Wifi Door Window Sensor PB69 uses a CB3S (BK7231N) module on PB-69W VER 1.3 20211112, with separate RXD1 and TXD1 pads on the PCB.
  • Firmware replacement works through a CH340 adapter by wiring 3.3V, GND, TX, and RX, then briefly shorting CEN to GND to enter programming mode.
  • OpenBK7231T_App firmware needs version 1.17.10 or newer, and the module is configured as P6 Btn, P7 DoorSnsrWSleep_nPup, and P9 LED.
  • Home Assistant setup uses MQTT and discovery, but the sensor values are swapped by default, so a manual YAML sensor and door entity class are recommended.
AI summary based on the discussion. May contain errors.

Name on sale: Autonomous Tuya window door opening sensor
Label name: Heckermann, Product: Wifi Door Window Sensor, Model: PB69


Device photos:



Disassembly photos:


Microcontroller: CB3S (BK7231N)
PCB: PB-69W VER 1.3 20211112




Pin description:

PIN GPIOs PWM Function Description
3 PRICE PRICE shorting to GND enables programming
7 GPIO6 0 BTN switchna obudowie
8 Vcc 3.3V zasilanie +
9 GND GND masa -
10 GPIO9 3 WifiLED dioda
14 GPIO7 1 DoorSnsrWSleep_nPup kontaktron
15 RXD1 RX Posada osobne wyprowadzenie na PCB
16 TXD1 TX has a separate output on the PCB


Firmware change:

CH340 converter is enough to change FW. We connect Vcc 3.3V, GND and TX and RX interchangeably. I didn't need an additional power source during development. A switch should be connected to the CEN and GND pins, which, when pressed, will enable downloading or uploading the FW.




Download the firmware from the address: https://github.com/openshwprojects/OpenBK7231T_App/releases
Minimum version required. 1.17.10

I had problems with BK7231GUIFlashTool under linux via mono so I took advantage of hid_downloader_py .

1. To make a firmware backup :
Code: Bash
Log in, to see the code


2. To upload new firmware :
Code: Bash
Log in, to see the code


After running the command, you need to briefly press the button connected to the CEN to start programming. After all, just unplug the device, insert the batteries, connect to the new Wifi AP and start configuration via www.


Necessary settings:


We connect to the Access Point of the device via Wifi and enter the configuration page: http://192.168.4.1

We set in turn:

1. Wi-Fi → Configure WiFi ( after confirming, we need to reconnect via the address taken from DHCP )

2. Static IP address to speed up connection → Configure IP

3. Sensors → Configure module :
P6 Btn
P7 DoorSnsrWSleep_nPup
P9 LED

4. Flags → Configure general/flags :
x 35 [HASS] Deactivate avty_t flag for sensor when publishing to HASS (permit to keep value). You must restart HASS discovery for change to take effect.
x 37 [WiFi] Quick connect to WiFi on reboot (TODO: check if it works for you and report on github)

5. Start commands → Change startup command text : (we set the same wake-up state for each position and shorten the time to fall asleep)
backlog DSEdge 0; DSTime 15;

6. Device name → Configure names

7. Connection to MQTT → Configure MQTT

8. Home Assistant settings→ Home Assistant Configuration





You can use Home Assistant Discovery to automatically add a sensor to the MQTT service, but by default the sensor values are swapped:
Code: YAML
Log in, to see the code


Instead, we create a file with the sensor ourselves and add it manually to the HA configuration:

Code: YAML
Log in, to see the code


And in HA itself, we change the entity class to "door" to improve the way it is displayed.

About Author
nihildiximus wrote 32 posts with rating 23 , helped 1 times. Live in city Wrocław. Been with us since 2018 year.

Comments

p.kaczmarek2 19 Apr 2023 12:19

Very good material, at the beginning I will only add that disabling the addition availability can also be implemented through a flag, according to: https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/flags.md ... [Read more]

gulson 19 Apr 2023 13:42

Great, thanks for the presentations, if you write me a PM with a parcel locker, I'll send a gift :) [Read more]

nihildiximus 20 Apr 2023 13:14

Entry completed :) [Read more]

kasa 25 May 2023 11:41

Hello , I was able to successfully change the software, unfortunately I entered the MQTT data incorrectly and I can't change it, I still have old data, re-uploading does not help, it does not open... [Read more]

p.kaczmarek2 25 May 2023 12:49

Turning the power on and off five times will force open the configuration AP, where you can change the settings, according to the FAQ: https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/faq.md ... [Read more]

kasa 25 May 2023 20:22

Thanks, it helped Ultimately, I would like to have it in IOBROKER, maybe some other config? [Read more]

p.kaczmarek2 25 May 2023 20:51

And what device do you have? [Read more]

kasa 25 May 2023 21:42

I'm all about that PB69, I admit it's my first contact with OBeken, I work with various "sonofs" and Tasmota all the time, Iobroker is running on Proxmox in a "container" I have different door... [Read more]

Jagis 23 Jun 2023 13:05

Hi, I have a problem with the door/window open/close sensor. The manufacturer is Melink, on the PCB I found only such information as MC400D-A002 and the production date 20210910. The sensor has a CB3S... [Read more]

p.kaczmarek2 23 Jun 2023 14:44

Hello @jagis, this issue was discussed with @nihildiximus in this thread: https://www.elektroda.pl/rtvforum/topic3971140-0.html But in short, you just probably need to change the DSEdge setting to something... [Read more]

andrewishy2 26 Sep 2023 19:56

I have the same device, this is what I did to make the purple board work... Set the I/O to the following https://obrazki.elektroda.pl/8823864500_1695755390_thumb.jpg And the following in the... [Read more]

jnoam 01 Oct 2023 10:44

Hi, I have what seems to be the same board (purple one). I configured as suggested by @andrewishy2 and want to ask if you see the same behavior (which might be OK for you?): 1. The module wakes up... [Read more]

andrewishy2 01 Oct 2023 22:08

2. Mine has some delay while it gets on the wifi network. However, I have set a static IP address so that it should not be waiting for DHCP. 4. I have some zigbee door sensors, they are more expensive... [Read more]

FAQ LABEL_AI_GENERATED

TL;DR: 3.3 V flashing and “press CEN briefly” let CH340 users replace Tuya firmware on the Heckermann PB69 CB3S/BK7231N door sensor. This FAQ helps OpenBeken, Home Assistant, and ioBroker users solve flashing, MQTT, wake-up, and reversed payload issues. [#20546781]

Why it matters: A battery WiFi contact sensor must wake reliably, publish quickly, and keep correct open/closed state after deep sleep.

Alternative Typical setup from thread Strength Limitation
OpenBeken WiFi PB69 CB3S/BK7231N, MQTT, DSTime 15 or 5 s Works with CH340 and existing WiFi MQTT update can take 9–10 s
Zigbee door sensor Local Home Assistant with Zigbee Faster door-open notification More expensive in the thread
Manual MQTT entity payload_on: 0, payload_off: 1 Fixes reversed PB69 values Requires YAML configuration

Key insight: Keep a physical button role configured and test DSEdge 0, 1, or 2 after every restart. Wrong edge settings can make a sleeping sensor ignore one magnet transition. [#20628332]

Quick Facts

  • Heckermann PB69 uses a CB3S module with BK7231N, PCB marking PB-69W VER 1.3 20211112, and 3.3 V UART flashing. [#20546781]
  • The documented OpenBeken minimum firmware version was 1.17.10, downloaded from the OpenBK7231T_App releases page. [#20546781]
  • Flashing used /dev/ttyUSB0, backup at 115200 baud, and upload at 128000 baud with uartprogram. [#20546781]
  • Recommended PB69 OpenBeken roles are P6 Btn, P7 DoorSnsrWSleep_nPup, and P9 LED. [#20546781]
  • A similar purple CB3S board used DSTime 5, DSEdge 1, and addEventHandler OnHold 7 DSTime 600 to extend awake time after a button hold. [#20748384]

How do I flash OpenBeken on a Heckermann PB69 WiFi Door Window Sensor with a CB3S/BK7231N module using a CH340 USB-UART adapter?

Use a CH340 USB-UART adapter at 3.3 V and wire UART directly to CB3S.
  1. Connect VCC 3.3 V, GND, TX to RX, and RX to TX.
  2. Add a momentary switch between CEN and GND.
  3. Run the flash command, then briefly press CEN to enter programming.
    The thread reports no extra power supply was needed during development. After flashing, disconnect power, insert batteries, join the new WiFi AP, and configure the web UI. [#20546781]

Which CB3S pins are used for VCC, GND, TX, RX, CEN, button, LED, and reed switch on the Heckermann PB69 PCB?

The PB69 exposes 3.3 V, GND, UART, button, LED, and reed switch on specific CB3S pins. Pin 8 is VCC 3.3 V, pin 9 is GND, pin 15 is RXD1, and pin 16 is TXD1. Pin 3 is CEN, shorted to GND for programming. GPIO6 on pin 7 is the button. GPIO9 on pin 10 drives the WiFi LED. GPIO7 on pin 14 handles the reed switch as DoorSnsrWSleep_nPup. [#20546781]

What OpenBeken module configuration should I use for the Heckermann PB69 door/window sensor pins P6, P7, and P9?

Configure the PB69 module as P6 Btn, P7 DoorSnsrWSleep_nPup, and P9 LED. These three roles match the documented hardware table for the PB69 board. The button sits on GPIO6, the reed contact sits on GPIO7, and the LED sits on GPIO9. The suggested startup command is backlog DSEdge 0; DSTime 15; for equal wake state handling and shorter sleep delay. [#20546781]

How do I make a firmware backup and upload OpenBK7231T/OpenBK7231N firmware with hid_download_py or uartprogram?

Use uartprogram from the HID downloader workflow to read and write firmware over UART. For backup, run ./uartprogram -d /dev/ttyUSB0 -b 115200 -s 0x00 -u -r ./backup-fw.bin. For upload, run ./uartprogram -d /dev/ttyUSB0 -b 128000 -s 0x00 -u -w OpenBK7231T_UA_1.17.10.bin. Press the CEN-to-GND button briefly after starting the command. The author used this path because BK7231GUIFlashTool caused Linux Mono problems. [#20546781]

What is the CEN pin on a BK7231N/CB3S module and why does pulling it to GND start programming mode?

CEN is the CB3S control pin used in this thread to trigger firmware download or upload mode. "CEN" is a module control input that enables BK7231N programming access, activated here by briefly connecting the pin to GND during a UART flashing command. On the PB69 table, CEN appears as pin 3, with the note that shorting it to GND enables programming. [#20546781]

Why does my OpenBeken door sensor keep old MQTT username and password after reflashing, and how can I reset or edit the configuration?

OpenBeken can keep stored configuration after reflashing, so old MQTT credentials may remain. The thread’s fix was to force the configuration AP, then change the username and password there. A second option is using the newer BK7231GUIFlashTool, which can load, edit, and save the OBK configuration from UART. This matters when the wrong MQTT user or password blocks normal broker connection. [#20593887]

How do I force the OpenBeken configuration access point to appear again after wrong WiFi or MQTT settings?

Power-cycle the device five times to force the OpenBeken configuration access point. The thread states that turning power on and off five times opens the configuration AP again. Use that AP to correct WiFi, MQTT username, or MQTT password. The user who had wrong MQTT credentials confirmed the method helped on May 25, 2023. [#20593887]

What do OpenBeken flags 35 and 37 do for Home Assistant availability and faster WiFi reconnect on battery door sensors?

Flag 35 disables the Home Assistant avty_t availability flag for sensors, keeping the last value published. Flag 37 enables quick WiFi connection on reboot. The thread recommends both for battery door sensors. After changing flag 35, restart Home Assistant discovery for the change to take effect. The maintainer also noted that flag 37 was expected to become enabled by default later. [#20546826]

How should I configure MQTT and Home Assistant for a PB69 door sensor when the open and closed payload values are reversed?

Create a manual MQTT binary_sensor and swap the payload values. Use state_topic: "doors_front/0/get", payload_on: 0, and payload_off: 1. The thread says Home Assistant Discovery can add the sensor automatically, but its default values were reversed. After adding the manual entity, set the Home Assistant device class to door for better display. [#20546781]

What is MQTT and how is it used by OpenBeken door/window sensors with Home Assistant or ioBroker?

MQTT carries the PB69 door state from OpenBeken to automation platforms through topics. "MQTT" is a messaging protocol that OpenBeken uses to publish sensor states and connection data, with topics such as doors_front/0/get carrying open or closed payloads. Home Assistant can read that topic as a binary_sensor. ioBroker users can use the same broker-based idea after configuring OpenBeken MQTT. [#20546781]

What is Home Assistant Discovery and why might I prefer a manual MQTT binary_sensor configuration for this PB69 sensor?

Home Assistant Discovery can automatically add the PB69 as an MQTT sensor, but manual YAML fixes reversed values. "Home Assistant Discovery" is an automatic entity registration feature that reads MQTT discovery data, useful for quick setup but risky when a device publishes inverted payload semantics. The manual example uses payload_on: 0 and payload_off: 1, avoiding the thread’s reversed open/closed state problem. [#20546781]

How do I configure a Heckermann PB69 or similar purple CB3S door sensor for ioBroker instead of Home Assistant?

Configure OpenBeken MQTT first, then let ioBroker consume the same MQTT topics. The thread does not provide a full ioBroker adapter template. It confirms the target device was PB69 and that the user already ran ioBroker on Proxmox in a container. Use the PB69 pin roles, MQTT credentials, and stable topic names before mapping objects inside ioBroker. [#20594546]

Why does a CB3S/BK7231N door sensor wake from one magnet state but not the other, and how do DSEdge 0, 1, and 2 affect wake-up behavior?

The wake edge setting can match only one magnet transition, so test DSEdge 0, 1, and 2. If the sensor sleeps while closed, it may miss magnet application. The maintainer advised changing DSEdge 0 to DSEdge 1 or DSEdge 2, then rebooting. Startup commands run only at device startup. Keep the button role configured, or recovery may require removing batteries. [#20628332]

OpenBeken WiFi door sensor vs Zigbee door sensor: which is better for fast door-open notifications and battery life?

Zigbee is better for fast door-open notification in the thread’s comparison. One user measured WiFi MQTT update delay at about 9–10 seconds during wake and boot. Another user said Zigbee door sensors cost more but work much quicker with local Home Assistant. For WiFi PB69, static IP can reduce DHCP waiting, but deep sleep still adds wake and WiFi join time. [#20754824]

Why is the battery voltage or battery channel always 0 in MQTT on a CB3S door sensor, and why can USB-UART power affect battery readings?

Battery readings can stay at 0 when the sensor runs from USB-UART instead of batteries. A user reported that battery numbers started working only after powering the device with a battery. While powered from the USB serial adapter, the device did not show power or voltage correctly. This affects channels such as battery channel 5 on similar CB3S door sensors. [#20754824]
AI summary based on the discussion. May contain errors.
%}