evilmarty / mjpeg-timelapse

Mjpeg Timelapse integration for Home Assistant
MIT License
24 stars 4 forks source link

[CR] Use another camera still_image entity as source image #13

Closed diamant-x closed 1 year ago

diamant-x commented 1 year ago

Hi,

I saw your extension in hacs and thought to try it. However, my source mjpeg signal is based on a template, because the url is a variable changing image id. As a result, i can't add it in your extension because is not a valid URL.

In fact, I would extend my issue to a more general one. Your extension is re-implementing a lot of complex things such as connecting to obtain a mjpeg image from a source, for which there's already an official integration supported with probably more use and scenarios considered. As a result, and as a better use of the effort, this integration would be very interesting if it could leverage as source image any other "camera." entity in HA for which there's a still_image source. That way, adding a camera image feed can be externalized to other integrations, and this one would be focused on generating timelapses as camera feed.

What do you think?

Thanks!

evilmarty commented 1 year ago

I like the idea and think it can make sense. You're welcome to create a PR implementing such a feature if you'd like.

diamant-x commented 1 year ago

Honestly, I have no idea where to start with such a feature. I've never programmed an integration for HA. All searchs I do found no results of other integrations attempting that.

Maybe something that could be done is to add a step of calling the 'snapshot' service on the selected camera and saving the resulting file in a known directory. Then the integration to pick up all the files based on the filename pattern.

diamant-x commented 1 year ago

Is this completed and available, or just won't be done?

Thanks.

evilmarty commented 1 year ago

No, it is not done. There was no activity so I closed the issue.