private static final int CAMERA_FPS = 15;
private static final int CHECK_TIME_WAIT = 1; // in seconds
private static final int SECOND_TO_TURN_ON = 60; // in seconds
+ private static final int SECOND_TO_TURN_OFF = 1; // in seconds
/**
* IoT Sets and Relations
try {
alm.init();
System.out.println("DEBUG: Initialized alarm!");
+ // TODO: Check that this initialization works for multiple times - might be that setZone() only works once!
+ //for (RoomSmart room : roomSet.values()) {
+ // turnOffAlarms(room.getRoomID());
+ // System.out.println("DEBUG: Initialized alarm for room (turn off): " + room.getRoomID());
+ //}
} catch (Exception e) {
e.printStackTrace();
}
// Get and init the alarm (this single alarm set can serve multiple zones / rooms)
Iterator alarmIt = alarmSet.iterator();
AlarmSmart alm = (AlarmSmart) alarmIt.next();
- alm.setZone(zoneId, true, SECOND_TO_TURN_ON);
+ alm.setZone(zoneId, true, SECOND_TO_TURN_OFF);
}
Iterator alarmIt = alarmSet.iterator();
AlarmSmart alm = (AlarmSmart) alarmIt.next();
// Turn this alarm off indefinitely
- alm.setZone(zoneId, false, -1);
+ alm.setZone(zoneId, false, SECOND_TO_TURN_ON);
}