1
0
mirror of https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git synced 2025-09-09 15:40:45 +02:00

Add some examples for dealing with motion events (#194)

* Add some examples for dealing with motion events

* Harmonize core motion detection & event handling to use one single motion.conf, refactor & beautify motion detection api for more consistency, host jquery locally for usecases without internet, add responsive switch to live ui

* added mqtt actions for switching motion detection on and off

* added motion detection status to status

* Update motion.conf

* Update motion.conf
This commit is contained in:
jmtatsch
2018-03-31 17:26:10 +02:00
committed by Elias Kotlyar
parent 3d8b9ce096
commit 5b9aedfbb9
13 changed files with 320 additions and 113 deletions

View File

@@ -3,10 +3,9 @@
# Set the socket option in order to restart easily the server (socket in use)
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
if [ -f /system/sdcard/config/motion ] ; then
source /system/sdcard/config/motion 2>/dev/null
/system/sdcard/bin/setconf -k r -v ${Region} 2>/dev/null
/system/sdcard/bin/setconf -k m -v ${Sens} 2>/dev/null
/system/sdcard/bin/setconf -k z -v ${OsdColor} 2>/dev/null
if [ -f /system/sdcard/config/motion.conf ] ; then
source /system/sdcard/config/motion.conf 2>/dev/null
/system/sdcard/bin/setconf -k r -v ${region_of_interest} 2>/dev/null
/system/sdcard/bin/setconf -k m -v ${motion_sensitivity} 2>/dev/null
/system/sdcard/bin/setconf -k z -v ${motion_indicator_color} 2>/dev/null
fi;