I have three cameras that do not play well with
Home Assistant; while I can display their stream, it is impossible torun the
These camera entities are webcams connected to raspberry pis (two PS2 USB cams, one PiCam) and broadcast their streams via
I positively can grab a live still image by running this command
ffmpeg -y -i http://ip:8081 -f image2 grab.png; this will create/overwrite
grab.png and write the frame that is displayed at the moment to this file.
Unfortunately, I was not able to find a library for python so that I could trigger a
python_script via HASS. The libraries that I found were for streaming via ffmpeg, not to utilize ffmpeg to do something else.
Though I could probably just use python to run this very bash command I posted above via
os, I’d prefer a “cleaner” solution (or, a plain python solution, if you will).
Or is there a HASS native way to do this that I missed? I know that motion itself can also trigger snapshots, but I particularly do not want to do this. The entire logic should run on my Home Assistant server, so if I ever add another camera (perhaps one that does not even run on
motion, so utilizing motion’s capture feature would not be available) it would still work just alike without changing things.
I need to grab multiple snapshots from these cameras when the linked motion sensors trigger and I am not at home.
Thank you in advance for your ideas