logo elektroda
logo elektroda
X
logo elektroda

[BK7231N/CBU] Door sensor without TuyaMCU - how to connect to UART RX/TX

gramais 10290 61
ADVERTISEMENT
  • Helpful post
    #61 20826588
    atomphil
    Level 10  
    To align the magnet and device during installation, it can be helpful to assign pin 26 to the LED instead of WifiLED_n. This allows you to see immediately whether the magnet is triggering or not.

    Screenshot of a device configuration interface showing various pin assignments.

    You can set it back to WifiLED_n afterwards.

    btw. Is there a way to increase the sensitivity of the sensor or adjust the threshold value? Background: I have a window with two sashes and would like to attach the device to one and a stronger magnet to the other to monitor both. So far, I have achieved a detection distance of approx. 10cm, which is about 5cm short of a reliable detection.
  • ADVERTISEMENT
  • #62 21563591
    sevenissimo
    Level 2  
    Hi everyone,
    I'm new to OpenBeken and I need some help with my Beken BK7231N door sensor.
    It seems to be bricked and I'm at a loss on how to proceed.

    Here's the story:
    I flashed OpenBeken using the GUIFlashTool, performing a backup and extracting the Tuya config. The device then entered AP mode. I set up the network SSID, MQTT, and the module config (initially, the first one I found in a thread, which wasn't quite right). It connected to my Wi-Fi, and the door sensor worked, but it wouldn't enter deep sleep (the timer kept resetting at 60 seconds).

    After reading more of your forum, I tried new module configurations. The device then seemed to enter deep sleep, but I couldn't wake it up, especially not with the button, as it wasn't configured on the correct pin but on the wrong channel. Since it was in deep sleep, I couldn't access the web interface to correct the configuration.

    I attempted a soft reset with multiple consecutive power cycles. During some of these, the LED configured as Wifi_n would light up. Then, that stopped working too. After several attempts, the module now seems completely unresponsive, only emitting a buzzing sound when powered.

    Initially, I was using rechargeable NiMH batteries. Since it seemed to have died, I've switched to new alkaline batteries, which should provide the expected power.

    Today, I tried reconnecting it via serial. I can still read and write to the chip.

    First, I read, modified, and rewrote the configuration – first the correct one for the hall sensor and button, then all to None:0. But after rebooting, still no sign of life (no AP, no STA). I then tried to rewrite the firmware. Reboot, nothing. I even tried restoring the RF partition (which required a lower baud rate). Reboot, still nothing.

    It really feels like it's in a "sleep of death."
    I'm quite new to OpenBeken and have no idea how to fix this. Any suggestions would be greatly appreciated!

    [BK7231N/CBU] Door sensor without TuyaMCU - how to connect to UART RX/TX

Topic summary

The discussion revolves around connecting and configuring a Tuya door and window sensor equipped with a BK7231N chip without using TuyaMCU. Users seek guidance on accessing the RX/TX pins for flashing firmware and configuring the device for MQTT/Home Assistant integration. Various solutions are proposed, including using specific pin configurations for the door sensor and button, adjusting baud rates for flashing, and troubleshooting issues related to firmware and battery drain. The conversation also covers the importance of deep sleep mode for battery conservation and the need for correct pin assignments to ensure proper sensor functionality. Users share their experiences with different configurations, including inverting sensor states and adjusting sleep settings to optimize performance.
Summary generated by the language model.
ADVERTISEMENT