diff --git a/.gradle/4.4/fileHashes/fileHashes.bin b/.gradle/4.4/fileHashes/fileHashes.bin
index c1eed44..6f136cd 100644
Binary files a/.gradle/4.4/fileHashes/fileHashes.bin and b/.gradle/4.4/fileHashes/fileHashes.bin differ
diff --git a/.gradle/4.4/fileHashes/fileHashes.lock b/.gradle/4.4/fileHashes/fileHashes.lock
index 0377539..f18aad8 100644
Binary files a/.gradle/4.4/fileHashes/fileHashes.lock and b/.gradle/4.4/fileHashes/fileHashes.lock differ
diff --git a/.gradle/4.4/taskHistory/taskHistory.bin b/.gradle/4.4/taskHistory/taskHistory.bin
index 3bb1bdb..618b096 100644
Binary files a/.gradle/4.4/taskHistory/taskHistory.bin and b/.gradle/4.4/taskHistory/taskHistory.bin differ
diff --git a/.gradle/4.4/taskHistory/taskHistory.lock b/.gradle/4.4/taskHistory/taskHistory.lock
index 3bb8d92..6c1c7a6 100644
Binary files a/.gradle/4.4/taskHistory/taskHistory.lock and b/.gradle/4.4/taskHistory/taskHistory.lock differ
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
index 41a3886..34f85cf 100644
Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin
index f878aea..b654629 100644
Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and b/.gradle/buildOutputCleanup/outputFiles.bin differ
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index eddea76..267d99c 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -3,7 +3,6 @@
-
-
-
+
+
+
+
@@ -404,11 +521,6 @@
-
-
-
-
-
@@ -443,37 +555,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
+
@@ -487,10 +582,43 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -529,64 +657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
-
- 1526977270838
+
+ 1527511421271
- 1526977270838
-
-
-
-
-
+ 1527511421271
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
@@ -595,170 +730,44 @@
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/device/hue.java
- 12
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- No facets are configured
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1.8
-
-
-
-
-
-
-
-
-
-
-
- SeniorAssistant
-
-
-
-
-
-
-
-
-
@@ -770,18 +779,6 @@
-
-
- Gradle: junit:junit:4.12
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 7c52fc4..f00b77a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -13,8 +13,10 @@ repositories {
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
- compile "com.sparkjava:spark-core:2.5.5"
- compile "org.slf4j:slf4j-simple:1.7.21"
+ // compile "com.sparkjava:spark-core:2.5.5"
+ // compile "org.slf4j:slf4j-simple:1.7.21"
compile "com.google.code.gson:gson:2.8.0"
- compile "org.xerial:sqlite-jdbc:3.15.1"
+ // compile "org.xerial:sqlite-jdbc:3.15.1"
+ compile 'org.apache.httpcomponents:httpclient:4.5.3'
+
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 933b647..7146639 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,6 @@
+#Mon May 28 15:34:56 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
diff --git a/src/main/java/device/hue.java b/src/main/java/device/hue.java
index 7da0e8f..af1e053 100644
--- a/src/main/java/device/hue.java
+++ b/src/main/java/device/hue.java
@@ -26,10 +26,18 @@ public class hue {
}
}
- public void looping() {
+ public void setBrightness(int num) {
for (String light : allLights.keySet()) {
String callURL = lightsURL + light + "/state";
- String body = "{ \"on\" : true, \"effect\" : \"colorloop\" }";
+ String body = "{ \"bri\" : "+num+" }";
+ rest.put(callURL, body, "application/json");
+ }
+ }
+
+ public void setAttribute(String attribute, String value){
+ for (String light : allLights.keySet()) {
+ String callURL = lightsURL + light + "/state";
+ String body = "{ \""+attribute+"\" : "+value+" }";
rest.put(callURL, body, "application/json");
}
}