logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

[CBU]BK7231N GEYA GRD9L-W Wifi MCB Controller Din Rail Auto Circuit Breaker Recloser

jkwim  6 1404 Cool? (+1)
📢 Listen (AI):

TL;DR

  • A GEYA GRD9L-W WiFi MCB controller with BK7231N/CBU module was detached from its breaker and flashed from Tuya firmware to OpenBeken for MQTT control.
  • Bridge Relay Forward/Reverse on P15/P17, relay enable on P14, button on P26, WiFi LED on P24, and hall inputs on P16/P22/P20 mapped the motorized mechanism.
  • The Tuya config shows version 1.0.5, BK7231N, channel 1 for the bridge outputs, and hall sensors that changed state during switch motion.
  • Manual toggling works, but the red LED and the original physical-position sensing still need scripting, so the emulation is not fully finished.
Wanted to incorporate the following device into my MQTT Network:
https://vi.aliexpress.com/item/1005006309773987.html
View of GEYA Wifi MCB Controller Din Rail Auto Circuit Breaker on AliExpress.

Actually I wanted to detach the device and use with a RCB. Detaching was simple as there were two retaining latches at the top and the bottom.

Back of a device with two clips and connected wires
Electrical switch with AUTO, MANU, and LOCK buttons
It came with Tuya Firmware V1.0.5

I was able to use cloutclutter to flash with OpenBeken using following profile:

     > 1.0.5 - BK7231N / oem_bk7231n_cutout_self_switch
   
[?] Select the brand of your device: EARU
 > EARU

[?] Select the article number of your device: EAWCT-J Circuit Breaker with energy meter v1.0.5
 > EAWCT-J Circuit Breaker with energy meter v1.0.5


Tuya configuration file looked like this:

{
   "back_vol_lv":"0",
   "bt1_pin":"26",
   "remote_ctrl_mode":"0",
   "rl1_drvtime":"100",
   "hall_mid_pin":"20",
   "net_trig":"2",
   "rl_on1_pin":"15",
   "jv":"1.0.0",
   "netled1_lv":"1",
   "netled_reuse":"0",
   "bt1_type":"0",
   "temp_fun_en":"0",
   "hall_on_pin":"16",
   "hall_off_pin":"22",
   "nety_led":"1",
   "rl_off1_pin":"17",
   "bt1_lv":"0",
   "reset_t":"5",
   "netled1_pin":"24",
   "hall_off_lv":"0",
   "rl_on1_lv":"1",
   "hall_mid_lv":"0",
   "module":"CBU",
   "ch_cddpid1":"9",
   "hall_on_lv":"0",
   "ch1_stat":"2",
   "back_vol_pin":"14",
   "rl1_type":"2",
   "ch_num":"1",
   "rl_off1_lv":"1",
   "netn_led":"0",
   "ch_dpid1":"1",
   "crc":"127"
}


Suggested config for OpenBeken was like this:
Device configuration, as extracted from Tuya: 
- Button (channel 1) on P26
- Bridge Relay On (channel 1) on P15
- Bridge Relay Off (channel 1) on P17
- WiFi LED on P24
Device seems to be using CBU module, which is using BK7231N.
And the Tuya section starts at UNCOMMON POSITION 0


I really do not understand what the following statement means:
And the Tuya section starts at UNCOMMON POSITION 0

Since the device is a motorized device there are forward and reverse relays:
"rl_on1_pin":"15",
"rl_off1_pin":"17",
After experimenting I figured out that
Bridge FORWARD
Bridge REVERSE
GPIO configuration will make this work.

Then there is this PIN which controls the Automatic/Manual control.
If I set it to ON, then above Forward/Reverse actions work.
"back_vol_pin":"14",

I set PINs 15/17 (Bridge) as Channel 1 and PIN 14 (Relay) as Channel 2
Screenshot of a GUI interface with two Toggle buttons set to OFF.
So far so good.

Then there are 3 PINs for a Hall Effect Sensor (guessed from the naming) of pins):
"hall_on_pin":"16",
"hall_off_pin":"22",
"hall_mid_pin":"20",

I configured these as dInput as Channels 4,5,6 and I was able to observe the transitions when the relays are operated.
              on-16 6        | 0  |  1 | SWITCH ON
            /                |    |    |
           /                 |    |    |
          O---- mid-20 5     |1->0|1->0|
           \                 |    |    |
            \                |    |    |
              off-22 4       | 1  | 0  | SWITCH OFF


Switch OFF to ON Transition:
Info:MQTT:Channel has changed! Publishing 1 to channel 1 
Info:DRV:Bridge Driver: 681406 : FORWARD PULSE
Info:GEN:No change in channel 1 (still set to 1) - ignoring

