|
From: Richard B. <ri...@g8...> - 2023-10-23 16:34:54
|
Hi, I'm dong something similar to that, by tracking both my phone and my wifes, and if both are out or we have set a state switch we are away, the the lwp-request http....../pause is sent and if either of us are in the lwp-request http......../start is sent and also at a time in the evening the lwp-request ..../start is sent and the opposite in the morning the problem is its a blind command and doesn't always get actioned by motion, or gets lost from the logfile there is > [0:cn0] [DBG] [STR] [Oct 23 17:19:42] webu_parseurl: Sent url: > /101/detection/pause > [0:cn0] [DBG] [STR] [Oct 23 17:19:42] webu_parseurl: Decoded url: > /101/detection/pause > [0:cn0] [DBG] [STR] [Oct 23 17:19:42] webu_parseurl: camid: >101< > cmd1: >detection< cmd2: >pause< parm1:>< val1:>< parm2:>< val2:>< > [0:wu0] [INF] [ALL] [Oct 23 17:19:42] webu_answer_ctrl: Connection > from: 127.0.0.1 > I've tried running tail -f motion.log | grep Decoded url > a file but haven't succeeded in setting a flag that can be read by another application/program like homeassistant this sorta works tail -f /var/log/motion/motion.log | grep Decoded [0:cn0] [DBG] [STR] [Oct 23 17:28:40] webu_parseurl: Decoded url: /101/detection/pause [0:cn0] [DBG] [STR] [Oct 23 17:28:41] webu_parseurl: Decoded url: /101/detection/pause But I haven't succeeded in writing the output of grep to a file On Mon, 2023-10-23 at 09:54 -0600, MrDave wrote: > What I've seen is that people use a bash script that pings their > phone. > If the ping returns then disable the camera(s), if not, then turn the > camera(s) on. Then use a crontab to run the script at some sort of > frequent interval. > > MrDave > On 10/23/2023 9:26 AM, Richard Bown wrote: > > Hi > > just 8 cams on my system, one really needs to be disabled during > > the > > day, > > At the moment I'm sending a script in homeassistant > > > > lounge_cam: > > command_on: 'lwp-request > > http://localhost:7770/101/detection/start' > > command_off: 'lwp-request > > http://localhost:7770/101/detection/pause' > > > > sorry for the line wrapping, it doesn't always work as verification > > is > > a pig to get to work, So far I have failed , > > I have logging set to 8 and I have tried to use grep to find the > > response to the lwp-request. > > If it was only just using it for a few hours at night, I could use > > crontab , but it also needs to be on if we are out or away from > > home. > > with 8 cameras and on log level 8 there is a lot being added to the > > logfile. > > Am I missing a simple way of doing this ??? > > > > > > _______________________________________________ > Motion-user mailing list > Mot...@li... > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user |