npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

homebridge-smart-lock-ttlock

v1.0.1

Published

Use smart locks with TTLock platform on Homebridge.

Readme

Homebridge Smart Lock TTLock Platform

GitHub release npm version Node.js Homebridge License

Requirements

  1. Lock/door handle using TTLock Platform (Wifi, or Bluetooth + Gateway)
  2. Smart Lock TTLock Bluetooth - Compatible Gateway (G1, G2, G3, or G4).
  3. TTLock app for iOS or Android
  4. Bash access to run curl command

Setup Instructions

Create TTLock Developer Account

  1. Go to TTLock Platform Registration. If you have previously used the lock with the app, you'll have to use the same account to create the app.
  2. Complete the required information to create a developer account for API access.
  3. Wait for the email confirming activation of your account (manual process that will be completed by TTLock).
  4. Create application and wait for approval.
  5. Log back into the TTLock Developer Platform and retreive your ClientId and ClientSecret.
  6. You'll have to submit the password as md5 with the api(use this site).
curl --location --request POST 'https://euapi.ttlock.com/v3/user/register?clientId=[clientid]&clientSecret=[clientsecret]&username=[username]&password=[passwordasmd5]&date=CURRENTMILLIS' \
--header 'Content-Type: application/x-www-form-urlencoded' \

Associate Lock and Gateway with New Account

  1. Log into the TTLock iOS or Android app with your account.
  2. Add your lock(s) to the app to accociate them with your account.
  3. If using Bluetooth, add the gateway (and ensure it is associated with the locks).

Plugin Installation

Recommended: install via the Homebridge UI

Or install the plugin with the following command:

npm install -g homebridge-smart-lock-ttlock

Configuration

	{
		"name": "Smart Lock TTLock Platform",
		"batteryLowLevel": 15,
		"maximumApiRetry": 2,
		"requestTimeoutMs": 7000,
		"apiRetryIntervalMs": 500,
		"postActionRefreshDelayMs": 2900,
		"username": "username",
		"password": "passwordasmd5",
		"clientid": "clientid",
		"clientsecret": "clientsecret",
		"platform": "smart-lock-ttlock",
		"_bridge": {
				"username": "0E:54:DD:3B:09:30",
				"port": 51221,
				"name": "Smart Lock TTLock Platform"
		}
	}

name: Platform name

clientid: TTLock Open Platform clientId.

clientsecret: TTLock Open Platform clientSecret.

username: TTLock app account username.

password: MD5 hash of your TTLock account password.

batteryLowLevel: Battery percentage at or below which HomeKit shows a low battery warning.

maximumApiRetry: Maximum number of attempts per TTLock API request.

requestTimeoutMs: HTTPS timeout for TTLock API requests.

apiRetryIntervalMs: Delay between TTLock network retry attempts.

postActionRefreshDelayMs: Delay before the second API request that re-reads the real lock state after a lock or unlock command.

Usage

  • On Homebridge load, plugin will get all locks from TTLock account and add them to Homebridge (if they are not already cached)
  • Use Homekit to lock and unlock your locks!
  • Homekit will show warning when lock has low battery (customize in plugin configuration)