Пример #1
0
def new_zone(name):
        rooms = raumfeld.getRoomsByName(name)
        room = rooms[0]
        raumfeld.connectRoomToZone(room.UDN)
        sleep(ctct_sleep)
        sleep(1)
        redirect('/ctct')
Пример #2
0
def add_room(name):
        rooms = raumfeld.getRoomsByName(name)
        room = rooms[0]
        zone = discover_active_zone()
        raumfeld.connectRoomToZone(room.UDN, zone.UDN)
        sleep(ctct_sleep)
        redirect('/ctct')
Пример #3
0
def separateRoom(name_udn):
    """Separates the the Room defined by the name or UDN from its zone"""
    global updateAvailableEvent
    returndata = {}
    returndata["success"] = False
    room = __getSingleRoom(name_udn)
    if room != None:
        raumfeld.connectRoomToZone(room.UDN)
        updateAvailableEvent.wait()
        returndata["success"] = True
    return json.dumps(returndata)
Пример #4
0
def separateRoom(name_udn):
    """Separates the the Room defined by the name or UDN from its zone"""
    global updateAvailableEvent
    returndata = {}
    returndata["success"] = False
    room = __getSingleRoom(name_udn)
    if room != None:
        raumfeld.connectRoomToZone(room.UDN)
        updateAvailableEvent.wait()
        returndata["success"] = True
    return json.dumps(returndata)