Skip to content

feat: DreamView (Razer) sub-protocol for per-segment LED control over LAN #131

@ir1141

Description

@ir1141

The crate currently has no support for DreamView - the binary sub-protocol that enables real-time per-segment LED color control over LAN UDP (sent as base64-encoded payloads inside "razer" JSON commands on port 4003).

This is useful for ambient lighting, music visualization, and any use case that needs to address individual LED segments at high frame rates (~30 fps).

Proposed changes:

  • New src/dreamview.rs module with packet codec (activate, deactivate, segment colors, checksums, base64/JSON wrapping)
  • DreamViewBackend async trait (separate from GoveeBackend since DreamView is LAN-only)
  • DreamViewBackend implementation for LocalBackend with per-device session tracking
  • DreamviewSession RAII guard with #[must_use], async close(self), and guarded Drop fallback
  • DreamViewSegmentLimit and DreamViewSessionConflict error variants
  • Unit tests for all packet building and protocol invariants

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions