Tuya/Smart Life Door Locks

Hello! I was interested in buying one of these cheap tuya door locks since there is a large variety of them available where I live. I unfortunately couldn’t find anyone that tried integrating them with HA before and they aren’t specified on an official integration page. Since all of my tuya devices work flawlessly with HA, I was wondering what are the odds of the this lock working as well. I ONLY need the locking mechanism to work, I don’t care about any other sensors on it. Thanks in advance for any advises!

Just found out it actually says on the integration page that the locks are not officially supported :((
If anyone has any experience with these either WIFI or ZigBee ones, please let me know, Thanks!

Another update: someone on tuya integration GitHub claimed they can lock/unlock all types of these locks via API calls, so if that were to be true next question would be how would someone automate getting the cloud key with one request and then using it to unlock/lock the door with only one button>?

This guy showed them working with homekit, and yet we still don’t even have the most generic driver to run them on home assistant, FeelsBadMan

HomeKit Integration Video

2 Likes

So basically to get zigbee versions of these locks into HA just get a zemismart hub and an apple device and connect those through home kit. If anyone has a better idea on how to implement it lemme know.

1 Like

the entire point of zigbee is in my opinion that you don’t need the cloud so to buy a tuya zigbee hub seems like a waste

i really hope that someone get it to work in Home Assistant soon because i just fried my old lock and need a new one asap

1 Like

Try using tuya local integration (not local tuya) for wifi locks.

The dev added support for lock, but you might need to submit a request to the github to add your device

@Robisback did you buy it in the end, and does it work?

Anyone get this working? I am considering it too

Unfortunately no.
I wouldn’t recommend the wifi version because you can’t remotely unlock it unless there’s unlock request (from the physical keypad)

Might stick to Zigbee or bluetooth lock. There’s homekit hub for that and TTlock has a custom integration.

Not sure if it is of any help but I have been playing around with this a little. I have the following:

Tuya Wifi+Pin - Basically a keypad/rfid reader

The Tuya IoT platform lists it as an “mk” device.

I have been able to unlock it remotely with two API calls from the Tuya IoT website.

First, I make an API call to “Get Temporary Key”:

curl --request POST “https://openapi.tuyaus.com/v1.0/devices/eb8bfxxxxxxxxxxxxxxsx/door-lock/password-ticket” --header “sign_method: HMAC-SHA256” --header “client_id: ftaqjxxxxxxxxxxxxxxx” --header “t: 1677685183193” --header “mode: cors” --header “Content-Type: application/json” --header “sign: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx” --header “access_token: xxxxxxxxxxxxxxxxxx”

That will return a “ticket_id” along with some other info, then I make a “Password-Free Unlocking” call:

curl --request POST “https://openapi.tuyaus.com/v1.0/devices/eb8bfxxxxxxxxxxxxxx/door-lock/password-free/open-door” --header “sign_method: HMAC-SHA256” --header “client_id: ftaxxxxxxxxxxxxxxxxxx” --header “t: 1677685751682” --header “mode: cors” --header “Content-Type: application/json” --header “sign: 9xxxxxxxxxxxxxxxxxxxxxxxxxxxx09” --header “access_token: aafb7xxxxxxxxxxxxxxxxxxxx8f” --data “{“ticket_id”:“4Nam6LUO”}”

So maybe someone smarter than me can figure out how to roll this into Home Assistant???

5 Likes

How do you get a valid sign? I tried here, but the sign gets invalidated after the first command.

Would love if someone could get these smart locks working with Tuya. I have a tuya deadbolt lock (similar to the image above) that uses a gateway and ble.

I am able to get info from the lock using IoT, but have no way to figure how to work that with HA (I am a newbie at this). Has anyone had any luck with this?

Hi, there is new custom integration for Tuya Bluetooth (Thanks to @PlusPlus-ua and all his efforts to get smart locks included in this integration )
if anyone has one of tuya ble smart lock please try this with yours and share your results, my HA is installed on an old laptop i dont trust the bluetooth range, i would like to see the result for others, Thanks!
check it out at link below:

3 Likes

Hi, do i still need the tuya bt hub?
Or does it work with bt proxy

It supposed to work with bt proxy and you need to makesure you unbind the device from your bt gateway if you have one, so it can discover your smart lock.

btw i have an open issue on this custom integration’s github page, please share your results there if possible, thanks

I have created ticket for that

@seanmoro your method requires paid subscription to Smart Lock Open APIs-Cloud Services API Reference-Tuya Developer ?

@fberbert :
Get Temporary Key:
https://eu.iot.tuya.com/cloud/explorer?id=p1683230055249f8ftrp&groupId=group-561293935902745&interfaceId=1275042059341799400&abilityId=1365686146595553298
Unlock Door Without Password
https://eu.iot.tuya.com/cloud/explorer?id=p1683230055249f8ftrp&groupId=group-561293935902745&interfaceId=1442670936242270200&abilityId=1365686146595553298

btw. local suport is not possible → Request support for Smart Lock - T12-Wifi-II / Card+PIN · Issue #678 · make-all/tuya-local · GitHub

1 Like

@macxq - As far as I know, there is no paid subscription required. I do not pay for anything (nor am I a dev) so I was able to access everything freely. The three important variable seem to be:

–header "sign: "
–header "access_token: "
–header "t: "

the first two will be unique for everyone. The t: header is a timestamp in epoch time as the access token expires after a set period.

Hope this helps.

I have also bought several different models of tuya door locks like wifi and zigbee (arround 20 different, zigbee one even can be remotely unlocked as well as one wifi model) was not able to integrate any into homeassistant. It would be rly nice to see any of them working with HA

1 Like

I just got a tuya padlock that is bluetooth, before I found this integration I had already loaded it into a gateway. It did show up to homeassistant but wouldn’t learn, so I unbound it from the gateway and now homeassistant isn’t seeing it anymore. It does still show up in the tuya app, I had assumed this was just via the bluetooth connection to my phone. Do I need to fully delete the lock and re add it only as a connection through my phone? Originally I linked it straight to the gateway.