Taking snapshot from a camera does not work

Hi.

I have Vivotek cameras connected to a Synology NAS. And the Synology NAS is connected to Home Assistant running on a RPi4. I can see the cameras in the system, I see video stream from the cameras on Lovelace.

But if I want to take snapshot from the cameras, it does not work. I store try storing the images in /tmp/camera.jpg. I created an automation to take a snapshot and send it via email. The email contained just empty placeholders instead of pictures. So I checked the /tmp folder and it is empty. So I tried take snapshot from the developer tools, selected one camera, set location to the /tmp folder again, hit the call service button and again nothing - /tmp folder is still empty.

image

When running it from developers tools, I don’t see any error. But when running it from the automation, I see error in the logs
image

And if I check permissions of the /tmp folder, I see this - seems fine to me.
image

Any idea why? When I change the storage location to for example /media/tmp it works fine. But I supposed that the /tmp folder should be used for things like these.

I save snapshots to the config/www/tmp directory . I don’t think the camera integration has permission to save images outside of the www directory, and I don’t know how to give it permission to (or if its possible)

The documentation mentions to use config/www (I believe you can create/specify whatever subdirectory your want in the www folder)

I recall having a lot of issues setting this up and ended up just using a blueprint that has been working well for me

2 Likes

As already mentioned, don’t save it to /tmp I use /config/www/cameras/

1 Like

If you really do want to save to /tmp/:

homeassistant:
  name: Home
  ...
  allowlist_external_dirs:
    - /tmp

allowlist_external_dirs

The problem is, however, to make it visible on Lovelace, you’ll need to copy it to www – so just save yourself the trouble (as mentioned).

2 Likes