This is a TuyaMCU device. It has both MCU and WiFi module. We only flash WiFI module and then use our implementation of TuyaMCU protocol to use the MCU.
Helpful post? Buy me a coffee.
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamp.kaczmarek2 wrote:This is a TuyaMCU device. It has both MCU and WiFi module. We only flash WiFi module and then use our implementation of TuyaMCU protocol to use the MCU.
startDriver TuyaMCU
tuyaMCU_setBaudRate 115200
tuyaMcu_defWiFiState 4
// request full state from time to time (every 10 seconds, -1 repeats - forever)
addRepeatingEvent 10 -1 uartSendHex 55AA0008000007
// dpID 20 is voltage * 0.1
setChannelType 1 Voltage_div10
linkTuyaMCUOutputToChannel 20 val 1
// dpID 18 is current * 0.001
setChannelType 2 Current_Div1000
linkTuyaMCUOutputToChannel 18 val 2
// dpID 19 is power * 0.1
setChannelType 3 Power_Div10
linkTuyaMCUOutputToChannel 19 val 3marschr wrote:Also my main doubt: Is there a way to reset the Total energy counters? They seem to be stored in the TuyaMCU, is that right? Is there a command for that? I've looked around on the .md guide files on GitHub and couldn't find a command related to that.
Quote:
Info:TuyaMCU:Consumed 150 unwanted non-header byte in Tuya MCU buffer
Info:TuyaMCU:Skipped data (part) 5B 49 2F 68 6C 77 5D 20 2A 2A 2A 2A 2A 43 48 41 2A 2A 2A 2A 2A 0D 0A 5B 49 2F 68 6C 77 5D 20 56 2F 46 72 65 71 2F 50 46 3A 20 32 33 30 30 2C 20 34 39 30 34 2C 20 31 30 30 0D 0A 5B 49 2F 68 6C 77 5D 20 49 2F 50 2F 45 3A 20 30 2C 20 30 2C 20 30 0D 0A 5B 49
Quote:
[I/hlw] *****CHA*****
[I/hlw] V/Freq/PF: 2300, 4904, 100
[I/hlw] I/P/E: 0, 0, 0
[I/hlw] *****CHB*****
[I/hlw] I/P/E/PF: 0, 0, 0, 100