*/
public void init() {
- System.out.println("DEBUG: Stopping here for debug purposes!");
- while(true) { }
+ //System.out.println("DEBUG: Stopping here for debug purposes!");
+ //while(true) { }
// Initialize IoTCloud server
- /*initIoTCloudServer();
+ initIoTCloudServer();
// Iterate over the set of rooms
for (RoomSmart rm : roomSet.values()) {
}
}
- }*/
+ }
}
}
homesecurity:
$(JAVAC) $(JFLAGS) *.java
cp HomeSecurityController.config $(BIN_DIR)/HomeSecurityController
- cp HomeSecurityController.tomoyo $(BIN_DIR)/HomeSecurityController
+ #cp HomeSecurityController.tomoyo $(BIN_DIR)/HomeSecurityController
cd $(BIN_DIR)/HomeSecurityController; $(JAR) $(JARFLAGS) HomeSecurityController.jar ../HomeSecurityController/HomeSecurityController*.class ../HomeSecurityController/*.class ../iotcode/interfaces/SmartthingsSensor*.class ../iotcode/interfaces/SmartthingsActuator*.class ../iotcode/interfaces/Camera*.class ../iotcode/interfaces/Alarm*.class ../iotcode/interfaces/Room*.class ../iotcode/interfaces/ZoneState*.class ../iotcode/interfaces/Resolution*.class
PHONY += check-homesecurity
check-homesecurity:
$(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) *.java
cp HomeSecurityController.config $(BIN_DIR)/HomeSecurityController
- cp HomeSecurityController.tomoyo $(BIN_DIR)/HomeSecurityController
+ #cp HomeSecurityController.tomoyo $(BIN_DIR)/HomeSecurityController
cd $(BIN_DIR)/HomeSecurityController; $(JAR) $(JARFLAGS) HomeSecurityController.jar ../HomeSecurityController/HomeSecurityController*.class ../HomeSecurityController/*.class ../iotcode/interfaces/SmartthingsSensor*.class ../iotcode/interfaces/SmartthingsActuator*.class ../iotcode/interfaces/Camera*.class ../iotcode/interfaces/Alarm*.class ../iotcode/interfaces/Room*.class ../iotcode/interfaces/ZoneState*.class ../iotcode/interfaces/Resolution*.class
.PHONY: $(PHONY)
}
System.out.println("DEBUG: Waiting for phone to send weather information");
- while (waitingForInterface.get()) {
- try {
- Thread.sleep(1000);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
+ //while (waitingForInterface.get()) {
+ // try {
+ // Thread.sleep(1000);
+ // } catch (Exception e) {
+ // e.printStackTrace();
+ // }
+ //}
// TODO: Use a phone input interface later
- //inchesPerWeek = 20.00;
- //weatherZipCode = 92612;
- //daysToWaterOn = 255;
- //inchesPerMinute.add(1.50);
+ inchesPerWeek = 20.00;
+ weatherZipCode = 92612;
+ daysToWaterOn = 255;
+ inchesPerMinute.add(1.50);
System.out.println("DEBUG: inchesPerWeek: " + inchesPerWeek);
System.out.println("DEBUG: weatherZipCode: " + weatherZipCode);
// init the sprinkler controller, do it here since it only needs to be done once per controller
try {
spr.init();
+ // Wait until sprinkler is active
+ Thread.sleep(30000);
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("Initialized rooms!");
// Setup the cameras, start them all and assign each one a motion detector
- for (CameraSmart cam : cameras.values()) {
+/* for (CameraSmart cam : cameras.values()) {
// Each camera will have a motion detector unique to it since the motion detection has state
MotionDetection mo = new MotionDetection(12, 0.5f, 10, 10);
camMotionDetect.put(cam, mo);
}
System.out.println("Initialized cameras!");
+*/
+ System.out.println("Skipped cameras!");
//Initialize the light-bulbs, will turn off the bulb
for (LightBulbSmart bulb : mainRoomLightBulbs.values()) {
Thread.sleep(1000);
}
System.out.println("Initialized bulbs!");
+
+ System.out.println("STOP here until we have 2 more working cameras!");
+ while (true) { }
// Run the main loop that will keep check the bulbs and rooms periodically
- while (true) {
+/* while (true) {
// Run this code every <specified time>
long currentTimeSeconds = (new Date()).getTime() / 1000;
}
}
- }
+ }*/
}
}
SELECT * FROM
CameraSmart
WHERE
-ID='CM4'
+ID='CM2'
;
-SELECT * FROM\r
-CameraSmart\r
-WHERE\r
-ID='CM3'\r
-;\r
+SELECT * FROM
+CameraSmart
+WHERE
+ID='CM1'
+;
SELECT * FROM
CameraSmart
WHERE
-ID='CM1' or ID='CM2'
+ID='CM3' or ID='CM4'
;