Esempio n. 1
0
#!/usr/bin/python

import thread, socket, os, datetime, sys, time, csv, struct

sys.path.insert(0, '/home/kecap/Desktop/Control Program/dtw-1.0')
from dtw import dtw
from phue import Bridge
from openCSV import openFiles
from sklearn import svm

start_time = time.time()  # start time to count the execution time

#importing datasets pattern
couch_empty, couch_lying, couch_sitting, couch_light_off, couch_light_on, couch_noisy, couch_quiet, tv_light_off, tv_light_on, tv_noisy, tv_quiet, living_light_off, living_light_on = openFiles(
)
##b = Bridge('10.10.0.102') # Enter bridge IP here. '00:17:88:15:8c:eb'

##lamp1, lamp2, lamp3 = b.get_light_objects()

#Hue lamp list of colour
normal = [1, 1]
red = [0.75, 0.25]
purple = [0.45, 0.25]
skyblue = [0.15, 0.25]
blue = [0.15, 0.05]
yellow = [0.45, 0.51]
green = [0.09, 0.81]
lightgreen = [0.3, 0.5]
orange = [0.55, 0.4]

start_time = time.time()  # start time for
#!/usr/bin/python

import thread, socket, os, datetime, sys, time, csv, struct
sys.path.insert(0, '/home/kecap/Desktop/Control Program/dtw-1.0')
from dtw import dtw
from phue import Bridge
from openCSV import openFiles
from sklearn import svm

start_time = time.time()	# start time to count the execution time

#importing datasets pattern
couch_empty, couch_lying, couch_sitting, couch_light_off, couch_light_on, couch_noisy, couch_quiet, tv_light_off, tv_light_on, tv_noisy, tv_quiet, living_light_off, living_light_on = openFiles()
##b = Bridge('10.10.0.102') # Enter bridge IP here. '00:17:88:15:8c:eb'

##lamp1, lamp2, lamp3 = b.get_light_objects()

#Hue lamp list of colour
normal = [1,1]
red = [0.75,0.25]
purple = [0.45,0.25]
skyblue = [0.15,0.25]
blue = [0.15,0.05]
yellow = [0.45,0.51]
green = [0.09,0.81]
lightgreen = [0.3,0.5]
orange = [0.55,0.4]

start_time = time.time()	# start time for

class mutex:									# Mutex Object.
#!/usr/bin/python

import thread, socket, os, datetime, sys, time, csv, struct

sys.path.insert(0, "/home/kecap/Desktop/Control Program/dtw-1.0")
from dtw import dtw
from phue import Bridge
from openCSV import openFiles
from sklearn import svm

start_time = time.time()  # start time to count the execution time

# importing datasets pattern
couch_empty, couch_lying, couch_sitting, couch_light_off, couch_light_on, couch_noisy, couch_quiet, tv_light_off, tv_light_on, tv_noisy, tv_quiet, living_light_off, living_light_on = (
    openFiles()
)
##b = Bridge('10.10.0.102') # Enter bridge IP here. '00:17:88:15:8c:eb'

##lamp1, lamp2, lamp3 = b.get_light_objects()

# Hue lamp list of colour
normal = [1, 1]
red = [0.75, 0.25]
purple = [0.45, 0.25]
skyblue = [0.15, 0.25]
blue = [0.15, 0.05]
yellow = [0.45, 0.51]
green = [0.09, 0.81]
lightgreen = [0.3, 0.5]
orange = [0.55, 0.4]