logo elektroda
logo elektroda
X
logo elektroda

OpenBK on CurryCurry Gen5.3 Curtain Switch with CB3S and TuyaMCU (PY32F003)

HansWorst7 450 19
ADVERTISEMENT
  • #1 21616797
    HansWorst7
    Level 3  
    Hello,

    I need help finalizing my device.

    I have a few CurryCurry Gen5.3 Curtain switches running in my home and for me, it was time to move on from Tuya.

    After a bit of research, I noticed the device has a CB3S chip and a TuyaMCU (Puya PY32F003).

    PCB of CurryCurry device with visible components and CB3S wireless module
    CB3S module on circular PCB with touch buttons and labeled TX/RX points
    Close-up of Puya PY32F003 chip on a green PCB with visible component labels

    Since we have a TuyaMCU, we need to cut the connections of TX and RX between it and the CB3S. I did that and managed to flash OpenBK.
    The only setting the BK7231 Easy UART Flasher was able to read was a baud rate of 9600.

    After finishing, I resoldered everything again, though I did kind of a sloppy job (I'm terrible at soldering)..

    Close-up of a PCB with poorly cut TX/RX traces near a CB3S module and switch labeled S1

    Still, I managed to boot the device and got onto the OpenBK UI.

    In the logs of the web application, I managed to read out the physical buttons of the device, which are connected to the TuyaMCU, using startDriver TuyaMCU.
    For the logging, I ran a basic "Curtains down - Curtains stop - Curtains up" sequence. This is the result of the log:

    
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 04 00 01 02 16 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 1 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 2
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 65 01 00 01 00 75 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 101 type 1-bool len 1
    Info:TuyaMCU:ParseState: byte 0
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 63 7C 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 99
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 62 7B 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 98
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 61 7A 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 97
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 60 79 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 96
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 5F 78 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 95
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 5E 77 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 94
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 5D 76 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 93
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 5C 75 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 92
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 5B 74 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 91
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 5A 73 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 90
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 59 72 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 89
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 58 71 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 88
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 57 70 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 87
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 56 6F 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 86
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 04 00 01 01 15 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 1 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 1
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 65 01 00 01 01 76 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 101 type 1-bool len 1
    Info:TuyaMCU:ParseState: byte 1
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 04 00 01 01 15 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 1 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 1
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 65 01 00 01 01 76 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 101 type 1-bool len 1
    Info:TuyaMCU:ParseState: byte 1
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 04 00 01 00 14 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 1 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 0
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 65 01 00 01 00 75 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 101 type 1-bool len 1
    Info:TuyaMCU:ParseState: byte 0
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 57 70 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 87
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 58 71 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 88
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 59 72 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 89
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 5A 73 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 90
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 5B 74 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 91
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 5C 75 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 92
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 5D 76 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 93
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 5E 77 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 94
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 5F 78 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 95
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 60 79 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 96
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 61 7A 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 97
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 62 7B 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 98
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 63 7C 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 99
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 64 7D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 100
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 04 00 01 01 15 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 1 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 1
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 65 01 00 01 01 76 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 101 type 1-bool len 1
    Info:TuyaMCU:ParseState: byte 1
    
    


    What I can read from that is:
    Quote:
    Info:TuyaMCU:ParseState: id 1 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 2

    dpId 1 is a type 4 - enum and was set to 2. This is most likely the button press for "curtains down", which is on channel 1 and the value that was written is 2.

    Quote:
    Info:TuyaMCU:ParseState: id 1 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 1

    dpId 1 was now set to enum val 1, which should be the "stop" button.

    Quote:
    Info:TuyaMCU:ParseState: id 1 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 0

    dpId 1 was set to val 0 - I would say this means up.

    There are a few other parameters like dpId2 which is most likely the percentage of the position (100 - open, 0 - closed) and another boolean type dpId 101 which I have no idea yet what this is for.

    Anyway, using this information and getting the example from the CurrySmarter Gen6 Curtain switch (https://www.elektroda.com/rtvforum/topic4046987.html#21033819) I tried writing my own autoexec.bat:

    
    PowerSave 1
    
    startDriver TuyaMCU
    tuyaMcu_defWiFiState 4
    
    # Channel 1: Touch buttons (0=Open, 1=Stop, 2=Close)
    setChannelType 1 textfield
    setChannelLabel 1 "Touch buttons (0=Open 1=Stop 2=Close)"
    setChannelVisible 1 false
    linkTuyaMCUOutputToChannel 1 4 1 
    
    startDriver httpButtons
    
    setButtonEnabled 0 1
    setButtonColor 0 "#2596be"
    setButtonLabel 0 "Up/Open"
    setButtonCommand 0 "setChannel 1 0"  # up
    
    setButtonEnabled 1 1
    setButtonColor 1 "#abdbe3"
    setButtonLabel 1 "Stop/Pause"
    setButtonCommand 1 "setChannel 1 1"  # stop
    
    setButtonEnabled 2 1
    setButtonColor 2 "#2596be"
    setButtonLabel 2 "Down/Close"
    setButtonCommand 2 "setChannel 1 2"  # down
    


    Unfortunately, this does not work, no reaction whatsoever from the web UI. I would need help starting here. Any help would be appreciated.
  • ADVERTISEMENT
  • #2 21616821
    p.kaczmarek2
    Moderator Smart Home
    So, with current config, commands like setChannel 1 0, or setChannel 1 2, give no reaction from device?

    Hmm, are you sure that this enumeration you're using, dpID 1, is writeable? Your approach will not work if this dpID is read only, i.e. it's used only by TuyaMCU to report the state to the cloud, and NOT to control the state from the cloud.

    Maybe you should try writing some of the other dpIDs.

    Apart from that, your setup looks more or less okay... your baud setting and connection to MCU is okay, since you managed to received data. So no error here.

    Interesting issue, I must admit. Would you be able to share your Tuya config partition, as downloaded from Web App?

    @divadiow may also look here
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #5 21616846
    divadiow
    Level 35  
    Code: JSON
    Log in, to see the code
  • #6 21616851
    p.kaczmarek2
    Moderator Smart Home
    Well it says RW...

    Screenshot of JSON structure showing accessMode set to rw

    Ok maybe, just for a test, you can check if you can control backlight?
    
    
        {
          "abilityId": 7,
          "accessMode": "rw",
          "code": "switch_backlight",
          "name": "背光开关 (Backlight Switch)",
          "desc": "",
          "desc_en": "",
          "typeSpec": {
            "type": "bool"
          }
        },
    
    Helpful post? Buy me a coffee.
  • #7 21618254
    HansWorst7
    Level 3  
    I have tried doing this but also to no avail.

    I noticed something strange though. I set the logs to ExtraDebug and get the heartbeat_valid = 0 string
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    


    I can however receive data from tuyaMcu to CB3S, so the baud rate should be correct if I'm not wrong. Is it possible that it is the soldering after all?
    If I have more time on my hands, I could try to resolder everything properly.
  • #8 21618258
    p.kaczmarek2
    Moderator Smart Home
    Try running tuyaMcu_sendQueryState command in commandline to ask TuyaMCU for current state and check if you are getting replies
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #9 21618262
    HansWorst7
    Level 3  
    >>21618258

    
    Debug:API:POST to api/cmnd
    Debug:CMD:cmd [tuyaMcu_sendQueryState ]
    Info:CMD:[WebApp Cmd 'tuyaMcu_sendQueryState ' Result] OK
    


    This is all I get.
  • #10 21618265
    p.kaczmarek2
    Moderator Smart Home
    You should get lots of new dpID updates after executing that. dpIDs, types and their current values.
    Helpful post? Buy me a coffee.
  • #11 21618269
    HansWorst7
    Level 3  
    >>21618265

    Thank you for your help. I think CB3S TX -> TuyaMCU RX may have a cold solder joint. I will redo it properly and report back.
  • #12 21618273
    p.kaczmarek2
    Moderator Smart Home
    It seems likely now, please check this contact. Check continunity with a multimeter.
    Helpful post? Buy me a coffee.
  • #13 21618584
    PSlowik
    Level 12  
    I have similar roller shutter controllers, do you know how to set the pin settings? and is it possible to adjust the operating time?
  • #14 21618591
    p.kaczmarek2
    Moderator Smart Home
    This is a device from TuyaMCU. Here you do not set the pins. You only have to write autoexec.bat to make the variables from the MCU available on the OBK panel and beyond.
    Helpful post? Buy me a coffee.
  • #16 21618618
    HansWorst7
    Level 3  
    Yes, it was indeed the soldering. I did a quick fix for that and now the backlight controls work like a charm! I will write a short summary once I'm done with the full setup (most likely tomorrow).
    The only other thing that's left for me to figure out is why the "Curtains Up" LED keeps blinking.
  • #17 21618625
    p.kaczmarek2
    Moderator Smart Home
    The pairing LED may be blinking if you don't force WiFi state 0x04 (connected to internet and to the cloud).

    Do you need any special channel types or enumerations for your device? I can help with adding new things to OBK.
    Helpful post? Buy me a coffee.
  • #18 21619115
    HansWorst7
    Level 3  
    Thanks, setting wifistate was the correct way to solve this.

    I have yet 2 other strange issues on hand.

    For one, I can only set dpID 1 to 0 (up), OBK doesn't do anything when I try to set it to 1 or 2 (pause and down).

    So, using setChannel 1 2 or setChannel 1 1 does not provide any output from TuyaMCU.
    Using setChannel 1 0 always gives me the correct output:
    
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 1 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 0
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 04 00 01 01 15 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 1 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 1
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 65 01 00 01 01 76 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 101 type 1-bool len 1
    Info:TuyaMCU:ParseState: byte 1
    


    As I said, using setChannel 1 1 or setChannel 1 2 does not provide any output (and doesn't do anything to the curtain).
    Using the percentage control with channel 2 does also work.

    Then, the communication seems a bit flaky overall. Sometimes I have to use setChannel 3 or 4 times before the curtains start. I'm not sure if there is an internal signal on TuyaMCU that blocks communication for a while after getting a command. Maybe someone here knows more about these issues.

    EDIT: Today I did some new tests.

    - Percentage values only work with <1 for close and any other value for open. Integers do not work (e.g. setChannel 2 80). I have no idea how to use this properly because I would think you just give it the integer value from 0 to 100 which will translate into a percentage value.
    
    {
          "abilityId": 2,
          "accessMode": "rw",
          "code": "percent_control",
          "name": "一路百分比控制 (Curtain Channel 1 Percent Control)",
          "desc": "",
          "desc_en": "",
          "typeSpec": {
            "type": "value",
            "max": 100,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "%"
          }
        },
    


    - Opening and closing the curtains now works fine with setChannel 1 0 and setChannel 1 2. Stopping midway is done using setChannel 101 1. I now used "toggle" but there has to be a better channeltype for this (like, firing the stop button). Until then I will probably use the textfield and just always set it to 1 when used.
  • #19 21657634
    mvz0209
    Level 5  
    Hello! I have a tuya electric curtain with the following motors:

    WiFi curtain motor with Tuya-branded box on a workstation table


    I used to use esphome firmware, and with it, these motors work in home assistant. But I want to flash it in openbeken. Inside is a WBR3 chip. I desoldered it and soldered a CB3S. Now I get the opening percentage and can close and pause with the buttons, but the opening doesn't work for me. I am aware of the tuya msu commands

    TUYA curtain control code in curtain1.h file on a laptop screen

    deciphered


    Screenshot of a Tuya packet decoder program with visible HEX data and analysis.

    Added after 1 [minutes]:

    // Start NTP Driver
    startDriver NTP
    // Set NTP Server
    ntp_setServer 194.190.168.1
    // Set timezone
    ntp_timeZoneOfs  7:00
    startDriver TuyaMCU
    
    tuyaMcu_defWiFiState 4
    
    setChannelType 1 TextField
    setChannelLabel 1 "Touch buttons (0=Open 1=Stop 2=Close)"
    setChannelVisible 1 true
    
    
    setChannelType 2 ReadOnly
    setChannelLabel 2 "Procent otkr"
    
    
    setChannelType 3 Percent
    setChannelLabel 3 "zadanie"
    
    setChannelType 4 ReadOnly
    
    linkTuyaMCUOutputToChannel 1 enum 1
    
    
    linkTuyaMCUOutputToChannel 3 val 2
    linkTuyaMCUOutputToChannel 2 val 3
    
    
    //55aa 00 06 00 05 01 04 000 100
    
    startDriver httpButtons
    
    setButtonEnabled 0 1
    
    
    setButtonColor 0 "#2596be"
    
    setButtonLabel 0 "Up/Open"
    
    setButtonCommand 0 "setChannel 1 0"  # up
    
    setButtonEnabled 1 1
    setButtonColor 1 "#abdbe3"
    setButtonLabel 1 "Stop/Pause"
    setButtonCommand 1 "setChannel 1 1"  # stop
    
    setButtonEnabled 2 1
    setButtonColor 2 "#2596be"
    setButtonLabel 2 "Down/Close"
    setButtonCommand 2 "setChannel 1 2"  # down
  • #20 21658799
    mvz0209
    Level 5  
    Success, sending to UART, added checksum
    addEventHandler OnChannelChange 4 uartSendHex 55AA00060005010400010010 # up
    addEventHandler OnChannelChange 5 uartSendHex 55AA00060005010400010111 # stop
    addEventHandler OnChannelChange 6 uartSendHex 55AA00060005010400010212 # down

Topic summary

The discussion focuses on integrating OpenBK firmware on CurryCurry Gen5.3 curtain switches equipped with a CB3S chip and a TuyaMCU (Puya PY32F003). The user disconnected the TX and RX lines between the TuyaMCU and CB3S to flash OpenBK, successfully establishing communication at 9600 baud. However, commands targeting dpID 1 (curtain control) showed no effect, raising the possibility that dpID 1 is read-only and used solely for state reporting by the TuyaMCU. The shared Tuya configuration JSON reveals multiple properties with read-write access, including curtain control (enum: open, continue, close), percent control (0-100%), calibration, and backlight switch (boolean). Testing control commands on other dpIDs, such as the backlight switch (abilityId 7), is suggested to verify write capabilities. The setup and baud rate appear correct, but further manual debugging of dpIDs is recommended to achieve full device control under OpenBK.
Summary generated by the language model.
ADVERTISEMENT