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