Exemplo n.º 1
0
def isPersistent():
    try:
        if readStringValue(statePersistentKey) == "TRUE":
            return True
    except KeyError:
        pass
    return False
Exemplo n.º 2
0
def getLastTime(key):
    try:
        lastTimeString = readStringValue(key)
        lastTime = datetime.datetime.strptime(lastTimeString, "%Y-%m-%d %H:%M:%S.%f")
    except:
        lastTime = datetime.datetime(1970,1,1)
    return lastTime
Exemplo n.º 3
0
def isPanic():
    try:
        if readStringValue(alarmPanicKey) == "TRUE":
            return True
    except KeyError:
        pass
    return False
Exemplo n.º 4
0
def isPanic():
    try:
        if readStringValue(alarmPanicKey) == "TRUE":
            return True
    except KeyError:
        pass
    return False
Exemplo n.º 5
0
def isPersistent():
    try:
        if readStringValue(statePersistentKey) == "TRUE":
            return True
    except KeyError:
        pass
    return False
Exemplo n.º 6
0
def getLastTime(key):
    try:
        lastTimeString = readStringValue(key)
        lastTime = datetime.datetime.strptime(lastTimeString,
                                              "%Y-%m-%d %H:%M:%S.%f")
    except:
        lastTime = datetime.datetime(1970, 1, 1)
    return lastTime
Exemplo n.º 7
0
def getCurrentAlarmState():
    try:
        return readStringValue(alarmStateKey)
    except KeyError:
        return "DISARMED"
Exemplo n.º 8
0
def getDesiredAlarmStateDelay():
    try:
        return readStringValue(alarmDesiredStateDelay)
    except KeyError:
        return "UNKNOWN"
Exemplo n.º 9
0
def getPreviousAlarmState():
    try:
        return readStringValue(alarmPreviousStateKey)
    except KeyError:
        return "UNKNOWN"
Exemplo n.º 10
0
def getCurrentAlarmCode ():
    try:
        return readStringValue(alarmCodeKey)
    except KeyError:
        return None
Exemplo n.º 11
0
def getCurrentAlarmState ():
    try:
        return readStringValue(alarmStateKey)
    except KeyError:
        return "DISARMED"
Exemplo n.º 12
0
def getDesiredAlarmStateDelay ():
    try:
        return readStringValue(alarmDesiredStateDelay)
    except KeyError:
        return "UNKNOWN"
Exemplo n.º 13
0
def getPreviousAlarmState ():
    try:
        return readStringValue(alarmPreviousStateKey)
    except KeyError:
        return "UNKNOWN"
Exemplo n.º 14
0
def getCurrentAlarmCode():
    try:
        return readStringValue(alarmCodeKey)
    except KeyError:
        return None
Exemplo n.º 15
0
def getLocalIp():
    try:
        ip = readStringValue(localIpKey)
    except:
        ip = "127.0.0.1"
    return ip
Exemplo n.º 16
0
#!/usr/bin/env python
# @author rouble matta

import sys
from CacheUtils import readStringValue

print readStringValue(sys.argv[1])
Exemplo n.º 17
0
def getLocalIp ():
    try:
        ip = readStringValue(localIpKey)
    except:
        ip = "127.0.0.1"
    return ip