First time creating a Hubitat driver. I do plan on trying to create an app to handle a callback URL from the TTLock API side to get quicker unlock/lock updates.
I've tested this on 4 locks and 2 gateways I have. (No WiFi locks). So far it can unlock/lock the locks and get the status.
Let me know any feedback and I'll do my best to be responsive. I can plan to integrate into Hubitat Package Manager.
This will require you sign up for a TTLock API account.
Been using it for a while now. I adjusted it as well to add an "app" code to take incoming changes via the callback URL. (optional).
I just submitted to HPM for this, but keeping version at 0.9 for now. It works mostly for routines I have that act on unlocking a door for us when we come home.
Thank you. Have managed to now copy and paste that into the ttlock app i created on the ttlock website but no events are coming back. Does it work right away or does it take time?
update some notifications come through. if you use the app it doesnt. if you use nfc or passcode it does. but a bit delayed. now a bit hit and miss, some come through others dont.
I have installed the drivers for ttlock on C8. I may not have done them correctly. I am unable to find where I actually control the lock. When i click on the virtual device i created, there is no option to lock or unlock the device. Is anyone able to help me on this? Thank You in advance.
There is a button I left on (Getlocks) which should retrieve them and create the child devices. If that does not do it, try enabling logging and see if any errors show up or anything to indicate if it found any locks.
I just installed this and I can now see my lock. However I cannot find the URL information in either the parent or the child preference.
Also, the current state for lock always says locked, even when I know the lock is unlocked. Is this tied to not having the URL info or is this something different regarding the status. I see the poll is set to 5 mins by default. If I hit the refresh button, the status changes. Is a 5 min poll recommended?
The URL for the callback is in the "app" driver code, you'll need to get that installed and then pick which locks you want it to use.
The 5 min is a recommendation yes. There is a API limit from them. I have 4 locks. Each time it polls (5 min or whenever), it uses N-locks +1 for the API usage. It uses 1 for getting the list of locks, then uses another on each lock to set the status of that lock. The idea is to set it with enough to not run out of the free API credits they give.
Has anyone experienced a huge battery drain when their smart lock is connected to their gateway?
In my first few days of using my smart lock, I connected it to the gateway and then to hubitat with this intergration. I started with new batteries, but my smart lock battery was draining 10% per day. After a few days, I removed the gateway and my battery has not dropped a single percentage in the last 3 or 4 days (I've been updating the status of the battery daily to verify)
I'm guessing it is the constant communication with the gateway that is draining the battery, but could that be due to the polling from the hubitat intergration as I currently have it set to 5 minutes, or could it be something else with the gateway and the official TTLock app. I could not find any polling setting within the official app so I am not yet sure what is/was cauing the huge battery drain.
I have not had any battery drain issues using this. The cloud polls the gateway, not sure if the gateway try to poll the lock itself or not. I have mine set to 5 min and no 10% daily. I use rechargeable batteries too. So far it's been months and only 2 locks are down to 90% vs. the others still at 100%.