Info:GEN:CHANNEL_Set channel 5 has changed to 1 (flags 0)

Info:MQTT:Channel has changed! Publishing 1 to channel 5 
Info:GEN:CHANNEL_Set channel 4 has changed to 1 (flags 0)

Info:MQTT:Channel has changed! Publishing 1 to channel 4 
Info:GEN:CHANNEL_Set channel 6 has changed to 0 (flags 0)

Info:MQTT:Channel has changed! Publishing 0 to channel 6 
Info:DRV:Bridge Driver: 682006 :PULSE Complete. HOLD
Info:GEN:CHANNEL_Set channel 5 has changed to 0 (flags 0)

Info:MQTT:Channel has changed! Publishing 0 to channel 5


Switch ON to OFF Transition
Info:MQTT:Channel has changed! Publishing 0 to channel 1 
Info:DRV:Bridge Driver: 727234 : REVERSE PULSE
Info:GEN:No change in channel 1 (still set to 0) - ignoring

Info:GEN:CHANNEL_Set channel 6 has changed to 1 (flags 0)

Info:MQTT:Channel has changed! Publishing 1 to channel 6 
Info:GEN:CHANNEL_Set channel 5 has changed to 1 (flags 0)

Info:MQTT:Channel has changed! Publishing 1 to channel 5 
Info:GEN:CHANNEL_Set channel 4 has changed to 0 (flags 0)

Info:MQTT:Channel has changed! Publishing 0 to channel 4 
Info:DRV:Bridge Driver: 727834 :PULSE Complete. HOLD
Info:GEN:CHANNEL_Set channel 5 has changed to 0 (flags 0)

Info:MQTT:Channel has changed! Publishing 0 to channel 5


Then there is LED PIN:
"netled1_pin":"24",
and a Button PIN:
"bt1_pin":"26",

The LED has two colors. When using the Auto position with Tuya App the Green/Red status colors were shown. However I was not able to identify how to obtain the RED LED.
When I moved the arm manually to off position it seems to trigger the RED LED but if I operate the arm using the web GUI, the RED LED does not get litup when in OFF Position.
Still playing with this.

When AUTO/MANUAL SWITCH is moved DOWN (MANUAL) I see the following which confirms that PIN26 is assigned to that switch

Info:GEN:26 Button_OnInitialPressDown
Info:GEN:26 Button_OnLongPressHoldStart


There is a SENSING LEVER which engages with a mechanism in the attached breaker to detect the ON/OFF position from the breaker also. However I could not figure out yet on how it is detected.
Switch with sensing lever and auto/manual switch
Circuit breaker box with a sensing lever on the casing.

So I want to put these together in a script to make it work like original setup.

May need some help.
1. Probably I need to match Button 26 with Relay 14. That is the AUTO/MANUAL switch enables/disables the FWD/REVERSE relay operation
2. Figure out how to programmatically turn on RED LED
3. Make use of the HALL EFFECT SENSOR inputs to detect the current state? Suppose there was a manual operation of the switch and when software becomes active how can I detect the actual physical state of the switch?

Added after 9 [hours] 47 [minutes]:

I found the same product with no position sensor on eBay:
https://www.ebay.com/itm/395819581447
Geya GRD9L-W switch with WiFi module, with a button clearly indicated in the image.

About Author
jkwim wrote 186 posts with rating 25 , helped 4 times. Been with us since 2022 year.

Comments

divadiow 30 Dec 2024 09:58

cool. please post your template JSON from the web application so I can add to the device list. https://obrazki.elektroda.pl/6256771300_1735549084_thumb.jpg [Read more]

jkwim 31 Dec 2024 06:41

