Open Puzzlr opened 8 years ago
I'd also like on_event_stop action. And it's even been here https://github.com/ccrisan/motioneye/issues/56
Mmmm,
I just now discovered that my thread-1.conf did get overwritten erasing my added /usr/bin/curl -s "http://Domoticz_IP:port/json.htm?type=command¶m=switchlight&idx=32&switchcmd=Off"
.
The motion sensor now only receives "On" commands, rendering it rather useless.
This behavior of motioneye seems to restrict the original behaviour of motion. Is that intentional?
The reason why on_event_stop is overwritten is that motionEye uses it internally to remove the "motion detected" red frame. Unfortunately there's no way to make it execute custom commands with the current version. I'll think of a way to allow executing extra commands when the event stops.
That would be great! I also need it to start a counter and count time since last detection
Instead of adding it under Motion Notification define it in the Extra Motion Options. I have done it for the WiFiPlug, so if the feed gets lost it flicks the plug off and on. on_event_end
I noticed that under "Motion Notification" you can add a command to be executed. However this is only added to the "on_event_start" directive in de thread-?.conf file. Luckily, if you manually add a "stop" command to "on_event_stop" directive it does not get overwritten.
I use the start / stop commands to flip a virtual motion detection device in Domoticz (a home automation system) whenever motion decides a motion event either starts or stops, so I can use my IP camera as a motiondetector as well.
Why no seperate options to add a mail / webhook / command option on event start and stop?