I purchased The MJ st02 with tasmota preinstalled. I was able to successfully get esphome installed through tasmota web interface with no need to open and solder wires. I used a yaml config other users had posted but could not control the switch from home assistant. I emailed Martin and Jerry and they informed me that the tasmota version is using a tuyamcu 2nd microcontroller to control the light. I have found that esphome also supports communicating with this tuyamcu but I have no idea how to set up the yaml to configure it properly.
I am curious if others have encountered this and if anyone has gotten it working with esphome.
I have the same tx/rx with tuya configured but no data points come up and I get:
Initialization failed. Current init_state: 0
From the reviews on amazon, this is the tasmota settings:
I reset the module and couldn’t get it to work right, so I contacted support. They responded in a few hours, and told me what I needed to know. If you find yourself in this situation:
1. Configure the module as 'Tuya MCU (54)'
2. Set the template to:
{"NAME":"MJ 3Way Switch","GPIO":[255,255,255,255,52,53,0,0,21,9,157,255,0],"FLAG":0,"BASE":18}
3. In the console, enter:
switchmode1 5
TuyaMCU 11,1
But I don’t know how to convert that to esphome.
@JohnGalt1717 I posted on github asking the same question of you.
I just purchased five of these switches which I did not realize that there wa no esphome yaml for it.
I have been tinkering for a few days with it based on the yaml you posted, but I am missing something.
Would you mind posting the entire yaml code that pertains to the switch.
Thank you for the help.
@JohnGalt1717 hi. i stumbled on this thread after A LOT of research on how the switch behaves, TuyaMCU, etc… anyway, this is what i used to get the switch to report the actual status. you should be able to modify this from “switch” to “light” to suit your original post