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-tuya-smartlife

v1.0.1

Published

Homebridge plugin bringing Tuya / Smart Life devices into HomeKit via the Smart Life device-sharing (QR) login — no Tuya developer account required.

Readme

Homebridge Tuya SmartLife

npm npm

Homebridge plugin for Tuya / Smart Life devices using the Smart Life QR login flow. The goal is to avoid per-user Tuya developer accounts and 6-month IoT Core trial renewals.

The current v1 focus is switches, outlets, thermometers, basic sensors, and thermostats.

Install

Install through the Homebridge UI plugin search, or from the Homebridge server shell:

npm install -g homebridge-tuya-smartlife

Test Builds

For unreleased test builds, install a GitHub tarball from a known commit:

npm install "https://github.com/supagroova/homebridge-tuya-smartlife/archive/<commit-sha>.tar.gz"

For the active PR branch, use the latest commit SHA from:

https://github.com/supagroova/homebridge-tuya-smartlife/pull/1

Avoid installing this test build with git+https://... on Raspberry Pi / Homebridge hosts. npm treats that as a Git dependency and runs a preparation install with dev dependencies; on low-memory hosts this can be killed with SIGKILL.

Smart Life QR Setup

  1. Install the plugin and restart Homebridge if needed.
  2. Open Homebridge UI.
  3. Open the plugin settings for Homebridge Tuya SmartLife.
  4. Enter your Smart Life user code.
  5. Leave the default Tuya login endpoint unless you know your account needs another endpoint.
  6. Click Start QR Login.
  7. Scan the displayed QR code with the Smart Life app.
  8. Wait for the settings screen to show the connected state.
  9. Restart Homebridge so the platform can discover devices using the saved token.

The plugin stores its token in the Homebridge storage path as:

tuya-smartlife-token.json

The browser UI does not receive or store the Tuya access token or refresh token.

Supported v1 Devices

Initial support targets the author's device set:

| Tuya category | HomeKit support | | --- | --- | | kg | Switch | | tdq | Switch | | cz | Outlet | | pc | Outlet | | wsdcg | Temperature / humidity sensor | | mcs | Contact sensor | | pir | Motion sensor | | sj | Leak sensor | | ywbj | Smoke sensor | | wk | Thermostat |

Multi-gang switches and multi-socket outlets expose one HomeKit service per controllable data point.

Known Limitations

  • Cloud-only: local LAN and BLE control are intentionally out of scope.
  • The current development build uses the Tuya-published Home Assistant compatible QR credentials. A Homebridge-specific client id/schema should be revisited before broad public or verified-plugin release.
  • Device state is polling-based. MQTT push updates are deferred to v2.
  • Lights, dimmers, covers, fans, scenes, and per-device DP overrides are deferred.
  • After QR login, restart Homebridge to run discovery.

Troubleshooting

git dep preparation failed / SIGKILL during install

Use a GitHub tarball URL instead of git+https://...:

npm install "https://github.com/supagroova/homebridge-tuya-smartlife/archive/<commit-sha>.tar.gz"

Plugin appears but no devices are discovered

Check the Homebridge logs. If no token is stored yet, the plugin logs that Smart Life authentication is required and asks you to open plugin settings to complete QR setup.

QR login fails with app or region errors

Make sure you scan the QR code in the Smart Life app with the account that owns the devices. If the error mentions region or endpoint, try the endpoint that matches your Smart Life account region.

Development

Local verification gate:

make check
npm run release:check

The repository uses TDD gates, Jest, ESLint, TypeScript, and plain tsc output to dist/.