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

v0.5.7

Published

Homebridge plugin for Tuya/Lohas Led Smart Lamp

Readme

Homebridge plugin for Lohas/Tuya Led Smart Bulb and Teckin/Tuya Smart Socket

npm npm GitHub last commit GitHub license

Example config.json for Tuya based LED Smart Lamp that support dimmable and changing of color temperature:

    "accessories": [
        {
            "accessory": "TuyaSmartDevice",
            "name": "Kitchen Light",
            "type": "lightbulb dimmable tunable",
            "manufacturer": "LOHAS",
            "model": "Smart Lamp",
            "devId": "XXXXXXXXXX",
            "localKey": "XXXXXXXXXXXXXX",
            "brightMin": 11
        }
    ]

Example config.json for Tuya based multiple LED Smart Lamp, the second one is Multicolor LED RGB Lamp:

    "accessories": [
        {
            "accessory": "TuyaSmartDevice",
            "name": "Kitchen Light",
            "type": "lightbulb dimmable tunable",
            "manufacturer": "LOHAS",
            "model": "Smart Lamp",
            "devId": "XXXXXXXXXX",
            "localKey": "XXXXXXXXXXXXXX",
            "brightMin": 11
        },
        {
            "accessory": "TuyaSmartDevice",
            "name": "Bedroom Light",
            "type": "lightbulb dimmable tunable color",
            "manufacturer": "LOHAS",
            "model": "Smart Lamp Multicolor",
            "devId": "XXXXXXXXXX",
            "localKey": "XXXXXXXXXXXXXX",
            "enableColor": true
        },
    ]

Example config.json for Tuya based Smart Socket with energy monitoring

    "accessories": [
        {
            "accessory": "TuyaSmartDevice",
            "name": "Coffee Machine",
            "type": "outlet monitoring",
            "manufacturer": "Teckin",
            "model": "Smart Socket SP23",
            "devId": "XXXXXXXXXX",
            "localKey": "XXXXXXXXXXXXXX",
            "interval": 15
        }
    ]

Example config.json for Tuya based Power Strip

    "accessories": [
        {
            "accessory": "TuyaSmartDevice",
            "name": "PSB",
            "type": "powerstrip",
            "manufacturer": "China",
            "model": "3A4U-UK",
            "devId": "XXXXXXXXXX",
            "localKey": "XXXXXXXXXXXXXX",
            "switchNames": ["Plug1", "Plug2", "Plug3", "USB"],
            "switchDPSs": [1, 2, 3, 4],
        }
    ]

To obtain the devId (hint: it has the MAC address in it), the localKey and the productKey, carefully read and review these procedures: Linking a Tuya Device

Description of config structure:

| Key | Purpose | |-----|---------| | accessory | obligatory set to "TuyaSmartDevice" | | name | device name passed to HomeKit | | type | characteristic of device - tunable means posibility of changing white light temperature | | manufacturer | simply passed to HomeKit, can be found in device details | | model | simply passed to HomeKit, can be found in device details | | devId | must be obtained from device Linking a Tuya Device | | localKey | must be obtained from device Linking a Tuya Device | | ip | specify an ip address (optional) | | version | TuyAPI protocol version, default is 3.1, for new devices use 3.3 | | brightMin | minimum value which can be set as bulb's brightness, usualy it's 25 (default) for RGB bulbs and 11 for others | | brightMax | maximum value which can be set as bulb's brightness, default is 255 | | tempMin | minimum value which can be set as bulb's warm white light temperature, default is 0 | | tempMax | maximum value which can be set as bulb's cool white light temperature, default is 255 | | interval | interval in seconds for pooling energy parameters and saving in history for Eve App | | enableColor | enable color controls for bulb | | switchNames | names of plugs in power strip | | switchDPSs | DPS numbers corresponding with plugs in power strip | | logErrors | if true errors are logged into homebridge |

Tested on the following Smart LED bulbs (Non affiliated links following) and Smart WiFi sockets:

This plugin should work with any Tuya based LED bulb that can be added to the Tuya or Smart Life apps, or even any Tuya based Samrt Switch (simply set type as an empty string).

LOHAS is a popular brand and theirs products can be found on LOHAS Lights or on Amazon: LOHAS Lights on Amazon

Work in progress...