bropat / eufy-security-client

This shared library allows to control Eufy security devices by connecting to the Eufy cloud servers and local/remote stations over p2p.
MIT License
467 stars 67 forks source link

Take a picture? #58

Closed andreasnuesslein closed 2 years ago

andreasnuesslein commented 2 years ago

Hi @bropat, hi all,

first of: thank you for this library :heart_eyes: Very cool, all the effort your pour into this.

My question: has anybody figured out how to trigger this "take a picture" functionality? I would love to take a picture every hour to later glue together a timelapse. But I couldn't find anything in your API.

Did I overlook it? Or is it not something the API actually provides? I thought maybe it was just the Android App actually taking a picture from the rtsp stream but then again it's got 3MP (2304*1296, 2MB) and it doesnt seem to be too dependent on the quality of the actual stream. I might be mistaken of course.

Or even better, take a snapshot and save it onto the Station? Or for that matter: trigger a recording onto the station (without motion happening necessarily) ?

Thanks Andreas

bropat commented 2 years ago

Hi @andreasnuesslein ,

thank you very much ;)

The "take a screenshot" functionality is only offered in the app during the live stream, as the screenshot is taken from the video footage. In this specific case, it was not implemented in the library. Of course, you can start the livestream with the library and take a screenshot from the livestream with ffmpeg.

Or even better, take a snapshot and save it onto the Station? Or for that matter: trigger a recording onto the station (without motion happening necessarily) ?

Unfortunately, this is not possible.

andreasnuesslein commented 2 years ago

ah shoot, forgot to answer.

Thank you for your response. Yeah I was looking into the ffmpeg-solution too. Only for some reason more often than not ffmpeg won't grab the stream correctly. I'll keep diggin there a bit.

Thanks again

schliemann commented 2 years ago

Hi @bropat,

I'm curios about the snapshot which is supported in the homekit(apple) integration for the cameras. Every 10 seconds it makes a new snapshot. Do you think this is done by livestreaming or some other means?

https://user-images.githubusercontent.com/10818044/149019768-90eec364-d4f5-4f76-b255-b1da1d79f774.MOV

fullphat commented 2 years ago

If it helps, this is how the ffmpeg HomeBridge plugin does it:

[1/11/2022, 9:17:21 PM] [Camera FFmpeg] [Ext Front Doorbell] Snapshot command: /usr/local/lib/node modules/homebridge-camera-ffmpeg/node modules/ffmpeg-for-homebridge/ffmpeg
-i rtsp://192.168.2.2/live0 -frames:v 1 -f image2
- -hide_banner -loglevel error

Not sure if the RTSP url could be replaced with the socket detail?

bropat commented 2 years ago

Do you think this is done by livestreaming or some other means?

I don't know. Is this functionality also offered for cameras with battery? It could be that Eufy has implemented a special function in the firmware that Homekit accesses.

schliemann commented 2 years ago

@bropat

HomeKit is available on Indoor Cam Pan&Tilt 2K, Indoor Cam 2K, eufyCam 2/2 Pro, and eufyCam 2C/2C Pro connected to eufy HomeBase 2. So I guess it is facilitated through the homebase.