logo elektroda
logo elektroda
X
logo elektroda

[BK7231N] AUBESS Power Monitor Switch - Setting Up Power Measurement Channel

brazoayeye 891 4
ADVERTISEMENT
  • #1 21209568
    brazoayeye
    Level 3  
    I bought this AUBESS "Power Monitor Switch"

    I umounted it, founding a BK7231N
    Connected 3.3V, GND, TX, RX under the small board

    Backed up using BK7231Flasher , and then flashed latest openBK

    Following the found json
    Spoiler:
    {
    "rl1_lv":"1",
    "on_off_cnt":"5",
    "onoff_rst_m":"1",
    "onoff_clear_t":"5",
    "rand_dpid":"42",
    "net_trig":"4",
    "onoff_n":"5",
    "netled1_lv":"0",
    "jv":"102",
    "onoff_rst_type":"2",
    "total_bt_pin":"23",
    "nety_led":"2",
    "over_cur":"0",
    "total_stat":"0",
    "reset_t":"5",
    "netled1_pin":"8",
    "chip_type":"3",
    "lose_vol":"0",
    "remote_add_dp":"49",
    "remote_list_dp":"50",
    "net_type":"0",
    "over_vol":"0",
    "inch_dp":"44",
    "module":"CB2S",
    "ch_cddpid1":"9",
    "onoff1":"24",
    "clean_t":"5",
    "init_conf":"38",
    "zero_select":"0",
    "onoff_type":"0",
    "series_ctrl":"2",
    "total_bt_lv":"0",
    "cyc_dpid":"43",
    "remote_select":"0",
    "ch_num":"1",
    "rl1_pin":"26",
    "ele_rx":"10",
    "netn_led":"2",
    "vol_def":"0",
    "ch_dpid1":"1",
    "ele_tx":"11",
    "crc":"48"
    }
    Device configuration, as extracted from Tuya:
    - Pair/Toggle All Button on P23  => it's the board button, P23 = ADC3 https://docs.libretiny.eu/boards/cb2s/#pinout
    - WiFi LED on P8     => that's right
    - TglChannelToggle (channel 1) on P24  => it's the S1/S2 switch
    - Relay (channel 1) on P26  => right
    Device seems to be using CB2S module, which is using BK7231N.
    And the Tuya section starts, as usual, at 2023424

    How can i find and setup the channel for the power measurement?
    Attached some photos, do you need other infos?

    Thanks

    Electronic module with BK7231N chip. Close-up of an AUBESS electronic switch board with visible components. Close-up of a printed circuit board with electronic components Back label of AUBESS power switch with technical specifications. Close-up of a circuit board with electronic components, including a CB2S module.
  • ADVERTISEMENT
  • #2 21209629
    p.kaczmarek2
    Moderator Smart Home
    BL0942 is always using UART1 for communication. You need to enter:
    
    startDriver BL0942
    in your either autoexec.bat or short startup command. Then reboot. Then you need to calibrate, like you'd do in Tasmota. VoltageSet/CurrentSet/PowerSet commands.

    For this kind of device, you also might need to enable PowerSave 1 so the device capacitors can last longer.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 21210158
    brazoayeye
    Level 3  
    Thanks for the info, so it's used a BL0942 and it communicates with the same TX/RX used for flashing.

    Can you provide a guide or a link where I can deepen how to calibrate it?

    At the end I want to flash espHome as I did in other devices without power metering, do you know if it's possible to read the current using it?

    When you write "this kind of devices" do you mean I should check also my other espHome DIY switch to enable some kind of low power mode? Example >>21126030

    Thanks
  • ADVERTISEMENT
  • #4 21583952
    brazoayeye
    Level 3  
    I flashed another identical device, and i have many questions:

    1. S1-S2 switch gives me problems. P24 is TglChnOnTgl but when let unconnected it randomly double toggle (like 1 time every 3 seconds). Switch usually off but relay turns on and off very fast because of that false signal. If i short circuit S1 S2 the relay remains stable, but if I open S1 S2 it starts ticking again. I found a stable 3.3V between S1 and S2
    2. I wrote on startup_command "powersave 1; startDriver BL0942" but idk where I can read the power consumption. I tried to calibrate the device having this message
    Last command: VoltageSet 226
    Last status: ERROR: Unknown command (undefined) 


    If i go to the console and I write "startDriver BL0942" than I start having "Last status: OK (200)!"
    PS: when I enable the driver I also can read the measure, so why it doesn't start on boot?

    Thanks
  • #5 21583963
    p.kaczmarek2
    Moderator Smart Home
    Let's do one issue at time. Where do you enter startDriver command? Startup command is run after reboot. VoltageSet command is available once driver is started. There is information about running drivers in the main page.

    I don't know much about Esphome. Last time I checked it had just powersave copied from OBK by one of our user. OBK, on the other hand, is calibrated to utilize OBK powersave - as far as I remember it was done few years ago by @ btsimonh, who adjusted timers to allow longer dynamic sleep. Just keep in mind that device won't sleep if you keep web app log open.

    By "this kind of devices" I mean like smart plugs or smart switches. Or... or just enable PowerSave 1 on any OBK device. It should be okay since we adjusted PowerSave to take BL0937 into the account.
    Helpful post? Buy me a coffee.
ADVERTISEMENT