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-localtuya

v0.0.2

Published

Homebridge plugin for local control of Tuya devices

Readme

homebridge-localtuya

A Homebridge plugin for controlling Tuya devices locally without cloud dependencies. Currently optimized for fan/light combination devices, specifically Designers Fountain ceiling fans.

Features

  • Local control of Tuya devices without cloud dependency
  • Real-time status updates
  • Support for fan and light combination devices
  • HomeKit integration for:
    • Fan on/off state and speed control
    • Light on/off state and brightness control

Prerequisites

  1. Homebridge installed and running
  2. Tuya device(s) set up and connected to your local network
  3. Device local keys (see Obtaining Device Keys)

Installation

npm install -g homebridge-localtuya@beta

Configuration

Configure through Homebridge UI or by editing config.json:

{
  "platforms": [
    {
      "platform": "LocalTuya",
      "devices": [
        {
          "name": "Living Room Fan",
          "id": "device_id",
          "key": "local_key",
          "ip": "device_ip",
          "type": "fanLight"
        }
      ]
    }
  ]
}

Required Device Parameters

  • name: Display name in HomeKit
  • id: Device ID from Tuya
  • key: Local encryption key
  • ip: Device's local IP address
  • type: Device type (currently only "fanLight" supported)

Obtaining Device Keys

Method 1: Smart Life App (Recommended)

  1. Install Smart Life app and add your devices
  2. Use third-party tools to extract local keys from the app
  3. Note down device IDs and local keys

Method 2: IoT Platform

  1. Create Account:

    • Visit iot.tuya.com
    • Register for a developer account
    • Select your data center based on location
  2. Create Cloud Project:

    • Go to Cloud > Development
    • Create new project
    • Select "Smart Home" industry and development method
  3. Configure API Access:

    • Enable required services:
      • Industry Basic Service
      • Smart Home Basic Service
      • Device Status Notification APIs
    • Note your Access ID and Secret
  4. Link Devices:

    • Navigate to Cloud > Your Project > Devices
    • Click "Link Tuya App Account"
    • Use Smart Life app to scan QR code
    • Authorize connection
  5. Get Device Information:

    • Device IDs and local keys will be visible in the linked devices section
    • Note: IoT platform access to local keys is limited and may not work for all devices

Supported Devices

Currently optimized for:

  • Fan/light combination devices (Designers Fountain ceiling fans)
  • Devices using Tuya protocol version 3.3

Troubleshooting

  1. Ensure device is connected to local network
  2. Verify device IP address is correct and static
  3. Confirm local key is correct
  4. Check device is using compatible protocol version (3.3)

Contributing

This is a beta version focused on fan/light combination devices. Please report issues on GitHub.

License

MIT


For more information about Homebridge, visit the Homebridge documentation.