logo elektroda
logo elektroda
X
logo elektroda

[CB3S/BK7231N] Flashing Lamex LXM170 single light switch with our Tasmota/esphome style firmware

p.kaczmarek2 1857 0
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • The packaging of the WiFi light switch M170 on a wooden table.
    Hello, today I will show you another firmware change guide for a WiFi light switch popular in our country. Device will be flashed with OpenBeken , futhermore, we will also automatically detect GPIO configuration for this device with our BK7231 Easy Flash Tool.

    Purchase of LXM170
    I did the flashing for the reader, who sent me this device, But I know where the switch was purchased:
    Advertisement for the Lamex LXM170 touch switch with price offer.
    60 zlotys (about 15$) for the switch, it's not that bad, especially since it's in our country....
    Description is mainly a marketing boast in every possible way:
    Single-zone touch light switch with WiFi, promoted as a product from LAMEX, featuring a prominently lit LED button and mobile app control capability.
    POLISH PRODUCER LAMEX - are they sure? I rather think it's a Tuya product imported from China?
    Presentation of functions and benefits of the Lamex WiFi switch.
    Time for some specifics:
    Installation instructions and technical specifications of the light switch. That is, it's the simplest switch as possible, no RF, no "no-neutral" mode, etc.
    Packaging:
    Packaging of M170 light switch. The packaging of the WiFi light switch M170 on a wooden table. Packaging of the LXM170 light switch with technical specifications.

    Content - although there are screws:
    Wiring diagram of a light switch with descriptions for neutral and live wires. Contents of the LXM170 switch box protected by foam. Screws in a transparent bag inside a box. Back of Lamex LXM170 WiFi light switch with technical information and manufacturer markings.


    Teardown of LXM170
    Now removing the front:
    Close-up of the WiFi module in the LXM170 switch Back panel of the LXM170 WiFi light switch with visible labels and specifications. WiFi module in LXM170 light switch without casing Close-up of the CB3S module in a WiFi switch.
    So here we have a WiFi module (probably something from BK7231), a pushbutton controller in SOIC, a three-legged LDO and a transistor from relay control. Let's look further:
    Internal PCB of LXM170 switch with CB3S module. PCB of the WiFi module in the LXM170 light switch
    The module is a CB3S:
    https://developer.tuya.com/en/docs/iot/cb3s?id=Kai94mec0s076
    By the way, you can also see the place for the RF chip in SOIC8 along with the oscillator, but here it is not soldered.


    Flashing our firmware
    Let's upload OBK:
    https://github.com/openshwprojects/OpenBK7231T_App
    In order to do it, we use our flasher:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    Solder RX, TX and GND and 3.3V:
    Applied flux:
    CB3S module on a circuit board.
    Flashed:
    CB3S WiFi module with visible RX, TX, and GND pins.
    Soldered:
    WiFi module with soldered wire on a workbench. .
    Flasher layout:
    Setup for flashing firmware on LXM170 WiFi light switch.
    Flasher correctly reads Tuya configuration with Read operation:
    Code: YAML
    Log in, to see the code
    You can generate an OBK template from this, e.g. here:
    https://openbekeniot.github.io/webapp/templateImporter.html
    Template:
    Code: JSON
    Log in, to see the code

    Human-readable description:
    
    Device seems to be using CB3S module, which is BK7231N chip.
    - Relay (channel 1) on P6
    - WiFi LED on P26
    - Button (channel 1) on P10
    

    The OBK configuration is ready, no need to guess anything. You can already make the connection with Home Assistant.

    For more info, you should take a look at the Elektroda com channel on Youtube:
    https://www.youtube.com/@electrodacom

    Summary
    This was the simplest switch as possible, no extra features, but at least it was easy to cut from the cloud and connect to Home Assistant. It was a bit easier than the switch which we presented on YT , because here we didn't have to desolder the controller in the SOIC because it wasn't connected to the RX/TX pins (when something is connected to the RX/TX port it can interfere with programming), so I think I can easily this switch to someone looking for something to easily change firmware.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 11966 posts with rating 9997, helped 572 times. Been with us since 2014 year.
  • ADVERTISEMENT
ADVERTISEMENT