Crates.io | riz |
lib.rs | riz |
version | 0.2.0 |
source | src |
created_at | 2023-12-12 23:50:34.877868 |
updated_at | 2023-12-15 20:11:34.790699 |
description | Wiz lights API and CLI |
homepage | |
repository | https://github.com/a-tal/riz.git |
max_upload_size | |
id | 1067409 |
size | 160,121 |
Check out Riz UI for an example of integrating a web UI with this API.
Both dev utilities are designed to be quick to iterate with, but dev.sh
is faster.
run.sh
dev.sh
Env Var | Default | Description |
---|---|---|
RIZ_PORT |
8080 | API listening port |
RIZ_STORAGE_PATH |
. | Path to storage (rooms.json must be writable by running UID) |
RIZ_CORS_ORIGIN |
http://localhost:8000 | Allowed CORS origin |
Build Arg | Default | Description |
---|---|---|
UID |
10010 | Running UID |
By default, RIZ_STORAGE_PATH
is configured to /data
; which is a VOLUME mount you may use.
The running dockerfiles include a healthcheck configuration.
To use the CLI; either pull the binary from the build container, or build this project locally with cargo build --release
. The CLI will built as target/release/riz
. Move that into your $PATH
somewhere if you want to use riz
anywhere.
$ riz --help
Riz light control CLI
Usage: riz [OPTIONS] [IP]...
Arguments:
[IP]... Bulb IPv4 address(es)
Options:
-b, --brightness <BRIGHTNESS> Set the bulb brightness (10-100)
-c, --color <COLOR> Set the bulb color as r,g,b (0-255)
-C, --cool <COOL> Set the cool white value (1-100)
-W, --warm <WARM> Set the warm white value (1-100)
-p, --speed <SPEED> Set the bulb speed (20-200)
-t, --temp <TEMP> Set the bulb temperature in Kelvin (1000-8000)
-l, --list List the available scene IDs
-s, --scene <SCENE> Set the scene by ID
-o, --on Turn the bulb on
-f, --off Turn the bulb off
-r, --reboot Reboot the bulb
-i, --status Get the current bulb status
-h, --help Print help
-V, --version Print version