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)
Run the build-cli.sh
script to build the executable JAR jlifx
.
For Maven, add the following entry to your pom.xml
(check https://search.maven.org/artifact/io.github.robvanderleek/jlifx for latest $VERSION
):
...
<dependencies>
...
<dependency>
<groupId>io.github.robvanderleek</groupId>
<artifactId>jlifx</artifactId>
<version>$VERSION</version>
</dependency>
</dependencies>
...
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
Examples that show how to use the API:
- Discover a bulb by name and set color: ColorBulbByName.java
- Discover a bulb by IP address and set color: ColorBulbByIpAddress.java
- Discover a bulb by name and make it blink: BlinkBulbByName.java
- Connect to bulb using IP and MAC address: ConnectWithIpAddressAndMacAddress.java