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.