fuatakgun / eufy_security

Home Assistant integration to manage Eufy Security devices as cameras, home base stations, doorbells, motion and contact sensors.
842 stars 73 forks source link

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

Closed bkr1969 closed 5 months ago

bkr1969 commented 5 months ago
          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 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 https://github.com/fuatakgun/eufy_security/issues/1074#issuecomment-1909651534_

fuatakgun commented 5 months ago

What is this supposed to mean?

bkr1969 commented 5 months ago

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.

bkr1969 commented 5 months ago

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

fuatakgun commented 5 months ago

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.

bkr1969 commented 5 months ago

But it is not. This is as precise as I can be.

  1. If a snapshot is being stored, where is it stored and how do I access it? It is NOT showing up as my poster.
  2. Can you simply post the EXACT configuration you used in your example: https://private-user-images.githubusercontent.com/11085566/210083674-bbf082ab-5f20-4d1c-ab61-e687c7ce7506.mp4?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDYyMTI3NzAsIm5iZiI6MTcwNjIxMjQ3MCwicGF0aCI6Ii8xMTA4NTU2Ni8yMTAwODM2NzQtYmJmMDgyYWItNWYyMC00ZDFjLWFiNjEtZTY4N2M3Y2U3NTA2Lm1wND9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTI1VDE5NTQzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU4MzMwZWVlOWExODQ2MDEyMmQyN2Q0MjBkYTYzOWNmMzQ3OGUzM2I3OWE0NDBjYzkyYjBmYWRhYzkwNTlmZDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.t-4UocMoREMUwfY1HG-vO-J2nltI7PMTatKZMD8pc40

Without knowing the code, I cannot tell if there is an issue with my camera model, my configuration, or my code. All I know is that it DOES NOT work as your example does.

fuatakgun commented 5 months ago

Can you post webrtc card code?

bkr1969 commented 5 months ago
  - type: custom:webrtc-camera
    url: rtsp://BackYardCamera1:Password@xxx.xx.x.xxx/live1
    poster: camera.backyard
    ui: true
fuatakgun commented 5 months ago

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.

bkr1969 commented 5 months ago

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.

fuatakgun commented 5 months ago

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

bkr1969 commented 5 months ago

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

fuatakgun commented 5 months ago

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

bkr1969 commented 5 months ago

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

fuatakgun commented 5 months ago

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

bkr1969 commented 5 months ago

Tell me exactly what you want me to do.

bkr1969 commented 5 months ago

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?