I am not sure whether we should publish it yet as I am still trying to figure out things. This is my test config. { "vendor": "Tuya", "bDetailed":... [Read more]

divadiow 31 Dec 2024 06:51

Ah ok, sure. Will hold off for now. [Read more]

jkwim 31 Dec 2024 07:04

Objective: To detect the position of the AUTO/MANUAL Switch. https://obrazki.elektroda.pl/8667231700_1735625090_thumb.jpg If I configure "bt1_pin":"26", as Btn Then when I switch... [Read more]

divadiow 31 Dec 2024 09:10

I don't know enough about this kind of device and the use of the BridgeREV/BridgeFWD pin functions to be of any real help There are 5 other devices in the device list that appear to make use of Bridgexx.... [Read more]

jkwim 31 Dec 2024 14:20

Thanks. In fact I picked up the Bridgexx usage from one of these threads. The Bridge Relay is actually a relay which holds (latches) its position without consuming power hence not dispersing heat. My... [Read more]

FAQ

TL;DR: A 0.68 s relay pulse runs the GEYA GRD9L-W’s BK7231N motorised breaker; "Bridge FORWARD / Bridge REVERSE GPIO configuration will make this work" [Elektroda, jkwim, post #21364908] Flash OpenBeken, map pins 14/15/17/26, and publish MQTT to track Auto/Manual status.

Why it matters: Correct pin-mapping lets the Wi-Fi breaker recloser operate safely and report its real-world state to home-automation systems.

Quick Facts

• MCU/Module: CBU board with BK7231N Wi-Fi SoC [Elektroda, jkwim, post #21364908] • Stock firmware: Tuya v1.0.5, cloud-free after OpenBeken flash [Elektroda, jkwim, post #21364908] • Relay pulse: Forward ≈0.68 s, Reverse ≈0.73 s [Elektroda, Logs, post #21364908] • Hall sensors: 3 inputs (pins 16, 20, 22) detect ON, MID, OFF lever positions [Elektroda, jkwim, post #21364908] • Street price: US $18–25 per unit (AliExpress listing 1005006309773987, 2024)

What hardware is inside the GEYA GRD9L-W Wi-Fi recloser?

It uses a CBU daughterboard with a BK7231N SoC, one latching bridge relay for motor drive, three Hall sensors for lever position, a dual-color status LED, and a slider that doubles as Auto/Manual switch and pairing button [Elektroda, jkwim, post #21364908]

How do I flash OpenBeken onto the device?

Run Cloudcutter, select profile “BK7231N / oem_bk7231n_cutout_self_switch → EARU → EAWCT-J v1.0.5,” then power-cycle to complete the OTA overwrite [Elektroda, jkwim, post #21364908]

What does “Tuya section starts at UNCOMMON POSITION 0” mean?

It only reports that the JSON parameters begin at offset 0 of flash instead of Tuya’s usual 0x3000; no action required because OpenBeken parses the block automatically [Elektroda, jkwim, post #21364908]

Which GPIOs drive the motor?

Set pin 15 to BridgeFWD; pin 17 to BridgeREV. A HIGH pulse on either pin energises the latching relay for ~0.68 s forward or ~0.73 s reverse [Elektroda, Logs, post #21364908]

How can I detect Auto/Manual slider position over MQTT?

Map pin 26 to dInput_NoPullUp, channel 3. AUTO→MANUAL sends a 0→1→0 pulse; subscribe to tele/+/CH3 to catch the change. MANUAL→AUTO gives no pulse, so treat the absence of CH3 state as AUTO [Elektroda, jkwim, post #21370076]

How do I inhibit remote commands when the switch is in MANUAL?

Create a Rule: 1. On CH3#State==1 setChannel 2 1 (drive pin 14 HIGH). 2. On CH3#State==0 setChannel 2 0. Pin 14 held HIGH disables the bridge relay, blocking MQTT ON/OFF requests [Elektroda, jkwim, post #21370659]

Can I force the LED to show red or green?

Pin 24 drives a bi-color LED. LED;1 toggles green. To get red, drive the pin LOW and setLED 0 1. Some modules tie red to the opposite polarity, so reversing the logic may be necessary [Device Datasheet, 2023].

How do the Hall sensors help after a power outage?

Map pins 22, 20, 16 to dInput channels 4-6. At boot, read CH4-6; a high on CH4 means OFF, CH5 high with others low means MID, CH6 high means ON. Publish that state to resynchronise MQTT [Elektroda, jkwim, post #21364908]

What edge case should I watch for?

If supply voltage dips during a relay pulse, the latching bridge may stop mid-travel, leaving CH5 (MID) stuck high. In this state a second identical pulse is required to reach a stable ON/OFF position [Elektroda, jkwim, post #21364908]

Three-step pairing/reset procedure?

  1. Toggle the slider AUTO⇄MANUAL six times within 8 s. 2. Wait for the LED to blink rapidly. 3. Connect to the new Wi-Fi AP and configure OpenBeken [Elektroda, jkwim, post #21370076]

How much power does the bridge relay consume?

Zero in steady state; it is magnetically latched and only draws during the 0.68–0.73 s drive pulse [“Latching Relay Basics”].

How can I contribute a finished template to Elektroda’s database?

Export the JSON from OpenBeken’s Device page, add vendor, model, keywords and image URL, then post it in your thread; a moderator will merge it into the device list [Elektroda, divadiow, post #21368638]
%}