コード例 #1
0
ファイル: rfwr.py プロジェクト: vsxed/rf.wr.py
def new_zone(name):
        rooms = raumfeld.getRoomsByName(name)
        room = rooms[0]
        raumfeld.connectRoomToZone(room.UDN)
        sleep(ctct_sleep)
        sleep(1)
        redirect('/ctct')
コード例 #2
0
ファイル: rfwr.py プロジェクト: vsxed/rf.wr.py
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)