fuatakgun/eufy_security

so, giving this a second thought, I see that camera snapshot is being updated regularly while streaming or when generate_image is called.

Closed this issue · 16 comments

          so, giving this a second thought, I see that camera snapshot is being updated regularly while streaming or when generate_image is called.

but this snapshot is stored under camera entity.
on the webrtc card example I shared, the logic is working like this;

  • if the camera is not streaming, show the poster (image.last_event -> this is not camera snapshot, this is last motion trigger event)
  • if the the camera is steraming, show the webrtc steram.

If you want, you can switch your webrtc card into this below;

type: custom:webrtc-camera
entity: camera.entrance
poster: camera.entrance

Originally posted by @fuatakgun in #1074 (comment)

What is this supposed to mean?

This response does not make sense to me. If I add entity: to my card, I get a "Cannot find URL for 'any camera I choose'". I still have an image on one camera that is a month old. I have followed the description exactly but nothing changes. Can you please give the exact configuration for a card that will include a current snapshot image? I am happy to give you access to my specific camera if that helps.

You closed the issue without it being resolved so this was my option for re-opening.

If you want this to be logical to you, then you have to be precise and clear.

The initial issue is that the camera snapshot is storing latest image when it is streaming or when generate_image is called

I checked the code and validated that it is working as described initially.

Can you post webrtc card code?

  - type: custom:webrtc-camera
    url: rtsp://BackYardCamera1:Password@xxx.xx.x.xxx/live1
    poster: camera.backyard
    ui: true

You are not using this integration for streaming, you are directly streaming from rtsp endpoint, which is not going through my integration.

So, don't expect a solution from this integration, but if i were you, i would create a generic camera with RTSP url and use that camera entity for webrtc camera and everything would work fine.

That mostly works, except the configuration for the generic camera asks for a URL for the still image and I don't know what to use there. For my RING generic camera, there is a URL for the latest snapshot. I imagine this is what I've been looking for all along. Thank you for your help with this.

If you want to use my initial suggestion, you need to call rtsp stream service to start streaming, so the rest would work fine. But not much needed

It will stream just fine, but I have a dummy image for the snapshot now. I cannot use the rtsp URL (generic camera won't accept). What do I use for the URL of the still image?
image

Just put some random image from the internet, it will not be visible to you on webrtc (hopefully)

No. As soon as the streaming is stopped, whatever image I use as a placeholder comes back.

Let's rollback to initial idea and use the camera entity from my integration and use respective services to start stop stream

Tell me exactly what you want me to do.

OK. I don't know if this helps or not. I tried using the camera.snapshot service. If I call it on the actual camera, it snaps the same stale image I've been seeing for the past month (stream is on when I call the service). If I call it on the generic camera I created, I get a blank (broken) image place holder. Shouldn't a snapshot grab what is coming through the stream?