示例#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()