Adding a new device: Lifx light bulb.
authorrtrimana <rtrimana@uci.edu>
Thu, 9 Aug 2018 16:06:15 +0000 (09:06 -0700)
committerrtrimana <rtrimana@uci.edu>
Thu, 9 Aug 2018 16:06:15 +0000 (09:06 -0700)
Code/Projects/SmartPlugDetector/src/main/java/edu/uci/iotproject/Main.java
automation/clicker.sh

index 8a0aa7fbc7cfff4ebbad836e16e5194700c4d420..bf6dee6c61ea47628cfcf5efa6e9ec8b89984897 100644 (file)
@@ -79,11 +79,17 @@ 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 1 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";
+        // 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";
+
+        // 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
 
         TriggerTimesFileReader ttfr = new TriggerTimesFileReader();
         List<Instant> triggerTimes = ttfr.readTriggerTimes(triggerTimesFile, false);
 
         TriggerTimesFileReader ttfr = new TriggerTimesFileReader();
         List<Instant> triggerTimes = ttfr.readTriggerTimes(triggerTimesFile, false);
index ba75e256ef309a7adfac590196ddefcf8fc7f29a..e93a8181d4cd2acd2dff6a98d8070bed14779fc2 100755 (executable)
@@ -39,7 +39,20 @@ do
        #       ./adb shell input tap 520 1211
        #fi
        # Hue bulb
        #       ./adb shell input tap 520 1211
        #fi
        # Hue bulb
-       ./adb shell input tap 923 383
+       #./adb shell input tap 923 383
+       # Lifx bulb
+       #./adb shell input tap 506 580
+       # Amcrest camera
+       if (( $i % 2 ))
+       then
+               # live view
+               ./adb shell input tap 92 139
+               ./adb shell input tap 92 139
+       else
+               # stop live view (go to playback)
+               ./adb shell input tap 92 139
+               ./adb shell input tap 92 250
+       fi
        #date +%r
        #RAND=$[( $RANDOM % $RAN_END ) + $RAN_STA]
        #RAND=$[`jot -r 1 $RAN_STA $RAN_END`]
        #date +%r
        #RAND=$[( $RANDOM % $RAN_END ) + $RAN_STA]
        #RAND=$[`jot -r 1 $RAN_STA $RAN_END`]