fwestenberg / reolink_dev

Home Assistant Reolink addon
MIT License
553 stars 101 forks source link

New official integration in next release? #608

Open KentuckyMC opened 1 year ago

KentuckyMC commented 1 year ago

Hello all,

As I always read the beta release notes, I saw that Reolink gets a official integration with Home Assistant. Maybe good for everyone (as also the maker of this repository) to help the core of Home Assistant and move towards there?

Thanks a lot!

https://rc.home-assistant.io/integrations/reolink

cpainchaud commented 1 year ago

Hi,

This is very interesting. From the very basic yet page it suggests it won't support AI sensors among other things. Did you try it?

KentuckyMC commented 1 year ago

Hi, no haven't tried this beta myself yet. But seems promising they include it in the core of HA. Because of the WAF I don't use the Beta releases of HA. I've a Reolink doorbell myself, so will give this one a try once they release it.

swa72 commented 1 year ago

https://github.com/home-assistant/core/pull/84081 gives some more details. It ss also based on https://github.com/fwestenberg/reolink_dev but with limited functions (yet).

andriej commented 1 year ago

No motion sensors as far as I can see

cpainchaud commented 1 year ago

I will be honest with you all, while I expect official integration will have less issues with 'event loops' which I cannot reproduce in my env so I cannot fix it, I still think they will be hit hard by all the bugs on various firmware version which have never been fixed. We will see !

shalak commented 1 year ago

It's out - has anyone tried if it's safe to update HA and not have this HACS integration broken?

ALEdmonds commented 1 year ago

I've installed the core update, and my cameras still appear to be working normally using reolink_dev. I even set up one of my cameras (an RLC-520) using the new official integration, and it seems to be working seamlessly using both integrations simultaneously while HA still treats it as a single device, which is neat.

As @andriej pointed out, the official integration doesn't provide any entities for motion, lights, AI, etc; but it does provide a separate entity for each stream (main, sub, and stills). Being able to use different streams in different dashboards could be useful, so I just might use both integrations for a while and see how that goes.

bcutter commented 1 year ago

I'd prefer all three (new official, this established one and https://github.com/JimStar/reolink_cctv#most-important-changesimprovements) would team up to concentrate dev power and create ONE "perfect" ReoLink integration.

bcameron21 commented 1 year ago

I noticed in the changes for the official integation that both fwestenberg and JimStar were asked if they wanted to be code owners of the official integration so I am sure they'd be open to volunteers. https://github.com/home-assistant/core/pull/84081#issuecomment-1353833376

cpainchaud commented 1 year ago

Remember that the main issue is API inconsistencies, bugs and non-sense designs made by Reolink. Each integration authors are making design choices based on what makes sense for their own devices specifics. It will be a really hard job to have 1 integration that works for everyone.

bcutter commented 1 year ago

It will be a really hard job to have 1 integration that works for everyone.

So will it be for every user looking for the integration working for them.

DarwinData commented 1 year ago

I have found that this official integration produces fewer errors in the log file but sadly no motion sensors.

bcutter commented 1 year ago

Maybe the one because of the other? 😃 Anyway, no motion sensors, no relevance for me.

cpainchaud commented 1 year ago

It I'll be there in next version, it's because of HA rules on new integrations. I saw the commits, it's definitely coming

DarwinData commented 1 year ago

Awesome news about the motion sensor!

bcutter commented 1 year ago

HA rules on new integrations

Interesting. What do they look like? Official integrations are not allowed to have not even closely the same set of features as the custom ones?

Just kidding, that's good news, basically.

cpainchaud commented 1 year ago

They are allowed only 1 platform per release. This one had 'camera' platform, next one should have boolean states

On Tue, Jan 10, 2023, 00:26 bcutter @.***> wrote:

HA rules on new integrations

Interesting. What do they look like? Official integrations are not allowed to have not even closely the same set of features as the custom ones?

Just kidding, that's good news, basically.

— Reply to this email directly, view it on GitHub https://github.com/fwestenberg/reolink_dev/issues/608#issuecomment-1376485617, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTC5PWYWNGD27CRDXLMAZLWRSNCHANCNFSM6AAAAAATL3BSDU . You are receiving this because you commented.Message ID: @.***>

andriej commented 1 year ago

It is not true - it's just easier to maintain and eliminate bugs. Contributors can do more PRs if they are able to, just keep it mind everyone does it in their free time...

cpainchaud commented 1 year ago

well I was just quoting its author: image https://github.com/home-assistant/core/issues/85559

bcutter commented 1 year ago

Strange. FullyKiosk had entities of several domains right from the beginning. Anyway, let's watch development (from the sideline in my case for some time).

ayourk commented 1 year ago

Remember that the main issue is API inconsistencies, bugs and non-sense designs made by Reolink. Each integration authors are making design choices based on what makes sense for their own devices specifics. It will be a really hard job to have 1 integration that works for everyone.

I have an open ticket with Reolink and they want to get into contact with the developers of this integration. They are having difficulty getting a response.

andriej commented 1 year ago

Maybe @starkillerOG would be interested in this, but AFAIR @fwestenberg already tried to get in touch with reolink and no luck so...

ayourk commented 1 year ago

Maybe @starkillerOG would be interested in this, but AFAIR @fwestenberg already tried to get in touch with reolink and no luck so...

I'm willing to help facilitate this. An email address(es) of who should be contacted would be nice.

starkillerOG commented 1 year ago

@andriej thanks for tagging me in this issue.

I am the code-owner of the official HomeAssistant integration and have written the code for it based on the work of this repo (@fwestenberg) and that of @JimStar.

