https://github.com/adridevelopsthings/philipshue-cli
A cli interface for the philipshue api
https://github.com/adridevelopsthings/philipshue-cli
Last synced: about 1 year ago
JSON representation
A cli interface for the philipshue api
- Host: GitHub
- URL: https://github.com/adridevelopsthings/philipshue-cli
- Owner: AdriDevelopsThings
- License: other
- Created: 2024-02-22T00:36:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-06T22:08:00.000Z (about 2 years ago)
- Last Synced: 2025-02-10T21:53:11.457Z (over 1 year ago)
- Language: Rust
- Size: 51.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# philipshue-cli
A cli interface for the philipshue api
## Installation
Download the binary from the releasese page for your operating system or install it with cargo:
```
cargo install --git https://github.com/adridevelopsthings/philipshue-cli
```
### AUR
If you're using arch linux you can get the philipshue-cli from the [AUR](https://aur.archlinux.org/packages/philipshue-cli):
```
yay -S philipshue-cli
```
### Docker
It's also possible to run philipshue-cli with docker:
```
docker run --rm -v ./config:/config ghcr.io/adridevelopsthings/philipshue-cli philipshue-cli login --device-type testdevice
```
# Usage
```
Usage: philipshue-cli
Commands:
login Login to the hue bridge.
get-light Get all data including it's state from a light.
list-lights List all lights, their light number and name.
get-lights List the data from all lights. If you just want to list all light numbers and names use 'list-lights' instead.
change-state Change the state (like if the light is on or off) of a light.
stay-on Turn the light on and (re-)set the state for n seconds every transition-time, if set, otherwise 10 seconds.
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
```
## Login
```
Login to the hue bridge.
Usage: philipshue-cli login [OPTIONS]
Options:
-b, --bridge-url Set the bridge url if discovering is not possible or doesn't work.
-d, --device-type Set the device type to any string. The bridge will associate your credentials with this string. If you don't set the device-type cli#HOSTNAME will be used
```
## Get light
```
Get all data including it's state from a light.
Usage: philipshue-cli get-light
Arguments:
The light number or light name.
```
## List lights
```
List all lights, their light number and name.
Usage: philipshue-cli list-lights
```
## Get lights
```
List the data from all lights. If you just want to list all light numbers and names use 'list-lights' instead.
Usage: philipshue-cli get-lights
```
## Change light state
```
Change the state (like if the light is on or off) of a light.
Usage: philipshue-cli change-state [OPTIONS]
Arguments:
The light number or light name.
Options:
-b, --brightness
--saturation
--hue
-t, --transition-time Transition time in seconds.
-s, --state [possible values: on, off]
```
## Stay on
```
Turn the light on and (re-)set the state for n seconds every transition-time, if set, otherwise 10 seconds.
Usage: philipshue-cli stay-on [OPTIONS] --stay-on-for
Arguments:
The light number or light name.
Options:
-b, --brightness
--saturation
--hue
-t, --transition-time Transition time in seconds.
-s, --stay-on-for Stay on for n seconds.
```
# License
Licensed under either of
* Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.