logo elektroda
logo elektroda
X
logo elektroda

Experience with LLXLJY 8-Channel Tuya Switch and OBK Compatibility?

io2345 6918 115
Best answers

Can the LLXLJY 8-channel Tuya switch be used with OBK, and how should it be flashed or configured?

Yes — the LLXLJY box turned out to be a BK7231N TuyaMCU device, so OBK compatibility is realistic; for flashing/backing up, choose BK7231N, and one user found that leaving the 3.3 V line disconnected during readback helped because the board was already powered via RX [#21212778 #21218438 #21218602]. OBK support became workable after newer TuyaMCU handling was added: the device uses relays on DPs 1–6 and 101/102, and with `tuyaMcu_setBaudRate 9600`, `tuyaMcu_defWiFiState 4`, `setChannelType ... Toggle`, and `linkTuyaMCUOutputToChannel ... bool ...` the eight relays could be toggled normally [#21223289 #21246749 #21247143]. The sticking point was TuyaMCU status handling (the 0x22 status-report path); once OBK learned to reply properly, relay control started behaving as expected [#21228786 #21229901 #21240579 #21245009]. If the relays behave linked or inverted, the original Tuya interlock settings are still likely stored, so resetting back to Tuya and clearing those settings fixed it for the user [#21247189 #21247345]. The RF remote is not learned in the app; pairing is done by pressing the onboard button five times quickly, then binding each remote button one by one [#21264721]
Generated by the language model.
ADVERTISEMENT
  • #31 21228423
    DeDaMrAz
    Level 22  
    Posts: 600
    Help: 34
    Rate: 127
    Let's try this autoexec and report back if possible with log as well.

    startDriver TuyaMCU
    tuyaMcu_setBaudRate 9600
    tuyaMcu_defWiFiState 4
    
    linkTuyaMCUOutputToChannel 1 bool 1
    
    setChannelType 1 Toggle
    SetChannelLabel 1 "Room 1"
    
  • ADVERTISEMENT
  • #32 21228485
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    Thank you for your patience. Sadly, the result is the same:

    A 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:MAIN:Time 220, idle 62863/s, free 73800, MQTT 0(13), bWifi 1, secondsWithNoPing 2, socks 2/38 POWERSAVE
    Info:GEN:dhcp=0 ip=192.168.0.182 gate=192.168.0.1 mask=255.255.255.0 mac=fc:3c:d7:f0:02:e1
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-52,ssid=AccessPoint,bssid=50:e6:36:35:f5:b8,channel=6,cipher_type:CCMP
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:MAIN:Time 221, idle 62211/s, free 73800, MQTT 0(13), bWifi 1, secondsWithNoPing 1, socks 2/38 POWERSAVE
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:MAIN:Time 222, idle 64022/s, free 73800, MQTT 0(13), bWifi 1, secondsWithNoPing 1, socks 2/38 POWERSAVE
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:CMD:[WebApp Cmd 'ToggleChannel 1' Result] OK
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:MAIN:Time 223, idle 76240/s, free 73800, MQTT 0(13), bWifi 1, secondsWithNoPing 1, socks 2/38 POWERSAVE
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:MAIN:Time 224, idle 64667/s, free 73800, MQTT 0(13), bWifi 1, secondsWithNoPing 1, socks 2/38 POWERSAVE
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:MAIN:Time 225, idle 71783/s, free 73800, MQTT 0(13), bWifi 1, secondsWithNoPing 1, socks 2/38 POWERSAVE
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:MAIN:Time 226, idle 70343/s, free 73800, MQTT 0(13), bWifi 1, secondsWithNoPing 1, socks 2/38 POWERSAVE
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:CMD:[WebApp Cmd 'ToggleChannel 1' Result] OK
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:MAIN:Time 227, idle 65950/s, free 73800, MQTT 0(13), bWifi 1, secondsWithNoPing 1, socks 2/38 POWERSAVE
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34
    Info:TuyaMCU:Received: 55 AA 03 22 00 28 01 01 00 01 01 02 01 00 01 00 03 01 00 01 00 04 01 00 01 00 05 01 00 01 00 06 01 00 01 00 65 01 00 01 00 66 01 00 01 00 3D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 47
    Info:TuyaMCU:ProcessIncoming: unhandled type 34


    Funny enough, there are still eight controls in the Interface, only the names of the others changed to "Toggle #"- and there is no reaction on the relays when pressing them, only the color changes. (To be precise, there are even nine controls, as there is a "Toggle 0" as well).
  • #33 21228504
    DeDaMrAz
    Level 22  
    Posts: 600
    Help: 34
    Rate: 127
    If your buttons are staying on the index page like that you should try rebooting your device and check again.

    You seeing actions being done and buttons changing colors that means that OBK is trying to do something and since the output of that device is unusual (at least to me right now) there is something we are missing.

    I'll try the dump you provided to see if there is something obvious from there but you would have to be patient about that for some time.

    EDIT: I just placed an order for that device from your link.
  • #34 21228511
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    >>21228504
    Thank you so much. Of course I did power the device off/on and did several reboots as well. Next, I will try to reset it to factory and check, if anything has changed.

    Hinzugefügt nach 11 [Minuten]:

    After the factory reset the other controls are gone, but "Room 1" is still present. The autoexec.bat survived the reset, it is still there. But the behaviour did not change: Switch relay on works, switching off doesn't.
  • Helpful post
    #35 21228786
    spin55
    Level 17  
    Posts: 209
    Help: 17
    Rate: 41
    You should take a look at Tuya's information:

    https://developer.tuya.com/en/docs/iot/tuya-c...-access-protocol?id=K9hhi0xxtn9cb#StatusQuery

    To begin, you must know the original firmware version of the device because that link warns that old versions do not respond to certain commands.

    "Check firmware compatibility with this feature. Update to the latest firmware version if necessary.
    The legacy firmware only supports sending status queries when the device is powered on for the first time."


    And this says about command 22, for example:

    "Report status (sync)
    This is a synchronous command. The MCU reports DP status and then waits for the result from the module.

    The module must respond to each status reporting message. The MCU must not send a new reporting task until receiving a response from the module.

    If the data fails to be reported to the cloud due to poor network quality, the module will return a failure code five seconds later. In this case, the MCU should wait for more than five seconds.

    The MCU can report the status of multiple DPs. For more information about the DP status data unit, see Data units."


    And the MCU will remain there waiting for a response because command 22 (34 in decimal notation) is not implemented yet. Or so it seems.

    S2
  • #36 21229901
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12371
    Very well, thank you for pointing that out. I can give it a go. Here is 0x22 parse and reply feature, but for now,parsing is just a stub, the carried dp data is not read. Can you give it a go:
    https://github.com/openshwprojects/OpenBK7231...mmit/c97c74bd777d4e0eb1d1339e28dc0d05f3b7083a
    And maybe double check if I did it correctly.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #37 21230085
    spin55
    Level 17  
    Posts: 209
    Help: 17
    Rate: 41
    55 aa 00 23 00 01 01 24

    Indeed, that looks like the module's acknowledgment command, but it is strange that it does not respond with:

    55 aa 00 22 00 01 01 23

    I don't know if it's a typo like this:

    "For example, the status of Boolean DP 1 is true, the MCU reports the following data to the module:

    55 aa 03 22 00 05 02 01 00 01 01 2e"


    Where the DP is 2 instead of 1.
  • #38 21240151
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    Is there anything that I can do or check to get that case forward? Probably that can be solved by you experts only, right?
  • #39 21240165
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12371
    Well, I am still waiting for feedback from you. As I said:
    p.kaczmarek2 wrote:
    Very well, thank you for pointing that out. I can give it a go. Here is 0x22 parse and reply feature, but for now,parsing is just a stub, the carried dp data is not read. Can you give it a go:
    https://github.com/openshwprojects/OpenBK7231...mmit/c97c74bd777d4e0eb1d1339e28dc0d05f3b7083a
    And maybe double check if I did it correctly.

    I need you to update OBK and recheck with new update...
    Helpful post? Buy me a coffee.
  • #40 21240185
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    >>21240165 Oh, sorry. Thought you were talking to @spin55
    What do I have to do? I have a file "OpenBK7231N_1.17.728.rbl" which is supposed for OTA update or alternatively the UART-flash file "OpenBK7231N_QIO_1.17.728.bin". How can I exchange the file "drv_tuyaMCU.c" that you supplied?
  • #41 21240286
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12371
    Well, just do the OTA as usual, through the Web App. Do you know how to do OTA in OBK?

    You don't need to manually exchange drv_tuyaMCU.c file. I've just shown it for reference. Those changes are already in public releases.
    Helpful post? Buy me a coffee.
  • #42 21240579
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    Same behaviour.
    Log says:
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:TuyaMCU:Received: 55 AA 03 22 00 05 01 01 00 01 01 2D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 12
    Info:TuyaMCU:ProcessIncoming: 0x22 replying
    Info:MAIN:Time 59, idle 178332/s, free 61104, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 61, idle 177346/s, free 72800, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
  • #43 21240585
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12371
    Are you sure? I can clearly see that it has replied:
    Code: C / C++
    Log in, to see the code

    Does it still keeps resending 0x22 (decimal 34) or maybe you can control it now or request TuyaMCU state via query?
    Helpful post? Buy me a coffee.
  • #44 21240597
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    >>21240585
    Yes, did it again - switching two times on/off:

    Info:MAIN:Time 79, idle 185374/s, free 72808, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 80, idle 188319/s, free 72592, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 3/38 
    Info:GEN:dhcp=0 ip=192.168.0.182 gate=192.168.0.1 mask=255.255.255.0 mac=fc:3c:d7:f0:02:e1
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-57,ssid=AccessPoint,bssid=50:e6:36:35:f5:b8,channel=6,cipher_type:CCMP
    Info:MAIN:Time 81, idle 180773/s, free 72800, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:TuyaMCU:Received: 55 AA 03 22 00 05 01 01 00 01 01 2D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 34 (Unknown) len 12
    Info:TuyaMCU:ProcessIncoming: 0x22 replying
    Info:MAIN:Time 82, idle 179785/s, free 72800, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 83, idle 188180/s, free 72800, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:MAIN:Time 84, idle 181772/s, free 72800, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 85, idle 188392/s, free 72800, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
    Info:MAIN:Time 86, idle 187105/s, free 72800, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 03 03 00 00 05 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 3 (WiFiState) len 7
    Info:MAIN:Time 87, idle 200396/s, free 72808, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 88, idle 188868/s, free 72800, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 89, idle 190462/s, free 61104, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 3/38 
    Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
    Info:MAIN:Time 90, idle 188092/s, free 72800, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.182 gate=192.168.0.1 mask=255.255.255.0 mac=fc:3c:d7:f0:02:e1
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-54,ssid=AccessPoint,bssid=50:e6:36:35:f5:b8,channel=6,cipher_type:CCMP
    Info:MAIN:Time 91, idle 185928/s, free 72800, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:MAIN:Time 92, idle 180997/s, free 72800, MQTT 0(5), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 93, idle 189848/s, free 72800, MQTT 0(6), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:MAIN:Time 94, idle 178718/s, free 72800, MQTT 0(6), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 95, idle 191502/s, free 61112, MQTT 0(6), bWifi 1, secondsWithNoPing 1, socks 3/38 
    Info:MAIN:Time 96, idle 187797/s, free 72808, MQTT 0(6), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 97, idle 188482/s, free 72808, MQTT 0(6), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8


    Red control field changes from red to green and back, but relay only switches on once and stays there.

    How to request TuyaMCU state via query?
  • #45 21240602
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12371
    Run command:
    
    tuyaMcu_sendQueryState
    

    So what is your current autoexec.bat ?
    Helpful post? Buy me a coffee.
  • #46 21240802
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    autoexec.bat is still as suggested by DeDaMrAz in Thread #31:
    Link

    tuyaMcu_sendQueryState simply responds with "OK". Is that good, or should there be more?
  • ADVERTISEMENT
  • #47 21241424
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    The MCU-response should be somehow more talkative, right?
  • #48 21241647
    spin55
    Level 17  
    Posts: 209
    Help: 17
    Rate: 41
    DeDaMrAz wrote:
    EDIT: I just placed an order for that device from your link.


    @io2345 While receiving the order, something you could do is:

    1.- Restore the original firmware.
    2.- Have at hand the information that you have extracted from the "Query Things Data Model" method on Tuya's IoT's dev page

    {
      "result": {
        "properties": [
          {
            "code": "switch_1",
            "custom_name": "",
            "dp_id": 1,
            "name": "Switch 1",
            "time": 1726077377847,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_2",
            "custom_name": "",
            "dp_id": 2,
            "name": "Switch 2",
            "time": 1726077377847,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_3",
            "custom_name": "",
            "dp_id": 3,
            "name": "Switch 3",
            "time": 1726077377847,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_4",
            "custom_name": "",
            "dp_id": 4,
            "name": "Switch 4",
            "time": 1726077377847,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_5",
            "custom_name": "",
            "dp_id": 5,
            "name": "Switch 5",
            "time": 1726077377847,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_6",
            "custom_name": "",
            "dp_id": 6,
            "name": "Switch 6",
            "time": 1726077377847,
            "type": "bool",
            "value": false
          },
          {
            "code": "fault",
            "custom_name": "",
            "dp_id": 26,
            "time": 1725737053897,
            "type": "bitmap",
            "value": 0
          },
          {
            "code": "switch_7",
            "custom_name": "",
            "dp_id": 101,
            "time": 1726077377847,
            "type": "bool",
            "value": true
          },
          {
            "code": "switch_8",
            "custom_name": "",
            "dp_id": 102,
            "time": 1726077377847,
            "type": "bool",
            "value": false
          },
          {
            "code": "value170",
            "custom_name": "",
            "dp_id": 170,
            "time": 1725737053897,
            "type": "value",
            "value": 0
          },
          {
            "code": "value171",
            "custom_name": "",
            "dp_id": 171,
            "time": 1725901387929,
            "type": "string",
            "value": "09-09-24 18:10:33 ON7"
          },
          {
            "code": "value172",
            "custom_name": "",
            "dp_id": 172,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value173",
            "custom_name": "",
            "dp_id": 173,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value174",
            "custom_name": "",
            "dp_id": 174,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value175",
            "custom_name": "",
            "dp_id": 175,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value_9",
            "custom_name": "",
            "dp_id": 181,
            "time": 1725737053897,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_8",
            "custom_name": "",
            "dp_id": 182,
            "time": 1726076960044,
            "type": "value",
            "value": 5
          },
          {
            "code": "value_7",
            "custom_name": "",
            "dp_id": 183,
            "time": 1726076960044,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_6",
            "custom_name": "",
            "dp_id": 184,
            "time": 1726076960044,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_5",
            "custom_name": "",
            "dp_id": 185,
            "time": 1726076960044,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_4",
            "custom_name": "",
            "dp_id": 186,
            "time": 1726076960034,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_3",
            "custom_name": "",
            "dp_id": 187,
            "time": 1726076960034,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_2",
            "custom_name": "",
            "dp_id": 188,
            "time": 1726076960034,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_1",
            "custom_name": "",
            "dp_id": 189,
            "time": 1726076960034,
            "type": "value",
            "value": 0
          },
          {
            "code": "data_1",
            "custom_name": "",
            "dp_id": 190,
            "time": 1726076961691,
            "type": "value",
            "value": 120
          },
          {
            "code": "data_2",
            "custom_name": "",
            "dp_id": 191,
            "time": 1725986510259,
            "type": "value",
            "value": 12
          },
          {
            "code": "data_3",
            "custom_name": "",
            "dp_id": 192,
            "time": 1725986486939,
            "type": "value",
            "value": 8
          },
          {
            "code": "data_4",
            "custom_name": "",
            "dp_id": 193,
            "time": 1725986482971,
            "type": "value",
            "value": 0
          },
          {
            "code": "data_5",
            "custom_name": "",
            "dp_id": 194,
            "time": 1725986282212,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_55",
            "custom_name": "",
            "dp_id": 195,
            "time": 1725737053897,
            "type": "value",
            "value": -5000
          },
          {
            "code": "alarm",
            "custom_name": "",
            "dp_id": 197,
            "time": 1725737053897,
            "type": "bool",
            "value": false
          },
          {
            "code": "state_1",
            "custom_name": "",
            "dp_id": 198,
            "time": 1725737053897,
            "type": "value",
            "value": -500
          },
          {
            "code": "value_99",
            "custom_name": "",
            "dp_id": 199,
            "time": 1726076961691,
            "type": "value",
            "value": 700919
          }
        ]
      },
      "success": true,
      "t": 1726143241189,
      "tid": "7eb0b4a1710011ef88b02ac421ecbce6"
    }


    3.- Press each option in the different menus of the App and write down the changes that occur in the values ​​of the different DPs (in each menu vary parameters so that the changes are reflected).

    With that and the subsequent help from @DeDaMrAz you will make the firmware implementation job much easier for @p.kaczmarek2.
  • ADVERTISEMENT
  • Helpful post
    #49 21241981
    DeDaMrAz
    Level 22  
    Posts: 600
    Help: 34
    Rate: 127
    @io2345 I am expecting this device next week so please be patient as that command is clearly not yet supported fully as we didn't encounter it before.
  • #50 21242241
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    >>21241647
    So, let's start to find out more details (hopefully):
    Starting with device recently powered up and SmartLife App connected. Most basic function is switching relays on and off:

    {
      "result": {
        "properties": [
          {
            "code": "switch_1",
            "custom_name": "",
            "dp_id": 1,
            "name": "Switch 1",
            "time": 1727514562336,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_2",
            "custom_name": "",
            "dp_id": 2,
            "name": "Switch 2",
            "time": 1727514562336,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_3",
            "custom_name": "",
            "dp_id": 3,
            "name": "Switch 3",
            "time": 1727514562336,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_4",
            "custom_name": "",
            "dp_id": 4,
            "name": "Switch 4",
            "time": 1727514562336,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_5",
            "custom_name": "",
            "dp_id": 5,
            "name": "Switch 5",
            "time": 1727514562336,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_6",
            "custom_name": "",
            "dp_id": 6,
            "name": "Switch 6",
            "time": 1727514562336,
            "type": "bool",
            "value": false
          },
          {
            "code": "fault",
            "custom_name": "",
            "dp_id": 26,
            "time": 1725737053897,
            "type": "bitmap",
            "value": 0
          },
          {
            "code": "switch_7",
            "custom_name": "",
            "dp_id": 101,
            "time": 1727514562336,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_8",
            "custom_name": "",
            "dp_id": 102,
            "time": 1727514562336,
            "type": "bool",
            "value": false
          },
          {
            "code": "value170",
            "custom_name": "",
            "dp_id": 170,
            "time": 1725737053897,
            "type": "value",
            "value": 0
          },
          {
            "code": "value171",
            "custom_name": "",
            "dp_id": 171,
            "time": 1725901387929,
            "type": "string",
            "value": "09-09-24 18:10:33 ON7"
          },
          {
            "code": "value172",
            "custom_name": "",
            "dp_id": 172,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value173",
            "custom_name": "",
            "dp_id": 173,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value174",
            "custom_name": "",
            "dp_id": 174,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value175",
            "custom_name": "",
            "dp_id": 175,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value_9",
            "custom_name": "",
            "dp_id": 181,
            "time": 1725737053897,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_8",
            "custom_name": "",
            "dp_id": 182,
            "time": 1727514326578,
            "type": "value",
            "value": 5
          },
          {
            "code": "value_7",
            "custom_name": "",
            "dp_id": 183,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_6",
            "custom_name": "",
            "dp_id": 184,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_5",
            "custom_name": "",
            "dp_id": 185,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_4",
            "custom_name": "",
            "dp_id": 186,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_3",
            "custom_name": "",
            "dp_id": 187,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_2",
            "custom_name": "",
            "dp_id": 188,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_1",
            "custom_name": "",
            "dp_id": 189,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "data_1",
            "custom_name": "",
            "dp_id": 190,
            "time": 1727514326946,
            "type": "value",
            "value": 120
          },
          {
            "code": "data_2",
            "custom_name": "",
            "dp_id": 191,
            "time": 1725986510259,
            "type": "value",
            "value": 12
          },
          {
            "code": "data_3",
            "custom_name": "",
            "dp_id": 192,
            "time": 1725986486939,
            "type": "value",
            "value": 8
          },
          {
            "code": "data_4",
            "custom_name": "",
            "dp_id": 193,
            "time": 1725986482971,
            "type": "value",
            "value": 0
          },
          {
            "code": "data_5",
            "custom_name": "",
            "dp_id": 194,
            "time": 1725986282212,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_55",
            "custom_name": "",
            "dp_id": 195,
            "time": 1725737053897,
            "type": "value",
            "value": -5000
          },
          {
            "code": "alarm",
            "custom_name": "",
            "dp_id": 197,
            "time": 1725737053897,
            "type": "bool",
            "value": false
          },
          {
            "code": "state_1",
            "custom_name": "",
            "dp_id": 198,
            "time": 1725737053897,
            "type": "value",
            "value": -500
          },
          {
            "code": "value_99",
            "custom_name": "",
            "dp_id": 199,
            "time": 1727514326946,
            "type": "value",
            "value": 700919
          }
        ]
      },
      "success": true,
      "t": 1727514603321,
      "tid": "7232841d7d7911efbc016e7818a0f8a2"
    }
    

    Next is the response after Relais 7 (I chose just any) is activated:

    {
      "result": {
        "properties": [
          {
            "code": "switch_1",
            "custom_name": "",
            "dp_id": 1,
            "name": "Switch 1",
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_2",
            "custom_name": "",
            "dp_id": 2,
            "name": "Switch 2",
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_3",
            "custom_name": "",
            "dp_id": 3,
            "name": "Switch 3",
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_4",
            "custom_name": "",
            "dp_id": 4,
            "name": "Switch 4",
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_5",
            "custom_name": "",
            "dp_id": 5,
            "name": "Switch 5",
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_6",
            "custom_name": "",
            "dp_id": 6,
            "name": "Switch 6",
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "fault",
            "custom_name": "",
            "dp_id": 26,
            "time": 1725737053897,
            "type": "bitmap",
            "value": 0
          },
          {
            "code": "switch_7",
            "custom_name": "",
            "dp_id": 101,
            "time": 1727514861737,
            "type": "bool",
            "value": true
          },
          {
            "code": "switch_8",
            "custom_name": "",
            "dp_id": 102,
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "value170",
            "custom_name": "",
            "dp_id": 170,
            "time": 1725737053897,
            "type": "value",
            "value": 0
          },
          {
            "code": "value171",
            "custom_name": "",
            "dp_id": 171,
            "time": 1725901387929,
            "type": "string",
            "value": "09-09-24 18:10:33 ON7"
          },
          {
            "code": "value172",
            "custom_name": "",
            "dp_id": 172,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value173",
            "custom_name": "",
            "dp_id": 173,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value174",
            "custom_name": "",
            "dp_id": 174,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value175",
            "custom_name": "",
            "dp_id": 175,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value_9",
            "custom_name": "",
            "dp_id": 181,
            "time": 1725737053897,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_8",
            "custom_name": "",
            "dp_id": 182,
            "time": 1727514326578,
            "type": "value",
            "value": 5
          },
          {
            "code": "value_7",
            "custom_name": "",
            "dp_id": 183,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_6",
            "custom_name": "",
            "dp_id": 184,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_5",
            "custom_name": "",
            "dp_id": 185,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_4",
            "custom_name": "",
            "dp_id": 186,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_3",
            "custom_name": "",
            "dp_id": 187,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_2",
            "custom_name": "",
            "dp_id": 188,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_1",
            "custom_name": "",
            "dp_id": 189,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "data_1",
            "custom_name": "",
            "dp_id": 190,
            "time": 1727514326946,
            "type": "value",
            "value": 120
          },
          {
            "code": "data_2",
            "custom_name": "",
            "dp_id": 191,
            "time": 1725986510259,
            "type": "value",
            "value": 12
          },
          {
            "code": "data_3",
            "custom_name": "",
            "dp_id": 192,
            "time": 1725986486939,
            "type": "value",
            "value": 8
          },
          {
            "code": "data_4",
            "custom_name": "",
            "dp_id": 193,
            "time": 1725986482971,
            "type": "value",
            "value": 0
          },
          {
            "code": "data_5",
            "custom_name": "",
            "dp_id": 194,
            "time": 1725986282212,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_55",
            "custom_name": "",
            "dp_id": 195,
            "time": 1725737053897,
            "type": "value",
            "value": -5000
          },
          {
            "code": "alarm",
            "custom_name": "",
            "dp_id": 197,
            "time": 1725737053897,
            "type": "bool",
            "value": false
          },
          {
            "code": "state_1",
            "custom_name": "",
            "dp_id": 198,
            "time": 1725737053897,
            "type": "value",
            "value": -500
          },
          {
            "code": "value_99",
            "custom_name": "",
            "dp_id": 199,
            "time": 1727514326946,
            "type": "value",
            "value": 700919
          }
        ]
      },
      "success": true,
      "t": 1727514868210,
      "tid": "10188c3e7d7a11ef88b02ac421ecbce6"
    }
    

    And now relay 7 is switched off again:

    {
      "result": {
        "properties": [
          {
            "code": "switch_1",
            "custom_name": "",
            "dp_id": 1,
            "name": "Switch 1",
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_2",
            "custom_name": "",
            "dp_id": 2,
            "name": "Switch 2",
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_3",
            "custom_name": "",
            "dp_id": 3,
            "name": "Switch 3",
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_4",
            "custom_name": "",
            "dp_id": 4,
            "name": "Switch 4",
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_5",
            "custom_name": "",
            "dp_id": 5,
            "name": "Switch 5",
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_6",
            "custom_name": "",
            "dp_id": 6,
            "name": "Switch 6",
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "fault",
            "custom_name": "",
            "dp_id": 26,
            "time": 1725737053897,
            "type": "bitmap",
            "value": 0
          },
          {
            "code": "switch_7",
            "custom_name": "",
            "dp_id": 101,
            "time": 1727514906510,
            "type": "bool",
            "value": false
          },
          {
            "code": "switch_8",
            "custom_name": "",
            "dp_id": 102,
            "time": 1727514861737,
            "type": "bool",
            "value": false
          },
          {
            "code": "value170",
            "custom_name": "",
            "dp_id": 170,
            "time": 1725737053897,
            "type": "value",
            "value": 0
          },
          {
            "code": "value171",
            "custom_name": "",
            "dp_id": 171,
            "time": 1725901387929,
            "type": "string",
            "value": "09-09-24 18:10:33 ON7"
          },
          {
            "code": "value172",
            "custom_name": "",
            "dp_id": 172,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value173",
            "custom_name": "",
            "dp_id": 173,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value174",
            "custom_name": "",
            "dp_id": 174,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value175",
            "custom_name": "",
            "dp_id": 175,
            "time": 1725737053897,
            "type": "string",
            "value": ""
          },
          {
            "code": "value_9",
            "custom_name": "",
            "dp_id": 181,
            "time": 1725737053897,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_8",
            "custom_name": "",
            "dp_id": 182,
            "time": 1727514326578,
            "type": "value",
            "value": 5
          },
          {
            "code": "value_7",
            "custom_name": "",
            "dp_id": 183,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_6",
            "custom_name": "",
            "dp_id": 184,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_5",
            "custom_name": "",
            "dp_id": 185,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_4",
            "custom_name": "",
            "dp_id": 186,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_3",
            "custom_name": "",
            "dp_id": 187,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_2",
            "custom_name": "",
            "dp_id": 188,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_1",
            "custom_name": "",
            "dp_id": 189,
            "time": 1727514326578,
            "type": "value",
            "value": 0
          },
          {
            "code": "data_1",
            "custom_name": "",
            "dp_id": 190,
            "time": 1727514326946,
            "type": "value",
            "value": 120
          },
          {
            "code": "data_2",
            "custom_name": "",
            "dp_id": 191,
            "time": 1725986510259,
            "type": "value",
            "value": 12
          },
          {
            "code": "data_3",
            "custom_name": "",
            "dp_id": 192,
            "time": 1725986486939,
            "type": "value",
            "value": 8
          },
          {
            "code": "data_4",
            "custom_name": "",
            "dp_id": 193,
            "time": 1725986482971,
            "type": "value",
            "value": 0
          },
          {
            "code": "data_5",
            "custom_name": "",
            "dp_id": 194,
            "time": 1725986282212,
            "type": "value",
            "value": 0
          },
          {
            "code": "value_55",
            "custom_name": "",
            "dp_id": 195,
            "time": 1725737053897,
            "type": "value",
            "value": -5000
          },
          {
            "code": "alarm",
            "custom_name": "",
            "dp_id": 197,
            "time": 1725737053897,
            "type": "bool",
            "value": false
          },
          {
            "code": "state_1",
            "custom_name": "",
            "dp_id": 198,
            "time": 1725737053897,
            "type": "value",
            "value": -500
          },
          {
            "code": "value_99",
            "custom_name": "",
            "dp_id": 199,
            "time": 1727514326946,
            "type": "value",
            "value": 700919
          }
        ]
      },
      "success": true,
      "t": 1727514909265,
      "tid": "289746fb7d7a11efb77736033862a1ba"
    }


    As far as I can tell, only the Boolean value of switch 7 changes from false to true and back.
    Is that of any help? Should I continue?

    Hinzugefügt nach 19 [Minuten]:

    >>21241981 Thank you DeDaMrAz. I am patient. Just trying to use the waiting time with something that eventually might get us forward.
  • #51 21242690
    spin55
    Level 17  
    Posts: 209
    Help: 17
    Rate: 41
    io2345 wrote:
    Is that of any help? Should I continue?


    Of course it helps, but you've only just begun. You have to go through all the menus and note the variations that occur in the different DPs.
    There are already DPs that can be deduced by intuition, but it is better to confirm with data. The correspondences of these DPs must be completed.

    "VM144":40{
       "1":"Switch 1",   Relay 1 (boolean, V=1 or 0)
       "2":"Switch 2",   Relay 2 (boolean, V=1 or 0)
       "3":"Switch 3",   Relay 3 (boolean, V=1 or 0)
       "4":"Switch 4",   Relay 4 (boolean, V=1 or 0)
       "5":"Switch 5",   Relay 5 (boolean, V=1 or 0)
       "6":"Switch 6",   Relay 6 (boolean, V=1 or 0)
       "26":"Fault",
       "101":"Switch 7",   Relay 7 (boolean, V=1 or 0)
       "102":"Switch 8",   Relay 8 (boolean, V=1 or 0)
       "170":"page",
       "171":"Ctrl 1",   set timer (example: V=09-09-24 18:10:33 ON7)
       "172":"Ctrl 2",
       "173":"Ctrl 3",
       "174":"Ctrl 4",
       "175":"Ctrl 5",
       "181":"value",
       "182":"num8",|
       "183":"num7",|      
       "184":"num6",|
       "185":"num5",|---> Numerical values under relay buttons (num1 ... num8). value 1 equals 0,1
       "186":"num4",|
       "187":"num3",|
       "188":"num2",|
       "189":"num1",| 
       "190":"mode",
       "191":"operate", ->  selecting options:
             Menu2 (Val V=10)
             Interlock on (V=11)
             Interlock off (V=12)   
             Jog setting (V=101)
             Power on setting (V=103)
             Interlocking setting (V=108)
             Delayed open (V=112)
             Delayed close (V=115)
             Timing setting (V=135)
       "192":"val1",   -> value(s) on page following selecting item in dpID 191 e.g for "set Interlock" (Val V = number "of channels")
       "193":"val2",   -> value(s) on page following selecting item in dpID 191 e.g. for "set delay open/close" (Val V = time in ms)
       "194":"val3",   -> value(s) on page following selecting item in dpID 191 
       "195":"val4",   -> value(s) on page following selecting item in dpID 191 
       "197":"Alarm",
       "198":"state",
       "199":"."
    }"undefined"


    For example, in that relationship you can see that the settings from DP 192 to DP195 are related to the value of DP191, and this corresponds to the menus you show in the photos: Interlock on, Interlock off, Jog setting, etc...

    It is possible that the relays cannot be activated because the MCU is waiting for confirmation or parameter configuration and validation of the parameters. That is why it is very important to see which DPs the different configurations affect. Tedious work, I know, but it is less complicated than connecting the USB adapter and monitoring the Rx and Tx lines with Realterm or another equivalent program.

    You already have all the Dps identified, now you have to relate them to the different configuration options. As you see, you are not far from providing the necessary information to implement the firmware by @p.kaczmarek2.
  • #52 21242984
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    Not easy - I always get the message, that the maximum length of the message is 65000 signs.
    Maybe it's better to send the result as text:

    Anything else I should check?
    Attachments:
    • Results.txt (97.96 KB) You must be logged in to download this attachment.
  • Helpful post
    #53 21243185
    spin55
    Level 17  
    Posts: 209
    Help: 17
    Rate: 41
    @io2345
    Anything else you would like get checked?

    Not at the moment. Wait for me to organize the information. As you may have seen, it seems that the menu changes are clearly reflected in the DPs.

    When I have time, I will summarize what I have seen.

    Grettings

    Added after 6 [hours] 32 [minutes]:

    Spoiler:
    Switching Group on in Menu 1:

    "dp_id": 3 changes from false to true.

    "dp_id": 5 changes from false to true.

    "dp_id": 7 changes from false to true.

    "dp_id": 8 changes from false to true.

    "dp_id": 191 changes from 135 to 11.


    Switching group off (Button OFF in Menu 1):

    "dp_id": 3, 5, 7 y 8 they return false.

    "dp_id": 171 changes from "24-09-28 22:47:33 ON1" to "09-09-24 18:10:33 ON7"

    "dp_id": 191 changes from 11 to 12.

    "dp_id": 192 changes from 1 to 8.


    Calling Menu 2:

    "dp_id": 191 changes from 12 to 10.


    Selecting "Jog setting" in menu 2:

    "dp_id": 191 changes from 10 to 101.

    "dp_id": 192 changes from 8 to 0.


    Entering Jog setting and setting channel 2 to 820ms inching:

    "dp_id": 192 changes from 0 to 2.

    "dp_id": 193 changes from 0 to 820.


    Pressing "Power on settings" in Menu 2:

    "dp_id": 191 changes from 101 to 103.


    Entering value 1 to channel 4 for power on settings:

    "dp_id": 192 changes from 2 to 4.

    "dp_id": 193 changes from 820 to 1.


    Selecting "Interlocking" in Menu 2:

    "dp_id": 191 changes from 103 to 108.

    "dp_id": 192 changes from 4 to 1.

    "dp_id": 193 changes from 1 to 4.


    Selecting "Total number of channels participating in interlocking" = 5 and "Number of channels per group" = 3 in Interlocking page:

    "dp_id": 192 changes from 1 to 5.

    "dp_id": 193 changes from 4 to 3.


    Selecting "Delayed open" in Menu 2:

    "dp_id": 191 changes from 108 to 112.

    "dp_id": 192 changes from 5 to 0.

    "dp_id": 193 changes from 3 to 0.


    Setting "Channel" = 3 and "Delay duration" = 335ms in Delayed open menu:

    "dp_id": 192 changes from 0 to 3.

    "dp_id": 193 changes from 0 to 335.


    Selecting "Delayed close" in Menu 2:

    "dp_id": 191 changes from 112 to 115.

    "dp_id": 192 changes from 3 to 0.

    "dp_id": 193 changes from 335 to 0.


    Setting Channel 2 to 448ms delay duration:

    "dp_id": 192 changes from 0 to 2.

    "dp_id": 193 changes from 0 to 448.


    Selecting "Timing settings" in Menu 2:

    "dp_id": 191 changes from 115 to 135.

    "dp_id": 192 changes from 2 to 0.

    "dp_id": 193 changes from 448 to 0.


    Setting page 1 in Timing settings to 24-09-28 22:47:33 ON1:

    "dp_id": 171 changes from "09-09-24 18:10:33 ON7" to "24-09-28 22:47:33 ON1"

    "dp_id": 192 changes from 0 to 1.
  • #54 21244804
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    Don't know if it's of interest: These are the datapoints I get when importing the Tuya-device into ioBroker:
    Screenshot showing a list of Tuya device data points in ioBroker.

    With the help of that, I managed to complete the list for ID 191 (in Thread #24)
    We also learn, the ID 26 has four sub-categories (the chinese letters mean "Fault alarms")
  • #55 21244989
    spin55
    Level 17  
    Posts: 209
    Help: 17
    Rate: 41
    Hello, the Dp26 is bitmap type, that means that the variation of each bit is significant (malfunction warning error codes?). It will be seen as all the correspondences of the other missing Dps are discovered. I don't know if you have checked all the options on the different menus. It seems not because there is a lack of Dps that we still don't know what they do.

    Once all this is completed, what I would do is connect two USB adapters to the Tx and Rx lines of the MCU. Open two instances of Realterm and configure it as I indicated at the time in this link https://www.elektroda.com/rtvforum/topic4000657-60.html in post #78. If you don't have two adapters, you can do it with one as @p.kaczmarek2 already indicated throughout the thread. This way you will see all the communication between the MCU and the WiFi module, which you can interpret with the information from https://developer.tuya.com/en/docs/iot/tuya-c...-access-protocol?id=K9hhi0xxtn9cb#StatusQuery
    and https://www.elektroda.com/rtvforum/topic3970199.html.

    This is to progress until @DeDaMrAz receives the order. With his help and that of @p.kaczmarek2 you will finish bringing this project to fruition, without a doubt.
  • Helpful post
    #56 21245009
    DeDaMrAz
    Level 22  
    Posts: 600
    Help: 34
    Rate: 127
    Update!

    WiFi module with relays on a blue service mat

    It will have to wait until I manage to steal some time from somewhere or next weekend.

    Added after 6 [hours] 46 [minutes]:

    Ok, this is going to be interesting to implement as there are whole bunch of dpID's floating around.

    This is just relay one toggling from the native app and original FW.

    //S 01-Oct-24 00:31:44 WiFi sent:
    55AA0006000501010001010E
    //R 01-Oct-24 00:31:44 WiFi received:
    55AA0322000501010001012D
    //R 01-Oct-24 00:31:44 WiFi received:
    55AA0322000501010001012D
    //R 01-Oct-24 00:31:44 WiFi received:
    55AA0322000501010001012D
    //S 01-Oct-24 00:31:44 WiFi sent:
    55AA002300010124
    //R 01-Oct-24 00:31:44 WiFi received:
    55AA0322000501010001012D
    //S 01-Oct-24 00:31:44 WiFi sent:
    55AA002300010124
    //S 01-Oct-24 00:31:44 WiFi sent:
    55AA002300010124
    //S 01-Oct-24 00:31:45 WiFi sent:
    55AA002300010124
    //S 01-Oct-24 00:31:46 WiFi sent:
    55AA0006000501010001000D
    //R 01-Oct-24 00:31:46 WiFi received:
    55AA0322000501010001002C
    //R 01-Oct-24 00:31:46 WiFi received:
    55AA0322000501010001002C
    //S 01-Oct-24 00:31:46 WiFi sent:
    55AA002300010124
    //R 01-Oct-24 00:31:46 WiFi received:
    55AA0322000501010001002C
    //S 01-Oct-24 00:31:46 WiFi sent:
    55AA002300010124
    //S 01-Oct-24 00:31:46 WiFi sent:
    55AA002300010124
    


    Sent by WiFi module:
    55 AA   00   06      00 05   0101000101   0E   
    HEADER   VER=00   SetDP      LEN   dpId=1 Bool V=1      CHK   
    
    Received by WiFi module:
    55 AA   03   22      00 05   0101000101   2D   
    HEADER   VER=03   Unk      LEN   0101000101   CHK   
    
    Received by WiFi module:
    55 AA   03   22      00 05   0101000101   2D   
    HEADER   VER=03   Unk      LEN   0101000101   CHK   
    
    Received by WiFi module:
    55 AA   03   22      00 05   0101000101   2D   
    HEADER   VER=03   Unk      LEN   0101000101   CHK   
    
    Sent by WiFi module:
    55 AA   00   23      00 01   01   24   
    HEADER   VER=00   Unk      LEN   01   CHK   
    
    Received by WiFi module:
    55 AA   03   22      00 05   0101000101   2D   
    HEADER   VER=03   Unk      LEN   0101000101   CHK   
    
    Sent by WiFi module:
    55 AA   00   23      00 01   01   24   
    HEADER   VER=00   Unk      LEN   01   CHK   
    
    Sent by WiFi module:
    55 AA   00   23      00 01   01   24   
    HEADER   VER=00   Unk      LEN   01   CHK   
    
    Sent by WiFi module:
    55 AA   00   23      00 01   01   24   
    HEADER   VER=00   Unk      LEN   01   CHK   
    
    Sent by WiFi module:
    55 AA   00   06      00 05   0101000100   0D   
    HEADER   VER=00   SetDP      LEN   dpId=1 Bool V=0      CHK   
    
    Received by WiFi module:
    55 AA   03   22      00 05   0101000100   2C   
    HEADER   VER=03   Unk      LEN   0101000100   CHK   
    
    Received by WiFi module:
    55 AA   03   22      00 05   0101000100   2C   
    HEADER   VER=03   Unk      LEN   0101000100   CHK   
    
    Sent by WiFi module:
    55 AA   00   23      00 01   01   24   
    HEADER   VER=00   Unk      LEN   01   CHK   
    
    Received by WiFi module:
    55 AA   03   22      00 05   0101000100   2C   
    HEADER   VER=03   Unk      LEN   0101000100   CHK   
    
    Sent by WiFi module:
    55 AA   00   23      00 01   01   24   
    HEADER   VER=00   Unk      LEN   01   CHK   
    
    Sent by WiFi module:
    55 AA   00   23      00 01   01   24   
    HEADER   VER=00   Unk      LEN   01   CHK   
    



    Just had to play around for a minute before bed, but stay tuned, we will work on this soon enough although there are some background tasks being worked on so please be patient.

    Added after 10 [minutes]:

    Ok, 22 looks to be a status report and 23 is acknowledgment of sorts - confirmed.... ok, gone now, will continue.

    Added after 10 [hours] 53 [minutes]:

    @io2345

    Here is something you can test before we get time to work on this device. in your autoexec you should have same as before:

    startDriver TuyaMCU
    tuyaMcu_setBaudRate 9600
    tuyaMcu_defWiFiState 4
    
    linkTuyaMCUOutputToChannel 1 bool 1
    
    setChannelLabel 1 "Room 1"
    setChannelType 1 Toggle


    Then execute a custom command as follows:

    backlog ToggleChannel 1; delay_s 2; uartSendHex 55AA002300010124

    Idea is to do it twice, second time it should turn off your device. Let us know and thanks.

    EDIT: my bad keep forgetting delay can't be backloged, standby...

    Added after 5 [hours] 17 [minutes]:

    @io2345 can you test this autoexec and report back??

    startDriver httpButtons
    startDriver TuyaMCU
    tuyaMcu_setBaudRate 9600
    tuyaMcu_defWiFiState 4
    
    //testing with CH2
    //linkTuyaMCUOutputToChannel 2 bool 1
    
    alias ON uartsendhex 55AA0006000502010001010F
    alias OFF uartsendhex 55AA0006000502010001000E
    
    setButtonLabel 1 "ON"
    setChannelLabel 1 ON
    setButtonColor 1 GREEN
    setButtonEnabled 1 1
    setButtonCommand 1 ON
    
    setButtonLabel 2 "OFF"
    setChannelLabel 2 OFF
    setButtonColor 2 RED
    setButtonEnabled 2 1
    setButtonCommand 2 OFF


    Added after 19 [minutes]:

    Or you can try this as well (no reading of initial state yet!!!)

    startDriver TuyaMCU
    tuyaMcu_setBaudRate 9600
    tuyaMcu_defWiFiState 4
    
    linkTuyaMCUOutputToChannel 2 bool 2
    
    setChannelType 2 Toggle
    
    alias OFF uartsendhex 55AA0006000502010001000E
    
    addChangeHandler Channel2 == 0 OFF
  • #57 21246404
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    @DeDaMrAz: Thank you for your investigations
    Autoexec.bat version 1: (Nothing set in "config", just using the autoexec.bat): Relay 4 is active as soon as device boots. When pressing the "ON" button, relay 2 goes on and after two seconds off again. When pressing the "OFF" button immediately after "ON", relay goes off after maybe one second. So, it seems to work.
    Autoexec.bat version 2: Same effect, only with "TOGGLE" button instead of ON/OFF
  • Helpful post
    #58 21246413
    DeDaMrAz
    Level 22  
    Posts: 600
    Help: 34
    Rate: 127
    @io2345

    Did you have something set with the original FW? Maybe "Jog Setting"?? I mentioned that this is not reading initial state yet as that is stored in tuyaMCU and different dpID's are responsible for that.

    So in general we are able to control the relays but we need to investigate more (I spent only like 15 minutes on this) just stand by for completion and we will have full support for this device soon.

    I'll post updates here when we find time to play around.
  • #59 21246445
    io2345
    Level 9  
    Posts: 244
    Help: 1
    Rate: 6
    DeDaMrAz wrote:
    Did you have something set with the original FW?

    Yes, everything in Thread #52. And there we find:
    ...
    Entering Jog setting and setting channel 2 to 820ms inching
    ...
    Entering value 1 to channel 4 for power on settings
    ...
    So, no wonder.
  • #60 21246654
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12371
    I've checked with @DeDaMrAz and concluded that we need to parse 0x22 packet data which seems to be the same as 0x07 packet data:
    https://github.com/openshwprojects/OpenBK7231...mmit/1dfd42f1b303751a1fabc56b2b662801641dd1a3
    We're testing
    Helpful post? Buy me a coffee.

Topic summary

✨ The discussion centers on the LLXLJY 8-channel Tuya smart switch, focusing on its compatibility with OpenBK (OBK) firmware and integration challenges. The device uses a BK7231N chipset with TuyaMCU architecture, communicating via UART at 9600 baud. Initial firmware backup and flashing to OBK were successful, enabling relay toggling through OBK's web interface. However, issues such as relay interlocking behavior and incomplete initial state reading were noted, linked to TuyaMCU's handling of device states and DP (Data Point) IDs. Extensive TuyaMCU packet captures were performed to map DP IDs to functions like relay switching, jog setting, interlocking, delayed open/close, and power-on settings. The community developed OBK autoexec scripts to link TuyaMCU outputs to OBK channels, allowing relay control and partial state management. Input detection via unused GPIO pins on the CBU module was explored for thermostat integration, with digital inputs configured as dInput or dInput_n to control relays based on thermostat signals. Hardware modifications included replacing mechanical relays with low-power MOSFET relays (Omron G3VM-601EY) for silent operation and reduced power consumption. Challenges remain in fully implementing initial state synchronization, interpreting complex DP IDs, and transmitting input states via MQTT. The device's RF remote pairing requires manual onboard button presses, as app-based pairing is unsupported. PowerSave mode on BK7231N shows limited effect due to continuous TuyaMCU communication. Overall, the device is functional with OBK for relay control, with ongoing efforts to enhance full feature support and input state reporting.
Generated by the language model.

FAQ

TL;DR: This 8-channel board uses 8 relays and, as one contributor put it, "it is definitely MCU". For OpenBeken users, the working path is BK7231N + TuyaMCU at 9600 baud, with relays mapped to dpIDs 1-6, 101, and 102; stable eight-relay control was confirmed after OBK 1.17.738. [#21246749]

Why it matters: This FAQ saves time for anyone trying to convert the LLXLJY 8-channel Tuya switch to OpenBeken without breaking backup, UART capture, or relay control.

Option What happened Practical result
BK7231M backup mode "non-standard encryption key" warning and no usable backup Wrong target for this board
BK7231N backup mode 2 MB dump succeeded Correct chip family/mode
Early OBK builds Relays could switch on but not reliably off 0x22 status handling incomplete
OBK 1.17.738 + autoexec All 8 relays toggled correctly Confirmed working setup

Key insight: The hardware is OpenBeken-compatible, but only because it is a TuyaMCU design. You must treat the Wi-Fi module as a UART bridge to the MCU, not as a simple direct-relay controller. [#21247676]

Quick Facts

  • The successful stock-firmware backup produced a 2 MB dump, used BK7231N mode, detected GD25Q16B flash, and found the Tuya config magic at 2023424. [#21218602]
  • The confirmed working TuyaMCU serial speed was 9600 baud; using 115200 in autoexec caused incorrect behavior during early setup. [#21228256]
  • Final relay mapping was dpIDs 1-6, 101, 102 for the eight outputs, with menu/control functions concentrated around dpIDs 170-199. [#21223289]
  • On this TuyaMCU device, PowerSave did not meaningfully lower the reported module temperature; the user still saw about 47°C, and constant MCU communication was cited as the reason. [#21329223]
  • A later solid-state relay mod used Omron G3VM-601EY parts rated for about 23 W / 100 mA per channel, while G3VM-601CR/FR was noted as allowing up to 140 W. [#21422968]

How do I flash OpenBK7231N on the LLXLJY 8-channel Tuya switch and get all eight relays working with TuyaMCU?

Use BK7231N firmware, not BK7231M, then configure TuyaMCU at 9600 baud. 1. Back up the original 2 MB flash. 2. Flash an OpenBK7231N QIO build. 3. In autoexec.bat, start TuyaMCU, set baud to 9600, set channels 1-8 as Toggle, and link dpIDs 1-6, 101, and 102 to channels 1-8. Relay toggling was confirmed working after updating to OBK 1.17.738 with that mapping. [#21246749]

Why does the LLXLJY 8-channel switch backup fail in BK7231M mode with a 'non-standard encryption key' warning, and why does BK7231N mode work instead?

It fails because this board uses a BK7231N-based CBU module, not BK7231M. In BK7231M mode, the tool read an encryption key and showed a "non-standard encryption key" warning, then produced no saved result. In BK7231N mode, the same flash chip, GD25Q16B, was detected and the full 2 MB backup succeeded once the wiring was corrected. That makes the warning a mode mismatch symptom here, not proof that backup is impossible. [#21218602]

What wiring should I use to back up the original firmware from this CBU/BK7231N Tuya board without powering the whole circuit incorrectly?

Use only GND, TX, and RX for backup, and do not connect the 3.3 V line. The successful report said the 3.3 V lead powered the rest of the board and caused read failures. With only ground plus UART lines connected, backup worked and the board was identified as a likely TuyaMCU device. The same post also noted that the required power was present on the RX line during that readback setup. [#21218602]

How can I capture TuyaMCU UART packets on this LLXLJY board to identify dpIDs for relay control and advanced functions?

Capture the Wi-Fi-module-to-MCU line for app actions, and the MCU-to-Wi-Fi line for physical events. 1. Use two USB-UART adapters to record both lines, or one adapter in two separate passes. 2. Save one capture per action, such as toggle_relay1.txt. 3. Change exactly one setting each time, because mixed captures make dpID decoding harder. The thread explicitly recommended separate captures for each relay and each menu function. [#21220533]

What is TuyaMCU, and how does it affect OpenBeken compatibility on Tuya relay boards like the LLXLJY 8-channel switch?

"TuyaMCU" is a secondary microcontroller that handles device logic and exchanges serial dpID packets with the Wi-Fi module, instead of letting the Wi-Fi chip drive relays directly. On this board, that means OpenBeken must speak the Tuya serial protocol over UART, including heartbeat and status packets. The board was identified as definitely MCU-based, and that is why correct TuyaMCU mapping matters more than simple GPIO relay assignment. [#21218700]

What is dpID in the Tuya protocol, and which dpIDs were identified for the eight relay outputs and menu functions on this device?

"dpID" is a Tuya data-point identifier that names one control or status field in the MCU protocol, such as a relay state, timer string, or menu parameter. On this device, relay outputs were identified as dpIDs 1-6, 101, and 102. Menu and parameter areas included 170 for page-like state, 171-175 for string controls such as timers, 182-189 for numeric values, 191 for operation/menu selection, and 192-195 for menu-dependent values. [#21223289]

How do I configure autoexec.bat in OBK for the LLXLJY 8-channel switch so channels 1-8 map correctly to dpIDs 1-6, 101, and 102?

Create autoexec.bat with TuyaMCU started at 9600 baud, then map the eight bool dpIDs to channels 1-8. The confirmed pattern was linkTuyaMCUOutputToChannel 1 bool 1 through 6 bool 6, then 101 bool 7 and 102 bool 8. Set channels 1-8 to Toggle before or after linking. That exact structure was posted as the working eight-relay setup for OBK 1.17.738. [#21246749]

Why did the relays switch on but not off in early OBK builds, and how was command 0x22 status reporting involved?

They failed because the MCU kept sending command 0x22 status reports and OBK did not fully handle them yet. The logs showed repeated cmd 34 messages, which is decimal 34 for hex 0x22, marked as unknown and unhandled. Another contributor pointed out that the MCU waits for an acknowledgment to status reports, so incomplete 0x22 handling could block normal state changes. After OBK added 0x22 reply support and then parsing based on 0x07-like data, relay behavior improved. [#21228786]

Which OBK version finally fixed relay toggling on this TuyaMCU-based 8-channel board, and what autoexec setup was confirmed to work?

OBK 1.17.738 was the version that finally gave confirmed on/off control for all eight relays. The working autoexec used startDriver TuyaMCU, tuyaMcu_setBaudRate 9600, tuyaMcu_defWiFiState 4, set channels 1-8 to Toggle, and linked dpIDs 1-6, 101, and 102 to channels 1-8. After flashing that build, the user reported: all relays switched on and off, with only leftover Tuya settings causing temporary odd behavior. [#21247143]

How can I disable leftover Tuya settings like interlock or jog mode after flashing OBK if the relays behave strangely?

Restore stock Tuya firmware, reset the unwanted MCU-side settings, then flash OBK again. The thread showed that odd relay behavior, such as one relay turning another off, came from old interlock settings still stored in the TuyaMCU. After reflashing Tuya firmware and then returning to OBK, relay toggling worked normally. That is the safest cleanup path when interlock, jog, or power-on rules persist across OBK flashes. [#21247345]

What's the difference between using stock Tuya firmware settings and scripting the same behavior in OpenBeken for jog, delayed open/close, and interlocking?

Stock Tuya firmware stores those features inside the MCU, while OpenBeken can reproduce most of them with scripts and channel logic. The thread identified menu items for jog, power-on setting, interlocking, delayed open, delayed close, and timing, but the user noted these are also easy to implement in home automation. The practical difference is persistence and complexity: Tuya stores MCU-side behavior directly, while OBK gives more flexible logic but may require custom scripting. [#21219836]

How do I use free CBU GPIO pins as digital inputs in OpenBeken to control the LLXLJY relays from room thermostats?

Use unused CBU GPIOs as dInput or dInput_n and assign them to the same target channels as the relays. The thread confirmed that free pins on the CBU can be used because they are normal 0-3.3 V GPIOs. The recommended method was simple: set the chosen pin role to dInput for normal logic or dInput_n for inverted logic, and point it to the relay’s channel. A later test confirmed this worked for thermostat-driven relay control. [#21273718]

How can I script heating and cooling logic in OBK so thermostat inputs control floor-heating valves with normal or inverted logic depending on mode?

Use separate input channels and one mode channel, then copy or invert values in a loop. The confirmed pattern was: thermostat inputs on channels 9-16, relays on 1-8, and a mode flag on channel 20. When channel 20 was 0, the script used SetChannel 1 $CH9 and so on. When channel 20 was 1, it used negation such as SetChannel 1 !$CH9. The user reported that this script worked immediately after being added to autoexec.bat. [#21473876]

What are the safest ways to detect 230V thermostat signals for CBU GPIO inputs, and when should I use an optocoupler instead of a simple transistor circuit?

Use an optocoupler when you need the safest isolation from 230 V thermostat lines. The thread discussed a simpler transistor-based AC detection idea, but it was explicitly questioned for surge tolerance and voltage-spike safety. The user later recommended a separate optocoupler module as the safer choice and used one in the final installation. That is the better approach whenever mains voltage is present near the GPIO input path. [#21275094]

Why doesn't PowerSave reduce temperature much on a BK7231N TuyaMCU device like this one, and what actually affects heat and idle power use?

PowerSave has little effect here because TuyaMCU devices must keep talking over UART. One contributor stated that PowerSave works on BK7231N, but on TuyaMCU boards it does not meaningfully reduce temperature because the module and MCU communicate constantly. Another contributor added that open WebApp logs also hurt PowerSave behavior. In the reported case, the module stayed around 47°C, which was described as not unusually high for this design. [#21330580]
Generated by the language model.
ADVERTISEMENT