Adding more devices
authorrtrimana <rtrimana@uci.edu>
Wed, 15 Aug 2018 20:50:14 +0000 (13:50 -0700)
committerrtrimana <rtrimana@uci.edu>
Wed, 15 Aug 2018 20:50:14 +0000 (13:50 -0700)
Code/Projects/SmartPlugDetector/.idea/modules/SmartPlugDetector_main.iml
Code/Projects/SmartPlugDetector/.idea/modules/SmartPlugDetector_test.iml
Code/Projects/SmartPlugDetector/src/main/java/edu/uci/iotproject/Main.java
automation/clicker.sh

index 5134c0a60323a32356c2c1f8949322984a55c924..0932ae09f252045eb7dd24107daed23c34b62067 100644 (file)
@@ -5,7 +5,6 @@
     <exclude-output />
     <content url="file://$MODULE_DIR$/../../src/main">
       <sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" />
     <exclude-output />
     <content url="file://$MODULE_DIR$/../../src/main">
       <sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/../../src/main/resources" type="java-resource" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
index b332c40ce1731f704f4b9b00fa9c7c545f54745a..4d22f1820043a547e944150395323fa5db5b3790 100644 (file)
@@ -5,7 +5,6 @@
     <exclude-output />
     <content url="file://$MODULE_DIR$/../../src/test">
       <sourceFolder url="file://$MODULE_DIR$/../../src/test/java" isTestSource="true" />
     <exclude-output />
     <content url="file://$MODULE_DIR$/../../src/test">
       <sourceFolder url="file://$MODULE_DIR$/../../src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../src/test/resources" type="java-test-resource" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
