logo elektroda
logo elektroda
X
logo elektroda

Qiachip Smart Switch - BK7231N / CB2S - interior, programming

p.kaczmarek2 64296 288
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #241 20357463
    p.kaczmarek2
    Moderator Smart Home
    Thanks. I will add this to our templates list, but can you at least post a photo of MK601 switch and information where it was bought? And which module?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #242 20357464
    Lesnoi
    Level 6  
    spin55 wrote:
    Hello. In my case the configuration of MK601 SMART SWICHT is:
    P26 --> LEDs
    P6 --> Relay
    P7 --> Btn
    P10--> Btn_n (S2)
    regards

    Thanks for the tip. pins RX, TX are P6, P7? on my board only these pins are connected. At the time of laying I usually wire) Qiachip Smart Switch - BK7231N / CB2S - interior, programming
  • #243 20357469
    p.kaczmarek2
    Moderator Smart Home
    @alexander21041995 ouh I see you have that problematic board with WB2S that is hardly accessible. For that one, I'd suggest doing a full 2MB firmware read for the OTA hack, so further devices from this series can be flashed with OpenBeken remotely, without opening the case. Do anyone have a 2MB full flash dump of original Tuya software from that kind of switch?
    Helpful post? Buy me a coffee.
  • #244 20357489
    Lesnoi
    Level 6  
    p.kaczmarek2 wrote:
    @alexander21041995 ouh I see you have that problematic board with WB2S that is hardly accessible. For that one, I'd suggest doing a full 2MB firmware read for the OTA hack, so further devices from this series can be flashed with OpenBeken remotely, without opening the case. Do anyone have a 2MB full flash dump of original Tuya software from that kind of switch?

    It seems that power saving helped from the reboot. I still don't understand how to control the relay. I'm not sure if I can use rx, tx as pins. Unfortunately I don't have stock firmware.
  • #245 20357492
    p.kaczmarek2
    Moderator Smart Home
    This is very good to hear, that PowerSave helps. I will add it to our FAQ.

    Can you provide more information about "don't understand how to control relay"?

    I think you should be able to use RX/TX as pins in our software. You configure them as any other pins. Are you saying there is some kind of issue with them?
    Qiachip Smart Switch - BK7231N / CB2S - interior, programming
    Helpful post? Buy me a coffee.
  • #246 20357498
    Lesnoi
    Level 6  
    p.kaczmarek2 wrote:
    This is very good to hear, that PowerSave helps. I will add it to our FAQ.

    Can you provide more information about "don't understand how to control relay"?

    I think you should be able to use RX/TX as pins in our software. You configure them as any other pins. Are you saying there is some kind of issue with them?
    Qiachip Smart Switch - BK7231N / CB2S - interior, programming

    Ok, I'll solder the missing pins and try again. but it seems the circuit is P26 --> LEDs
    P6 --> relay
    P7 --> Btn
    P10 --> Btn_n (S2) is not suitable for my board. i can use rx, tx, p24, p26.
  • #247 20357504
    p.kaczmarek2
    Moderator Smart Home
    So give it a try and I will help you if there is some problem.

    I will just already note - this is not "Btn_n", if you are trying to connect a normal two state switch, then you should use this role:
    Qiachip Smart Switch - BK7231N / CB2S - interior, programming
    TglChanOnTgl, it toggles target channel on switch toggle, so you can use old, "classic" switch with smart module.

    Of course, if you connect a momentary switch, then just indeed use Btn.
    Helpful post? Buy me a coffee.
  • #248 20357749
    spin55
    Level 17  
    Mine has a CB2S board, although I replaced it with the equivalent TYWE2S because the operation was not stable.
    regards
    Qiachip Smart Switch - BK7231N / CB2S - interior, programming Qiachip Smart Switch - BK7231N / CB2S - interior, programming Qiachip Smart Switch - BK7231N / CB2S - interior, programming

    Added after 2 [hours] 9 [minutes]:

    Pin 10 is RX1 and I use it to switch S2.
    regards

    Added after 11 [minutes]:

    You have to short-circuit the P10 to ground for it to work. Or with S1 which is internally connected to ground. Be careful because in the double relay controllers for blinds these contacts usually go to the 230V phase. Careful with this.
  • ADVERTISEMENT
  • #249 20358872
    Lesnoi
    Level 6  
    Qiachip Smart Switch - BK7231N / CB2S - interior, programming Qiachip Smart Switch - BK7231N / CB2S - interior, programming Qiachip Smart Switch - BK7231N / CB2S - interior, programming

    I managed to get the device to work on such a config. But the button is not working properly. if you set p24--BTN the button reacts but starts randomly turning on and off. what could be the problem?
  • #250 20358905
    spin55
    Level 17  
    On P11 and P24 play around with the BTn and BTn_n settings and swap. You are close to getting it.
    As the board is horizontal, it does not use pins 6,7 and 8, so they have had to take advantage of TXD1.
  • #251 20359114
    p.kaczmarek2
    Moderator Smart Home
    spin55 wrote:
    Mine has a CB2S board, although I replaced it with the equivalent TYWE2S because the operation was not stable.

    In case of any power supply issues, add PowerSave command to "Short startup command" in Options! The cheapest power supplies might require low power mode on Beken in order not to overload.


    Lesnoi wrote:

    But the button is not working properly. if you set p24--BTN the button reacts but starts randomly turning on and off. what could be the problem?

    That's strange - can you clarify what do you mean by "the button"? The small, microswitch on the device? Or the big switch that you connect to device contacts?
    For the button on the device, use Btn/Btn_n, for the toggle switch connected to S* terminal, if it's two state, use "toggle channel on toggle"...
    Helpful post? Buy me a coffee.
  • #252 20359179
    Lesnoi
    Level 6  
    p.kaczmarek2 wrote:
    Lesnoi wrote:

    But the button is not working properly. if you set p24--BTN the button reacts but starts randomly turning on and off. what could be the problem?

    That's strange - can you clarify what do you mean by "the button"? The small, microswitch on the device? Or the big switch that you connect to device contacts?
    For the button on the device, use Btn/Btn_n, for the toggle switch connected to S* terminal, if it's two state, use "toggle channel on toggle"...

    pins s1 and s2 work fine when p11 is set to "TglChanOnTgl" turns on the relay when closed and vice versa. if you set p24 "BTN" the button reaction device (micro button) but at the same time starts to turn on and off the relay involuntarily. similar to contact bounce
  • #253 20359225
    p.kaczmarek2
    Moderator Smart Home
    Can you try Btn_n?
    That's the first time I see this issue.
    Helpful post? Buy me a coffee.
  • #254 20359252
    spin55
    Level 17  
    I don't think it's the power supply in my case because I feed the CB2S module directly with 3V3 and the instability continues. Back in the day I tried to update the firmware via OTA but it was still the same. It is currently working with a TYWE2S board with EspHome firmware and fully integrated into Home Assistant.
    Back in the day I had a problem similar to Lesnoi's (I don't remember if it was with this device or another) and I solved it by playing with the Buttons and LED configurations.
    regards
  • #255 20359448
    p.kaczmarek2
    Moderator Smart Home
    nemec23041990 wrote:
    RX TX как указать?
    драйвер DHT11/22, AM2301?
    Quote:
    чип UNICMICRO UM8005
    http://www.gztrchip.com/uploadfile/file/20210811/1628649277678726.pdf
    его можно прошить?

    https://www.unicmicro.com/index.php/show-27-69.html
    информация о прошивке.

    DHT11, DHT22, DHT12, DHT21 support has been added on latest update and was tested in BK7231T and BL602.

    Qiachip Smart Switch - BK7231N / CB2S - interior, programming
    Qiachip Smart Switch - BK7231N / CB2S - interior, programming Qiachip Smart Switch - BK7231N / CB2S - interior, programming Qiachip Smart Switch - BK7231N / CB2S - interior, programming Qiachip Smart Switch - BK7231N / CB2S - interior, programming
    Qiachip Smart Switch - BK7231N / CB2S - interior, programming
    Configuration: connect DHT11 to any pin. For that pin role, select DHT11. First linked channel is temperature, second is humidity. You can receive publishes with Home Assistant. You can scale values in HA because temperature is stored as times 10 value like in TuyaMCU. You could also just do on change handler with publishFloat and $CH2*0.1 expression, this will also work and that way you can set any topic
    Here is a screenshot from out automatic tests for this feature:
    Qiachip Smart Switch - BK7231N / CB2S - interior, programming
    Here is the command (to be put in autoexec.bat):
    
    addEventHandler OnChannelChange 20 publishFloat myAliasedVal $CH20*0.1
    
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #256 20383209
    Lesnoi
    Level 6  
    p.kaczmarek2 wrote:
    Can you try Btn_n?
    That's the first time I see this issue.


    i did some tests. Btn_n disables the button. I also read the reviews where I bought this module and many users encounter the problem of self-enable / disable on the stock firmware. I just don't use the standard button and the relay works fine. but there is a problem, if the wifi point disappears, then the device gets hot and starts to reboot cyclically. I don't know how to solve this problem. I'll try to test for a longer period with a stable access point. Thanks for your hard work!
  • #257 20383267
    p.kaczmarek2
    Moderator Smart Home
    So that's a hardware problem that happens on stock firmware as well?

    If device gets hot, you can try low power mode - PowerSave in a short startup command, but take care, it's experimental.
    Helpful post? Buy me a coffee.
  • #258 20383481
    spin55
    Level 17  
    As I previously indicated, I replaced the CB2S board with a TWE2S. The plate that I removed the food directly with 3.3 volts and continues to give the same symptom as when it was installed: Very slow web page reloading and continuous disconnections. So I came to the conclusion that the board is bad. From what Lesnoi has said, it seems that these plates are defective from the factory.
    Regards
  • #259 20388008
    Lesnoi
    Level 6  
    p.kaczmarek2 wrote:
    So that's a hardware problem that happens on stock firmware as well?

    If device gets hot, you can try low power mode - PowerSave in a short startup command, but take care, it's experimental.

    PowerSave unfortunately does not work, I suggest putting a heatsink on the chip, I'll tell you about my experience later
  • #260 20441890
    nemec23041990
    Level 4  
    приветствую, ds18b20 есть поддержка?
  • #261 20441892
    p.kaczmarek2
    Moderator Smart Home
    Hello @nemec23041990 , we have support for DHT sensors (DHT11, DHT22, etc), ds18b20 can be added if you want but it's not here right now
    Helpful post? Buy me a coffee.
  • #262 20511413
    ginpachi98
    Level 1  
    I'd also like DS18B20 support, its so small and easy to add, it'd be a shame not to have it :D
  • #263 20542978
    piratee
    Level 13  
    Hello
    I am trying to read the az BK7231N firmware and I get the message:
    (on the chip is the inscription NU2)
    Qiachip Smart Switch - BK7231N / CB2S - interior, programming
    Starting read!
    Now is: niedziela, 16 kwietnia 2023 20:39:18.
    Flasher mode: BK7231N
    Going to open port: COM1.
    Serial port open!
    Getting bus... (now, please do reboot by CEN or by power off/on)
    Getting bus success!
    Going to set baud rate setting (921600)!
    Will try to read device flash MID (for unprotect N):
    failed with serial.BytesToRead 0 (expected 15)
    The beginning of buffer in UART contains data.
    Failed to read device MID!
    Going to start reading at offset 0x00...
    Reading 0x00... failed with serial.BytesToRead 0 (expected 4111)
    The beginning of buffer in UART contains data.
    Failed! There was no result to save. Qiachip Smart Switch - BK7231N / CB2S - interior, programming Qiachip Smart Switch - BK7231N / CB2S - interior, programming Qiachip Smart Switch - BK7231N / CB2S - interior, programming Qiachip Smart Switch - BK7231N / CB2S - interior, programming
  • ADVERTISEMENT
  • #264 20543120
    p.kaczmarek2
    Moderator Smart Home
    Please try desoldering the module first, just to be sure.
    Please try hid_download_py:
    https://github.com/OpenBekenIOT/hid_download_py
    https://www.youtube.com/watch?v=PKkiqDNFIx8&t=295s&ab_channel=Elektrodacom

    That fail at MID is worrying, I hope they didn't change the flashing method or the way chip identifies itself
    Helpful post? Buy me a coffee.
  • #267 20547116
    p.kaczmarek2
    Moderator Smart Home
    Thank you for the backups. By the way, the new version of the flasher has an option to conveniently restore the backup. https://github.com/openshwprojects/BK7231GUIFlashTool
    Helpful post? Buy me a coffee.
  • #268 20787293
    rass5000
    Level 1  
    Where can I find the original firmware version 1.1.15 for BK7231N CB2S?
  • #269 20787436
    p.kaczmarek2
    Moderator Smart Home
    @rass5000 why do you need that specific firmware? Flashing 2MB dump from other device to yours may not work correctly...
    Helpful post? Buy me a coffee.
  • #270 20831513
    BartekNowaczyk
    Level 6  
    I join the request for ds18b20, they are invaluable in building thermostats, in my Frankenstein project where I replaced the original chip with esp8266, apart from the relay and LED button support, I added thermometer support on one of the pins, I will send photos from the tape in my free time.
    . I will be happy to test it, I have some smartswitches from various Chinese manufacturers, both with an integrated bekken on the board and with a module that has its equivalent from esp. Thanks for your time.

Topic summary

The discussion revolves around the Qiachip Smart Switch utilizing the BK7231N chip and the CB2S module, focusing on programming, firmware flashing, and integration with Home Assistant. Users share experiences with flashing the device using various tools like hid_download_py and uartprogram, troubleshooting issues such as connection problems, firmware compatibility, and device reboots. Key challenges include configuring WiFi settings, handling relay operations, and ensuring stable operation with different firmware versions. The community provides insights on soldering techniques, pin configurations, and the importance of power supply stability. Additionally, there are discussions about integrating DHT sensors and the need for improved firmware features.
Summary generated by the language model.
ADVERTISEMENT