Any Tuya Keypads with ESP brains?

I have been lurking around on aliexpress for smart stuff as you do :slight_smile:

I have seen a bunch of tuya keypads, some that appears to have wifi, some that have bluetooth and communicates with a tuya gateway and some of just classic dumb controllers.

Has some one found out if any of these can be flashed with ESPHome?
Or brain transplant to esp module etc?
Or another non-tuya one that has ESP modules already?

I wanted to get a hand of one that has the keyboard and also rfid. But of course want it to run ESPHome.
But unable to identify what they have inside.

Alternative is to use Wiegand that all of them are also using and then use a module connected to that and doing whats needed.

But I would rather have a all in one.

Tuya - blech, avoid!

1 Like

yes, thats why I want to flash ESPHome on it :slight_smile:

I’m curious about this as well, if it’s not using custom pcb you can just do an esp swap.
If it’s bk7231T/N or realtek you can flash with libretuya
Have you asked the seller if he can put some teardown/disassemble pics?

well, only got this image sent to me. But that did not give me any extra info of the internals.


If not the module is on the other side of the pcb, it looks like something else runs on these. or maybe this picture shows the non-tuya version.

I have asked for information about the tuya module used inside these.

They do have a website with alot of panels
http://www.s4a.com.cn/?list/243_2

The picture is a bit low res, would be great if they can provide a higher resolution.
With wifi devices, it could beken chip & tuya mcu

Yes, I have requested more info from the seller.
I noticed they had 2 versions of Tuya too. one called Tuya-I and Tuya-II.

Version 1 appears to only allow remote opening and version 2 has possibility to add/delete users, read logs etc.

Not sure but the picture sent to me is also in the listing, and it might be the non-tuya version.

I have to wait until they respond on my request.

The photo is from aliexpress.

Hi everyone!
I have that reader and I’m available to do any test, what I can say is that I was unable to integrate it into HA neither with local tuya nor with tuya local.
I have the keys and id but its not working like all other devices.
I can tell you that from the app you can see the status (open or closed) and you can create even temporary pin codes and authorize rfid tags, it works at 125Khz (which is essential for me because I already have another esp8266 hardware for nfcs which working different frequency.

Ready to open it up :man_factory_worker: and take some photos :camera_flash: to may get a clue what the brains :brain: of operation is?

And any information on what version you ordered?

I finally got my tuya-II version (I hope, note that the Bluetooth logo is missing on front-panel).
It’s using WBR1 module, so guess there is no transplant happening here.
Wonder if the Tuya-I will have another module as it does miss some functionality this version will have.

Got it from aliexpress from S4A, which support or communication wise do not recommend, they never answered my questions, only replying to email them instead, and even via email they never responded…



1 Like

Tested to remove the tuya module and soldered wires to the board and onto a ESP32.
The Tuya module only uses 3.3v, gnd, txt and rx. the EN pin is going to a unpopulated resistor, so that is not in use.
Tuya component in ESPHome appears to not be compatible, id does heartbeat, but nothing else.

Get stuck on initialization.

[18:55:25][C][tuya:039]:   Configuration will be reported when setup is complete. Current init_state: 3

If I trigger the Keyboard into pairing mode then tuya component get stuck on init_state 4

[18:56:49][E][tuya:213]: WIFI_RESET is not handled
[18:56:49][D][uart_debug:158]: <<< "U\xAA\x00\x03\x00\x00\x02U\xAA\x00\x04\x00\x01\x00\x04"
[18:56:49][D][uart_debug:158]: >>> "U\xAA\x00\b\x00\x00\a"
[18:56:49][D][uart_debug:158]: >>> "U\xAA\x00\b\x00\x00\a"
[18:56:49][D][uart_debug:158]: >>> "U\xAA\x00\b\x00\x00\a"
[18:56:50][D][uart_debug:158]: >>> "U\xAA\x00\b\x00\x00\a"
[18:56:50][D][uart_debug:158]: >>> "U\xAA\x00\b\x00\x00\a"
[18:56:50][E][tuya:408]: Initialization failed at init_state 4

Im no tuya protocol expert.
Sending manually commands, this is query mode, but I get a echo of the same data back.

[19:07:16][D][uart_debug:158]: >>> "U\xAA\x00\x02\x00\x00\x01"
[19:07:16][D][uart_debug:158]: <<< "U\xAA\x00\x02\x00\x00\x01"

query info gives me a response:

[19:08:12][D][uart_debug:158]: >>> "U\xAA\x00\x01\x00\x00\x00"
[19:08:12][D][uart_debug:158]: <<< "U\xAA\x00\x01\x00*{\"p\":\"s7qamihym60z5jro\",\"v\":\"1.0.0\",\"n\":0}\xED"

The header is connected to TX and RX
Top 5v (goes to 3.3 regulator), RX, TX, GND

Since 2023.02.0 of ESPHome, Wiegand is supported, I think I will probably just solder in a esp module with som wires and glue it on the board and just connect it to wiegand pins.

1 Like

Hey! Did you manage to make it work with esphome? I’m searching for keypads and this would be a great option if proved viable

I can use the esphome with wiegand.
That way every tag or every button press gets read by the esp module.

One thing I did’t get to work is to set the keypad to wiegand reader-mode. (there is stand-alone and reader-mode)
So what happens is that the built in IC for handling the rfid read and button presses thinks it’s running in stand-alone. So if I enter a pincode, it will indicate that the pin is wrong as it’s missing from the internal memory of approved Pins.
But the data is still sent via wiegand, so does both send via wiegand and handle localy.

The best would to be that the keypad is in reader-mode.
But I think the ESPhome needs to be able to send data back to the keypad, to indicate that the key/pin is correct and flash green etc.
And what I know there is no way to send data to the keypad, only read from it.

So another thing that I was thinking of doing was to use other pins on the esp-module to handle the buzzer and the LEDs.
But then I will have to do some more hacking :slight_smile:

1 Like

Hello LCL,

I have bought (theoretically) the same keypad from Amazon as “Wisyurt WiFi Tuya Touchpad” and it mentions Tuya compatibility. Unfortunately, the complete PCB is covered in silicone, I guess to make it waterproof. So I cannot check whether the module is there. But as compared to the picture of your first keypad, my buzzer and the elcos are in the right position. There is neither a bluetooth nor a WiFi symbol in the upper right, unlike your’s.

I powered it on but I see neither a WiFi network popping up nor anything else that would show it connects. Can you give me a helping hand what steps you did in order to get it into the tuna app (which would be the first step, afterwards I would integrate it into FHEM with fhempy or I use tuya-mqtt, this is not decided yet). I think there is still a small chance it is w/o WiFi and they advertised it falsely…

Best Regards,
Carsten.

OK, I can now answer myself. On the box there was a small sticker saying “T12MF-W” and I found that code on AliExpress. It explains this is a waterproof keypad. No Tuya. It should have been “T12MF-W-WiFi tuya”. How good I ordered at Amazon and not in China directly…

Hi, on the box of my keypad there is also a small sticker, but it says T12EM-wifi-2
Think there is 125 kHz and 13.56 MHz rfid so EM and MF can probably identify them (mine is 125kHz).