motioneye-project / motioneye

A web frontend for the motion daemon.
GNU General Public License v3.0
3.94k stars 650 forks source link

Latest image for command to run on motion #2875

Open manno-xx opened 10 months ago

manno-xx commented 10 months ago

Hi!

Is there a way to get the latest image that was saved after a motion event?

I was hoping to send the last saved image to a web server somewhere without having to write some server0side logic. So, whatever the filename is on the RPi (running motioneyeOS currently) to, for instant, 'recent.jpg' on a webserver I host a site on.

I guess I can the command to work somehow (.sh probably) but I cannot find a reference to the most recent recorded image.

The File Storage -> Upload Media Files is not an option as it uploads everything and there is no telling what the name of the latest is.

Kind regards, Manno

zagrim commented 10 months ago

At least in my setup there's a symlink lastsnap.jpg in each camera directory pointing to the most recent image file.

manno-xx commented 10 months ago

Thanks @zagrim! Indeed, Had not thought about looking there using ssh. Somehow I hoped to find the answer in the web interface, but this works! (btw, I would consider this closed, not sure what the idea is here. Sometimes I think Issues are used as sort of forum)