huesmith-core 0.1.0

Platform-agnostic core for Hue-compatible Zigbee lights: color math, ZCL light state machine, and scene parsing
Documentation
/// Device identity reported in the Basic cluster.
/// The Hue Bridge uses `manufacturer_name` and `model_identifier`
/// to determine device type and capabilities.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct DeviceIdentity {
    pub manufacturer_name: &'static str,
    pub model_identifier: &'static str,
    pub date_code: &'static str,
    pub sw_build_id: &'static str,
    pub hw_version: u8,
}

// ── Philips Hue Presets ──────────────────────────────────────────────

/// Philips Hue White and Color Ambiance A19 (3rd gen)
pub const PHILIPS_LCT016: DeviceIdentity = DeviceIdentity {
    manufacturer_name: "Philips",
    model_identifier: "LCT016",
    date_code: "20190816",
    sw_build_id: "1.65.11_hB798F2B",
    hw_version: 1,
};

/// Philips Hue White Ambiance (color temperature only)
pub const PHILIPS_LTW015: DeviceIdentity = DeviceIdentity {
    manufacturer_name: "Philips",
    model_identifier: "LTW015",
    date_code: "20190816",
    sw_build_id: "1.46.13_r26312",
    hw_version: 1,
};

/// Philips Hue White (dimmable only)
pub const PHILIPS_LWB014: DeviceIdentity = DeviceIdentity {
    manufacturer_name: "Philips",
    model_identifier: "LWB014",
    date_code: "20190816",
    sw_build_id: "1.46.13_r26312",
    hw_version: 1,
};

/// Philips Hue Lightstrip Plus V2
pub const PHILIPS_LST002: DeviceIdentity = DeviceIdentity {
    manufacturer_name: "Philips",
    model_identifier: "LST002",
    date_code: "20190816",
    sw_build_id: "1.65.11_hB798F2B",
    hw_version: 1,
};

/// Philips Hue White and Color Ambiance E14 Candle
pub const PHILIPS_LCT012: DeviceIdentity = DeviceIdentity {
    manufacturer_name: "Philips",
    model_identifier: "LCT012",
    date_code: "20190816",
    sw_build_id: "1.65.11_hB798F2B",
    hw_version: 1,
};

// ── Generic / Custom Presets ─────────────────────────────────────────

pub const GENERIC_COLOR_LIGHT: DeviceIdentity = DeviceIdentity {
    manufacturer_name: "huesmith",
    model_identifier: "HUESMITH-ECL01",
    date_code: "20250101",
    sw_build_id: env!("CARGO_PKG_VERSION"),
    hw_version: 1,
};

pub const GENERIC_CCT_LIGHT: DeviceIdentity = DeviceIdentity {
    manufacturer_name: "huesmith",
    model_identifier: "HUESMITH-CCT01",
    date_code: "20250101",
    sw_build_id: env!("CARGO_PKG_VERSION"),
    hw_version: 1,
};

pub const GENERIC_DIMMABLE_LIGHT: DeviceIdentity = DeviceIdentity {
    manufacturer_name: "huesmith",
    model_identifier: "HUESMITH-DIM01",
    date_code: "20250101",
    sw_build_id: env!("CARGO_PKG_VERSION"),
    hw_version: 1,
};

pub const GENERIC_ON_OFF_LIGHT: DeviceIdentity = DeviceIdentity {
    manufacturer_name: "huesmith",
    model_identifier: "HUESMITH-ONF01",
    date_code: "20250101",
    sw_build_id: env!("CARGO_PKG_VERSION"),
    hw_version: 1,
};