Elektroda.com
Elektroda.com
X

Qiachip Smart Switch - BK7231N / CB2S - interior, programming

p.kaczmarek2 34101 266
This content has been translated flag-pl » flag-en View the original version here.
  • #241
    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?
  • #242
    Lesnoi
    Level 5  
    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
    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?
  • #244
    Lesnoi
    Level 5  
    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
    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
  • #246
    Lesnoi
    Level 5  
    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
    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.
  • #248
    spin55
    Level 14  
    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.
  • #249
    Lesnoi
    Level 5  
    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
    spin55
    Level 14  
    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
    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"...
  • #252
    Lesnoi
    Level 5  
    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
    p.kaczmarek2
    Moderator Smart Home
    Can you try Btn_n?
    That's the first time I see this issue.
  • #254
    spin55
    Level 14  
    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
    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
    
  • #256
    Lesnoi
    Level 5  
    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
    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.
  • #258
    spin55
    Level 14  
    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
    Lesnoi
    Level 5  
    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
    nemec23041990
    Level 4  
    приветствую, ds18b20 есть поддержка?
  • #261
    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
  • #262
    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
    piratee
    Level 12  
    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