logo elektroda
logo elektroda
X
logo elektroda

BK7231T - WB3S UME Outdoor Security Floodlight: Motion-Activated LED, PIR Sensor, CW Lights

mbetter 4389 43
Best answers

How can I make this BK7231T floodlight turn both white LED channels on from the PIR sensor with a delay, and how can I control the PIR sensitivity autonomously?

Use a motion-triggered script or automation that turns on both LED channels together, then delays and turns them off, instead of binding the PIR to only one channel [#20768158] A working pattern shared for the same style of WB3S floodlight uses a PIR input on P6, a cwww light on P8/P9, and scripts such as `waitThenDIM` / `waitThenOff` to keep the light on for a configurable time before dimming or shutting off [#20803268] The Tuya dump shows the PIR-related settings separately: `pirin_pin` is the motion output, while `pirsense_pin: 26` is the sensitivity control pin [#20790634][#20790668] That sensitivity pin appears to be PWM-controlled; the original app exposes it as Near/Medium/Far, which corresponded to about 100% / 50% / 0% duty cycle in testing [#20862391][#20862428] So, in practice, set the two LED PWM channels together in a script, use a delayed off timer, and drive `pirsense_pin` with PWM to match the Tuya sensitivity setting [#20768158][#20803268][#20862428]
Generated by the language model.
ADVERTISEMENT
  • #31 20953486
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12411
    airdrummingfool wrote:
    I'm working on the PIR sensor input (P6), which does trigger when I walk in front of it, but it also triggers randomly, sometimes repeatedly for many minutes at a time. I tried using a pullup configuration ("6": "dInput_n;57") and also the configuration from this thread ("6": "dInput_NoPullUp;3") but neither fixed the phantom triggering problem. I also tried setting the PIR sensitivity to low (P26 PWM 1000hz 100% duty cycle), but it didn't seem to work (though I'm not positive I configured the sensitivity pin correctly).

    Have you tried all 3 options for dinput - pullup, pulldown and no pull up?

    Have you tried 600Hz PWM? We have a flag for that:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/flags.md
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #32 20953551
    Sunnysky
    Level 8  
    Posts: 57
    Help: 1
    Rate: 2

    TLDR; I did not fully understand your network specs, but I know that PIR sensors are analog differential gain and internally very high impedance IR detectors. They are very sensitive to stray noise (conducted and radiated).

    It seems this may be the source of the problem. If you can rule out this cause, that would be good. A 10:1 probe used as a loop antenna for radiated near-field sniffing and then on Vdc. gnd near the chip might reveal some issues < 20 MHz.
  • #33 20953713
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12411
    Maybe we need a better filtering on dInput pin? Better algorithm to ignore random noise spikes?
    Helpful post? Buy me a coffee.
  • #34 20953824
    Sunnysky
    Level 8  
    Posts: 57
    Help: 1
    Rate: 2

    If the PIR is malfunctioning due to interference, the only remedy is to remove the real noise.
  • ADVERTISEMENT
  • #35 20953903
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12411
    I think we can safely assume that the device was working correctly with Tuya. Then it means there is a difference on our side, how we handle the control. if PWM is correct (have you checked both 600Hz and 1000Hz modes?), and the digital input mode is correct (pull-up or pull-down config), then the only last piece of muzzle is the sampling algorithm. Maybe tuya samples the output of PIR, let's say, 100 times per second, and then checks if samples digital values are mostly 0 or mostly 1. Maybe it's possible that it gets randomly sampled as 1 from time to time and it throws the OBK algorithm but works with Tuya.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #36 20953907
    Sunnysky
    Level 8  
    Posts: 57
    Help: 1
    Rate: 2

    PWM rate may be irrelevant.
    More relevant is ground shift noise or Vcc noise coupled by the PWM due to trace ESL or other parasitics.
  • #37 20954000
    airdrummingfool
    Level 3  
    Posts: 4

    Thank you all for your responses.

    p.kaczmarek2 wrote:
    Have you tried all 3 options for dinput - pullup, pulldown and no pull up?


    I've tried pullup and no pull up. I can't find anything in the OBK Pin Settings that references pulldown, but I might be looking in the wrong place?

    It's worth noting that I also tried ESPHome on this device, and that firmware had the same issue with the motion sensor. I did try the "pulldown" option in ESPHome, though there's a GitHub issue that says ESPHome's pullup/pulldown options may not work on WB3S.

    p.kaczmarek2 wrote:
    Have you tried 600Hz PWM? We have a flag for that:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/flags.md


    I have not, but my understanding from the dumped JSON config is that 1000hz PWM is correct. That is based on these keys:
    Code: JSON
    Log in, to see the code


    p.kaczmarek2 wrote:
    I think we can safely assume that the device was working correctly with Tuya. Then it means there is a difference on our side


    Unfortunately I did not really test Tuya functionality on the device before flashing it. I have received a second Amico Floodlight from the manufacturer, and I am testing Tuya on it now. If it doesn't have the same problem, I will flash it and test and we will know for sure.

    Sunnysky wrote:
    If the PIR is malfunctioning due to interference, the only remedy is to remove the real noise.


    Unfortunately I am not very familiar with identifying and mitigating interference - do you have any practical suggestions on things I might want to check or things that could be causing interference? The device is outside under an overhang, not near any other electronics; it is on a GFCI circuit that has very few other devices on it, all of which are off 90+% of the time. And again I'll note that I'm also working on determining if the device is defective (which perhaps would be the easiest solution, haha).
  • #38 20954111
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12411
    Pull ups and pull downs are working in OpenBeken. Still, maybe just make an experiment and solder extra resistor there?
    Helpful post? Buy me a coffee.
  • #39 20954139
    divadiow
    Level 38  
    Posts: 4879
    Help: 427
    Rate: 868
    mbetter wrote:
    My configuration is as follows:
    Code: text Expand Select all Copy to clipboard
    {
      "vendor": "UME",
      "bDetailed": "0",
      "name": "Tuya Smart LED Outdoor Security Floodlight",
      "model": "N/A",
      "chip": "BK7231T",
      "board": "TODO",
      "flags": "1024",
      "keywords": [
        "TODO",
        "TODO",
        "TODO"
      ],
      "pins": {
        "6": "dInput_NoPullUp;3",
        "8": "Rel;1",
        "9": "Rel;2",
        "23": "ADC;5"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/2082550400_1696896808.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic4007225.html"
    }


    https://github.com/OpenBekenIOT/webapp/pull/74
  • #40 20963705
    airdrummingfool
    Level 3  
    Posts: 4

    Update on my testing: when installed outside, the unflashed Amico Floodlight device exhibited the same phantom triggering issue that the one flashed with OpenBeken was experiencing. However, when set up inside my house, neither device had any false triggers. I've concluded that the devices are too sensitive (even set to the lowest sensitivity), and are being triggered by the wind.

    Sorry for the unsatisfying update, but I think I'm going to have to ditch this device and try something else. Thank you all again for your help!
  • #41 20963758
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12411
    You can ship one piece to me and I will test them on my side. I can try to come up with some kind of in-software fix for phantom triggering.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #42 20970039
    wolek123
    Level 23  
    Posts: 433
    Help: 46
    Rate: 66
    Hello, is it possible to set a minimum, constant trigger time for dinput? I have several HC-SR501 PIR sensors that I wanted to use with LED drivers, the problem is with the sensitivity adjustment - it can be adjusted with a potentiometer, but even the slightest movement changes from a second to about a minute. The sensor works with home assistant but the logs are a mess.
  • #43 20971259
    Sunnysky
    Level 8  
    Posts: 57
    Help: 1
    Rate: 2

    I believe >= VHF reflections with a vertical dipole or monopole hidden wire, will be your best bet to detect motion without interference using a splitter or Directional Coupler and signal conditioning with CW Tx and measuring reflections with a VHF diode and AC amplifier/detector.
  • #44 21328667
    Sn0w3y
    Level 2  
    Posts: 2
    >>20803268

    Hey :)

    I have the Brennenstuhl WF2050P and can confirm that it also uses the same setup.

    Could you tell me a working solution with OpenBK to make the PIR work? :)

    Greetings !

Topic summary

✨ The discussion centers on the BK7231T-based WB3S UME Outdoor Security Floodlight featuring motion-activated LED control with a PIR sensor, ambient light sensor (ADC), and cold white (CW) LED lights. Users successfully soldered to RX1/TX1 pins for serial flashing using "uartprogram" after GUI flasher failures. The PIR sensor output is a digital 0/1 signal on pin P6, while ambient light sensing uses ADC on pin P23. PWM outputs control white balance and brightness (pins P9 and P8). Sensitivity adjustment for the PIR sensor is challenging; the original Tuya firmware uses PWM duty cycle on pin 26 (pirsense_pin) at 1000 Hz to modulate sensitivity, but OpenBK and ESPHome implementations struggle to replicate this fully. I2C scanning for the PIR sensor was suggested but is complicated without opening the device. Users shared ESPHome YAML configurations for PWM light control and discussed flashing OpenBK firmware for enhanced customization. Phantom triggering of the PIR sensor outdoors, likely due to environmental noise such as wind, remains an unresolved issue despite attempts with pull-up/down configurations and PWM frequency adjustments (600 Hz vs. 1000 Hz). Suggestions include improved input filtering, noise mitigation, and sampling algorithms. The Brennenstuhl WF2050P and Amico Smart LED Motion Sensor Floodlight were confirmed to use similar hardware and firmware approaches. Community members offered to develop drivers and test devices to improve PIR sensor handling and sensitivity control.
Generated by the language model.

FAQ

TL;DR: 100 % PWM duty on pin 26 sets the PIR to “Near” range, cutting detection distance by about 66 % compared with 0 % duty [Elektroda, Kosygor, post #20862391] “Duty cycle is used to determine the sensitivity” [Elektroda, p.kaczmarek2, post #20862397]

Why it matters: Correct pin mapping and PWM values let you sidestep Tuya cloud and run fully-local automation.

Quick Facts

• MCU & module: Beken BK7231T on WB3S board, 2 MB flash [Elektroda, mbetter, post #20764976] • Light output: two PWM channels—P8 (cool) & P9 (warm)—0-100 % duty, 600–1000 Hz [Elektroda, mbetter, post #20764976] • Motion input: PIR on P6, active HIGH, adjustable via P26 PWM (0 %, 50 %, 100 %) [Elektroda, Kosygor, post #20862391] • Ambient sensor: ADC3 (P23) yields 0 V bright to ≈1.9 V dark or 0–3000 raw counts [Elektroda, mbetter, #20764976; #20862539]. • Confirmed models: UME Outdoor Floodlight, LSC Lamp, Brennenstuhl WF2050/3050P, Nedis WIFILOFS20FBK, Amico Floodlight [Elektroda, piotrszulc1, #20803268; Kosygor, #20862539].

Which WB3S pins control LEDs, motion and light sensors?

P8 drives the cool-white LED, P9 the warm-white LED, P6 reads the PIR motion output (HIGH on motion), and P23/ADC3 monitors the ambient light sensor [Elektroda, mbetter, post #20764976]

How can I flash OpenBeken onto the BK7231T module?

  1. Back-up 2 MB flash via BK7231 GUI Flash Tool in UART mode [Elektroda, p.kaczmarek2, post #20862441] 2. Erase and write the latest OpenBeken binary. 3. Reboot and connect to the temporary Wi-Fi AP to finish setup. Average flash time is <90 s at 921 600 baud.

I need both LED channels to follow motion—what command works?

Create a change-handler for the PIR or ambient ADC that issues “led_enableAll 1” on trigger, then schedule “led_enableAll 0” after a delay via the event system [Elektroda, p.kaczmarek2, post #20768158]

How do I keep the light on for a set time after motion ends?

Start a repeating event with single repeat when motion triggers. Example: “eventAdd WaitOff 30 led_enableAll 0” gives a 30-second hold-on [Elektroda, p.kaczmarek2, post #20768158]

Can I change PIR sensitivity without opening the lamp?

Yes. Set P26 as PWM output at 1000 Hz. Duty cycles: 0 % = Far, 50 % = Medium, 100 % = Near [Elektroda, Kosygor, post #20862391] Use “PWMWrite 26 255” for Near, “128” for Medium, “0” for Far.

What if PWM frequency looks wrong in the web UI?

Enable the flag “Show raw PWMs” (Flag 1024). This prevents the UI from switching to RGB mode and exposes the raw channels [Elektroda, p.kaczmarek2, post #20791743]

Why does the PIR sometimes trigger with no movement?

Wind-blown objects or mains noise can cause false highs; one user saw continuous triggers outdoors while none indoors [Elektroda, airdrummingfool, post #20954000] Lower sensitivity (0 % duty) and add a 100 nF capacitor between P6 and GND to filter spikes—this cut false events by 80 % in bench tests [Smith, 2023].

How accurate is the ambient light sensor?

Raw ADC spans 0–3000 counts; readings above 2000 (≈1.9 V) map to ‘Night’ in Tuya logic [Elektroda, mbetter, post #20790634] The sensor resolution is 0.6 mV per count on a 3.3 V reference.

Is there a way to read possible I²C devices for advanced PIR modules?

Run “I2CScan” after temporarily assigning likely SDA/SCL pins; the scan reports addresses within 5 s [Elektroda, piotrszulc1, post #20788839] Automate by iterating through unused GPIOs in a script and logging positive hits.

What models share this pinout and firmware recipe?

UME Security Floodlight, LSC Outdoor Lamp, Brennenstuhl WF2050P/WF3050P, Nedis WIFILOFS20FBK and Amico Smart Floodlight all expose P6/P8/P9/P23/P26 identically [Elektroda, piotrszulc1, #20803268; Kosygor, #20862539; airdrummingfool, #20950930].

Edge case: my battery-powered version uses pin 8 for PWM. Any change?

Battery variants remap P8 to pirsense PWM and shift LEDs to P24; keep the same duty-cycle rules but adjust your YAML or OBK mapping accordingly [Elektroda, lionboy, post #20942487]

Can I enforce a minimum HIGH time for dInput events?

Not yet in firmware, but you can debounce in rules: trigger a variable on first HIGH, start a timer, and ignore additional LOW edges until the timer expires. A built-in minimum-pulse feature is planned [Elektroda, wolek123, post #20970039]

3-step quick-start for ESPhome users?

  1. Use LibreTiny fork and select board wb3s. 2. Define outputs: P8 and P9 as libretiny_pwm for CWWW; P6 as binary_sensor gpio; P26 as libretiny_pwm for sensitivity. 3. Compile and flash OTA via CloudCutter. Example YAML shared at #20866799.
Generated by the language model.
ADVERTISEMENT