コード例 #1
0
ファイル: flaskBackend.py プロジェクト: HuangZhenQiu/NanoKong
def flaskSetPeopleInRoom():
  peopleinroom = True if request.args.get("peopleinroom","1")=="1" else False
  wkpf.setProperty(occupancyWuObject, propertyNumber=0, datatype=wkpf.DATATYPE_BOOLEAN, value=peopleinroom)
  return "peopleinroom set to {}".format(peopleinroom)
コード例 #2
0
ファイル: flaskBackend.py プロジェクト: HuangZhenQiu/NanoKong
def flaskSetThreshold():
  threshold = int(request.args.get("threshold","255"))
  wkpf.setProperty(numericInputWuObject, propertyNumber=0, datatype=wkpf.DATATYPE_INT16, value=threshold)
  return "threshold set to {}".format(threshold)