alixinne / hyperion.rs

Rust implementation of the Hyperion Ambient Lighting software
MIT License
10 stars 1 forks source link
ambilight hyperion rust

hyperion.rs

Build Docs GitHub

hyperion.rs is a rewrite of hyperion.ng in the Rust Programming Language. This version features:

Disclaimer: this is an early work-in-progress:

Compatibility

Currently implemented features:

Extra features not available in hyperion.ng:

Configuration

Migrating your settings

This rewrite uses the same database format for storing settings. In order to load your existing hyperion.ng settings, assuming you are in your home directory:

# Create config directory for hyperion.rs
$ mkdir -p .config/hyperion.rs/

# Copy the existing hyperion.ng database to the new location for hyperion.rs
$ cp .hyperion/db/hyperion.db .config/hyperion.rs/

Using a TOML file

You may also configure hyperion.rs using a TOML representation of the configuration. To generate the initial file, you can use the --dump-config option:

$ hyperiond-rs --dump-config >config.toml

Then, you can start the daemon using this config file:

$ hyperiond-rs --config config.toml

The minimal configuration required is as follows:

[instances.0.instance]
friendlyName = 'Test instance'
enabled = true

[instances.0.device]
type = 'dummy'

Running hyperion.rs

Once your settings database has been migrated, you can run hyperion.rs using cargo:

$ cargo run

If running from a release archive, invoke the hyperiond-rs binary directly.

Cross-compiling

Cross-compiling is done using cross. Let's say we are building for the Raspberry Pi Zero, which corresponds to the Rust target arm-unknown-linux-gnueabihf.

$ export TARGET=arm-unknown-linux-gnueabihf
$ export ENABLE_PYO3=1

# (if not done already) Install cross
$ cargo install --force cross

# Build the project
$ cross build --release --target $TARGET

# The resulting binaries will be in target/$TARGET/release

License

This work is licensed under the MIT License.

Author

Alixinne alixinne@pm.me. Original project and protocol source files by hyperion-project.