diff --git a/.gradle/4.4/fileHashes/fileHashes.bin b/.gradle/4.4/fileHashes/fileHashes.bin
index d8f0777..69df71d 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 d537144..27a02ab 100644
Binary files a/.gradle/4.4/fileHashes/fileHashes.lock and b/.gradle/4.4/fileHashes/fileHashes.lock differ
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..2994e6d
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index bc8d0a3..e208459 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,5 @@
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..aae55b8
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/SeniorAssistant_main.iml b/.idea/modules/SeniorAssistant_main.iml
new file mode 100644
index 0000000..01deee6
--- /dev/null
+++ b/.idea/modules/SeniorAssistant_main.iml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/SeniorAssistant_test.iml b/.idea/modules/SeniorAssistant_test.iml
new file mode 100644
index 0000000..508d79f
--- /dev/null
+++ b/.idea/modules/SeniorAssistant_test.iml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 06d95ab..6e9bcb6 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,14 +2,17 @@
+
+
+
+
+
-
-
-
+
@@ -31,11 +34,10 @@
-
-
+
+
-
@@ -44,21 +46,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -85,7 +74,7 @@
@@ -655,65 +633,100 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
-
+
-
+
-
+
-
-
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -722,6 +735,9 @@
+
+
+
@@ -735,22 +751,17 @@
-
-
-
-
-
-
+
+
-
-
+
+
-
@@ -758,6 +769,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No facets are configured
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+ SeniorAssistant_test|SeniorAssistant
+
+
+
+
+
+
+
+
+
+
1.8
@@ -770,6 +841,18 @@
+
+
+ Gradle: com.fasterxml.jackson.core:jackson-core:2.1.3
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SeniorAssistant.iml b/SeniorAssistant.iml
new file mode 100644
index 0000000..306ea4c
--- /dev/null
+++ b/SeniorAssistant.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/device/Hue.java b/src/main/java/device/Hue.java
index e37e8eb..b26042e 100644
--- a/src/main/java/device/Hue.java
+++ b/src/main/java/device/Hue.java
@@ -53,10 +53,18 @@ public class Hue {
}
}
- public void setAttribute(String attribute, String value){
+ /*public void setAttribute(String attribute, String value){
for (String light : allLights.keySet()) {
String callURL = lightsURL + light + "/state";
- String body = "{ \""+attribute+"\" : "+value+" }";
+ String body = "{ \"+attribute+\" : "+value+" }";
+ Rest.put(callURL, body, "application/json");
+ }
+ }*/
+
+ public void colorLoop() {
+ for (String light : allLights.keySet()) {
+ String callURL = lightsURL + light + "/state";
+ String body = "{ \"on\" : true, \"effect\" : \"colorloop\" }";
Rest.put(callURL, body, "application/json");
}
}
diff --git a/src/test/java/TestLights.java b/src/test/java/TestLights.java
index 7ad31fc..6a2fdda 100644
--- a/src/test/java/TestLights.java
+++ b/src/test/java/TestLights.java
@@ -11,7 +11,7 @@ public class TestLights {
//Hue lights = new Hue("http://localhost/api/newdeveloper/");
Hue lights = new Hue();
- Set toRemove = new HashSet();
+ Set toRemove = new HashSet<>();
for(String str: lights.getNameLights())
if(!str.equals("4"))
toRemove.add(str);
@@ -24,15 +24,15 @@ public class TestLights {
this.wait(0b1111101000); // 1000
}
+
lights.turnOn();
for(int i=0; i<256; i++) {
lights.setBrightness(i);
- this.wait(10);
+ this.wait(2);
}
- for(int i=256; i>=0; i--) {
- lights.setBrightness(i);
- this.wait(10);
- }
+ lights.colorLoop();
+ this.wait(20);
+ lights.turnOff();
}
}