huesmith-core
Platform-agnostic core for Philips Hue–compatible Zigbee lights.
This crate holds everything that does not depend on a specific MCU or HAL, so it builds and tests on any host (Linux, macOS):
- Color math — CIE 1931 XY ↔ RGB, mireds/Kelvin ↔ RGB, HSV, CCT channel mixing.
LightState— a ZCL-accurate light state machine (on/off, level, color modes, smooth transitions, identify blink, scene snapshots).LightOutput— the trait a hardware backend implements to drive real LEDs.- Scene parsing — defensive parsing/encoding of Zigbee scene extension fields.
- Device identity — Hue device types and ready-made Philips model presets.
The hardware/Zigbee-stack side lives in the companion crate
huesmith, which implements LightOutput on
ESP32-C6/H2 via ESP-IDF.
use xy_to_rgb;
// CIE XY (ZCL 0–65535 range) + brightness (0–254) → 8-bit RGB
let = xy_to_rgb;
Testing
huesmith-core is pure Rust and runs on the host:
See the project repository for the full guide.
Trademark & affiliation
This is an independent interoperability project and is not affiliated with, authorized, or endorsed by Signify (Philips Hue). "Philips Hue" and "Signify" are trademarks of Signify Netherlands B.V.; the bundled Philips model presets exist only so a self-built device can interoperate with a Hue Bridge. For educational and hobby use.
License
MIT