Hi
I can switch movement detection on one of the cameras controlled by the Motion software
but its not verified .
If set the logging to maximum on Motion it does generate a response in the logfile at
/var/log/motion/motion.log`
There are options in motion.conf to execute a command on motion detection.
You can use it to publish a mqtt message and trigger on it.
# Command to be executed when a motion frame is detected (default: none)
on_motion_detected /usr/bin/mosquitto_pub -h mqtt_broker -t home/tpad/motion -m 'ON'
Hi
Yes I’m aware of those options, when motion is detected
, but what I is to be able to verify a command sent to motion to pause motion detection has been done.
I can send the command to pause or start detection on a camera from lovelace, but I have no idea if the detection pause/start has been actually completed.
All I can find is in the motion.log the line I posted earlier.
I suspect I will have to write a script sorta like
then grab the output from grep and test if cmd2 was pause or start
then set a flag which HA can test.
Its not so simple as grep needs only to respond to the exact string, not its normal behavior
so maybe have to pipe it to SED and cut a section of the string to test