logo elektroda
logo elektroda
X
logo elektroda

Identify Mini smart switch WiFi Relay Module with ln882hki Chip

Lesnoi 9774 32
ADVERTISEMENT
  • #1 20815114
    Lesnoi
    Level 6  

    I got a relay on an unknown chip, maybe someone knows what kind of chip it is? Electronic circuit with visible components on a circuit board. Close-up of a circuit board with a chip labeled LN82XHKI.
  • ADVERTISEMENT
  • #2 20815229
    p.kaczmarek2
    Moderator Smart Home
    This search may be related:
    https://www.elektroda.com/rtvforum/find.php?q=ln882
    Where did you order this device?
    Helpful post? Buy me a coffee.
  • #3 20815721
    Lesnoi
    Level 6  

    I got them on AliExpress. as I understand it, their firmware is impossible?
  • #4 20815901
    p.kaczmarek2
    Moderator Smart Home
    Maybe it's possible, there is some SDK:
    https://github.com/lightningsemi/ln882h
    Can you check whether the flash tool is also present there? Is the flash tool able to read and write the device flash via UART?

    Another problem would be that I dont have this kind of chip at hand.
    Helpful post? Buy me a coffee.
  • #5 20820538
    Lesnoi
    Level 6  
    Can I somehow help with development?
  • #6 20820592
    p.kaczmarek2
    Moderator Smart Home
    Hello, are you referring to OBK development in general or to LN882H?

    You can try to test the LN882H flash tool, you can try porting OBK to this platform (I can tell you how, if you're interested), you can also make a donation: https://paypal.me/openshwprojects
    Helpful post? Buy me a coffee.
  • #7 20839581
    protectivedad
    Level 7  
    I hooked up the uart and it keeps repeating:
    ------  wifi_mcu_basic_example  ------


    While I was connecting the 3.3v lead it started up the CozyLife code:
    TCP/IP initialized.
    LN882H SDK Ver: 1.8 [build time:Sep  9 2023 08:53:42][0x010800ff]
    
        ____               _     _  __
       / ___|___ _____   _| |   (_)/ _| ___
      | |   / _ \_  / | | | |   | | |_ / _ \
      | |__| (_) / /| |_| | |___| |  _|  __/
       \____\___/___|\__, |_____|_|_|  \___|
                     |___/
    
    
    cozylife_app_info
    CozyLife SDK Version: 0.6.0
    CozyLife SDK Build Sep  9 2023 08:53:37
    
    cozylife_app_info
    Product Id: iy9fT1
    Firmware Version: 1.0.1
    Firmware Build Sep  9 2023 08:53:44
    
    
    device id:DELETED
    
    1609473600 [L] [     lib_log] udplog_init on: 0, 192.168.2.2:7789
    1609473600 [L] [    lib_wifi] wifi_start_connect
    [WLIB_I]cap_comp = 0, xtal_capbank_tab:[0]:40 [1]:35 [2]:35 [3]:35 [4]:50 [5]:70 [6]:70 [7]:70
    [WLIB_I][original]phy_tab_1f:0x4C, phy_tab_20:0x3C
    [WLIB_I][efuse]phy_tab_1f:0x54, phy_tab_20:0x44
    [WLIB_I][flash]phy_tab_1f:0x54, phy_tab_20:0x44, tx_pwr_comp_all=0, tx_pwr_comp_b=0, tx_pwr_comp_gn=0
    [WLIB_I]==>temp_sect:2,phy_tab_1f:0x54,phy_tab_20:0x44
    [WLIB_I]<==temp_sect:2,phy_tab_1f:0x54,phy_tab_20:0x44
    [WLIB_I]LN882H WiFi Lib Ver(CozyLife-230526.1): 1.1.3 [build time:May 26 2023 18:45:35][0x010103ff]
    [WLIB_I]STA_Startup.
    [WLIB_I]Disconnected.
    [WLIB_E]HwEr:UKI:0
    psk value :
    00000000:  DELETED
    00000010:  DELETED
    00000020:  DELETED
    1609473601 [L] [    lib_wifi] wifi connecting to ssid: DELETED  passwd: DELETED
    STA startup!
    [WLIB_I]Disconnected.
    [WLIB_I]Status: Scan Successful. Initaiting Join:
    [WLIB_I]SSID      = DELETED
    [WLIB_I]BSSID     = DELETED
    [WLIB_I]Channel   = 3
    [WLIB_I]RSSI      = -70
    [WLIB_I]StationID = DELETED
    [WLIB_I]Status: Initiating Authentication.
    [WLIB_I]Status: Authentication Successful. Initiating Association.
    [WLIB_I]Peer's HT-Capabilities:
    [WLIB_I]ht_capable             = 1
    [WLIB_I]ldpc_cod_cap           = 0
    [WLIB_I]smps_mode              = 3
    [WLIB_I]greenfield             = 0
    [WLIB_I]short_gi_20            = 1
    [WLIB_I]short_gi_40            = 1
    [WLIB_I]rx_stbc                = 0
    [WLIB_I]max_rx_ampdu_factor    = 3
    [WLIB_I]min_mpdu_start_spacing = 6
    [WLIB_I]htc_support            = 0
    [WLIB_I]sta_amsdu_maxsize      = eff
    [WLIB_I]chan_width             = 1
    [WLIB_I]dsss_cck_40mhz         = 1
    [WLIB_I]Status: Association Successful.
    [WLIB_I]Connected.
    STA connected to target AP!
    1609473602 [L] [    lib_wifi] wifi_connect
    [WLIB_I]xtal_temp_cal.curr_sect=3,last_sect=2
    [WLIB_I]==>temp_sect:3,phy_tab_1f:0x54,phy_tab_20:0x44
    [WLIB_I]<==temp_sect:3,phy_tab_1f:0x54,phy_tab_20:0x44
    +--------------- net device info ------------+
    |netif hostname: sta                         |
    |netif ip      = DELETED
    |netif mask    = 255.255.255.0               |
    |netif gateway = DELETED
    |netif mac     : DELETED
    +--------------------------------------------+
    1609473609 [L] [    lib_wifi] wifi_get_iP
    1609473609 [L] [   lib_mainw] ip: DELETED
    [WLIB_I]xtal_temp_cal.curr_sect=2,last_sect=3
    [WLIB_I]==>temp_sect:2,phy_tab_1f:0x54,phy_tab_20:0x44
    [WLIB_I]<==temp_sect:2,phy_tab_1f:0x54,phy_tab_20:0x44
    adc raw:  792, temp_IC:   33
    Total:135436; Free:104080;
    adc raw:  792, temp_IC:   33
    Total:135436; Free:104168;
    adc raw:  794, temp_IC:   34
    Total:135436; Free:104080;
    

    I don't know how I got it to run and I haven't been able to do it again.
  • Helpful post
    #8 20911009
    divadiow
    Level 34  
    I also have this Cozylife 16A mini switch with LN-02 - https://www.aliexpress.com/item/1005006127262082.html

    I've captured the boot log and it has the same product ID, but a newer firmware.

    [14:09:36.925] - serial type is general
    [14:09:36.965] - Open COM10 Success
    [14:09:41.512] - ------  wifi_mcu_basic_example  ------
    [14:09:42.053] - TCP/IP initialized.
    [14:09:42.058] - LN882H SDK Ver: 2.1_rc1 [build time:Nov 28 2023 09:34:26][0x02010001]
    [14:09:42.059] -     ____               _     _  __
    [14:09:42.060] -    / ___|___ _____   _| |   (_)/ _| ___
    [14:09:42.066] -   | |   / _ \_  / | | | |   | | |_ / _ \
    [14:09:42.068] -   | |__| (_) / /| |_| | |___| |  _|  __/
    [14:09:42.069] -    \____\___/___|\__, |_____|_|_|  \___|
    [14:09:42.070] -                  |___/
    [14:09:42.071] - cozylife_app_info
    [14:09:42.072] - CozyLife SDK Version: 0.6.0
    [14:09:42.073] - CozyLife SDK Build Nov 28 2023 09:34:21
    [14:09:42.074] - cozylife_app_info
    [14:09:42.074] - Product Id: iy9fT1
    [14:09:42.075] - Firmware Version: 1.0.2
    [14:09:42.080] - Firmware Build Nov 28 2023 09:34:28
    [14:09:42.081] - device id:
    [14:09:42.083] - 1609473600 [L] [     lib_log] udplog_init on: 0, 192.168.2.2:7789
    [14:09:42.085] - 1609473600 [L] [     lib_ble] ble mac: e8:73:f0:c2:50:00
    [14:09:42.827] - [BLIB_I]BLIB Ver: 1.0.5 [build time:Aug  7 2023 17:33:27][0x010005ff]
    [14:09:42.829] - 1609473600 [L] [     lib_ble] bt_event_bleenabled
    [14:09:42.834] - [WLIB_I]cap_comp = 0, xtal_capbank_tab:[0]:40 [1]:35 [2]:35 [3]:35 [4]:50 [5]:70 [6]:70 [7]:70
    [14:09:42.837] - [WLIB_I][original]phy_tab_1f:0x4C, phy_tab_20:0x3C
    [14:09:42.839] - [WLIB_I][efuse]phy_tab_1f:0x50, phy_tab_20:0x40
    [14:09:42.841] - [WLIB_I][flash]phy_tab_1f:0x50, phy_tab_20:0x40, tx_pwr_comp_all=0, tx_pwr_comp_b=0, tx_pwr_comp_gn=0
    [14:09:42.844] - [WLIB_I]==>temp_sect:2,phy_tab_1f:0x50,phy_tab_20:0x40
    [14:09:42.846] - [WLIB_I]<==temp_sect:2,phy_tab_1f:0x50,phy_tab_20:0x40
    [14:09:42.851] - [WLIB_I]LN882H WiFi Lib Ver: 1.3.0 [build time:Oct  8 2023 11:17:49][0x010300ff][for Cozylife Commit-a353a99a]
    [14:09:42.852] - [WLIB_I]STA_Startup.
    [14:09:42.855] - [WLIB_I]Disconnected.
    [14:09:42.856] - [WLIB_E]HwEr:UKI:0
    [14:09:42.856] - STA startup!
    [14:09:43.623] - 	CH= 6,RSSI= -45,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:43.626] - 	CH= 6,RSSI= -48,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:43.628] - 	CH= 1,RSSI= -65,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:43.630] - 	CH= 1,RSSI= -67,BSSID:[MACADDR],SSID:""
    [14:09:43.632] - 	CH=11,RSSI= -73,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:43.636] - 	CH= 1,RSSI= -86,BSSID:[MACADDR],SSID:""
    [14:09:43.637] - 	CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:43.640] - 	CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:43.642] - 	CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:""
    [14:09:43.644] - 	CH= 1,RSSI= -91,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:43.644] - [WLIB_I]Disconnected.
    [14:09:43.647] - AP01  rssi:-45  channel:6  ssid:fakewifi
    [14:09:43.648] - AP02  rssi:-48  channel:6  ssid:fakewifi
    [14:09:43.650] - AP03  rssi:-65  channel:1  ssid:fakewifi
    [14:09:43.653] - AP04  rssi:-67  channel:1  ssid:
    [14:09:43.655] - AP05  rssi:-73  channel:11  ssid:fakewifi
    [14:09:43.656] - AP06  rssi:-86  channel:1  ssid:
    [14:09:43.658] - AP07  rssi:-90  channel:1  ssid:fakewifi
    [14:09:43.660] - AP08  rssi:-90  channel:1  ssid:fakewifi
    [14:09:43.661] - AP09  rssi:-90  channel:1  ssid:
    [14:09:43.662] - AP10  rssi:-91  channel:1  ssid:fakewifi
    [14:09:43.832] - [WLIB_I]LN882H WiFi Lib Ver: 1.3.0 [build time:Oct  8 2023 11:17:49][0x010300ff][for Cozylife Commit-a353a99a]
    [14:09:43.834] - [WLIB_I]STA_Startup.
    [14:09:43.835] - [WLIB_I]Disconnected.
    [14:09:43.836] - [WLIB_E]HwEr:UKI:0
    [14:09:43.838] - STA startup!
    [14:09:45.281] - 	CH= 6,RSSI= -45,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:45.284] - 	CH= 6,RSSI= -48,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:45.286] - 	CH= 1,RSSI= -65,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:45.287] - 	CH= 1,RSSI= -65,BSSID:[MACADDR],SSID:""
    [14:09:45.290] - 	CH=11,RSSI= -74,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:45.292] - 	CH=11,RSSI= -88,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:45.293] - 	CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:""
    [14:09:45.295] - 	CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:45.298] - 	CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:45.300] - 	CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:""
    [14:09:45.302] - 	CH= 1,RSSI= -91,BSSID:[MACADDR],SSID:"fakewifi"
    [14:09:45.303] - [WLIB_I]Disconnected.
    [14:09:45.305] - AP01  rssi:-45  channel:6  ssid:fakewifi
    [14:09:45.307] - AP02  rssi:-48  channel:6  ssid:fakewifi
    [14:09:45.308] - AP03  rssi:-65  channel:1  ssid:fakewifi
    [14:09:45.311] - AP04  rssi:-65  channel:1  ssid:
    [14:09:45.313] - AP05  rssi:-74  channel:11  ssid:fakewifi
    [14:09:45.315] - AP06  rssi:-88  channel:11  ssid:fakewifi
    [14:09:45.316] - AP07  rssi:-90  channel:1  ssid:
    [14:09:45.319] - AP08  rssi:-90  channel:1  ssid:fakewifi
    [14:09:45.320] - AP09  rssi:-90  channel:1  ssid:fakewifi
    [14:09:45.322] - AP10  rssi:-90  channel:1  ssid:
    [14:09:45.323] - AP11  rssi:-91  channel:1  ssid:fakewifi
    [14:09:45.325] - 1609473603 [L] [    lib_wifi] wifi_start_config
    [14:09:45.435] - [WLIB_I]LN882H WiFi Lib Ver: 1.3.0 [build time:Oct  8 2023 11:17:49][0x010300ff][for Cozylife Commit-a353a99a]
    [14:09:45.437] - [WLIB_I]SoftAP_Startup.
    [14:09:45.437] - [WLIB_E]HwEr:UKI:0
    [14:09:45.439] - [WLIB_I]Channel scanning not needed
    [14:09:45.440] - [WLIB_I]User Preferred channel idx 0-0
    [14:09:45.443] - [WLIB_I]Selecting 20MHz ch from One of ... 0
    [14:09:45.444] - [WLIB_I]Selected Channel Tbl Idx 0-0
    [14:09:45.447] - [WLIB_I]AP: Starting network in 0-0
    [14:09:45.448] - [WLIB_I]Connected.
    [14:09:45.450] - [WLIB_I]sta_conn_step_set: CONNECTED
    [14:09:45.452] - [WLIB_I]Status: Start Successful. Entering Enable State.
    [14:09:45.454] - SoftAP startup!
    [14:09:45.455] - +--------------- net device info ------------+
    [14:09:45.458] - |netif hostname: ln_softap                   |
    [14:09:45.459] - |netif ip      = 192.168.4.1                 |
    [14:09:45.462] - |netif mask    = 255.255.255.0               |
    [14:09:45.464] - |netif gateway = 192.168.4.1                 |
    [14:09:45.467] - |netif mac     : [MACADDR]         |
    [14:09:45.468] - +--------------------------------------------+
    [14:09:45.529] - [WLIB_I]Disconnected.
    [14:09:45.531] - [WLIB_I]Channel scanning not needed
    [14:09:45.533] - [WLIB_I]User Preferred channel idx 4-0
    [14:09:45.535] - [WLIB_I]Selecting 20MHz ch from One of ... 0 1 2 3 4
    [14:09:45.538] - [WLIB_I]Selected Channel Tbl Idx 4-0
    [14:09:45.539] - [WLIB_I]AP: Starting network in 4-0
    [14:09:45.540] - [WLIB_I]Connected.
    [14:09:45.542] - [WLIB_I]sta_conn_step_set: CONNECTED
    [14:09:45.544] - [WLIB_I]Status: Start Successful. Entering Enable State.
    [14:09:45.546] - 1609473603 [L] [     lib_ble] ble_start_wifi_cfg
    [14:09:55.054] - [WLIB_I]xtal_temp_cal.curr_sect=3,last_sect=2
    [14:09:55.056] - [WLIB_I]==>temp_sect:3,phy_tab_1f:0x50,phy_tab_20:0x40
    [14:09:55.058] - [WLIB_I]<==temp_sect:3,phy_tab_1f:0x50,phy_tab_20:0x40
    [14:09:56.054] - [WLIB_I]xtal_temp_cal.curr_sect=2,last_sect=3
    [14:09:56.061] - [WLIB_I]==>temp_sect:2,phy_tab_1f:0x50,phy_tab_20:0x40
    [14:09:56.063] - [WLIB_I]<==temp_sect:2,phy_tab_1f:0x50,phy_tab_20:0x40


    I've started a firmware dump and will then proceed with the LN882H test image from @sweetlilmre and @p.kaczmarek2 as discussed in https://www.elektroda.com/rtvforum/topic4008545.html

    I've soldered BOOT in situ Close-up of soldering point on a black circuit board labeled BOOT. Cozylife 16A LN-02 mini switch with attached wire Mini switch Cozylife 16A LN-02 with BOOT wire soldered Close-up of a circuit board labeled LN-02 with a Lightning LN882HKV chip.
    Close-up of a circuit board with soldered pins labeled TX, RX, GND, and 3.3.
    ELIVCO mini smart switch with an app on the phone. Advertisement for Cozylife 16A Wi-Fi switch on AliExpress Digitaling Store.
  • ADVERTISEMENT
  • #9 20943151
    Hgo11
    Level 6  
    Hello,

    Does anyone have the pin mapping for this switch? Flashed openbeken and forgot to backup old one.

    Thanks!
  • #10 20943170
    p.kaczmarek2
    Moderator Smart Home
    I think it's already on our list:
    Screenshot of an IoT devices list showing two devices in a table.
    Here: https://openbekeniot.github.io/webapp/devicesList.html
    Helpful post? Buy me a coffee.
  • #11 20943231
    Hgo11
    Level 6  
    thanks for the swift answer, didn't notice it.
  • #12 20953098
    p.kaczmarek2
    Moderator Smart Home
    It has been brought to my attention that MQTT Discovery fails on LN882H. I've submited a fix:
    https://github.com/openshwprojects/OpenLN882H/commit/29073151d1bc6dada9bb28f818928bba8e06617e
    As usual, we had to increase MQTT buffers, namely:
    - MQTT_OUTPUT_RINGBUF_SIZE
    - MQTT_VAR_HEADER_BUFFER_LEN
    - MQTT_REQ_MAX_IN_FLIGHT
    Still, I haven\t been able to test it myself yet, so let me know if it works for you guys.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #13 20974595
    silvestro_gatto
    Level 7  

    >>20911009

    I have some of this Cozylife 16A mini switch with LN-02 and I was able to save original firmware and upload OpenLN882H firmware LN882H_Test_ver_1.17.478.

    I couldn't get any serial output with the original firmware. Could you please tell me which speed you set on the serial port to capture the boot log? Thanks!

    Added after 12 [minutes]:

    >>20943170

    One more question ...

    Could you please explain how to modify the upper part of the Template info ( "vendor" , "bDetailed", "name", "model", "chip", "board",
    "flags", "keywords")? I tried many times to Import the "Elivco Cozylife 16A Mini Switch (RMW002)" Template and apply it, but I can only update the pin settings.

    Screenshot showing a JSON template editor for the Cozylife 16A Mini Switch device.

    I am also getting a "FAILED! Invalid command "lfs_format // clear LFS" error when I click on "Clear OBK and apply new script from above" button

    Screenshot showing template configuration and script execution log for Cozylife 16A mini switch.

    Thank you!
  • #14 20974623
    divadiow
    Level 34  
    silvestro_gatto wrote:
    I have some of this Cozylife 16A mini switch with LN-02 and I was able to save original firmare and upload OpenLN882H firmware LN882H_Test_ver_1.17.478.

    I couldnt get any serial output with the original firmware. Could you please tell me which speed you set on the serial port to capture the boot log? Thanks!


    I think maybe just 115200. Obviously the BOOT pin is not grounded for standard flash boot output. The output logs posted are from factory fw, so you can expect an already-flashed OBK output to be different.

    silvestro_gatto wrote:
    Could you please explain how to modify the upper part of the Template info ( "vendor" , "bDetailed", "name", "model", "chip", "board",
    "flags", "keywords")? I tried many times to Import the "Elivco Cozylife 16A Mini Switch (RMW002)" Template and apply it, but I can only update the pin settings.


    The import function strips this info out anyway and will only apply the pins and flags settings. The export box text is for copying out into a text editor for manual editing and then posting on these forums. If the template posted is unique it'll normally end up being added to the devices list - https://openbekeniot.github.io/webapp/devicesList.html

    silvestro_gatto wrote:
    I am also getting a "FAILED! Invalid command "lfs_format // clear LFS" error when I click on "Clear OBK and apply new script from above" button


    yes. the import/littlefs stuff doesn't seem to be setup for LN882 firmware yet. Manual module config required
  • #15 20975324
    silvestro_gatto
    Level 7  

    Hi divadiow,
    Thank you for your prompt answer.

    In my past test I tried to log from serial port the factory fw, but (even changing the serial port speed and leaving BOOT disconnected from Ground) I did not get any output in the serial monitor. Just curious what version of factory fw is running on my devices ...

    Btw, is there a way to modify the values of "vendor", "bDetailed", "name", "model", "chip", "board", "flags", "keywords" in the currently running Template and make them consistent with the current hw? Is there any configuration file where these information are stored that can be edited and updated?

    Thanks!
  • #16 20975378
    p.kaczmarek2
    Moderator Smart Home
    All those fields (except flags) are for template only, they are not stored on the device. The idea is that you are supposed to fill them while creating a teardown topic on our forum, and then paste the template in the topic, so we can later add it to https://openbekeniot.github.io/webapp/devicesList.html
    Helpful post? Buy me a coffee.
  • #17 20975465
    silvestro_gatto
    Level 7  
    Got it!

    Many thanks p.kaczmarek2
  • ADVERTISEMENT
  • #18 20998750
    silvestro_gatto
    Level 7  

    Instead of the text "LN882H_Test", it would be nice to show the current version (i.e. OpenLN882H_1.17.501) both in the footer of each page

    User interface displaying software version LN882H_Test at the bottom of the screen.

    and in the Config Tab of the Web Application

    Screenshot of the Config tab showing current device details with software version LN882H_Test.

    I have several devices running different versions of OpenLN code and Build info is not enough to quickly find the correct version.
  • #19 20999123
    p.kaczmarek2
    Moderator Smart Home
    It seems we need to define USER_SW_VER in Makefile, I will check this out.
    If that's not defined, then a default value is used:
    Screenshot of a code editor displaying the new_common.h file defined in the OpenBK7231T_App.
    Helpful post? Buy me a coffee.
  • #20 21012494
    silvestro_gatto
    Level 7  

    Hello @p.kaczmarek2,
    I updated the firmware on some LN882H modules and noticed that they are still showing "version LN882H_Test"

    Displayed text showing the software version as LN882H_Test.

    Screenshot of LN882H device information showing details such as firmware version, IP and MAC addresses.

    instead of the current firmware version.

    Is there any timeframe for fixing this issue?

    Thank you!
  • #21 21012498
    p.kaczmarek2
    Moderator Smart Home
    Not yet, we need somebody who knows CMake to look into forwarding the CMake variable to a #define , I have looked into that some time ago but I don't know CMake and I didn't have much time to research that. Here is unfinished PR:
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1123
    Helpful post? Buy me a coffee.
  • #22 21012694
    silvestro_gatto
    Level 7  
    Thank you for your follow up.
  • #23 21012958
    divadiow
    Level 34  
    maybe there should be an Elektroda Discord to attract more devs, real-time chat etc
  • #24 21019912
    silvestro_gatto
    Level 7  
    >>21012498

    @p.kaczmarek2 I'm glad that fixing the problem with LN882H time_t size brought some resources to the solution of this issue too. Showing also release info makes more sense than just build date & time and it is consistent with all the other platforms.
  • #25 21206419
    terryb8s
    Level 4  
    >>21012958 1 to Discord, I would be keen on this and happy to help as needed with support for stuff I know about, would be nice to have a bit of community for more collaborative conversations etc.

    Obviously understand there may be some reluctance to using Discord as the forum allows for a better recording of the history on a specific topic.
    Helpful post? Buy me a coffee.
  • #26 21243429
    alexios_13
    Level 1  
    Anybody knows how these switches communicate from the app.
    I am interested in triggering them without the app but without flashing them.
    I did manage to get a lot of info about the device by using a MITM proxy and starting the Cozy Life app, but when I trigger the switch nothing happens so I suspect that it uses some kind of other protocol than http to trigger the switch over WIFI.
    Thanks !
  • #27 21315355
    darknesspaladin
    Level 1  
    >>21243429
    Hello, alexios_13!
    Here's what I know so far:
    1. The device initiates a TCP connection to 139.162.135.94:8899 (apparently for remote control "via the cloud"). The protocol is NOT HTTP/HTTPS, when trying to connect via telnet there is no prompt, banner or server greeting, and there are no error messages when trying to send anything there.
    2. The device accepts incoming connections on TCP/5555. The protocol is unknown, when connecting via telnet there is no greeting or response to the data sent.

    I'll probably do more research, but don't count on me - I only have one of these devices, which I bought inexpensively by mistake, and I have no benefit from researching it unless I can get results quickly.

    I think you can try using Mitmproxy in "Generic TCP" mode -- I saw in its documentation that it can do this.
  • #28 21315819
    p.kaczmarek2
    Moderator Smart Home
    Do you have any captures of their communications, like Wireshark one or something?
    Helpful post? Buy me a coffee.
  • #29 21349628
    vit5041
    Level 1  
    Hello All!
    I've got this mini switch with LN882H chip. Tried to flash it with esphome firmware -- it simply doesn't work. Used bk72xx: board: generic-bk7231n-qfn32-tuya then found some OpenLN882H firmware and it's started. Then I am lost and cannot figure out, can I use this board in ESPHOME ? Which board definition in esphome can I use? Thanks a lot for your help.

    Upd. It seems it is not supported in ESPHOME.
  • #30 21350030
    p.kaczmarek2
    Moderator Smart Home
    Esphome does not support many devices, you should rather try:
    https://github.com/openshwprojects/OpenBK7231T_App
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around identifying a mini smart switch WiFi relay module utilizing the LN882H chip. Users share insights on the device's firmware, with some indicating that the firmware may be difficult to modify. References to an SDK for the LN882H chip are provided, along with links to development resources. Users discuss capturing boot logs and the challenges of flashing the device with alternative firmware, such as OpenBK or OpenLN882H. There are inquiries about pin mapping, MQTT communication issues, and the potential for community collaboration through platforms like Discord. Additionally, some users express interest in understanding the communication protocol used by the device without flashing it.
Summary generated by the language model.
ADVERTISEMENT