Sign inSign up

chuckcharlie/gemstonecontroller

By chuckcharlie

•Updated 3 months ago

A small self-hosted bridge that controls Gemstone Lights controllers locally over LAN.

Image
0

450

chuckcharlie/gemstonecontroller repository overview

⁠gemstonecontroller

A small self-hosted bridge that controls Gemstone Lights controllers locally over the Tuya LAN protocol — no cloud, no vendor app. Exposes each controller through MQTT (Home Assistant auto-discovery) and/or a REST HTTP/JSON API.

Controls the basics reliably: whole-controller on/off, brightness, and a single solid RGB color. (Vendor-app themes, animations, and per-pixel effects are cloud-managed and not available over local Tuya.)

⁠Quick start

services:
  gemstonecontroller:
    image: chuckcharlie/gemstonecontroller:latest
    container_name: gemstonecontroller
    restart: unless-stopped
    # Only needed when 'rest' is enabled (REST API + browser test page).
    ports:
      - "8080:8080"
    environment:
      INTERFACES: "mqtt"            # mqtt, rest, or mqtt,rest

      # Controllers: one variable per controller.
      # Format: Name|devId|localKey|ip[|tuya_version]
      GEMSTONE_DEVICE_1: "Gemstone Back|<devId>|<localKey>|192.168.1.50"

      # MQTT (used when 'mqtt' is in INTERFACES) — point at the same broker
      # your Home Assistant uses.
      MQTT_HOST: "mosquitto"        # broker hostname/IP
      MQTT_PORT: "1883"
      # MQTT_USERNAME: "user"
      # MQTT_PASSWORD: "pass"
      # MQTT_DISCOVERY_PREFIX: "homeassistant"
      # MQTT_BASE_TOPIC: "gemstone"

      POLL_INTERVAL: "30"
      LOG_LEVEL: "INFO"
docker compose up -d

Each controller is one line: Name|devId|localKey|ip[|tuya_version]. You need the devId and localKey per controller (a one-time extraction). With mqtt enabled and HA on the same broker, a light.gemstone_<slug> entity is auto-discovered per controller.

⁠Full docs

Setup, key extraction, Home Assistant wiring, REST API, and configuration reference are all in the GitHub repo:

https://github.com/chuckcharlie/gemstonecontroller⁠

Supported tags: latest and versioned releases (e.g. 1.0.1), multi-arch (amd64/arm64).

Tag summary

Content type

Image

Digest

sha256:e067f0032…

Size

52.7 MB

Last updated

3 months ago

docker pull chuckcharlie/gemstonecontroller