Closed burnshomeautomation closed 5 years ago
Is this going to be possible, what additional information do you need from me?
Hi,
To add support to zemismart fan/light switch combo switch, it is needed to modify the Tasmota's tuya driver: https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/xdrv_16_tuyadimmer.ino
@digiblur @chaosmaster
Any idea?
@burnshomeautomation Please provide a Weblog4 when you use the different functions (ideally with commentary what actions you did) So we can see what messages are exchanged. Do the +/- buttons control only the light or only the fan? Do they control both?
I will get this uploaded as soon as I get back to the house. The +/- buttons control the fan only, not the light.
@burnshomeautomation
Trying to remember when I spoke with you on discord but weren't you able to get the light relay to work when you didn't have the Tuya stuff picked? Or am I thinking wrong here.
@digiblur
No, everything is handled with the tuya rx/tx. Everytime a button is pressed locally on the switch, you see the tx/rx pop up on the console.
@chaosmaster - Here are the logs from the various button presses.....
02:43:07 TYA: Set WiFi LED to state 3 (0) 02:43:07 TYA: TX Packet: "55aa000300010306" 02:43:08 TYA: Set WiFi LED to state 3 (0) 02:43:08 TYA: TX Packet: "55aa000300010306" 02:43:09 TYA: Set WiFi LED to state 3 (0) 02:43:09 TYA: TX Packet: "55aa000300010306" 02:43:10 TYA: Set WiFi LED to state 3 (0) 02:43:10 TYA: TX Packet: "55aa000300010306"
02:43:10 TYA: RX Packet: "55aa01070005010100010110" 02:43:10 TYA: RX - On State 02:43:10 SRC: Switch 02:43:10 TYA: Send Serial Packet Dim Value=255 (id=2) 02:43:10 TYA: TX Packet: "55aa0006000802020004000000ff14" 02:43:10 MQT: zemi/stat/office_switch/RESULT = {"POWER":"ON","Dimmer":100} 02:43:10 MQT: zemi/stat/office_switch/POWER = ON 02:43:10 TYA: RX Packet: "55aa0107000802020004000000f80f" 02:43:10 TYA: RX Dim State=248 02:43:10 TYA: Send CMND_DIMMER_STR=Dimmer 97 02:43:10 SRC: Switch 02:43:10 RSL: Received Topic /Dimmer, Data Size 2, Data 97 02:43:10 RSL: Group 0, Index 1, Command DIMMER, Data 97 02:43:10 MQT: zemi/stat/office_switch/RESULT = {"POWER":"ON","Dimmer":97} 02:43:10 TYA: RX Packet: "55aa01070005030100010011" 02:43:10 TYA: RX - Off State 02:43:10 SRC: Switch 02:43:10 TYA: Send Dim Level skipped due to 0 or already set. Value=0 02:43:10 MQT: zemi/stat/office_switch/RESULT = {"POWER":"OFF","Dimmer":97} 02:43:10 MQT: zemi/stat/office_switch/POWER = OFF 02:43:10 TYA: RX Packet: "55aa0107000802020004000000ff16" 02:43:10 TYA: RX Dim State=255 02:43:10 TYA: Send CMND_DIMMER_STR=Dimmer 100 02:43:10 SRC: Switch 02:43:10 RSL: Received Topic /Dimmer, Data Size 3, Data 100 02:43:10 RSL: Group 0, Index 1, Command DIMMER, Data 100 02:43:10 SRC: Light 02:43:10 TYA: Send Dim Level skipped due to 0 or already set. Value=255 02:43:10 TYA: SetDevicePower.rpower=1 02:43:10 TYA: TX Packet: "55aa0006000501010001010e" 02:43:10 MQT: zemi/stat/office_switch/RESULT = {"POWER":"ON","Dimmer":100} 02:43:10 MQT: zemi/stat/office_switch/POWER = ON 02:43:10 MQT: zemi/stat/office_switch/RESULT = {"POWER":"ON","Dimmer":100} 02:43:10 TYA: RX Packet: "55aa01070005010100010110" 02:43:10 TYA: RX - On State 02:43:10 TYA: RX Packet: "55aa0107000802020004000000ff16" 02:43:10 TYA: RX Dim State=255 02:43:10 TYA: RX Packet: "55aa01070005030100010011" 02:43:10 TYA: RX - Off State 02:43:10 SRC: Switch 02:43:10 TYA: Send Dim Level skipped due to 0 or already set. Value=0 02:43:10 MQT: zemi/stat/office_switch/RESULT = {"POWER":"OFF","Dimmer":100} 02:43:10 MQT: zemi/stat/office_switch/POWER = OFF 02:43:10 TYA: RX Packet: "55aa01070005010100010110" 02:43:10 TYA: RX - On State 02:43:10 SRC: Switch 02:43:10 TYA: Send Serial Packet Dim Value=255 (id=2) 02:43:10 TYA: TX Packet: "55aa0006000802020004000000ff14" 02:43:10 MQT: zemi/stat/office_switch/RESULT = {"POWER":"ON","Dimmer":100} 02:43:10 MQT: zemi/stat/office_switch/POWER = ON 02:43:10 TYA: RX Packet: "55aa0107000802020004000000ff16" 02:43:10 TYA: RX Dim State=255 02:43:11 TYA: Set WiFi LED to state 3 (0) 02:43:11 TYA: TX Packet: "55aa000300010306" 02:43:11 CFG: Saved to flash at F9, Count 402, Bytes 3584 02:43:12 TYA: Set WiFi LED to state 3 (0) 02:43:12 TYA: TX Packet: "55aa000300010306" 02:43:13 TYA: Set WiFi LED to state 3 (0) 02:43:13 TYA: TX Packet: "55aa000300010306" 02:43:14 TYA: Set WiFi LED to state 3 (0) 02:43:14 TYA: TX Packet: "55aa000300010306" 02:43:15 TYA: Set WiFi LED to state 3 (0) 02:43:15 TYA: TX Packet: "55aa000300010306" 02:43:16 TYA: Set WiFi LED to state 3 (0) 02:43:16 TYA: TX Packet: "55aa000300010306" 02:43:17 TYA: Set WiFi LED to state 3 (0) 02:43:17 TYA: TX Packet: "55aa000300010306" 02:43:18 TYA: Set WiFi LED to state 3 (0) 02:43:18 TYA: TX Packet: "55aa000300010306" 02:43:19 TYA: Set WiFi LED to state 3 (0) 02:43:19 TYA: TX Packet: "55aa000300010306" 02:43:20 TYA: Set WiFi LED to state 3 (0) 02:43:20 TYA: TX Packet: "55aa000300010306" 02:43:21 TYA: Set WiFi LED to state 3 (0) 02:43:21 TYA: TX Packet: "55aa000300010306" 02:43:22 TYA: Set WiFi LED to state 3 (0) 02:43:22 TYA: TX Packet: "55aa000300010306" 02:43:23 TYA: Set WiFi LED to state 3 (0) 02:43:23 TYA: TX Packet: "55aa000300010306" 02:43:24 TYA: Set WiFi LED to state 3 (0) 02:43:24 TYA: TX Packet: "55aa000300010306" 02:43:25 TYA: Set WiFi LED to state 3 (0) 02:43:25 TYA: TX Packet: "55aa000300010306" 02:43:26 TYA: Set WiFi LED to state 3 (0) 02:43:26 TYA: TX Packet: "55aa000300010306" 02:43:26 WIF: Checking connection... 02:43:26 WIF: Connected 02:43:27 TYA: Set WiFi LED to state 3 (0) 02:43:27 TYA: TX Packet: "55aa000300010306" 02:43:28 TYA: Set WiFi LED to state 3 (0) 02:43:28 TYA: TX Packet: "55aa000300010306" 02:43:29 TYA: Set WiFi LED to state 3 (0) 02:43:29 TYA: TX Packet: "55aa000300010306" 02:43:30 TYA: Set WiFi LED to state 3 (0) 02:43:30 TYA: TX Packet: "55aa000300010306"
02:43:30 TYA: RX Packet: "55aa01070005010100010110" 02:43:30 TYA: RX - On State 02:43:30 TYA: RX Packet: "55aa0107000802020004000000f80f" 02:43:30 TYA: RX Dim State=248 02:43:30 TYA: Send CMND_DIMMER_STR=Dimmer 97 02:43:30 SRC: Switch 02:43:30 RSL: Received Topic /Dimmer, Data Size 2, Data 97 02:43:30 RSL: Group 0, Index 1, Command DIMMER, Data 97 02:43:30 MQT: zemi/stat/office_switch/RESULT = {"POWER":"ON","Dimmer":97} 02:43:30 TYA: RX Packet: "55aa01070005030100010011" 02:43:30 TYA: RX - Off State 02:43:30 SRC: Switch 02:43:30 TYA: Send Dim Level skipped due to 0 or already set. Value=0 02:43:30 MQT: zemi/stat/office_switch/RESULT = {"POWER":"OFF","Dimmer":97} 02:43:30 MQT: zemi/stat/office_switch/POWER = OFF 02:43:31 TYA: Set WiFi LED to state 3 (0) 02:43:31 TYA: TX Packet: "55aa000300010306" 02:43:31 CFG: Saved to flash at F8, Count 403, Bytes 3584 02:43:32 TYA: Set WiFi LED to state 3 (0) 02:43:32 TYA: TX Packet: "55aa000300010306" 02:43:33 TYA: Set WiFi LED to state 3 (0) 02:43:33 TYA: TX Packet: "55aa000300010306" 02:43:34 TYA: Set WiFi LED to state 3 (0) 02:43:34 TYA: TX Packet: "55aa000300010306" 02:43:35 TYA: Set WiFi LED to state 3 (0) 02:43:35 TYA: TX Packet: "55aa000300010306" 02:43:36 TYA: Set WiFi LED to state 3 (0) 02:43:36 TYA: TX Packet: "55aa000300010306" 02:43:37 TYA: Set WiFi LED to state 3 (0) 02:43:37 TYA: TX Packet: "55aa000300010306" 02:43:38 TYA: Set WiFi LED to state 3 (0) 02:43:38 TYA: TX Packet: "55aa000300010306" 02:43:39 TYA: Set WiFi LED to state 3 (0) 02:43:39 TYA: TX Packet: "55aa000300010306" 02:43:42 TYA: Set WiFi LED to state 3 (0) 02:43:42 TYA: TX Packet: "55aa000300010306" 02:43:43 TYA: Set WiFi LED to state 3 (0) 02:43:43 TYA: TX Packet: "55aa000300010306" 02:43:44 TYA: Set WiFi LED to state 3 (0) 02:43:44 TYA: TX Packet: "55aa000300010306" 02:43:45 TYA: Set WiFi LED to state 3 (0) 02:43:45 TYA: TX Packet: "55aa000300010306"
02:43:45 TYA: RX Packet: "55aa01070005010100010110" 02:43:45 TYA: RX - On State 02:43:45 SRC: Switch 02:43:45 TYA: Send Serial Packet Dim Value=247 (id=2) 02:43:45 TYA: TX Packet: "55aa0006000802020004000000f70c" 02:43:45 MQT: zemi/stat/office_switch/RESULT = {"POWER":"ON","Dimmer":97} 02:43:45 MQT: zemi/stat/office_switch/POWER = ON 02:43:45 TYA: RX Packet: "55aa0107000802020004000000f50c" 02:43:45 TYA: RX Dim State=245 02:43:45 TYA: RX Packet: "55aa01070005030100010011" 02:43:45 TYA: RX - Off State 02:43:45 SRC: Switch 02:43:45 TYA: Send Dim Level skipped due to 0 or already set. Value=0 02:43:45 MQT: zemi/stat/office_switch/RESULT = {"POWER":"OFF","Dimmer":97} 02:43:45 MQT: zemi/stat/office_switch/POWER = OFF 02:43:45 TYA: RX Packet: "55aa0107000802020004000000f70e" 02:43:45 TYA: RX Dim State=247 02:43:46 TYA: Set WiFi LED to state 3 (0) 02:43:46 TYA: TX Packet: "55aa000300010306" 02:43:47 TYA: Set WiFi LED to state 3 (0) 02:43:47 TYA: TX Packet: "55aa000300010306" 02:43:48 TYA: Set WiFi LED to state 3 (0) 02:43:48 TYA: TX Packet: "55aa000300010306" 02:43:48 WIF: Checking connection... 02:43:48 WIF: Connected 02:43:49 TYA: Set WiFi LED to state 3 (0) 02:43:49 TYA: TX Packet: "55aa000300010306" 02:43:50 TYA: Set WiFi LED to state 3 (0) 02:43:50 TYA: TX Packet: "55aa000300010306" 02:43:51 TYA: Set WiFi LED to state 3 (0) 02:43:51 TYA: TX Packet: "55aa000300010306" 02:43:52 TYA: Set WiFi LED to state 3 (0) 02:43:52 TYA: TX Packet: "55aa000300010306" 02:43:53 TYA: Set WiFi LED to state 3 (0) 02:43:53 TYA: TX Packet: "55aa000300010306" 02:43:54 TYA: Set WiFi LED to state 3 (0) 02:43:54 TYA: TX Packet: "55aa000300010306" 02:43:55 TYA: Set WiFi LED to state 3 (0) 02:43:55 TYA: TX Packet: "55aa000300010306" 02:43:56 TYA: Set WiFi LED to state 3 (0) 02:43:56 TYA: TX Packet: "55aa000300010306" 02:43:57 TYA: Set WiFi LED to state 3 (0) 02:43:57 TYA: TX Packet: "55aa000300010306" 02:43:58 TYA: Set WiFi LED to state 3 (0) 02:43:58 TYA: TX Packet: "55aa000300010306"
02:43:58 TYA: RX Packet: "55aa01070005010100010110" 02:43:58 TYA: RX - On State 02:43:58 SRC: Switch 02:43:58 TYA: Send Serial Packet Dim Value=247 (id=2) 02:43:58 TYA: TX Packet: "55aa0006000802020004000000f70c" 02:43:58 MQT: zemi/stat/office_switch/RESULT = {"POWER":"ON","Dimmer":97} 02:43:58 MQT: zemi/stat/office_switch/POWER = ON 02:43:58 TYA: RX Packet: "55aa0107000802020004000000f80f" 02:43:58 TYA: RX Dim State=248 02:43:58 TYA: RX Packet: "55aa01070005030100010011" 02:43:58 TYA: RX - Off State 02:43:58 SRC: Switch 02:43:58 TYA: Send Dim Level skipped due to 0 or already set. Value=0 02:43:58 MQT: zemi/stat/office_switch/RESULT = {"POWER":"OFF","Dimmer":97} 02:43:58 MQT: zemi/stat/office_switch/POWER = OFF 02:43:58 TYA: RX Packet: "55aa0107000802020004000000f70e" 02:43:58 TYA: RX Dim State=247 02:43:58 TYA: RX Packet: "55aa01070005010100010110" 02:43:58 TYA: RX - On State 02:43:58 SRC: Switch 02:43:58 TYA: Send Serial Packet Dim Value=247 (id=2) 02:43:58 TYA: TX Packet: "55aa0006000802020004000000f70c" 02:43:59 MQT: zemi/stat/office_switch/RESULT = {"POWER":"ON","Dimmer":97} 02:43:59 MQT: zemi/stat/office_switch/POWER = ON 02:43:59 TYA: RX Packet: "55aa0107000802020004000000f50c" 02:43:59 TYA: RX Dim State=245 02:43:59 TYA: RX Packet: "55aa01070005030100010011" 02:43:59 TYA: RX - Off State 02:43:59 SRC: Switch 02:43:59 TYA: Send Dim Level skipped due to 0 or already set. Value=0 02:43:59 MQT: zemi/stat/office_switch/RESULT = {"POWER":"OFF","Dimmer":97} 02:43:59 MQT: zemi/stat/office_switch/POWER = OFF 02:43:59 TYA: RX Packet: "55aa0107000802020004000000f70e" 02:43:59 TYA: RX Dim State=247 02:43:59 TYA: Set WiFi LED to state 3 (0) 02:43:59 TYA: TX Packet: "55aa000300010306" 02:44:00 TYA: Set WiFi LED to state 3 (0) 02:44:00 TYA: TX Packet: "55aa000300010306" 02:44:01 MQT: zemi/tele/office_switch/STATE = {"Time":"2019-04-17T02:44:01","Uptime":"1T05:46:55","Vcc":3.086,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Dimmer":97,"Fade":"OFF","Speed":1,"LedTable":"OFF","Wifi":{"AP":1,"SSId":"jarvis","BSSId":"44:D9:E7:FD:32:F6","Channel":11,"RSSI":84,"LinkCount":1,"Downtime":"0T00:01:10"}} 02:44:01 MQT: zemi/tele/office_switch/SENSOR = {"Time":"2019-04-17T02:44:01","Switch1":"ON","Switch2":"ON"} 02:44:01 TYA: Set WiFi LED to state 3 (0) 02:44:01 TYA: TX Packet: "55aa000300010306" 02:44:02 TYA: Set WiFi LED to state 3 (0) 02:44:02 TYA: TX Packet: "55aa000300010306" 02:44:03 TYA: Set WiFi LED to state 3 (0) 02:44:03 TYA: TX Packet: "55aa000300010306" 02:44:04 TYA: Set WiFi LED to state 3 (0) 02:44:04 TYA: TX Packet: "55aa000300010306" 02:44:05 TYA: Set WiFi LED to state 3 (0) 02:44:05 TYA: TX Packet: "55aa000300010306" 02:44:06 TYA: Set WiFi LED to state 3 (0) 02:44:06 TYA: TX Packet: "55aa000300010306" 02:44:07 TYA: Set WiFi LED to state 3 (0) 02:44:07 TYA: TX Packet: "55aa000300010306" 02:44:08 TYA: Set WiFi LED to state 3 (0) 02:44:08 TYA: TX Packet: "55aa000300010306" 02:44:08 WIF: Checking connection... 02:44:08 WIF: Connected 02:44:09 TYA: Set WiFi LED to state 3 (0) 02:44:09 TYA: TX Packet: "55aa000300010306" 02:44:10 TYA: Set WiFi LED to state 3 (0) 02:44:10 TYA: TX Packet: "55aa000300010306" 02:44:11 TYA: Set WiFi LED to state 3 (0) 02:44:11 TYA: TX Packet: "55aa000300010306" 02:44:12 TYA: Set WiFi LED to state 3 (0) 02:44:12 TYA: TX Packet: "55aa000300010306" 02:44:13 TYA: Set WiFi LED to state 3 (0) 02:44:13 TYA: TX Packet: "55aa000300010306"
02:44:13 TYA: RX Packet: "55aa0107000501010001000f" 02:44:13 TYA: RX - Off State 02:44:13 TYA: RX Packet: "55aa0107000802020004000000f50c" 02:44:13 TYA: RX Dim State=245 02:44:13 TYA: RX Packet: "55aa01070005030100010011" 02:44:13 TYA: RX - Off State 02:44:13 TYA: RX Packet: "55aa0107000501010001000f" 02:44:13 TYA: RX - Off State 02:44:13 TYA: RX Packet: "55aa01070008020200040000000017" 02:44:13 TYA: RX Dim State=0 02:44:13 TYA: RX Packet: "55aa01070005030100010011" 02:44:13 TYA: RX - Off State 02:44:14 TYA: Set WiFi LED to state 3 (0) 02:44:14 TYA: TX Packet: "55aa000300010306" 02:44:15 TYA: Set WiFi LED to state 3 (0) 02:44:15 TYA: TX Packet: "55aa000300010306" 02:44:16 TYA: Set WiFi LED to state 3 (0) 02:44:16 TYA: TX Packet: "55aa000300010306" 02:44:17 TYA: Set WiFi LED to state 3 (0) 02:44:17 TYA: TX Packet: "55aa000300010306" 02:44:18 TYA: Set WiFi LED to state 3 (0) 02:44:18 TYA: TX Packet: "55aa000300010306" 02:44:19 TYA: Set WiFi LED to state 3 (0) 02:44:19 TYA: TX Packet: "55aa000300010306" 02:44:20 TYA: Set WiFi LED to state 3 (0) 02:44:20 TYA: TX Packet: "55aa000300010306" 02:44:21 TYA: Set WiFi LED to state 3 (0) 02:44:21 TYA: TX Packet: "55aa000300010306" 02:44:22 TYA: Set WiFi LED to state 3 (0) 02:44:22 TYA: TX Packet: "55aa000300010306" 02:44:23 TYA: Set WiFi LED to state 3 (0) 02:44:23 TYA: TX Packet: "55aa000300010306" 02:44:24 TYA: Set WiFi LED to state 3 (0) 02:44:24 TYA: TX Packet: "55aa000300010306"
02:44:24 TYA: RX Packet: "55aa01070005010100010110" 02:44:24 TYA: RX - On State 02:44:24 SRC: Switch 02:44:24 TYA: Send Serial Packet Dim Value=247 (id=2) 02:44:24 TYA: TX Packet: "55aa0006000802020004000000f70c" 02:44:24 MQT: zemi/stat/office_switch/RESULT = {"POWER":"ON","Dimmer":97} 02:44:24 MQT: zemi/stat/office_switch/POWER = ON 02:44:24 TYA: RX Packet: "55aa01070008020200040000000017" 02:44:24 TYA: RX Dim State=0 02:44:24 TYA: RX Packet: "55aa01070005030100010011" 02:44:24 TYA: RX - Off State 02:44:24 SRC: Switch 02:44:24 TYA: Send Dim Level skipped due to 0 or already set. Value=0 02:44:24 MQT: zemi/stat/office_switch/RESULT = {"POWER":"OFF","Dimmer":97} 02:44:24 MQT: zemi/stat/office_switch/POWER = OFF 02:44:24 TYA: RX Packet: "55aa01070005010100010110" 02:44:24 TYA: RX - On State 02:44:24 SRC: Switch 02:44:24 TYA: Send Serial Packet Dim Value=247 (id=2) 02:44:24 TYA: TX Packet: "55aa0006000802020004000000f70c" 02:44:24 MQT: zemi/stat/office_switch/RESULT = {"POWER":"ON","Dimmer":97} 02:44:24 MQT: zemi/stat/office_switch/POWER = ON 02:44:24 TYA: RX Packet: "55aa0107000802020004000000f50c" 02:44:24 TYA: RX Dim State=245 02:44:24 TYA: RX Packet: "55aa01070005030100010011" 02:44:24 TYA: RX - Off State 02:44:24 SRC: Switch 02:44:24 TYA: Send Dim Level skipped due to 0 or already set. Value=0 02:44:24 MQT: zemi/stat/office_switch/RESULT = {"POWER":"OFF","Dimmer":97} 02:44:24 MQT: zemi/stat/office_switch/POWER = OFF 02:44:24 TYA: RX Packet: "55aa0107000802020004000000f70e" 02:44:24 TYA: RX Dim State=247 02:44:24 TYA: RX Packet: "55aa0107000802020004000000f70e" 02:44:24 TYA: RX Dim State=247 02:44:25 TYA: Set WiFi LED to state 3 (0) 02:44:25 TYA: TX Packet: "55aa000300010306" 02:44:26 TYA: Set WiFi LED to state 3 (0) 02:44:26 TYA: TX Packet: "55aa000300010306" 02:44:27 TYA: Set WiFi LED to state 3 (0) 02:44:27 TYA: TX Packet: "55aa000300010306" 02:44:28 TYA: Set WiFi LED to state 3 (0) 02:44:28 TYA: TX Packet: "55aa000300010306" 02:44:28 WIF: Checking connection... 02:44:28 WIF: Connected 02:44:29 TYA: Set WiFi LED to state 3 (0) 02:44:29 TYA: TX Packet: "55aa000300010306" 02:44:30 TYA: Set WiFi LED to state 3 (0) 02:44:30 TYA: TX Packet: "55aa000300010306" 02:44:31 TYA: Set WiFi LED to state 3 (0) 02:44:31 TYA: TX Packet: "55aa000300010306" 02:44:32 TYA: Set WiFi LED to state 3 (0) 02:44:32 TYA: TX Packet: "55aa000300010306" 02:44:33 TYA: Set WiFi LED to state 3 (0) 02:44:33 TYA: TX Packet: "55aa000300010306" 02:44:34 TYA: Set WiFi LED to state 3 (0) 02:44:34 TYA: TX Packet: "55aa000300010306" 02:44:35 TYA: Set WiFi LED to state 3 (0) 02:44:35 TYA: TX Packet: "55aa000300010306" 02:44:36 TYA: Set WiFi LED to state 3 (0) 02:44:36 TYA: TX Packet: "55aa000300010306"
02:44:36 TYA: RX Packet: "55aa01070005010100010110" 02:44:36 TYA: RX - On State 02:44:36 SRC: Switch 02:44:36 TYA: Send Serial Packet Dim Value=247 (id=2) 02:44:36 TYA: TX Packet: "55aa0006000802020004000000f70c" 02:44:36 MQT: zemi/stat/office_switch/RESULT = {"POWER":"ON","Dimmer":97} 02:44:36 MQT: zemi/stat/office_switch/POWER = ON 02:44:36 TYA: RX Packet: "55aa0107000802020004000000f50c" 02:44:36 TYA: RX Dim State=245 02:44:36 TYA: RX Packet: "55aa01070005030100010112" 02:44:36 TYA: RX - On State 02:44:36 TYA: RX Packet: "55aa0107000802020004000000f70e" 02:44:36 TYA: RX Dim State=247 02:44:37 TYA: Set WiFi LED to state 3 (0) 02:44:37 TYA: TX Packet: "55aa000300010306" 02:44:37 CFG: Saved to flash at F7, Count 404, Bytes 3584 02:44:38 TYA: Set WiFi LED to state 3 (0) 02:44:38 TYA: TX Packet: "55aa000300010306" 02:44:39 TYA: Set WiFi LED to state 3 (0) 02:44:39 TYA: TX Packet: "55aa000300010306" 02:44:40 TYA: Set WiFi LED to state 3 (0) 02:44:40 TYA: TX Packet: "55aa000300010306" 02:44:42 TYA: Set WiFi LED to state 3 (0) 02:44:42 TYA: TX Packet: "55aa000300010306" 02:44:44 TYA: Set WiFi LED to state 3 (0) 02:44:44 TYA: TX Packet: "55aa000300010306" 02:44:45 TYA: Set WiFi LED to state 3 (0) 02:44:45 TYA: TX Packet: "55aa000300010306" 02:44:46 TYA: Set WiFi LED to state 3 (0) 02:44:46 TYA: TX Packet: "55aa000300010306"
02:44:47 TYA: RX Packet: "55aa01070005010100010110" 02:44:47 TYA: RX - On State 02:44:47 TYA: RX Packet: "55aa0107000802020004000000f50c" 02:44:47 TYA: RX Dim State=245 02:44:47 TYA: RX Packet: "55aa01070005030100010011" 02:44:47 TYA: RX - Off State 02:44:47 SRC: Switch 02:44:47 TYA: Send Dim Level skipped due to 0 or already set. Value=0 02:44:47 MQT: zemi/stat/office_switch/RESULT = {"POWER":"OFF","Dimmer":97} 02:44:47 MQT: zemi/stat/office_switch/POWER = OFF 02:44:47 TYA: Set WiFi LED to state 3 (0) 02:44:47 TYA: TX Packet: "55aa000300010306" 02:44:47 CFG: Saved to flash at F6, Count 405, Bytes 3584 02:44:48 TYA: Set WiFi LED to state 3 (0) 02:44:48 TYA: TX Packet: "55aa000300010306" 02:44:49 TYA: Set WiFi LED to state 3 (0) 02:44:49 TYA: TX Packet: "55aa000300010306" 02:44:50 TYA: Set WiFi LED to state 3 (0) 02:44:50 TYA: TX Packet: "55aa000300010306" 02:44:51 WIF: Checking connection... 02:44:51 WIF: Connected
Hopefully this will give you some kind of an idea of what its doing
Is this the kind of info you were needing from the logs?
Yes, that looks good, I haven't had time to look into this yet.
Anything I can do to help on this one?
So the deivice has two power IDs (1 and 3): 55aa01070005030100010011 55aa0107000501010001000f
Not sure which one is used for fan and which for light.
ID 2 is used for fan speed: 55aa0107000802020004000000f50c
The code currently doesn't check the ID when it receives a power message. That would have to be changed. I currently don't have much time, @digiblur maybe you could look into that?
I'll just tack on to this discussion. I have an Oil Diffuser that has a TYWE3S chip but everything is controlled through the MCU. I've documented most of the codes
As you can see it uses different id for commands and introduces a few new things (RGB control, different power modes). I'm well aware all this support would require a major rewrite.
How difficult would it be to define command id's in a way like the SetOption34 defines tuyaid?
This device also has multiple power IDs:
Currently the device is manageable using rules and my smart home hub. The only problem is there is no return state if the device buttons are used for control
Also want to drop a reference to #5545 with a similar problem of multiple switches
I have a very similar problem with some new three and four relay switches i have purchased, these units flash over the air the same way the Tuya Dimmer does they take the Tasmota firmware fine this way but do not seem to be GPIO controlled. If i select Tuya Dimmer (54) then switching the switch on and off controls switch one on them and when i press button 2, 3, & 4 i get serial codes coming through the console so its serial controlled in the same way. Can i control these with rules or do i need code changes to get these working? It would be really good to get these going as these are certified for use in NZ and AU and look the same as Sonoff switches.
The console under debug send status updates every few seconds and seems to show in the switched are on or off ok.
01:09:22 TYA: RX - Off State 01:09:22 TYA: RX Packet: "55aa01070005020100010010" 01:09:22 TYA: RX - Off State 01:09:22 TYA: RX Packet: "55aa01070005030100010011" 01:09:22 TYA: RX - Off State 01:09:22 TYA: RX Packet: "55aa01070005040100010012" 01:09:22 TYA: RX - Off State 01:09:51 TYA: RX Packet: "55aa01070005010100010110" 01:09:51 TYA: RX - On State 01:09:51 TYA: RX Packet: "55aa01070005020100010111" 01:09:51 TYA: RX - On State 01:09:51 TYA: RX Packet: "55aa01070005030100010112" 01:09:51 TYA: RX - On State 01:09:51 TYA: RX Packet: "55aa01070005040100010113" 01:09:51 TYA: RX - On State
You can use rules to control them like I did above, its not a perfect solution but it'll make the switch remotely operable atleast
This will leave it so that if someone manually operates the switch it will not send MQTT updates though right?
Yes, until we can have a rule trigger on serial received packets
We got a rule trigger on serial received packets (SerialRecevied#data=value), so it will now be possible to trigger relay states on serial messages using rules. Gonna do some testing this evening on my tuya device with MCP controller and see how it works out
how do i use the rules to send the command? I can't seem to get it to work.
for example serialsend5 55AA00060005020400010213
but you need to be using Generic module and backlog baudrate 9600; seriallog 2
. See my device and how I handled it.
For a complete setup you'd need to capture codes by using the app to issue commands and monitor serial traffic with a serial terminal capable of reading hex codes.
@burnshomeautomation I have the solution for the issue , It was tested with the same switch refer This Post
@shanekuz , I believe Tuya Protocol is standard it worked for 4 Gang should work for 3 Gang with setoption38 =3
Thanks Thiru
can you do an OTA firmware update for this?
nevermind, i got it on there, ill test it tonight and let you know how it performs. Thank you!
@burnshomeautomation , Please use this Branch this latest and fully Tested Dev Branch : https://github.com/thirug010/Sonoff-Tasmota
@thirug010, That worked like a champ. I was able to set it all up in home assistant with mqtt, and it keeps the status correctly either pushing the buttons locally or through mqtt. You are awesome!
@burnshomeautomation Thank you for testing it.
Closing issue as this issue has been solved.
Thanks everyone for helping on this :+1:
@thirug010 Is your code something that should/could be incorporated into the main Tasmota codebase? If so, could you create a pull request to add your solution?
Mike
@meingraham, Code was merged to dev branch.
Thanks Thiru
Can anyone suggest how to flash this to tasmota ? does Tuya convert works ? I have the Fan light switch UK model.
@tyjtyj
Please, address your issue to the Tasmota support chat. Thanks
I have a zemismart fan/light switch combo switch.... http://www.zemismart.com/smart-wifi-switch-for-fan-light-compatible-with-alexa-google-home-smart-life-app-control_p0153.html
I have flashed it with Tasmota and it partially works with the tuya-dimmer template. All of the control is handled via tuya tx/rx. The issue is, the tuya dimmer, doesnt allow me to add a second button/switch. So matter which button i push locally on the switch, it sends the same messages. If I leave the light switch turned off, the fan dimmer and switch work properly from tasmota or mqtt.
Please add ability to add additional switches to this template.