def motion_mode():
if is_local_request(flask.request):
json = flask.request.get_json()
enabled = json.get('enabled', False)
env.set_motion_enabled(enabled)
return "Motion mode is now %r" % enabled
else:
logger.info('Motion Mode accessed by remote address %s', flask.request.environ['REMOTE_ADDR'])
flask.abort(404)
评论列表
文章目录