예제 #1
0
파일: __init__.py 프로젝트: jkgit/home
import os
from jinsteon import Device

devicePath = os.path.join(os.getcwd(), 'applications', 'home', 'private', 'devices.xml')
print devicePath
print os.getcwd()
Device.loadAll(devicePath)
print "devices loaded"
예제 #2
0
파일: automate.py 프로젝트: jkgit/home
def turnOnInsteonDevice():
    try:
        serviceType,method,deviceID = request.args[:3]
    except:
        redirect('some_error_page')
    return Device.getDeviceByInsteonID(deviceID).turnOn()
예제 #3
0
파일: default.py 프로젝트: jkgit/home
def initialize():
    devicePath = os.path.join('applications', 'home', 'private', 'devices.xml')
    with open("log.txt", "a") as f:
	f.write(devicePath)
	f.write(os.getcwd())
    Device.loadAll(devicePath)
예제 #4
0
파일: automate.py 프로젝트: jkgit/home
def turnOnLights():
    device = Device.getDeviceByRoomAndName("Movie - Lights").turnOn();
    device = Device.getDeviceByRoomAndName("Unfinished Basement - Lights").turnOn()
    device = Device.getDeviceByRoomAndName("Lower Staircase - Track Lights").turnOn()