I asked both @fwestenberg and @JimStar to be code-owners of the official HomeAssistant integration and they are refrenced in the acknowledgment of my new upstream library reolink-aio. Unfortunately @fwestenberg and @JimStar did not want to go through the extra work of adhering to all HomeAssistant rules and wanted to go there own way with the custom integration, hopefully they will change there minds once the official integration reaches feature parity to the custom components.

Anyone who wants to help me with the official integration is more than welcome to put in PRs for the upstream lib reolink-aio or the HomeAssistant repo. I will do my best at reviewing incomming Reolink PRs.

Others that do not have the knowledge or time to work on PRs but want to show their appreciation or support can chose to sponsor the upstream library/me.

starkillerOG commented 1 year ago

They are allowed only 1 platform per release. This one had 'camera' platform, next one should have boolean states

Almost right, the initial PR to get a new integration into HomeAssistant can only have 1 platform. After that you can add more PRs for more platforms (1 platform per PR). However I run out of time before the beta-cut and did not get to other platforms. (Keep in mind I do this in my free-time without getting paid).

I am already working hard on the binary_sensor platform, my progress is in this branch: https://github.com/starkillerOG/home-assistant/tree/reolink_binary_sensors The basics are done, it just needs some styling, testing and debugging. Hopefully I will have time tonight to finish that and put in the PR.

starkillerOG commented 1 year ago

I have an open ticket with Reolink and they want to get into contact with the developers of this integration. They are having difficulty getting a response.

@ayourk I am the developer of the official reolink integration and would be very open to get more contacts with Reolink. They can make a issue in my github library: https://github.com/starkillerOG/reolink_aio/issues Or send me a chat on reddit, my reddit username is StarkillerTR If they contact me, I will send them my private e-mail and phonenumber on which I always respond. You can also post a e-mail adress here, and I can send them a e-mail.

I do have a private-chat with one reolink employee on reddit that is very helpfull, he enroled me in the "super-user" program of Reolink. He is in contact with the dev-team and I have made some requests for new API commands and they did add the GetEvents API command I requested in beta firmware I have, it schould be released in production firmware soon.

cpainchaud commented 1 year ago

I might contribute to the official integration @starkillerOG , I have been maintaining this repo for a year+ now and there were are a few issues standing out on Reolink side with tons of bugs and unpractical things. If you have the right contacts then may be there is a hope!

starkillerOG commented 1 year ago

@cpainchaud that would be great if you could contribute. I think Reolink is taking me serious at the moment, they have send me a small amount of equipment to test with and seem to be very pleased with having a official integration now.

They even told me they were going to test the official integration themselfs "later". Would be awesom if some inside reolink employees would test with HomeAssistant and experiance themselfs what problems there are in their API.

starkillerOG commented 1 year ago

The binary_sensor PR is finished and tested, the PR is here: https://github.com/home-assistant/core/pull/85654 (for people who want to track the progress).

Once that PR is merged and a new HA version is released the binary sensors schould show up for each camera. Probably around febuary 1st.

starkillerOG commented 1 year ago

I have an open ticket with Reolink and they want to get into contact with the developers of this integration. They are having difficulty getting a response.

@ayourk did you replay to Reolink to tell them they can contact me? They can also use this e-mail: starkiller.og@gmail.com, I will keep an eye on that e-mail for the coming week. Note that I normally do not read that e-mail and only forward filtered messages from that e-mail.

ayourk commented 1 year ago

Yes, I've been forwarding info along.

arthurEspooner commented 1 year ago

seems the official one supports everything and then some now? psyched to build a custom PTZ interface now!

are you planning on deprecating this one?

EDIT: ah, ok. this was the one that has the ptz support. i see the official one adds focus/zoom sliders, so i still have to build out the ptz UI myself using this. would be nice if the official one had support for this. merging everything together seems the best path.

starkillerOG commented 1 year ago

@arthurEspooner The next HomeAssistant 2023.4 which will be released on April 5th will include everything and some additional entities, the current version 2023.3 does not include much.

In HA 2023.4 the following will be added: Number entities:

Button entities:

Select entities:

Siren entity

Switch entities:

global switch entities:

Light entities:

starkillerOG commented 1 year ago

@fwestenberg maybe this component can be depricated after April 5th once HomeAssistant 2023.4 has been released?

arthurEspooner commented 1 year ago

very cool, thanks! this is going to make blue iris etc look like child's play when it comes to automations.

besides a few settings this means we have nearly full control from HA now without having to resort to using the camera API to build out the features we need. the only thing i've never seen is speaker/mic support outside of the reolink apps and blue iris, and my reolink speakers don't work via blue iris, but i can hear audio. is this a limitation in HA or the reolink side? done for security?

currently i just click my camera notification to open the reolink app so it's not a huge deal, and i like how it's explicit and feels like a phone call. i'm not sure i'd want to accidentally turn on my cameras speaker via HA and let passersby here inside my house.

ayourk commented 1 year ago

I'm just hoping this fixes my "too many logins" issue I've been having with my cameras. HA was constantly signing into the cameras too quickly causing the cameras to freeze up and lose connection if I was also watching the video stream from a web browser while using HA to manage the cameras.

starkillerOG commented 1 year ago

Two-way audio is not yet supported by Reolink camera firmware, but is announced to be coming for the RTSP stream. However I do not know if HomeAssistant can already deal with 2-way audio.

starkillerOG commented 1 year ago

@fwestenberg now that HomeAssistant 2023.4 is released, the build-in Reolink integration surpasses this custom integration in supported features/entities. Therefore at this point I would advice everyone to switch to the build-in Reolink integration.

@fwestenberg could you maybe archive this reolink_dev custom integration and maybe add a line at the top of the README informing users they schould switch to the build-in integration?