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

scrypted-tuya

v2.1.6

Published

Unofficial standalone Scrypted Tuya plugin with maximum advertised camera quality selection and Smart Life P2P bridge integration.

Readme

scrypted-tuya & Tuya Camera Bridge

Version License Build & Publish Home Assistant C++23 Engine Scrypted Docker

Buy Me A Coffee

Unofficial standalone Scrypted Tuya / Smart Life camera plugin & companion Home Assistant WebRTC-to-RTSP bridge.

Extracted from plugins/tuya and significantly extended with:

  • Maximum quality selection — requests the highest writable quality advertised by each camera before RTSP allocation.
  • Smart Life P2P bridge — companion Home Assistant add-on with a custom C++ WebRTC-to-RTSP streaming engine.

This project is unofficial and is not affiliated with or endorsed by Scrypted or Tuya.


Features

  • Tuya and Smart Life camera discovery via MQTT.
  • Cloud RTSP camera streaming.
  • Maximum advertised video-quality selection with safe fallback.
  • Tuya doorbell ring notifications.
  • Motion events on supported devices.
  • Camera indicator and floodlight controls when exposed by the device.
  • QR-code login flow (Tuya / Smart Life app — no developer keys required).

Home Assistant — Tuya Camera Bridge Add-on

For cameras that stream at low resolution via Tuya Cloud RTSP (or not at all), use the companion add-on in the bridge/ folder. It runs a custom C++ streaming engine that:

  1. Authenticates via Smart Life QR code (scanned once from the Web UI).
  2. Opens a WebRTC P2P session to the camera using the Tuya protocol.
  3. Re-streams it as a standard RTSP feed on your local network.

1-Click Install via Home Assistant

Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.

Manual Install (Home Assistant)

  1. Settings → Add-ons → Add-on Store → ⋮ → Repositories
  2. Add https://github.com/resonaura/scrypted-tuya
  3. Install Tuya Camera Bridge → Start
  4. Open the Web UI (ingress or http://<ha-host>:6767)
  5. Create a profile → scan the QR code in Smart Life
  6. Copy the RTSP URL shown on the camera card, e.g. rtsp://<ha-host>:8655/<CameraName>
  7. In Scrypted → camera settings → Smart Life P2P HD RTSP URL → paste URL

The Scrypted plugin continues handling discovery, motion, doorbell events and controls. Video comes from the P2P bridge.


Standalone Docker (without Home Assistant)

You can run the Tuya Camera Bridge on any Linux/macOS machine with Docker:

Using Docker Compose (Recommended)

Clone the repository and run:

git clone https://github.com/resonaura/scrypted-tuya.git
cd scrypted-tuya/bridge
docker compose up -d --build

Example docker-compose.yml:

services:
  tuya-bridge:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: tuya-bridge
    restart: unless-stopped
    # CRITICAL: host network mode is required for camera P2P WebRTC / UDP discovery
    network_mode: host
    environment:
      - PORT=6766
      - WEB_PORT=6767
      - RTSP_BASE_PORT=8655
      # Optional: set LAN IP explicitly if auto-detection fails:
      # - RTSP_HOST=192.168.1.50
      - LOG_LEVEL=info
    volumes:
      - ./data:/data/tuya-bridge
      - ./config:/config/tuya-bridge

Using docker run

docker run -d \
  --name tuya-bridge \
  --restart unless-stopped \
  --network host \
  -v $(pwd)/data:/data/tuya-bridge \
  -v $(pwd)/config:/config/tuya-bridge \
  ghcr.io/resonaura/tuya-rtsp-bridge:latest

After starting, open http://<host-ip>:6767 in your browser.

Network Ports

| Port | Protocol | Purpose | |------|----------|---------| | 6766 | TCP | REST / WebSocket API | | 6767 | TCP | Web UI dashboard | | 8655+ | TCP/UDP | RTSP streams (one per camera, starting at 8655) |


Authentication (Scrypted plugin)

The recommended login method is the QR-code flow from the Tuya or Smart Life application. The legacy Tuya Developer Account login remains available for existing configurations.


Development

Requirements: Node.js, npm, a Scrypted server for deployment.

npm ci
npm run typecheck
npm run build

The plugin archive is generated at out/plugin.zip.


Attribution

The original Tuya plugin was written by the Scrypted contributors. This standalone fork is based on upstream commit abd37e4.

The bridge add-on was originally inspired by DanEng1982/tuya-rtsp-bridge. We are grateful for their pioneering work. The current add-on is a full from-scratch rewrite with a custom C++ engine, NestJS backend, and React frontend.


License

See UPSTREAM-LICENSE-NOTICE.md. Review upstream terms before redistributing.