Skip to content

Commit

Permalink
Remove the command line interface -- it should be its own project
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroOne3010 committed Aug 2, 2018
1 parent f9d02d9 commit 1062d76
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 113 deletions.
33 changes: 1 addition & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@ Yet Another Hue API
This is a Java 8 API for the Philips Hue lights. It does not use the official
Hue SDK but instead accesses the REST API of the Philips Hue Bridge directly.

This library can be used in two ways:
1. As a library, included in another project
2. As a stand-alone software, with a very simple and very limited command line interface

Usage
-----

### As a library

If you already have an API key for your Bridge:

[//]: # (init)
Expand Down Expand Up @@ -48,7 +42,7 @@ room.setState(new State(true, java.awt.Color.PINK));
room.getLightByName("Corner").get().turnOff();
```

#### Including the library with Maven
### Including the library with Maven

Add the following to your pom.xml file:

Expand All @@ -69,31 +63,6 @@ Add the following to your pom.xml file:
</dependencies>
```

### As stand-alone software

Enter the Bridge IP as the first command line argument.
Enter the API key as the second command line argument.

Use the following environment variables to create simple conditional actions:
* `ifAnyOn`
* `thenRoom`
* `state`

For example, to set a red color to Bedroom when there are
any lights on in the Hallway, use these parameters:

```
-DifAnyOn=Hallway
-DthenRoom=Bedroom
-Dstate={\"on\":true,\"color\":\"FF0000\"}
```

A complete example of a command line:

```
java -DifAnyOn="Hallway" -DthenRoom="Bedroom" -Dstate="{\"on\":true,\"color\":\"FF0000\"}" -jar yetanotherhueapi-0.0.1-jar-with-dependencies.jar 192.168.1.99 d3908jOKd208jLKJaD8jd2l2djlkncbbMBN39918
```

Scope and philosophy
--------------------

Expand Down
23 changes: 0 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,6 @@
<build>
<plugins>

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.github.zeroone3010.yahueapi.HueCommandLineInterface</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down

This file was deleted.

0 comments on commit 1062d76

Please sign in to comment.