logo elektroda
logo elektroda
X
logo elektroda

Kogan Smart Plug with USB ports & Energy Meter (KASPUSBAC1A)

BenAndo 930 3
ADVERTISEMENT
  • Helpful post
    #1 20715576
    BenAndo
    Level 4  

    I managed to get this plug flashed OTA using the other Kogan profile KASPEMHA.

    However, mine is BK7231N, not BK7231T. Also, the physical button was on a different pin, in this case P7.

    Kogan SmarterHome smart plug with energy meter on a wooden surface

    Kogan smart plug with USB ports lying on a wooden surface.

    Official device to buy from: https://www.kogan.com/au/buy/kogan-smarterhometm-smart-plug-with-energy-meter-5v-2a-usb-ac-ports-kogan.

    I've got the Tuya binary to JSON, but it doesn't seem to tell me what the pins are for energy monitoring.
    However, if I type in
    startDriver BL0942
    , then it starts energy monitoring and reporting. But after power cycling the plug, it no longer reports the energy.

    Regarding the plug itself, it works quite well. The USB ports aren't controllable, so if the plug is off, the USB ports still provide power.

    Anyway, here's the JSON code from BK7231 Easy UART Flasher
    {
    	"rl1_lv":"1",
    	"bt1_pin":"7",
    	"net_trig":"1",
    	"jv":"1.0.5",
    	"netled1_lv":"0",
    	"netled_reuse":"0",
    	"bt1_type":"0",
    	"ffc_select":"1",
    	"nety_led":"0",
    	"over_cur":"10500",
    	"bt1_lv":"0",
    	"reset_t":"5",
    	"netled1_pin":"6",
    	"chip_type":"3",
    	"lose_vol":"165",
    	"over_vol":"270",
    	"module":"CB2S",
    	"ch_cddpid1":"9",
    	"ch1_stat":"2",
    	"rl1_type":"0",
    	"ch_num":"1",
    	"ele_fun_en":"1",
    	"rl1_pin":"26",
    	"netn_led":"1",
    	"vol_def":"0",
    	"ch_dpid1":"1",
    	"crc":"59",
    	"}Xid;Bgw_di3^5Awf_start_mdbv":"40.00",
    	"pv":"2.2",
    	"lpv":"3.3",
    	"pk":"keyjup78v54myhan",
    	"firmk":"keyjup78v54myhan",
    	"cadv":"08Btls_ca_cnt.1.8",
    	"s_id":"null",
    	"dtp":"0",
    	"sync":"0",
    	"attr_num":"0",
    	"mst_tp_0":"0",
    	"mst_ver_0":"null",
    	"mst_tp_1":"0",
    	"mst01":"null",
    	"mst_tp_2":"0",
    	"mst_ver_2":"null",
    	"mst_tp_3":"0",
    	"mst_ver_3":"null "
    }

  • ADVERTISEMENT
  • #2 20715677
    p.kaczmarek2
    Moderator Smart Home
    Hello, don't worry about BL0942 driver not starting. You just need to either:
    a) put the command in short startup command
    b) put command in autoexec.bat in LittleFS in the Web App
    This is standard procedure, this is required so command runs on every reboot of the device.

    Futhermore, you may want to enable NTP and SSDP, maybe also PowerSave.

    Also, please add the OBK JSON format from the Web App, so I can add the final template of this device to our devices list:
    https://openbekeniot.github.io/webapp/devicesList.html
    Thanks!
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20716181
    BenAndo
    Level 4  

    Attached is the OBK Config file. Not sure how to get it into .json format.
    Attached as well is the Current Template .json file
    I've also redid the Config from Tuya binary which seems to have more info and generates a better ESPHome template. Although upon loading ESPHome onto this plug, I cannot get the energy readings to work. Not sure why. I just get the following errors
    22:34:01	[E]	[uart:015]	
    Reading from UART timed out at byte 1!
    22:34:01	[W]	[bl0942:043]	
    Junk on wire. Throwing away partial message
    22:34:01	[E]	[uart:015]	
    Reading from UART timed out at byte 0!
    22:34:01	[W]	[component:204]	
    


    But I understand that's a separate issue and the wrong forum to discuss ESPHome config.

    Below is the updated code.
    {
        "bt1_lv": 0,
        "bt1_pin": 7,
        "bt1_type": 0,
        "ch1_stat": 2,
        "ch_cddpid1": 9,
        "ch_dpid1": 1,
        "ch_num": 1,
        "chip_type": 3,
        "crc": 59,
        "ele_fun_en": 1,
        "ffc_select": 1,
        "jv": "1.0.5",
        "lose_vol": 165,
        "module": "CB2S",
        "net_trig": 1,
        "netled1_lv": 0,
        "netled1_pin": 6,
        "netled_reuse": 0,
        "netn_led": 1,
        "nety_led": 0,
        "over_cur": 10500,
        "over_vol": 270,
        "reset_t": 5,
        "rl1_lv": 1,
        "rl1_pin": 26,
        "rl1_type": 0,
        "vol_def": 0
    }

  • #4 20716306
    p.kaczmarek2
    Moderator Smart Home
    I apologize, I don't know why are you getting errors in ESPHome. I do not recommend this firmware, especially if even BL0942 is buggy. However, you can also get OBK JSON entry here:
    https://openbekeniot.github.io/webapp/templateImporter.html
    I may edit your post later to improve the config in case that something is missing.

    EDIT: Ok I generated one:
    Code: JSON
    Log in, to see the code

    Thanks! This device is now added to our templates list. If you need some further help with OBK or can submit next device teardown/template, please open a new topic.

    It seems there are more devices in that series:
    Quote:

    KOGAN SMARTERHOME™ SMART PLUG WITH ENERGY METER AND 5V 2A USB-A & C PORTS - KASPUSBAC1A, KASPUSBAC2A, KASPUSBAC4A - MANUALS AND SUPPORT

    If anyone has them, please submit configs.

    We will soon have 400 entries on our list.
    Helpful post? Buy me a coffee.
ADVERTISEMENT