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"
def turnOnInsteonDevice(): try: serviceType,method,deviceID = request.args[:3] except: redirect('some_error_page') return Device.getDeviceByInsteonID(deviceID).turnOn()
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)
def turnOnLights(): device = Device.getDeviceByRoomAndName("Movie - Lights").turnOn(); device = Device.getDeviceByRoomAndName("Unfinished Basement - Lights").turnOn() device = Device.getDeviceByRoomAndName("Lower Staircase - Track Lights").turnOn()