logo elektroda
logo elektroda
X
logo elektroda

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

jkwim 963 6
ADVERTISEMENT
  • 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.

    Cool? Ranking DIY
    About Author
    jkwim
    Level 12  
    Offline 
    jkwim wrote 169 posts with rating 23, helped 4 times. Been with us since 2022 year.
  • ADVERTISEMENT
  • #2 21368638
    divadiow
    Level 34  
    cool. please post your template JSON from the web application so I can add to the device list.

    Screenshot of an app interface with a JSON template ready to be copied.
  • ADVERTISEMENT
  • #3 21370063
    jkwim
    Level 12  
    >>21368638
    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": "0",
      "name": "Full Device Name Here",
      "model": "enter short model name here",
      "chip": "BK7231N",
      "board": "TODO",
      "flags": "1024",
      "keywords": [
        "TODO",
        "TODO",
        "TODO"
      ],
      "pins": {
        "14": "Rel;2",
        "15": "BridgeFWD;1",
        "16": "dInput;6",
        "17": "BridgeREV;1",
        "20": "dInput;5",
        "22": "dInput;4",
        "24": "LED;1",
        "26": "dInput_NoPullUp;3"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
    }
  • ADVERTISEMENT
  • #4 21370068
    divadiow
    Level 34  
    Ah ok, sure. Will hold off for now.
  • #5 21370076
    jkwim
    Level 12  
    Objective:
    To detect the position of the AUTO/MANUAL Switch.
    GEYA GRD9L-W switch with AUTO and MANU options.
    If I configure
    "bt1_pin":"26",

    as Btn

    Then when I switch from AUTO to MANUAL I see the following response:

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


    When switched from MANUAL to AUTO there is no response.


    Similarly if I configure PIN 26 as dInput

    I get following foe AUTO->MANUAL

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


    But MANUAL -> AUTO does not produce any output.

    Do you have any suggestions as to what could be the correct pin type for PIN 26?

    It seems that in one direction there is a 0->1->0 pulse but there is nothing in the reverse direction.

    Additional info:
    The same button is used switch the device in to Access Point mode during pairing with Tuya app and cloudcutter ie. the swtch needs to be toggled 6 x times from AUTO-MANUAL and back to switch the mode.
  • ADVERTISEMENT
  • #6 21370175
    divadiow
    Level 34  
    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. Maybe the answer lies in their threads.

    https://www.elektroda.com/rtvforum/topic3940050.html
    https://www.elektroda.com/rtvforum/topic4000770.html#20855531
    https://www.elektroda.com/rtvforum/topic3990985.html
    https://www.elektroda.com/rtvforum/topic4005835.html
    https://www.elektroda.com/rtvforum/topic3957566.html
  • #7 21370659
    jkwim
    Level 12  
    >>21370175

    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 minimal requirement out of this device is to be able to operate the lever on/off action via MQTT.

    The ON/OFF action works.

    However I have two issues:
    1. Need to be able to remotely detect the position of the recloser at initial power up if there is an interruption to the supply.
    2. To be able to detect the position of AUTO/MANUAL switch so that any remote action can be blocked and notified. In the worse case scenario, if I walk towards the switch and set the Switch to MANUAL any remote on/off requests will not physically operate the lever. So the safety aspect is covered. However I would like to be able to know the status of AUTO/MANUAL switch if possible.
    3. Input at PIN 14 will inhibit the remote operation. So I am looking at a way of linking the AUTO/MANUAL Switch status (PIN26) to PIN14.

    The issue is that PIN26 (which is a slider switch) does not seem to give out any signal when moved from MANUAL -> AUTO.

    Possible solution is to latch the transition from 0->1->0 as a STATUS 0 or something like that.

    I do not how to do that in a script.

Topic summary

The discussion revolves around integrating the BK7231N-based GEYA GRD9L-W Wifi MCB Controller into an MQTT network. The user successfully detached the device and flashed it with OpenBeken firmware, using a specific profile for configuration. They are working on detecting the position of the AUTO/MANUAL switch and ensuring remote operation safety. The user encountered issues with pin configuration for detecting switch status and is seeking advice on the correct pin type. Other participants provided insights into the use of Bridge pins and shared links to related threads for further assistance.
Summary generated by the language model.
ADVERTISEMENT