Smart lights control tool and Rust
crate.
Currently it mainly supports Philips Hue lights. But the back-end crate is written in a way that allows other smart lights to be added in the future.
That said, the bulk of the codebase and the CLI focuses on Philips Hue as I don't have any other branded smart light or other smart home tech to integrate.
As it is under development you will need the Rust
and cargo
installed.
Easiest way to do so is to get on board with rustup.
Once you have the dependencies installed, run the following:
shell
cargo install --git https://github.com/finnkauski/lighthouse
More manually:
shell
git clone https://github.com/finnkauski/lighthouse
cd lighthouse
cargo install --path .
If you would like to see some of the uses for the crate
side of lighthouse
,
see the examples
directory of the repository. They will give you an idea of
how to use the internals of the crate.
After installing you will have to authenticate to a Philips Hue
bridge (the
box that controls the lights). All commands with the exception of discover
will run you through a Hue authentication flow.
```shell
lh on
lh off
lh state
lh state -f filename
lh discover
lh info ```
The tool is good enough for me to be able to do most stuff I want to do. It does have the potential to become much more user friendly. I would love people to contribute:
Result
returns.
Good one to start with.reqwest
client is not async
, would be ideal if we could send
the lights commands asynchronously rather than in a for loop.