Unkown tuya chip

@ferbulous I replaced the BL2028N chip with an ESP8266X that I pulled out of an other Tuya switch, and indeed it is pinout compatible, but requires a custom template for Tasmota:

{“NAME”:“Aubess-RS-1”,“GPIO”:[0,0,0,0,576,0,0,0,224,32,160,0,0,0],“FLAG”:0,“BASE”:18}

thx again…

Sorry, didn’t noticed your comment. Yes, I still have some.

Hello!
Thanks for so many contributions! I have made the change to ESP8266 in an MH104 as the manual says. But I can’t get the switch to work. I can only turn it off or on from the Tasmota wifi menu. I have tried with the relay in GPIO12 / 13… Nothing… Impossible. Currently the configuration is this:
“{“NAME”:“ESP8266 MS-104”,“GPIO”:[0,0,0,0,0,0,0,0,1,1,0,0,0,0],“FLAG” :0,“BASE”:18}”

Where do you think the error could be? The welding is done correctly.

have you tried sniffing the RX/TX lines to see what the original serial data looks like?

As you can see I am quite new to this. To be sure, it’s my first integration with Tasmota. The rest have been “simpler”.
The truth is that I don’t know how to follow the RX/TX line. I see in the Tasmota console that when I do something from the web, it is reflected. But when I press the button, nothing.
I have tried with two other MH104 that I had at home and the operation is the same. I can turn on and off from the web, but not with the button…
:frowning:

I had responded to a very old post but have you enabled the rules for AC line detection and is the GPIO set correctly see https://tasmota.github.io/docs/Buttons-and-Switches/#changing-default-functionality

Go to the section AC Frequency Detection Switch.

Hope That helps

I think I’ve gotten myself into a mess that I don’t know how to get out of…
The most I knew what to do, as it said in the PDF manual that I downloaded from this same thread (I think), was to indicate in which GPIO the relay was soldered and in which the button was soldered. It seemed easier. I will try to understand the link.
Thank you very much!

This is the manual I followed:

The PDF guide is pretty easy to follow: -

Make sure the wiring is as follows:-

“GPIO13 is connected to switch, GPIO12 is connected to relay”

If lets say GPIO13 is relay because of mistake GPIO12 should be switch adjust accordingly and reapply the tasmota template don’t forget to swap 94 with 21

{“NAME”:“Moes MS-104”,“GPIO”:
[0,0,0,0,0,0,0,0,21,94,0,0,0],“FLAG”:0,“BASE”:18}

Then try the below: -

{“NAME”:“Moes MS-104”,“GPIO”:
[0,0,0,0,0,0,0,0,94,21,0,0,0],“FLAG”:0,“BASE”:18}

Follow the guide again,

If something is wrong you will have to troubleshoot

It seems that the problem now is that it does not save the configuration.
When applying the setting “{“NAME”:“Moes MS-104”,“GPIO”: [0,0,0,0,0,0,0,0,21,94,0,0,0],“ FLAG”:0,”BASE”:18}” I save and change it to:
“{“NAME”:“ESP8266 MS-104”,“GPIO”:[0,0,0,0,0,0,0,0,0,0,0,0,0,0],“FLAG” :0,“BASE”:18}”

I leave screenshots and appreciate your help!!

Try this flash tasmota-minimal via ota and then flash full version of tasmota

1 Like

I did so. Configure template looks like this. And configure Other appears like this:
“{“NAME”:“Generic”,“GPIO”:[1,1,1,1,1,1,1,1,1,1,1,1,1,1],“FLAG”:0, “BASE”:18}”
I can’t modify.

I’m posting a link to blakadders guide on how to apply templates:-

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

1 Like

The inbuilt templates cannot be modified I always apply templates as per the blakadder guide, which is fully tweakable

I did it like that.
Now it seems that I have it configured correctly. But the switch still doesn’t work.
In GPIO12 you have applied a Relay
On GPIO13 you have applied a Counter_n.
And on the main page there is a number that goes up. But i do not know why…
Seriously, thank you very much!

I presumed you have followed this bit from the PDF and now have a working external monetary switch working?

As we want it to change the relay state and not just count, we install the following
rule on the console command line: rule1 ON Counter#c1>0 do Backlog POWER TOGGLE;
Counter1 0 ENDON and then we activate it: rule1 on
Now, everytime the switch is toggled, the relay is toggled as well, which is what we
want.
Congratulations!

You have entered the command in the console?

16:06:57.419 CMD: rule1 ON Counter#c1>0 do Backlog POWER TOGGLE
16:06:57.424 RUL: Stored uncompressed, would compress from 39 to 33 (-16%)
16:06:57.428 RSL: RESULT = {“Rule1”:{“State”:“OFF”,“Once”:“OFF”,“StopOnError”:“OFF”,“Length”:39,“Free”:472,“Rules”:“ON Counter#c1>0 do Backlog POWER TOGGLE”}}

This is the response when entering the command in the tasmota console

Does the monetary switch work?

Also did you enter commands as follows: - first line is the rule that we are setting, second command is to activate the rule.

rule1 ON Counter#c1>0 do Backlog POWER TOGGLE; Counter1 0 ENDON
rule1 on

1 Like

Ou yeah! I finally managed to move the relay with the switch!
Now it looks like it’s working like a push button. It turns on, but does not turn off.
You don’t know how happy I was to hear the relay!
Thank you, thank you, and thank you!

Working on the same unit (FK-UFO-R6). Swapped in a ESP 12F and it seems that it is using a MCU for the temp and humidity. I have it currently set up under a template based on Tuya MCU(54) with GPIO4 as IRsend and GPIO05 as IRrecv. Both the send and receive seem to be working fine but my temp and humidity is stuck at 100c and 80%