// final String outputPcapFile = path + "/2018-10/st-plug/st-plug-processed.pcap";
// final String triggerTimesFile = path + "/2018-10/st-plug/st-plug-oct-18-2018.timestamps";
// final String deviceIp = "192.168.1.246"; // .246 == phone; .142 == SmartThings Hub (note: use eth0 capture for this!)
+ // TODO: EXPERIMENT - November 12, 2018
+ final String inputPcapFile = path + "/experimental_result/standalone/st-plug/wlan1/st-plug.wlan1.local.pcap";
+ final String outputPcapFile = path + "/experimental_result/standalone/st-plug/wlan1/st-plug-processed.pcap";
+// final String inputPcapFile = path + "/experimental_result/standalone/st-plug/eth1/st-plug.eth1.local.pcap";
+// final String outputPcapFile = path + "/experimental_result/standalone/st-plug/eth1/st-plug-processed.pcap";
+ final String triggerTimesFile = path + "/experimental_result/standalone/st-plug/timestamps/st-plug-nov-12-2018.timestamps";
+// final String deviceIp = "192.168.1.142"; // .246 == phone; .142 == SmartThings Hub (note: use eth0 capture for this!)
+ final String deviceIp = "192.168.1.246"; // .246 == phone; .142 == SmartThings Hub (note: use eth0 capture for this!)
// 4) Wemo July 30 experiment
// final String inputPcapFile = path + "/2018-07/wemo/wemo.wlan1.local.pcap";
// final String triggerTimesFile = path + "/2018-08/kwikset-doorlock/kwikset-doorlock-8hr-data-oct-11-2018.timestamps";
// final String deviceIp = "192.168.1.246"; // .246 == phone; .142 == SmartThings Hub (note: use eth0 capture for this!)
// TODO: EXPERIMENT - November 10, 2018
- final String inputPcapFile = path + "/experimental_result/standalone/kwikset-doorlock/wlan1/kwikset-doorlock.wlan1.local.pcap";
- final String outputPcapFile = path + "/experimental_result/standalone/kwikset-doorlock/wlan1/kwikset-doorlock-processed.pcap";
-// final String inputPcapFile = path + "/experimental_result/standalone/kwikset-doorlock/eth1/kwikset-doorlock.eth1.local.pcap";
-// final String outputPcapFile = path + "/experimental_result/standalone/kwikset-doorlock/eth1/kwikset-doorlock-processed.pcap";
- final String triggerTimesFile = path + "/experimental_result/standalone/kwikset-doorlock/timestamps/kwikset-doorlock-nov-10-2018.timestamps";
-// final String deviceIp = "192.168.1.183"; // .246 == phone; .142 == SmartThings Hub (note: use eth0 capture for this!)
- final String deviceIp = "192.168.1.246"; // .246 == phone; .142 == SmartThings Hub (note: use eth0 capture for this!)
+// final String inputPcapFile = path + "/experimental_result/standalone/kwikset-doorlock/wlan1/kwikset-doorlock.wlan1.local.pcap";
+// final String outputPcapFile = path + "/experimental_result/standalone/kwikset-doorlock/wlan1/kwikset-doorlock-processed.pcap";
+//// final String inputPcapFile = path + "/experimental_result/standalone/kwikset-doorlock/eth1/kwikset-doorlock.eth1.local.pcap";
+//// final String outputPcapFile = path + "/experimental_result/standalone/kwikset-doorlock/eth1/kwikset-doorlock-processed.pcap";
+// final String triggerTimesFile = path + "/experimental_result/standalone/kwikset-doorlock/timestamps/kwikset-doorlock-nov-10-2018.timestamps";
+//// final String deviceIp = "192.168.1.142"; // .246 == phone; .142 == SmartThings Hub (note: use eth0 capture for this!)
+// final String deviceIp = "192.168.1.246"; // .246 == phone; .142 == SmartThings Hub (note: use eth0 capture for this!)
// September 12, 2018 - includes both wlan1 and eth1 interfaces
// final String inputPcapFile = path + "/2018-08/kwikset-doorlock/kwikset3.wlan1.local.pcap";
// final String inputPcapFile = path + "/UNSW/16-09-23.pcap";
// final String inputPcapFile = path + "/UNSW/16-09-24.pcap";
-// final String inputPcapFile = path + "/UNSW/16-09-25.pcap";
+ final String inputPcapFile = path + "/UNSW/16-09-25.pcap";
// final String inputPcapFile = path + "/UNSW/16-09-26.pcap";
// final String inputPcapFile = path + "/UNSW/16-09-27.pcap";
// final String inputPcapFile = path + "/UNSW/16-09-29.pcap";
// // TP-Link Plug PHONE signatures
// final String onSignatureFile = path + "/training/st-plug/signatures/st-plug-onSignature-phone-side.sig";
// final String offSignatureFile = path + "/training/st-plug/signatures/st-plug-offSignature-phone-side.sig";
+ // TODO: EXPERIMENT - November 12, 2018
+ // SmartThings Plug experiment
+// final String inputPcapFile = path + "/experimental_result/standalone/st-plug/wlan1/st-plug.wlan1.local.pcap";
+// final String inputPcapFile = path + "/experimental_result/standalone/st-plug/eth0/st-plug.eth0.local.pcap";
+// //final String inputPcapFile = path + "/experimental_result/smarthome/st-plug/wlan1/st-plug.wlan1.detection.pcap";
+// final String inputPcapFile = path + "/experimental_result/smarthome/st-plug/eth0/st-plug.eth0.detection.pcap";
+// // SmartThings Plug PHONE signatures
+ final String onSignatureFile = path + "/experimental_result/standalone/st-plug/signatures/st-plug-onSignature-phone-side.sig";
+ final String offSignatureFile = path + "/experimental_result/standalone/st-plug/signatures/st-plug-offSignature-phone-side.sig";
// LiFX Bulb experiment
// Kwikset Door lock experiment
// final String inputPcapFile = path + "/experimental_result/standalone/kwikset-doorlock/wlan1/kwikset-doorlock.wlan1.local.pcap";
// //final String inputPcapFile = path + "/experimental_result/smarthome/kwikset-doorlock/wlan1/kwikset-doorlock.wlan1.detection.pcap";
-//// final String inputPcapFile = path + "/experimental_result/smarthome/kwikset-doorlock/eth0/kwikset-doorlock.eth0.detection.pcap";
-// // Kwikset Door lock PHONE signatures
+// final String inputPcapFile = path + "/experimental_result/smarthome/kwikset-doorlock/eth0/kwikset-doorlock.eth0.detection.pcap";
+//// // Kwikset Door lock PHONE signatures
// final String onSignatureFile = path + "/experimental_result/standalone/kwikset-doorlock/signatures/kwikset-doorlock-onSignature-phone-side.sig";
// final String offSignatureFile = path + "/experimental_result/standalone/kwikset-doorlock/signatures/kwikset-doorlock-offSignature-phone-side.sig";
PcapPacket firstPkt = match.get(0).get(0);
detectedEvents.add(new UserAction(UserAction.Type.TOGGLE_ON, firstPkt.getTimestamp()));
});
- offDetector.addObserver((searched, match) -> {
- PcapPacket firstPkt = match.get(0).get(0);
- detectedEvents.add(new UserAction(UserAction.Type.TOGGLE_OFF, firstPkt.getTimestamp()));
- });
+// offDetector.addObserver((searched, match) -> {
+// PcapPacket firstPkt = match.get(0).get(0);
+// detectedEvents.add(new UserAction(UserAction.Type.TOGGLE_OFF, firstPkt.getTimestamp()));
+// });
PcapHandle handle;
try {
// TODO: need a better way of triggering detection than this...
onDetector.mClusterMatchers.forEach(cm -> cm.performDetection());
- offDetector.mClusterMatchers.forEach(cm -> cm.performDetection());
+// offDetector.mClusterMatchers.forEach(cm -> cm.performDetection());
// Sort the list of detected events by timestamp to make it easier to compare it line-by-line with the trigger
// times file.
from datetime import datetime
-#path = "/scratch/July-2018/experimental_result/smarthome/"
-path = "/scratch/July-2018/experimental_result/standalone/"
+path = "/scratch/July-2018/experimental_result/smarthome/"
+#path = "/scratch/July-2018/experimental_result/standalone/"
# D-Link plug
#device = "dlink-plug/self-test"
#fileExperiment = "dlink-plug-nov-7-2018.timestamps"
#device = "dlink-siren/self-test"
#fileExperiment = "dlink-siren-nov-9-2018.timestamps"
#fileDetection = "phone-side-detection"
-device = "dlink-siren/timestamps"
-fileExperiment = "dlink-siren-smarthome-nov-10-2018.timestamps"
-fileDetection = "dlink-siren-smarthome-nov-10-2018.eth0.phone.detections"
+#device = "dlink-siren/timestamps"
+#fileExperiment = "dlink-siren-smarthome-nov-10-2018.timestamps"
+#fileDetection = "dlink-siren-smarthome-nov-10-2018.eth0.phone.detections"
# Kwikset door lock
-device = "kwikset-doorlock/self-test"
-fileExperiment = "kwikset-doorlock-nov-10-2018.timestamps"
-fileDetection = "phone-side-detection"
+#device = "kwikset-doorlock/self-test"
+#fileExperiment = "kwikset-doorlock-nov-10-2018.timestamps"
+#fileDetection = "phone-side-detection"
#device = "kwikset-doorlock/timestamps"
#fileExperiment = "kwikset-doorlock-smarthome-nov-10-2018.timestamps"
#fileDetection = "kwikset-doorlock-smarthome-nov-10-2018.eth0.phone.detections"
+# SmartThings plug
+#device = "st-plug/self-test"
+#fileExperiment = "st-plug-nov-13-2018.timestamps"
+#fileDetection = "phone-side-detection"
+device = "st-plug/timestamps"
+fileExperiment = "st-plug-smarthome-nov-13-2018.timestamps"
+fileDetection = "st-plug-smarthome-nov-13-2018.eth0.phone.detections"
+
+
# Arlo camera
#device = "arlo-camera/self-test"
#fileExperiment = "arlo-camera-aug-10-2018.timestamps"