6 releases (3 breaking)

0.4.1 Feb 15, 2022
0.4.0 Jan 22, 2022
0.3.0 Jan 10, 2022
0.2.1 Jan 1, 2022
0.1.0 Dec 31, 2021

#1154 in Hardware support

MIT/Apache

35KB
1K SLoC

Huehue

A Rust wrapper for Hue API v2.

Note that the Hue API v2 is in early access at the time of writing, so an upgrade to it could break applications in unpredictable way.

Features

  • Hue Bridge certificate validation.
  • Bridge discovery:
  • Devices:
    • list devices.
  • Light:
  • Smart plug:
    • switch on/off.
    • note: smart plug is exposed as a light, since it is also listed as a light by Hue.
  • XY to RGB and RGB to XY conversion.

Examples

The examples folder has fully functional sample applications to demonstrate some implemented features. The examples aim to be trivial to understand by focusing on specific functionality, and should be easy to copy and build your own application.

Simply use cargo to run the desired example:

$ cargo run --example scan

Scanning for bridges for 5 seconds.
1 bridges found.

> Bridge #1:
        Identifier: 1231231231231234
        Model: BSB002
        Version: 1948086000
        Address: 192.168.2.124
        Supported: true

Dependencies

~10–23MB
~363K SLoC