-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rich camera support for: Reolink Cameras #1027
Comments
Hi @skynet01 . Thank you for the specific request to add media browsing capabilities for Reolink cameras into this card. Looking at the integration code for the official one, it does not appear to expose media at all (i.e. no Media browsing support in HA)? Is that right? If yes, there's nothing I can do on the card to fix that. Perhaps @starkillerOG (the codeowner for the official Reolink integration) could comment on whether there's any plan to add media browsing support there, or if I'm missing anything. A quick look at the JimStar version suggests it does expose media (source), so having the card pull out its media would be possible. Obviously though, given the choice, I'd rather only support the official one since it will likely have the widest reach given time. |
I am still using the JimStar integration as it has the most features and I think it actually is more popular, as the official one just launched a month or so back. I think the official one will add media browsing as well. I asked the author I'll update this thread with his answer. Thank you for considering |
The author confirmed its already being developed in the core integration I believe since its a fork from them Jimstar integration implementing it for the Jimstar will make it work with the other when it's released. |
There is some work beeing done on media browsing for the build-in reolink integration, see here: Question about media platform. · Issue #9 · starkillerOG/reolink_aio · GitHub 2 |
Thanks @starkillerOG . Should we expect that the media source in the core HA version of the integration would be a "clean" fork of the JimStar version, or might it be entirely unrelated? [If it's going to likely be very similar, we could safely do development on this end. If you don't know, we still could, but at much greater risk we'd need to change it later] |
@dermotduffy it will probably be losely based on, but no I will build it up from the ground. |
@starkillerOG Thank you, will keep that in mind. |
The native Reolink plugin now supporst media playback any chance this can now be added into the cards :) |
Aha, great! Every chance, but more upvotes would make it more likely for me to prioritize this. I also plan to rename the card after the v6 release (see rename bug), and I'm hoping it can help accelerate support for other camera engines like Reolink. |
Any update on this? Reolink integration is being used by 20,000 people (6.7%) (https://www.home-assistant.io/integrations/reolink/) , more then ONVIF , Ring or even Unifi. I just think no one know about this amazing card so people are not voting for it: |
Ooh I see the feature tag, does it mean we may see it in the future ❤️😉 |
@skynet01 Honestly, I am hoping someone with Reolink cameras might be interested in implementing this, possibly after I do the card rename and advertise it a little ... as you said above, I suspect the card is not that well known outside the Frigate world. So I'm definitely open to it, just harder for me to develop for a camera platform I do not use. |
yeah very good point 👌 |
Due to @skynet01 's impressive persistence, I've started playing with this :-) I found an old WiFi Reolink camera and put an SD card in it. Here's what I have so far:
I found a few major problems (these are all equally problems with the existing HA interface, but I think they are more apparent/painful in the card):
Curious what @starkillerOG thinks about these problems / ideas. |
Woo, thanks for working on this🎉
Sorry that this turned out to be much harder then I thought. |
The issue isn't the amount requested, it's that the card must fetch a whole day to return any amount. 5 or 50 will take approximately the same amount of time to fetch (and it's too long).
If it works for you through the media library in the companion app, the card would likely work fine for you too. Neither work for me, presumably because I'm using the default self-signed certificate my camera came with. Your camera/NVR likely either has a valid certificate, or you're accessing everything over
This should be handled at the integration level in my opinion, so that both the integration and card could benefit. |
|
Yeah. In general, my fear is just that for some users this sets them up for a poor experience, which they then rightfully complain about! Lets see what the integration owner says. If they are open to adding a service call to fetch between arbitrary dates, this could be much smoother.
Huh. OK. I didn't try just using
If implemented in the integration itself, the HA Media Library and the card would automatically have access to those thumbnails. Of the three issues, this is probably the hardest to fix unless the camera itself supports thumbnails. The only alternative is really icky stuff like downloading media automatically, pulling frames out of it, saving them locally to use as thumbnails, etc. A lot of complexity and performance issues. In this issue the integration owner chimes in on this topic:
|
Sorry for the late response.
|
|
@starkillerOG Thoughts on 1 above? I think the service call is the best path if you're open to it, as it won't necessary need your media browser experience to change. Related: I can't see any way (in |
@dermotduffy sorry for the late response.
I don't think the API offers a way to only receive the first X number of records, you can only request records between to datetimes. |
@starkillerOG For 2, you might consider using https://github.com/dermotduffy/hass-web-proxy-lib/ which is a library for just such a purpose (it's what Frigate uses) -- might make your PR smaller and keep logic centralized for integrations that need proxy capabilities. For users of the card, 2 is already solved since they can use https://github.com/dermotduffy/hass-web-proxy-integration (which uses the library I linked above). It will still be better to have this built into HA though, so looking forward to your PR! For 1, yes, but honestly all service calls that return JSON require the user to know the format and process it. Wondering is this actually any different? |
@dermotduffy regarding 2, In that case I would suggest you try to get this proxying capabality in HomeAssistant core (maybe as a helper), not as a custom integration. regarding 1, that is why i never implement a service which responds with JSON and I don't think there are many of such services. |
There's a library, and SEPARATELY a custom integration which uses that library. Using the library in core is no different than the way you use |
I think the key question is whether you'd support such a service as code owner for the |
Aaah did not see it was a pypi library, thanks for the info. |
@dermotduffy No I don't have anything against such a service. If you make the PR, I will review it and approve it. I do see one privacy/security consern: I don't like the service to return the plain text password of the Reolink camera/NVR. |
Of course, makes complete sense, thanks. I might wait until someone actually complains about the performance of the existing implementation before I work on it though, lets see.
Yes, definitely would not like to do that. In practice though, I was assuming it could just return the media browser identifier, and ask HA to resolve that as it already does with all the media browser calls. All the caller of this new service caller would need is that ID, which is whatever the integration already returns. The existing integration would do the rest as it does today to translate that into a useful URL for your browser, i.e. the security would be no worse than it already is. |
You are probably right, ideed you don't need the actual URL. |
As per #884 this is a request to add media browsing support for Reolink cameras. There is an official Reolink integration https://www.home-assistant.io/integrations/reolink/ that’s used by about 14k (5.4%) people and Jinstar’s integration https://github.com/JimStar/reolink_cctv (which the official one is forked from)
Describe the solution you'd like
the media functionality works within a card just like frigate cameras. Would be great if it worked with both integrations as a considerable amount of people still use Jimstars integration
The text was updated successfully, but these errors were encountered: