This program supports various controlling aspects of this Wifi enabled LED lights.
##Supported operations
Operations | Sample values |
---|---|
Turn On | |
Turn Off | |
Set color (RGB) | 100,100,100 |
Set Warm | 150 |
Set Cool | 200 |
Get Status | Output: {status=OFF, rgb=0,0,0, warm=0} |
Note: IP address of the LED light is passed in as an argument for all these operations.
- Nexlux LED with Wifi controller - Click here
- Govee Smart Wifi LED Magic hue - Click here
- Java sockets are used to connect send request to the IP address assinged to these LED lights
- Here are the HEX codes sent across for each operations:
Operations | Hex values |
---|---|
Turn On | 71:23:0f |
Turn Off | 71:24:0f |
Set color (RGB) | RGB converted to hex |
Set Warm | 31:00:00:00:Warm_value:0f:0f |
Set Cool | 31:00:00:00:00:Cold_value:0f |
Get Status | 81:8a:8b:96 |
<repository>
<id>repsy</id>
<name>repsy</name>
<url>https://repo.repsy.io/mvn/hariohmprasath/magic-hue</url>
</repository>
<dependency>
<groupId>org.example</groupId>
<artifactId>magic-hue-java</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
Operations | Hex values |
---|---|
Turn On | MagicHueHelper.turnOn(IP_ADDRESS) |
Turn Off | MagicHueHelper.turnOff(IP_ADDRESS) |
Set color (RGB) | MagicHueHelper.setRgb(IP_ADDRESS, "100,100,100") |
Set Warm | MagicHueHelper.setWarm(IP_ADDRESS, "150") |
Set Cool | MagicHueHelper.setCool(IP_ADDRESS, "200") |
Get Status | MagicHueHelper.getStatus(IP_ADDRESS) |
Thanks to excellent documentation by @kirillsimin part of his contribution in (https://github.com/kirillsimin/magichue). I was able to create a java version for this.