From e527ad6ba165b2e09ce410fe6a460874d3b65f1b Mon Sep 17 00:00:00 2001 From: Radar231 Date: Tue, 24 Oct 2023 10:46:42 -0400 Subject: [PATCH] added motion detect threshold get and set commands --- get_threshold | 7 +++++++ set_threshold | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100755 get_threshold create mode 100755 set_threshold diff --git a/get_threshold b/get_threshold new file mode 100755 index 0000000..60745b4 --- /dev/null +++ b/get_threshold @@ -0,0 +1,7 @@ +#!/bin/bash + +mepod=$(/snap/bin/kubectl get pod -n home-automation | grep "^motioneye" | cut -d' ' -f1) + +/snap/bin/kubectl exec -t $mepod -n home-automation -- curl -s http://localhost:7999/1/config/list | grep threshold + + diff --git a/set_threshold b/set_threshold new file mode 100755 index 0000000..3c63d5f --- /dev/null +++ b/set_threshold @@ -0,0 +1,6 @@ +#!/bin/bash + +mepod=$(/snap/bin/kubectl get pod -n home-automation | grep "^motioneye" | cut -d' ' -f1) + +/snap/bin/kubectl exec -t $mepod -n home-automation -- curl -s http://localhost:7999/1/config/set?threshold=${1} +