[SOLVED] Capture image frame and/or video from RTSP with MotionEye

Hi

I have a binary sensor that tells me when someone is ringing at doorbell.

I would like to send a still image or little video from my external RTSP camera that is already defined in MotionEye, installed as HA addon.

Is there a way to capture it using NodeRed ?

Thanks

Yes, but i dont think it would be possible with motioneye. Have you added this camera as a camera entity to HA? If you have you can just call the camera snapshot service and the camera entity. if you havent you can get the snapshot url and then using http node request a get command to that snapshot url with the correct camera authentication

I’ve created this script:

snap_vialetto:
  alias: snap_vialetto
  sequence:
  - data:
      entity_id: "camera.vialetto"
      filename: "/share/snap_vialetto.jpg"
    service: camera.snapshot

and this is the camera definition:

  - name: Vialetto
    platform: generic
    still_image_url: http://xxx.xxx.xxx.xxx/tmpfs/auto.jpg
    stream_source: rtsp://xxx.xxx.xxx.xxx:xxx/xx
    verify_ssl: false
    username: user
    password:  pass
    authentication: basic

When I call the script nothings happens, as well as I call directly the service from the Service panel in HA.

What can I check?

Thanks

I hope that you are able to see the camera feed in HA and also the snapshot url is valid. Did you whitelist the /share folder?

  allowlist_external_dirs:
    - /tmp
    - /share
1 Like

Thanks!
That was the trick.
Now I have defined allowlist_external_dirs and it’s working fine!