index bf6dee6c61ea47628cfcf5efa6e9ec8b89984897..cd11d353faf59f7bfc02523e253796bf68b84314 100644 (file)
@@ -67,7 +67,7 @@ public class Main {
 //        final String triggerTimesFile = path + "/2018-07/wemoinsight/wemo-insight-july-31-2018.timestamps";
 //        final String deviceIp = "192.168.1.135";
 
 //        final String triggerTimesFile = path + "/2018-07/wemoinsight/wemo-insight-july-31-2018.timestamps";
 //        final String deviceIp = "192.168.1.135";
 
-        // TP-Link BULB August 1 experiment
+        // TP-Link Bulb August 1 experiment
 //        final String inputPcapFile = path + "/2018-08/tplink-bulb/tplinkbulb.wlan1.local.pcap";
 //        final String outputPcapFile = path + "/2018-08/tplink-bulb/tplinkbulb-processed.pcap";
 //        final String triggerTimesFile = path + "/2018-08/tplink-bulb/tplink-bulb-aug-3-2018.timestamps";
 //        final String inputPcapFile = path + "/2018-08/tplink-bulb/tplinkbulb.wlan1.local.pcap";
 //        final String outputPcapFile = path + "/2018-08/tplink-bulb/tplinkbulb-processed.pcap";
 //        final String triggerTimesFile = path + "/2018-08/tplink-bulb/tplink-bulb-aug-3-2018.timestamps";
@@ -79,17 +79,41 @@ public class Main {
 //        final String triggerTimesFile = path + "/2018-08/kwikset-doorlock/kwikset-doorlock-aug-6-2018.timestamps";
 //        final String deviceIp = "192.168.1.246"; // .246 == phone; .142 == SmartThings Hub (note: use eth0 capture for this!)
 
 //        final String triggerTimesFile = path + "/2018-08/kwikset-doorlock/kwikset-doorlock-aug-6-2018.timestamps";
 //        final String deviceIp = "192.168.1.246"; // .246 == phone; .142 == SmartThings Hub (note: use eth0 capture for this!)
 
-        // Hue BULB August 7 experiment
+        // Hue Bulb August 7 experiment
 //        final String inputPcapFile = path + "/2018-08/hue-bulb/hue-bulb.wlan1.local.pcap";
 //        final String outputPcapFile = path + "/2018-08/hue-bulb/hue-bulb-processed.pcap";
 //        final String triggerTimesFile = path + "/2018-08/hue-bulb/hue-bulb-aug-7-2018.timestamps";
 //        final String deviceIp = "192.168.1.246";
 
 //        final String inputPcapFile = path + "/2018-08/hue-bulb/hue-bulb.wlan1.local.pcap";
 //        final String outputPcapFile = path + "/2018-08/hue-bulb/hue-bulb-processed.pcap";
 //        final String triggerTimesFile = path + "/2018-08/hue-bulb/hue-bulb-aug-7-2018.timestamps";
 //        final String deviceIp = "192.168.1.246";
 
-        // Lifx BULB August 8 experiment
-        final String inputPcapFile = path + "/2018-08/lifx-bulb/lifx-bulb.wlan1.local.pcap";
-        final String outputPcapFile = path + "/2018-08/lifx-bulb/lifx-bulb-processed.pcap";
-        final String triggerTimesFile = path + "/2018-08/lifx-bulb/lifx-bulb-aug-8-2018.timestamps";
-        final String deviceIp = "192.168.1.246"; // .246 == phone; .231 == Lifx
+        // Lifx Bulb August 8 experiment
+//        final String inputPcapFile = path + "/2018-08/lifx-bulb/lifx-bulb.wlan1.local.pcap";
+//        final String outputPcapFile = path + "/2018-08/lifx-bulb/lifx-bulb-processed.pcap";
+//        final String triggerTimesFile = path + "/2018-08/lifx-bulb/lifx-bulb-aug-8-2018.timestamps";
+//        final String deviceIp = "192.168.1.246"; // .246 == phone; .231 == Lifx
+
+        // Amcrest Camera August 9 experiment
+//        final String inputPcapFile = path + "/2018-08/amcrest-camera/amcrest-camera.wlan1.local.pcap";
+//        final String outputPcapFile = path + "/2018-08/amcrest-camera/amcrest-camera-processed.pcap";
+//        final String triggerTimesFile = path + "/2018-08/amcrest-camera/amcrest-camera-aug-9-2018.timestamps";
+//        final String deviceIp = "192.168.1.246"; // .246 == phone; .235 == camera
+
+        // Arlo Camera August 10 experiment
+//        final String inputPcapFile = path + "/2018-08/arlo-camera/arlo-camera.wlan1.local.pcap";
+//        final String outputPcapFile = path + "/2018-08/arlo-camera/arlo-camera-processed.pcap";
+//        final String triggerTimesFile = path + "/2018-08/arlo-camera/arlo-camera-aug-10-2018.timestamps";
+//        final String deviceIp = "192.168.1.140"; // .246 == phone; .140 == camera
+
+        // Blossom sprinkler August 13 experiment
+//        final String inputPcapFile = path + "/2018-08/blossom/blossom.wlan1.local.pcap";
+//        final String outputPcapFile = path + "/2018-08/blossom/blossom-processed.pcap";
+//        final String triggerTimesFile = path + "/2018-08/blossom/blossom-aug-13-2018.timestamps";
+//        final String deviceIp = "192.168.1.229"; // .246 == phone; .229 == sprinkler
+
+        // DLink siren August 14 experiment
+        final String inputPcapFile = path + "/2018-08/dlink-siren/dlink-siren.wlan1.local.pcap";
+        final String outputPcapFile = path + "/2018-08/dlink-siren/dlink-siren-processed.pcap";
+        final String triggerTimesFile = path + "/2018-08/dlink-siren/dlink-siren-aug-14-2018.timestamps";
+        final String deviceIp = "192.168.1.183"; // .246 == phone; .183 == siren
 
         TriggerTimesFileReader ttfr = new TriggerTimesFileReader();
         List<Instant> triggerTimes = ttfr.readTriggerTimes(triggerTimesFile, false);
 
         TriggerTimesFileReader ttfr = new TriggerTimesFileReader();
         List<Instant> triggerTimes = ttfr.readTriggerTimes(triggerTimesFile, false);
index e93a8181d4cd2acd2dff6a98d8070bed14779fc2..28008c1478eb42d9706b13abac7bfcf79cffb29d 100755 (executable)
@@ -43,15 +43,46 @@ do
        # Lifx bulb
        #./adb shell input tap 506 580
        # Amcrest camera
        # Lifx bulb
        #./adb shell input tap 506 580
        # Amcrest camera
-       if (( $i % 2 ))
-       then
+       #if (( $i % 2 ))
+       #then
                # live view
                # live view
-               ./adb shell input tap 92 139
-               ./adb shell input tap 92 139
-       else
+       #       ./adb shell input tap 92 139
+       #       ./adb shell input tap 92 139
+       #else
                # stop live view (go to playback)
                # stop live view (go to playback)
-               ./adb shell input tap 92 139
-               ./adb shell input tap 92 250
+       #       ./adb shell input tap 92 139
+       #       ./adb shell input tap 92 250
+       #fi
+       # Arlo camera
+       #if (( $i % 2 ))
+       #then
+               # live view
+       #       ./adb shell input tap 532 740
+       #else
+               # stop live view
+       #       ./adb shell input tap 101 1012
+       #fi
+       # Blossom
+       #if (( $i % 2 ))
+       #then
+               # start watering
+       #       ./adb shell input tap 538 1597
+       #else
+               # stop watering
+       #       ./adb shell input tap 496 1533
+       #fi
+       # Dlink siren
+       #./adb shell input tap 994 802
+       # Nest thermostat
+       if (( $i % 2))
+       then
+               # start fan
+               ./adb shell input tap 524 1668
+               ./adb shell input tap 936 1709
+       else
+               # stop fan
+               ./adb shell input tap 524 1668
+               ./adb shell input tap 679 1702
        fi
        #date +%r
        #RAND=$[( $RANDOM % $RAN_END ) + $RAN_STA]
        fi
        #date +%r
        #RAND=$[( $RANDOM % $RAN_END ) + $RAN_STA]