https://github.com/robvanderleek/jlifx
LIFX control utility in Java
https://github.com/robvanderleek/jlifx
java lifx
Last synced: about 1 year ago
JSON representation
LIFX control utility in Java
- Host: GitHub
- URL: https://github.com/robvanderleek/jlifx
- Owner: robvanderleek
- Created: 2013-12-21T09:41:38.000Z (over 12 years ago)
- Default Branch: main
- Last Pushed: 2024-01-22T04:33:34.000Z (over 2 years ago)
- Last Synced: 2024-11-02T08:31:14.329Z (over 1 year ago)
- Topics: java, lifx
- Language: Java
- Homepage:
- Size: 1.05 MB
- Stars: 12
- Watchers: 4
- Forks: 10
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JLifx

[](https://github.com/robvanderleek/JLifx/actions/workflows/main.yml)
[](https://github.com/robvanderleek/JLifx/actions/workflows/release.yml)
[](https://coveralls.io/r/robvanderleek/JLifx?branch=master)
[](https://maven-badges.herokuapp.com/maven-central/io.github.robvanderleek/jlifx)
Small LIFX Wifi LED bulb control library and utility written in Java.
This project is not, in any way, affiliated or related to LIFX Labs.
Implementation is based on the specification by LIFX Labs (https://lan.developer.lifx.com/docs/introduction)
## Installation
### Command line tool
Run the `build-cli.sh` script to build the executable JAR `jlifx`.
### Library
For Maven, add the following entry to your `pom.xml` (check https://search.maven.org/artifact/io.github.robvanderleek/jlifx for latest `$VERSION`):
```xml
...
...
io.github.robvanderleek
jlifx
$VERSION
...
```
## Usage
### As command line tool
Build the executable JAR and run it from the command line, this will display
the supported commands:
$ ./jlifx
Examples:
./jlifx switch all off
./jlifx color all red
./jlifx color livingroom red
./jlifx blink gateway
./jlifx blink 192.168.178.50 3
./jlifx rainbow all
./jlifx rainbow all 30
### As library
Examples that show how to use the API:
- Discover a bulb by name and set color: [ColorBulbByName.java](https://github.com/robvanderleek/JLifx/blob/master/src/test/java/io/github/robvanderleek/jlifx/examples/ColorBulbByName.java)
- Discover a bulb by IP address and set color: [ColorBulbByIpAddress.java](https://github.com/robvanderleek/JLifx/blob/master/src/test/java/io/github/robvanderleek/jlifx/examples/ColorBulbByIpAddress.java)
- Discover a bulb by name and make it blink: [BlinkBulbByName.java](https://github.com/robvanderleek/JLifx/blob/master/src/test/java/io/github/robvanderleek/jlifx/examples/BlinkBulbByName.java)
- Connect to bulb using IP and MAC address: [ConnectWithIpAddressAndMacAddress.java](https://github.com/robvanderleek/JLifx/blob/master/src/test/java/io/github/robvanderleek/jlifx/examples/ConnectWithIpAddressAndMacAddress.java)