logo elektroda
logo elektroda
X
logo elektroda

New firmware for WT5 Multi-Channel LED controller with RF - TuyaMCU?

Kinsi55 7506 106
ADVERTISEMENT
  • #31 20715683
    p.kaczmarek2
    Moderator Smart Home
    I don't think you can say that those chips are 5V-tolerant. While there indeed may be present the clamping protection diodes at the IO pins, it doesn't justify saying that those are 5V tolerant. Going against manufacturer specs is always a risk, it may work at first, but the real question is, would it work reliably and in a long term?

    If you only need to read from 5V logic, maybe a simple resistor divider could help.

    Ok, let's try with that driver. Can I help you with it somehow? Please open a pull request so you can use online builds, they are very handy if you don't want to setup toolchain on your machine.

    Added after 9 [hours] 58 [minutes]:

    UPDATE: I had some time so I've added a teardowns list entry for this device:
    https://github.com/OpenBekenIOT/webapp/commit/e847d083b41f853f40eca1dc0493e5cb7883ba42
    It will now appear on our guides list:
    https://openbekeniot.github.io/webapp/devicesList.html
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #32 20716947
    Kinsi55
    Level 4  

    I checked the datasheet of the RF chip, and according to the datasheet, it also isn't 5V tolerant. So, as expected, when I just add a resistor to divide down the voltage on MOSI, it still functions fine. So, I guess that's the way forward.

    I think I should be able to build something that works myself. It almost certainly won't be something shippable, but at least give you a reference :D If I get stuck, I will let you know. Thanks for all the help!
  • ADVERTISEMENT
  • #33 20717055
    p.kaczmarek2
    Moderator Smart Home
    My first idea would be to trigger an interrupt on the given rising/falling edge:
    Code: C / C++
    Log in, to see the code

    and then check the logical bit value on data:
    Code: C / C++
    Log in, to see the code

    However, I am starting to think that it may be better to use hardware SPI, because Beken is using some kind of flash caching and there may be some extra delay interfering with stuff. I had that issue with WS2812B driver (or similar), where I tried to get very precise timing down to single instruction cycles and it turned out to be impossible without ramfunc.... or maybe you don't need that precise timing, it depends.
    Helpful post? Buy me a coffee.
  • #34 20717950
    electroda2
    Level 2  

    I arrived here from a Google search. I have the newer version of this from AliExpress called the WB5. I can't find anything on this site for it. I have flashed the WB5 with the latest OpenBK7231N firmware today but I don't quite know how to configure it.

    Here are the resources I've found so far:

    https://templates.blakadder.com/WB5.html

    Should I make a new thread?
  • #35 20717986
    p.kaczmarek2
    Moderator Smart Home
    Please open a new thread, put device name in the title, along with chip name/module. Provide some basic information about the module, some photos, some screenshots from the seller page, and we will do our best to guide you step by step with the flashing and integration process.
    Helpful post? Buy me a coffee.
  • #36 20784330
    atomphil
    Level 10  
    p.kaczmarek2 wrote:
    UPDATE: I had some time so I've added a teardowns list entry for this device:
    https://github.com/OpenBekenIOT/webapp/commit/e847d083b41f853f40eca1dc0493e5cb7883ba42It will now appear on our guides list:
    https://openbekeniot.github.io/webapp/devicesList.html


    I think the true manufacturer of the device is Skydance (https://www.iskydance.com).

    Product page for WT5
  • #37 20784706
    p.kaczmarek2
    Moderator Smart Home
    That's a very useful information indeed. Let me post here some screenshots:
    Shown is a wireless LED controller Skydance 5CH*3A 12-24V Wi-Fi and RF 5 in 1 CV WT5.
    Diagram and specifications for the WiFi and RF LED controller WT5.
    The illustration shows a Skydance 2.4G RF controller with three control options: mobile app, handheld remote, and panel controller.
    I like how detailed their specs are. Even the PWM frequency is listed. They also have reverse polarity protection.
    Helpful post? Buy me a coffee.
  • #38 20785808
    atomphil
    Level 10  
    I have now managed to flash one of my WT5s with OBK. Unfortunately, I can't get any further now.

    I have managed it :-) My autoexec.bat for the moment looks like this:

    startDriver TuyaMCU
    startDriver SSDP
    PowerSave 1
    
    tuyaMcu_setBaudRate 115200
    tuyaMcu_defWiFiState 4
    tuyaMcu_setupLED 24 0
  • ADVERTISEMENT
  • #39 20838189
    mashgsm
    Level 15  
    Hello,

    I have the same drivers and I can't connect to them. I had no problems with other devices. RX-TX TX-RX connected, separate 3.3V power supply and BK7231 Easy Uart Flasher program. I cut off the connection to the transistor from TX to be sure (user @Kinsi55 drew this connection), the RX pin seems not to be connected anywhere. Shorting CEN to mass does not help either. Power is supplied, the converter is operational. Photo of the device, marking on the housing WT5, WB3S chip inside.

    Image of a device labeled WT5 with an internal WB3S chip.
  • #40 20838429
    p.kaczmarek2
    Moderator Smart Home
    Good job, @atomphil ! It's nice to hear that OBK works well on TuyaMCU RGBCW (it's RGBCW, yes?) devices as well.

    Btw do you know that you can add a custom button to WiFi module GPIO to control LEDs and it will work even with TuyaMCU LED driver? Just set a proper GPIO role and it will work, no pull up resistor needed, BK7231 has internall pullups that are enabled in our code.
    Helpful post? Buy me a coffee.
  • #41 20841382
    mashgsm
    Level 15  
    Hello,

    Successfully programmed. It turned out that I had damaged the programmer when connecting it (initially I had connected RX and TX incorrectly). For programming, I used the ESP8266 Nodemcu board with connected EN-G pins - a lifesaver if someone did not have a separate programmer but had a free ESP board. We then use the RX and TX pins and the ESP system is turned off. Script by @atomphil loaded and successful.

    User interface for controlling an LED strip with options for adjusting brightness, RGB color, and temperature. Graphical user interface with a section for script file editing.
  • #42 20841440
    p.kaczmarek2
    Moderator Smart Home
    @mashgsm I'm glad everything works. If you have any questions, write.
    PS: You can also use Arduino for programming in a similar way.
    Helpful post? Buy me a coffee.
  • #43 20869760
    atomphil
    Level 10  

    Two things do not work in the daily operation of my WT5 with OpenBeken:

    Firstly, if I change the settings via the RF remote control, the new values are not adopted by the BK7231T. They are therefore not displayed in the web interface or in HA.

    The second, far more annoying, is the behavior at startup. I switch the controller (and power supply unit) via a light switch, so it is not powered when it is not in use. When the light is switched on, the controller starts up correctly with the last setting before it was switched off (regardless of how it was set).
    After a few seconds, the boot process of the BK7231T seems to be completed and it overwrites the correct values. Depending on how the flag 12 is set, the light will then always be 100% brightness cold white (terrible!) or one of the last values set via the web interface or HA, but not via RF. Saving the last values via the web interface or HA is also not always consistent.

    Two things would be very nice for usable operation:

    Firstly, very important: The module should ideally not send any settings to the Tuya MCU at startup, as the Tuya MCU already displays the last values correctly. It should therefore only send something when changes are made via the web interface, CLI or HA.

    Secondly: It would be nice if the values of the TuyaMCU were mirrored back to the BK7231T after starting or after changes via RF.
  • ADVERTISEMENT
  • #44 20869781
    DeDaMrAz
    Level 19  
    atomphil wrote:
    ...

    Secondly: It would be nice if the values of the TuyaMCU were mirrored back to the BK7231T after starting or after changes via RF.


    I can only answer the second part because I tested it on a physical device, there is no communication between RF part and WiFI portion, so whatever you set via RF will not be reflected back to the original TuyaAPP hence not to OBK.

    The first part is a bit tricky as I haven't test such scenario (completely powering off the device) as the WiFi part has a bootup (5-10 seconds depending on the settings) time. But there is a certain retain values setting that you can use for TuyaMCU but I am not sure if that particular TuyaMCU has that.

    See this post for more clarification on the matter - https://www.elektroda.com/rtvforum/topic4003825.html#20743842

    EDIT: also search here for tuyaMCU and familiarize with the commands that may help you setup the device in your desired configuration - https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
  • #45 20869827
    atomphil
    Level 10  

    For the first part, everything would be fine if there was an option for the Wi-Fi part to simply not send anything at startup. Because without this communication, it works. The Tuya MCU sets the correct settings at the start but is then unfortunately overwritten.

    You can test this by pre-setting any light setting and then interrupting the communication between the BK7231T and Tuya MCU (e.g. by changing the OBK settings).
  • #46 20869884
    p.kaczmarek2
    Moderator Smart Home
    atomphil wrote:

    Secondly: It would be nice if the values of the TuyaMCU were mirrored back to the BK7231T after starting or after changes via RF.

    Please check what happens in the Web App Log when you change settings via RF. Are any dpIDs sent? If so, how do they look like? Please provide comprehensive information dump, which dpIDs are send for which settings, and what is your autoexec.bat. I think I can help with that, I can parse those dpIDs if they are really sent.
    Helpful post? Buy me a coffee.
  • #47 20870344
    atomphil
    Level 10  
    My autoexec.bat is still the one I published in post 38:

    
    startDriver TuyaMCU
    startDriver SSDP
    PowerSave 1
    
    tuyaMcu_setBaudRate 115200
    tuyaMcu_defWiFiState 4
    tuyaMcu_setupLED 24 0
    



    Unfortunately, only some of the inputs made via RF remote control can be found in the weblog. I have set it to log level debug and checked feature TuyaMCU.

    log of on/off (dpId 20):
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 14 01 00 01 01 25 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 20, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 1
    Info:TuyaMCU:Color is sent as 00DF03AC00AA
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 20 with value 1 is not mapped
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 14 01 00 01 01 25 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 20, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 1
    Info:TuyaMCU:Color is sent as 00DF03AC00AA
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 20 with value 1 is not mapped
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 10 18 03 00 0C 30 30 44 46 30 33 41 43 30 30 41 41 F3 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 23 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 24, dataType 3-DP_TYPE_STRING and 12 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 10 18 03 00 0C 30 30 44 46 30 33 41 43 30 30 41 41 F3 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 23 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 24, dataType 3-DP_TYPE_STRING and 12 data bytes
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 1988, idle 56648/s, free 77640, MQTT 0(124), bWifi 1, secondsWithNoPing 1909, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1989, idle 70553/s, free 77640, MQTT 0(124), bWifi 1, secondsWithNoPing 1910, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 1990, idle 71418/s, free 77640, MQTT 0(124), bWifi 1, secondsWithNoPing 1911, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1991, idle 68112/s, free 77640, MQTT 0(124), bWifi 1, secondsWithNoPing 1912, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 14 01 00 01 00 24 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 20, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 0
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 20 with value 0 is not mapped
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 14 01 00 01 00 24 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 20, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 0
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 20 with value 0 is not mapped



    log of brightness change (dpId 22):
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 16 02 00 04 00 00 00 00 2D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 22, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 22 with value 0 is not mapped
    Info:MAIN:Time 923, idle 60259/s, free 77648, MQTT 0(57), bWifi 1, secondsWithNoPing 844, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 16 02 00 04 00 00 00 00 2D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 22, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 22 with value 0 is not mapped
    Info:MAIN:Time 924, idle 70340/s, free 77648, MQTT 0(57), bWifi 1, secondsWithNoPing 845, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 16 02 00 04 00 00 00 00 2D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 22, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 22 with value 0 is not mapped
    Info:MAIN:Time 925, idle 64556/s, free 77648, MQTT 0(57), bWifi 1, secondsWithNoPing 846, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 16 02 00 04 00 00 00 00 2D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 22, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 22 with value 0 is not mapped
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 16 02 00 04 00 00 00 00 2D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 22, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 22 with value 0 is not mapped
    Info:MAIN:Time 926, idle 65327/s, free 77648, MQTT 0(57), bWifi 1, secondsWithNoPing 847, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 16 02 00 04 00 00 00 00 2D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 22, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 22 with value 0 is not mapped
    Info:MAIN:Time 927, idle 61702/s, free 77648, MQTT 0(57), bWifi 1, secondsWithNoPing 848, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 16 02 00 04 00 00 00 00 2D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 22, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 22 with value 0 is not mapped
    Info:MAIN:Time 928, idle 67997/s, free 77432, MQTT 0(57), bWifi 1, secondsWithNoPing 849, socks 5/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 16 02 00 04 00 00 00 00 2D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 22, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0


    log of CCT change (dpId 23):
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 17 02 00 04 00 00 00 00 2E 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 23, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 23 with value 0 is not mapped
    Info:MAIN:Time 1571, idle 143017/s, free 77640, MQTT 0(97), bWifi 1, secondsWithNoPing 1492, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 1572, idle 71776/s, free 77640, MQTT 0(98), bWifi 1, secondsWithNoPing 1493, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 17 02 00 04 00 00 00 61 8F 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 23, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 97
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 23 with value 97 is not mapped
    Info:MAIN:Time 1573, idle 70552/s, free 69032, MQTT 0(98), bWifi 1, secondsWithNoPing 1494, socks 5/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 17 02 00 04 00 00 00 C3 F1 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 23, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 195
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 23 with value 195 is not mapped
    Info:MAIN:Time 1574, idle 69903/s, free 77640, MQTT 0(98), bWifi 1, secondsWithNoPing 1495, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 17 02 00 04 00 00 01 24 53 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 23, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 292
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 23 with value 292 is not mapped
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 17 02 00 04 00 00 01 86 B5 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 23, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 390
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 23 with value 390 is not mapped
    Info:MAIN:Time 1575, idle 70886/s, free 77640, MQTT 0(98), bWifi 1, secondsWithNoPing 1496, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 17 02 00 04 00 00 01 E8 17 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 23, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 488
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 23 with value 488 is not mapped
    Info:MAIN:Time 1576, idle 72449/s, free 77640, MQTT 0(98), bWifi 1, secondsWithNoPing 1497, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 17 02 00 04 00 00 02 49 79 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 23, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 585
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 23 with value 585 is not mapped
    Info:MAIN:Time 1577, idle 69982/s, free 77640, MQTT 0(98), bWifi 1, secondsWithNoPing 1498, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 17 02 00 04 00 00 02 AB DB 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 23, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 683
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 23 with value 683 is not mapped
    Info:MAIN:Time 1578, idle 70875/s, free 77640, MQTT 0(98), bWifi 1, secondsWithNoPing 1499, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 17 02 00 04 00 00 03 0D 3E 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 23, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 781
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 23 with value 781 is not mapped
    Info:MAIN:Time 1579, idle 71079/s, free 77640, MQTT 0(98), bWifi 1, secondsWithNoPing 1500, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 03 00 00 05 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 3 (WiFiState) with 7 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 17 02 00 04 00 00 03 6E 9F 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 23, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 878
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 23 with value 878 is not mapped
    Info:MAIN:Time 1580, idle 143117/s, free 77640, MQTT 0(98), bWifi 1, secondsWithNoPing 1501, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1581, idle 70554/s, free 77640, MQTT 0(98), bWifi 1, secondsWithNoPing 1502, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 17 02 00 04 00 00 03 E8 19 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 23, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 1000
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 23 with value 1000 is not mapped


    Log of (soft)OFF via the big on/off-button on the remote:
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 14 01 00 01 00 24 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 20, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 14 01 00 01 00 24 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 20, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 0
    Info:CFG:####### Flash Save LED #######


    Log of (soft)ON via the big on/off-button on the remote:
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 14 01 00 01 01 25 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 20, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 1
    Info:TuyaMCU:Color is sent as 00DF03AC00AA
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 14 01 00 01 01 25 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 20, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 1
    Info:TuyaMCU:Color is sent as 00DF03AC00AA
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 10 18 03 00 0C 30 30 44 46 30 33 41 43 30 30 41 41 F3 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 23 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 24, dataType 3-DP_TYPE_STRING and 12 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 10 18 03 00 0C 30 30 44 46 30 33 41 43 30 30 41 41 F3 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 23 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 24, dataType 3-DP_TYPE_STRING and 12 data bytes
    Info:CFG:####### Flash Save LED #######



    In the log of RGB change I can´t see anything:
    
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 1892, idle 72805/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1813, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1893, idle 71688/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1814, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 1894, idle 73461/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1815, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 03 00 00 05 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 3 (WiFiState) with 7 bytes
    Info:MAIN:Time 1895, idle 74458/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1816, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1896, idle 72171/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1817, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1897, idle 79883/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1818, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 1898, idle 72700/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1819, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1899, idle 71955/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1820, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1900, idle 73651/s, free 77432, MQTT 0(118), bWifi 1, secondsWithNoPing 1821, socks 5/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1901, idle 71674/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1822, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 1902, idle 74300/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1823, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1903, idle 83305/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1824, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1904, idle 71323/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1825, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1905, idle 60630/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1826, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 1906, idle 58462/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1827, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 1907, idle 73793/s, free 77640, MQTT 0(118), bWifi 1, secondsWithNoPing 1828, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 1908, idle 74978/s, free 77640, MQTT 0(119), bWifi 1, secondsWithNoPing 1829, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    


    Selecting or changing scenes via RF remote control is also not shown in the log.

    Is there an easy way to monitor the communication between BK and TuyaMCU before the WLAN connection is established? Perhaps something interesting is sent by the TuyaMCU at startup.

    But all this is only what would be nice.
    Firstly, it would help a lot if the WLAN module did not overwrite the TuyaMCU's start values after startup.
  • #48 20870701
    p.kaczmarek2
    Moderator Smart Home
    Which of those dpIDs are not received correctly by OBK?

    atomphil wrote:

    Is there an easy way to monitor the communication between BK and TuyaMCU before the WLAN connection is established? Perhaps something interesting is sent by the TuyaMCU at startup.

    Well, there is one method. Select quick connect flag in OBK flags, then go to the web app, then, on obk native panel, click "reboot", clear Web App log but keep it open, and after up to 5-10 seconds, when OBK reconnects, you should get whole log (since reboot) in the web App anyway. This is because OBK firmware has a buffer of a certain size that can store the log for some time and it will send it to the App once it reaches WiFi
    Helpful post? Buy me a coffee.
  • #49 20872464
    atomphil
    Level 10  
    The method only returns the log from wifi connect. Here is the log when the entire controller is started by switching the supply voltage:
    sChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Time 7, idle 37723/s, free 78792, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Info:MAIN:Time 8, idle 102740/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 9, idle 64186/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 10, idle 64379/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 0, softap: 0, b/g/n
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 11, idle 62636/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 12, idle 64201/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 13, idle 63286/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 14, idle 62124/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 15, idle 64146/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 16, idle 63277/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_AUTH_FAILED - 3
    Info:MAIN:Time 17, idle 82675/s, free 80008, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 18, idle 200682/s, free 80008, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 19, idle 120067/s, free 79424, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 20, idle 74734/s, free 80480, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:GEN:dhcp=0 ip=192.168.XXX.XXX gate=192.168.XXX.XXX  mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-62,ssid=XXXXX,bssid=XX:XX:XX:XX:XX:XX,channel=9,cipher_type:CCMP
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 21, idle 59496/s, free 80520, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 22, idle 60328/s, free 80520, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 23, idle 62473/s, free 80520, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:HTTP:DRV_SSDP_Shutdown
    Info:MAIN:Drv SSDP stopped.
    Info:HTTP:DRV_SSDP_Init
    Info:HTTP:DRV_SSDP_CreateSocket_Receive: Socket created, waiting for packets
    Info:MAIN:Started SSDP.
    Info:MAIN:Time 24, idle 60583/s, free 80176, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 25, idle 57229/s, free 79296, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 26, idle 64980/s, free 78048, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 27, idle 67344/s, free 78048, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 28, idle 62934/s, free 78048, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 29, idle 60859/s, free 66352, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 5/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 30, idle 124144/s, free 66352, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 5/38 POWERSAVE
    Info:GEN:dhcp=0 ip=192.168.XXX.XXX gate=192.168.XXX.XXX  mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-62,ssid=XXXXX,bssid=XX:XX:XX:XX:XX:XX,channel=9,cipher_type:CCMP
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 31, idle 61339/s, free 66352, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 5/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 32, idle 61113/s, free 66352, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 5/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 33, idle 63401/s, free 66352, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 5/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 34, idle 61934/s, free 66352, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 5/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 35, idle 61503/s, free 66136, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 6/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet

    And here after rebooting the wifi module via web interface:
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 164, idle 77949/s, free 77736, MQTT 0(10), bWifi 1, secondsWithNoPing 85, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Module reboot in 2...
    Info:MAIN:Time 165, idle 71018/s, free 77736, MQTT 0(10), bWifi 1, secondsWithNoPing 86, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Module reboot in 1...
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    tes
    Info:MAIN:Time 5, idle 0/s, free 80336, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 6, idle 0/s, free 80336, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 03 00 00 05 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 3 (WiFiState) with 7 bytes
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Time 7, idle 39398/s, free 78792, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Info:MAIN:Time 8, idle 100227/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 9, idle 60567/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 10, idle 61630/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 0, softap: 0, b/g/n
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 11, idle 60723/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 12, idle 60501/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 13, idle 60512/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 14, idle 61522/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 15, idle 60562/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 16, idle 60461/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_AUTH_FAILED - 3
    Info:MAIN:Time 17, idle 81411/s, free 80008, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 18, idle 116881/s, free 80008, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 19, idle 116473/s, free 79424, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 20, idle 74332/s, free 80496, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:GEN:dhcp=0 ip=192.168.XXX.XXX gate=192.168.XXX.XXX mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-62,ssid=XXXXX,bssid=XX:XX:XX:XX:XX:XX,channel=9,cipher_type:CCMP
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 21, idle 66321/s, free 80536, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 22, idle 62674/s, free 80536, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 23, idle 58799/s, free 80536, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:HTTP:DRV_SSDP_Shutdown
    Info:MAIN:Drv SSDP stopped.
    Info:HTTP:DRV_SSDP_Init
    Info:HTTP:DRV_SSDP_CreateSocket_Receive: Socket created, waiting for packets
    Info:MAIN:Started SSDP.
    Info:MAIN:Time 24, idle 60204/s, free 71568, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 5/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 25, idle 59277/s, free 79664, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 26, idle 59511/s, free 79664, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 27, idle 57433/s, free 79448, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 5/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 28, idle 60769/s, free 79664, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 29, idle 61657/s, free 79664, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 30, idle 53578/s, free 79664, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:GEN:dhcp=0 ip=192.168.XXX.XXX gate=192.168.XXX.XXX mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-62,ssid=XXXXX,bssid=XX:XX:XX:XX:XX:XX,channel=9,cipher_type:CCMP
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 31, idle 58526/s, free 79664, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 32, idle 61872/s, free 79664, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 33, idle 58282/s, free 79664, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 34, idle 62506/s, free 79664, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 35, idle 64662/s, free 79664, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 36, idle 70079/s, free 79664, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:MAIN:Time 37, idle 72181/s, free 79664, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 38, idle 67294/s, free 79664, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
    Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
    


    In both cases, the wifi module has already overwritten the correct values of the TuyaMCU before the log starts.

    Once again. It would be very very very helpful if the Wifi module would send NOTHING to the Tuya MCU at startup. It is not necessary and is even counterproductive in the current state.
  • #50 20872838
    p.kaczmarek2
    Moderator Smart Home
    I don't know what WiFi module is sending to your TuyaMCU at startup. Maybe we should check what is being send first, and then try to fix the issue.

    If your logs are not complete due to the very early boot, then there is one very simple solution.
    Modify your autoexec.bat to contain:
    
    delay_s 20
    startDriver TuyaMCU
    [your remaining autoexec.bat here]
    

    This will add artificial 20 seconds delay after reboot and before TuyaMCU start.

    Alternatively, you could connect USB to UART converter and capture the data sent.
    Helpful post? Buy me a coffee.
  • #51 20873136
    atomphil
    Level 10  
    Okay, I have tried the following:

    I have disabled all MQTT and HA stuff and used the following autoexec.bat:

    delay_s 20
    startDriver TuyaMCU
    
    //startDriver SSDP
    tuyaMcu_defWiFiState 4
    tuyaMcu_setBaudRate 115200
    //PowerSave 1
    
    tuyaMcu_setupLED 24 0
    
    //Set blue after 15s for testing
    delay_s 15
    tuyaMCU_sendColor 24 0 0 1 1


    I then set the light to red via the web interface and switched it on and off to save the value in the EEPROM. I then set the light to warm white via RF remote and switched off the controller using the mains switch.

    After deleting the log, I switched the controller on again using the mains switch. The light immediately came on in the right colour (warm white). After a while it changed to red (which the WLAN module had saved as the last colour) and after a further 15 seconds to my test command blue.

    I have recorded the following log:

    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 1278 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 19 changes count.
    Error:CMD:no file early.bat err -2
    Info:GEN:PIN_SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    Info:MAIN:Main_Init_Delay
    Info:MAIN:Main_Init_Delay done
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:ssid:XXXXX key:XXXXX
    Info:MAIN:Using SSID [XXXXX]
    Info:MAIN:Using Pass [XXXXX]
    Info:MQTT:MQTT_RegisterCallback called for bT Bad_LED/ subT Bad_LED/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens/ subT bekens/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/Bad_LED/ subT cmnd/Bad_LED/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens/ subT cmnd/bekens/+
    Info:MQTT:MQTT_RegisterCallback called for bT Bad_LED/ subT Bad_LED/+/get
    Info:CMD:CMD TCP server started!
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Time 1, idle 248248/s, free 82088, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 2, idle 248886/s, free 81504, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 3, idle 96176/s, free 81584, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 4, idle 0/s, free 81584, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Time 5, idle 157589/s, free 80048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Info:MAIN:Time 6, idle 246662/s, free 81936, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 7, idle 246059/s, free 81936, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 8, idle 250053/s, free 81936, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 9, idle 250014/s, free 81936, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 10, idle 253671/s, free 81936, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 0, softap: 0, b/g/n
    Info:MAIN:Time 11, idle 248309/s, free 81936, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 12, idle 249894/s, free 81936, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 13, idle 251674/s, free 81936, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 14, idle 249901/s, free 81936, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_AUTH_FAILED - 3
    Info:MAIN:Time 15, idle 250189/s, free 81264, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 16, idle 499812/s, free 80680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Time 17, idle 253976/s, free 81760, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 18, idle 244285/s, free 81792, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 19, idle 247070/s, free 81832, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    4/s, free 81832, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:GEN:dhcp=0 ip=192.168.XXX.XXX gate=192.168.XXX.XXX mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-66,ssid=XXXXX,bssid=XX:XX:XX:XX:XX:XX,channel=9,cipher_type:CCMP
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Time 21, idle 249330/s, free 80920, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 00 03 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 22, idle 254550/s, free 80920, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 01 00 2A 7B 22 70 22 3A 22 65 6C 78 38 31 69 65 67 6A 6E 34 72 79 6E 72 33 22 2C 22 76 22 3A 22 31 2E 30 2E 30 22 2C 22 6D 22 3A 30 7D E0 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 1 (QueryProductInformation) with 49 bytes
    Info:TuyaMCU:TuyaMCU_ParseQueryProductInformation: received {"p":"elx81iegjn4rynr3","v":"1.0.0","m":0}
    Info:MAIN:Time 23, idle 242510/s, free 80920, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 02 00 00 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 2 (MCUconf) with 7 bytes
    Info:TuyaMCU:TuyaMCU_ProcessIncoming: TUYA_CMD_MCU_CONF, TODO!
    Info:MAIN:Time 24, idle 489190/s, free 80920, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 14 01 00 01 01 25 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 20, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 1
    Info:TuyaMCU:Color is sent as 000003E800B4
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 15 04 00 01 00 28 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 21, dataType 4-DP_TYPE_ENUM and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 16 02 00 04 00 00 03 40 70 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 22, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 832
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 17 02 00 04 00 00 00 00 2E 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 23, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 1A 02 00 04 00 00 00 00 31 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 26, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 14 01 00 01 01 25 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 20, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 1
    Info:TuyaMCU:Color is sent as 000003E800B4
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 10 18 03 00 0C 30 30 30 30 30 33 45 38 30 30 42 34 B6 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 23 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 24, dataType 3-DP_TYPE_STRING and 12 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 10 18 03 00 0C 30 30 30 30 30 33 45 38 30 30 42 34 B6 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 23 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 24, dataType 3-DP_TYPE_STRING and 12 data bytes
    Info:MAIN:Time 25, idle 190548/s, free 80744, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 26, idle 259141/s, free 80744, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 03 00 00 05 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 3 (WiFiState) with 7 bytes
    Info:MAIN:Time 27, idle 256671/s, free 80744, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 28, idle 259263/s, free 80744, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 29, idle 258234/s, free 80744, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 30, idle 252456/s, free 80744, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:GEN:dhcp=0 ip=192.168.XXX.XXX gate=192.168.XXX.XXX mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-65,ssid=XXXXX,bssid=XX:XX:XX:XX:XX:XX,channel=9,cipher_type:CCMP
    Info:MAIN:Time 31, idle 507643/s, free 80744, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 32, idle 258705/s, free 80744, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 33, idle 259906/s, free 80744, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 34, idle 259864/s, free 80744, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 35, idle 256538/s, free 80744, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:TuyaMCU:Color is sent as 00f003e803e8
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 10 18 03 00 0C 30 30 66 30 30 33 65 38 30 33 65 38 36 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 23 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 24, dataType 3-DP_TYPE_STRING and 12 data bytes
    Info:MAIN:Time 36, idle 251465/s, free 80744, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 37, idle 257569/s, free 80528, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 4/38 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MAIN:Time 38, idle 256247/s, free 80744, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 39, idle 252111/s, free 80744, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    


    These two "Info:TuyaMCU:Colour is sent as 000003E800B4" commands are the troublemakers. It would be good if they were not sent.

    When switching on the controller, the TuyaMCU starts without delay with the last set values (regardless of whether these came from the RF or the Wifi module), it makes no sense in any constellation for the Wifi module to set these again after it has started.
  • #52 20873173
    DeDaMrAz
    Level 19  
    Set the color with web interface to whatever you want, power cycle the device and DO NOT touch the RF remote.

    What is the color on startup??
  • #53 20873185
    p.kaczmarek2
    Moderator Smart Home
    Just a quick idea - maybe remembering the color on OBK side can work for you? Set Flag for "Remember LED state" and try again.
    Helpful post? Buy me a coffee.
  • #54 20873375
    atomphil
    Level 10  
    DeDaMrAz wrote:
    Set the color with web interface to whatever you want, power cycle the device and DO NOT touch the RF remote.

    What is the color on startup??


    The start colour is ALWAYS the last setting, regardless of how it was made. In this case, the last colour set via the web interface.

    When the Tuya driver is loaded, this is then overwritten by the colour stored in the EEPROM. This does not have to be the same colour, even if it is entered via the web interface (it does not seem to save every change immediately).

    As I said, overwriting the colour by the Wifi module at startup brings no advantage, only problems.

    p.kaczmarek2 wrote:
    Just a quick idea - maybe remembering the color on OBK side can work for you? Set Flag for "Remember LED state" and try again.


    The flag is already set. If I uncheck "Flag 12 - [LED] Remember LED driver state (RGBCW, enable, brightness, temperature) after reboot", the Wifi module sets the light colour to 100% brightness full cold white (brrrr) after starting the Tuya driver.
  • #55 20873403
    p.kaczmarek2
    Moderator Smart Home
    We can disable sending color early, for example, before timer reaches 60 seconds uptime.

    Still, this would make a large desync between OBK WWW panel and true device color, because OBK would not know what color is currently set.

    Would that be an acceptable solution for you?

    The other option would be to read TuyaMCU color somehow but I can't see it's dpID being sent from MCU to BK,.
    Helpful post? Buy me a coffee.
  • #56 20873477
    atomphil
    Level 10  

    p.kaczmarek2 wrote:
    We can disable sending color early, for example, before the timer reaches 60 seconds uptime.
    Would that be an acceptable solution for you?


    Yes, that would be a practical workaround. 60 seconds is probably too long, only these first two autonomous "Colour is sent" commands need to be suppressed.
    Maybe you could set the waiting time in seconds via the config or a variable in the autoexec.bat. For example like:
    tuyaMcu_defStartupNoSend 12


    p.kaczmarek2 wrote:

    Still, this would make a large desync between OBK WWW panel and true device color, because OBK would not know what color is currently set.

    The other option would be to read TuyaMCU color somehow but I can't see its dpID being sent from MCU to BK,.


    Yes, that's a pity, but the desync between the state of the web interface and the actual light is the minor problem in the practical application, because the first function of the controller is the lighting and not the web interface. The web interface still works, it just shows the wrong values under certain circumstances without input.
  • #57 20873484
    p.kaczmarek2
    Moderator Smart Home
    I will add this fix for you, but before I do, I have one more question.
    Was the desync present also in Tuya App?

    I am asking because so far I haven't seen any RGB data dpIDs sent from TuyaMCU to WiFi module and I find it strange and confusing. Maybe I am missing something.
    Helpful post? Buy me a coffee.
  • #58 20873648
    atomphil
    Level 10  

    I have already asked myself this question.

    Unfortunately, I can't find out with this WT5, it runs with OpenBeken and is installed in a drywall ceiling.
    To be honest, I haven't looked at this creepy Chinese spy app yet and have flashed all my devices directly with OpenBeken or Tasmota (depending on the chip).

    However, I still have another uninstalled WT5 that I could flash back to the Tuya firmware for test purposes (how can I do that?) and pair it with the Tuya app. I could also listen to the serial interface on this one. Maybe we don't see anything yet because the status is actively requested by the Wi-Fi module with Tuya firmware?
  • #59 20873671
    p.kaczmarek2
    Moderator Smart Home
    The status request can be done in OBK by using tuyaMcu_sendQueryState command. This will request all dpIDs. Have you tried executing this command?

    Still, you can make a capture on unflashed device with our tool:
    https://github.com/openshwprojects/TuyaMCUAnalyzer
    Of course, you need to know how to do that in safe manner. For example, when your device is using a non-isolated power supply, connecting it to your PC via UART may damage both PC and device. I think that @DeDaMrAz even had one time some kind of similiar accident.

    On the other hand, if the device is powered via an isolated 12V DC power supply, then you can do a safe capture without any extra optoisolation...
    Helpful post? Buy me a coffee.
  • #60 20873896
    atomphil
    Level 10  

    After 2.5 hours of unsuccessful trying, I give up. I tried to pair the unflashed WT5 with the Tuya Smart app and with the Smart Life app on different devices, but neither of them could find the device. So unfortunately, I can't answer the question.

Topic summary

The discussion revolves around the WT5 Multi-Channel LED controller, which utilizes a WB3S Wi-Fi module and an SC95F8615 SOC for controlling MOSFETs. Users are exploring the possibility of flashing the device with new firmware, specifically OpenBeken, to enable better integration with TuyaMCU. Key points include the need for UART communication captures to understand the device's operation, the challenges of RF remote control integration, and the behavior of the device upon power cycling. Users have shared their experiences with firmware flashing, configuration scripts, and the limitations of the current setup, particularly regarding the synchronization of settings between the RF remote and the web interface. Solutions discussed include modifying the autoexec.bat for persistent settings and capturing communication data for further analysis.
Summary generated by the language model.
ADVERTISEMENT