Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UCE Light

DMX lighting control for the UCE real-time lighting platform — fixture library, floorplan, scenes and patching, delivered as a module of uce-hub.

What is UCE?

UCE is a real-time lighting platform built around a single application, uce-hub:

  • a Rust backend (Axum + Tokio) that owns the DMX runtime, the HTTP/WebSocket API, persistence, and device integrations;
  • a Vue 3 frontend (Composition API + Pinia) for hands-on control, floorplan editing, scene management, and patching.

uce-hub is composed of feature modules. UCE Light is the lighting module: it provides everything needed to drive a DMX rig — from importing fixtures and patching addresses to painting a floorplan, mixing colors, and storing scenes. This repository holds the module's own source (Rust backend + Vue frontend); the code is compiled and shipped as part of uce-hub.

Features

Grounded in what the module actually implements:

  • DMX output over Art-Net and sACN (E1.31) — pluggable senders behind a common DmxSender trait, with a dedicated output loop driving full 512-channel universes.
  • Fixture library from the Open Fixture Library — browse and import fixture profiles straight from the public Open Fixture Library; catalog and profiles are fetched from OFL's public data with no API key.
  • Patch & soft-patch — assign fixtures to universes and addresses, resolve channel layouts per fixture mode, and inspect the live output in a patch visualizer.
  • Interactive floorplan — place fixtures, beams and furniture on a plan, edit shapes with a built-in vector editor, save multiple setups, and see per-fixture state live.
  • Scenes — capture and recall lighting looks across DMX, Zigbee and Elgato devices, with configurable fades.
  • Rooms — organize fixtures into rooms and drive per-room scenes and controls.
  • Zigbee lights via Zigbee2MQTT — pairing mode, device rename, and RGB / CCT / gradient control over MQTT.
  • Elgato Key Light — network discovery and control of Key Light devices.
  • Import / export — move configuration and DMX data in and out for backup and transfer.
  • Real-time UI — a WebSocket channel (/ws) streams DMX updates to the frontend, with dedicated fade control.

Architecture

uce-hub is a hub that pulls feature modules directly into its own build — modules are not separate services, they are source injected at compile time.

Backend (statically linked into uce-hub). The hub's Rust crate references this module's files in place via #[path = "../../modules/uce-light/core/src/..."] attributes (see uce-hub's core/src/main.rs and core/src/handlers/mod.rs). The module's core/src/** therefore compiles as part of the uce-hub binary. module.json declares the API surface the module owns (protected_paths), and core/src/module_paths.rs marks which routes belong to UCE Light — /ws, /api/config*, /api/fade, /api/library, /api/dmx/*, /api/scenes, /api/floorplan/*, /api/zigbee/*, /api/elgato/*, and the import/export/cloud routes.

Frontend (bundled into uce-hub's web app). Before the hub's web build runs, web/scripts/ensure-light-module.mjs copies this module's web/src/** into uce-hub/web/modules/uce-light/src, and Vite/TypeScript aliases (@, @uce-light) resolve to it. The module's Vue components, stores, composables and API clients thus build into the hub frontend bundle.

Repository layout

uce-light/
├─ core/src/      Rust backend sources injected into uce-hub core
│  ├─ dmx/          Art-Net & sACN senders + output loop
│  ├─ library/      Open Fixture Library catalog & profile manager
│  ├─ mqtt/         Zigbee2MQTT integration
│  ├─ handlers/     HTTP/WebSocket handlers (config, scenes, floorplan, …)
│  ├─ scenes.rs     Scene storage & recall
│  └─ output.rs     Runtime output plumbing
├─ web/src/       Vue 3 / TypeScript sources injected into uce-hub web
│  ├─ components/   Floorplan, patch, scenes, rooms, Zigbee, Elgato UI
│  ├─ stores/       Pinia stores
│  ├─ composables/  Reusable UI logic
│  └─ api/          Backend API clients
├─ module.json    Module metadata (slug, routes, OTA tag prefix)
└─ LICENSE        GPLv3

Tech stack

  • Backend: Rust (edition 2024), Axum, Tokio, tower-http, artnet_protocol, sacn, rumqttc (MQTT), SQLx (SQLite), reqwest, serde, tracing.
  • Frontend: Vue 3 (Composition API), Pinia, TypeScript, Vite, @mdi/js; ESLint and vue-tsc for checks.

Build & Run

UCE Light is developed in this repository but built as part of uce-hub. Check out both repositories side by side, inject the module, then build the hub.

1. Get the sources

git clone https://github.com/UCE-Tech/uce-hub.git
git clone https://github.com/UCE-Tech/uce-light.git

2. Inject the module into uce-hub

cd uce-hub
./scripts/bootstrap-light-module.sh        # Windows: ./scripts/bootstrap-light-module.ps1

The bootstrap script syncs a sibling ../uce-light checkout into modules/uce-light (falling back to cloning from GitHub if none is present). uce-hub also composes the uce-resolume module, so run ./scripts/bootstrap-resolume-module.sh as well for a complete hub build.

3. Backend

cd core
cargo build            # or: cargo run  → serves API + WebSocket on http://localhost:3000

4. Frontend

cd ../web
npm ci
npm run build          # runs ensure-light-module.mjs, then vue-tsc + vite build
# or: npm run dev      → Vite dev server on http://localhost:5173

Quality checks

The module is validated by running uce-hub's checks with it injected (this is what CI does):

# from uce-hub/core
cargo fmt -- --check
cargo clippy -- -D warnings
cargo test

# from uce-hub/web
npm run lint
npm run build

Fixtures

Fixtures come from the Open Fixture Library, a public, open-data project. The catalog is enumerated from OFL's Git tree and profiles are fetched as raw OFL JSON — no account and no API key required. Imported profiles are validated (safe filenames, no path traversal) before being stored locally.

Updates

Releases are published to GitHub Releases from light-v* tags. Each release carries the module OTA package (the built web/dist). Because the UCE Light backend is statically linked into uce-hub, frontend-only module changes ship via a light-v* tag, while backend changes are delivered through a uce-hub (hub-v*) release.

Contributing

Contributions are welcome. Because the module builds inside uce-hub, please validate changes with the quality checks above (the same ones CI runs) before opening a pull request, and keep module logic in this repository rather than duplicating it into uce-hub. Bug reports and feature proposals are welcome via GitHub issues.

License

This project is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE for the full text.

Copyright (C) 2026 Maxime Deprince

About

UCE Hub module for DMX lighting control: fixture library (Open Fixture Library), interactive floorplan, scenes, and soft-patching. Injected into uce-hub at build time.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages