Flashing ONENUO Tuya Wifi Door Sensor BK7231N CBU-NL with Tasmota Replacement
Module name: ONENUO Tuya Wifi Door Sensor - 19JWT
Protocol: WiFi 2,4GHz
Power: 3V (2x AAA battery)
Wifi module: Tuya CBU-NL (BK7231N) datasheet
This is the door sensor version of the module, but based on the PCB layout they also build other sensors with the same panel.
Bought it on aliexpress for $3.69 on sale: Link
Another sensor with seemingly the same PCB was discussed here, but this one has a different pin configuration. Probably a new PCB revision, however no labeling about it.
Flashed latest release with python flasher: hid_download_py
Pictures of the module:
Tear-down pictures:
Pin config:
Surprisingly the push button is connected to both P14 and P16, but with different pull-ups. This might be used for some kind of debouncing or?
P15: WifiLED_n (Bat+ > R8 10k > LED1 > R3 1k > P15)
P14: BTN_n (Bat+ > R8 10k > P14)
P16: BTN_n (Bat+ > R8 10k > P14 > R9 10k > P16)
P20: BAT_rel (R1 10k - R2 10k voltage divider switched with Q3 through R4 4k7)
P22: DoorSnsrWSleep (Q3 sensor directly connected)
P23: BAT_adc (Bat+ > R1 10k > ADC > R2 10k > GND)
Original firmware:
JSON config:
Protocol: WiFi 2,4GHz
Power: 3V (2x AAA battery)
Wifi module: Tuya CBU-NL (BK7231N) datasheet
This is the door sensor version of the module, but based on the PCB layout they also build other sensors with the same panel.
Bought it on aliexpress for $3.69 on sale: Link
Another sensor with seemingly the same PCB was discussed here, but this one has a different pin configuration. Probably a new PCB revision, however no labeling about it.
Flashed latest release with python flasher: hid_download_py
Code: Bash
Pictures of the module:
Tear-down pictures:


Pin config:
Surprisingly the push button is connected to both P14 and P16, but with different pull-ups. This might be used for some kind of debouncing or?
P15: WifiLED_n (Bat+ > R8 10k > LED1 > R3 1k > P15)
P14: BTN_n (Bat+ > R8 10k > P14)
P16: BTN_n (Bat+ > R8 10k > P14 > R9 10k > P16)
P20: BAT_rel (R1 10k - R2 10k voltage divider switched with Q3 through R4 4k7)
P22: DoorSnsrWSleep (Q3 sensor directly connected)
P23: BAT_adc (Bat+ > R1 10k > ADC > R2 10k > GND)
Original firmware:
JSON config:
Code: JSON
Comments
Hi! Is there a deepsleep enabled in this profile? And when does it sleep; when the magnet is present or absent? Thank you! [Read more]
The pin role called DoorSnsrWSleep is automatically starting DoorSensor driver on every reboot. There is no script required because all is done in the firmware. The DoorSensor driver handles the... [Read more]