Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/2tvenom/lifx
LIFX cross-platform cli
https://github.com/2tvenom/lifx
Last synced: 3 days ago
JSON representation
LIFX cross-platform cli
- Host: GitHub
- URL: https://github.com/2tvenom/lifx
- Owner: 2tvenom
- License: wtfpl
- Created: 2015-09-27T19:43:41.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-21T22:23:25.000Z (almost 9 years ago)
- Last Synced: 2023-08-04T13:46:41.030Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 15
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LIFX CLI
Cross-platform LIFX command line interface. Get info, set color and power state. This code has been developed and maintained by Ven at September 2015.
## Requirements
Golang 1.5https://golang.org/dl/
## Installation
```bash
go get github.com/2tvenom/golifx
go get github.com/2tvenom/lifx
```## Example
Get help
```bash
lifx --help
```Lookup bulbs
```bash
lifx --lookup
```
Output:
```
MAC: d0:73:d5:01:90:d7
IP: 192.168.0.2:56700
Power state: false
```Get color state
```bash
lifx --lookup --color
```
Output:
```
MAC: d0:73:d5:01:90:d7
IP: 192.168.0.2:56700
Label: Ven LiFX
Power state: true
Color:
HUE: 52000
Saturation: 0
Brightness: 32336
Kelvin: 6196
```Json format output:
```bash
lifx --lookup --color --json
```
Output:
```javascript
[{"color":{"brightness":32336,"hue":52000,"kelvin":6196,"saturation":0},"ip":{"IP":"192.168.0.2","Port":56700,"Zone":""},"label":"Ven LiFX","mac":"d0:73:d5:01:90:d7","power_state":true}]
```Turn off:
```bash
lifx --bulb d0:73:d5:01:90:d7 --off
```Turn on:
```bash
lifx --bulb d0:73:d5:01:90:d7 --on
```Set blue color:
```bash
lifx --bulb d0:73:d5:01:90:d7 --hue=36240 --saturation=65535 --brightness=64580 --kelvin=3505
```Set purple color:
```bash
lifx --bulb d0:73:d5:01:90:d7 --hue=49719 --saturation=65535 --brightness=64580 --kelvin=3505
```Set red color:
```bash
lifx --bulb d0:73:d5:01:90:d7 --hue=64489 --saturation=63482 --brightness=65535 --kelvin=3500
```## Compiled
Pre-compiled versions: https://github.com/2tvenom/lifx/releases/tag/v0.1 (Goland **not** required)
## Links
- LIFX protocol specification http://lan.developer.lifx.com/
- Community https://community.lifx.com/c/developing-with-lifx## Licence
[WTFPL](http://www.wtfpl.net/)