home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.74k stars 30.46k forks source link

Reolink integration not showing doorbell notification for Reolink Doorbell #87134

Closed Kepro closed 1 year ago

Kepro commented 1 year ago

The problem

Reolink integration not showing the camera as a doorbell in the home kit integration,

image

The more likely question is, if this integration should provide automatically linked_doorbell_sensor (from https://www.home-assistant.io/integrations/homekit/#linked_doorbell_sensor) or if this integration can provide it automatically 🤔

if nope, should we update documentation? (I can do that)

What version of Home Assistant Core has the issue?

2023.2.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Reolink

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

diagnostic log config_entry-homekit-0b91fabfe70646541ef30e334922d2b2.json.txt

you can see that linked_motion_sensor is there but not linked_doorbell_sensor

starkillerOG commented 1 year ago

@avdgaag1984 good to hear you are now up and running :) Thanks for the feedback.

doronazl commented 1 year ago

how do i get this to work ? the visitor entity wont trigger upon a button press im on POE version of the doorbell, connected to my switch, i also have a reolink nvr if that matters but the ports are full with cameras so cant connect it directly to it

Kepro commented 1 year ago

@doronazl do you have this issue also with the latest version? can you share a little bit more of your setup? https or anything? other "motion" based events are working only visitor is not working?

doronazl commented 1 year ago

@doronazl do you have this issue also with the latest version? can you share a little bit more of your setup? https or anything? other "motion" based events are working only visitor is not working?

Motions ok, only visitor is the problem. Where do i check the version and what do you mean http or anything?please clarify

doronazl commented 1 year ago

![Uploading 107E9DA2-5579-4C20-8C42-9FBAA8ED70E3.jpeg…]()

doronazl commented 1 year ago

anyone got any ideas ?

mhoogenbosch commented 1 year ago

anyone got any ideas ?

Have you checked everything mentioned above? And what have you found in regards to the suggestions above when using search?

doronazl commented 1 year ago

mhoogenbosch

just went over the whole thing my URLS were some old duckdns im not using anymore(using nabucasa now) will test now

doronazl commented 1 year ago

ok so on network settings on HA it marked "use home assistant cloud" for internet and for local network it specified to my http local address(which is the one im using when browsing to HA dashboard on the browser)

the "visitor" still doesnt work when clicking the button getting notification from the reolink app but nothing show up on HA Firmware: v3.0.0.1459_22102808 Hardware: DB_566128M5MP_P

mhoogenbosch commented 1 year ago

ok so on network settings on HA it marked "use home assistant cloud" for internet and for local network it specified to my http local address(which is the one im using when browsing to HA dashboard on the browser)

the "visitor" still doesnt work when clicking the button getting notification from the reolink app but nothing show up on HA Firmware: v3.0.0.1459_22102808 Hardware: DB_566128M5MP_P

You could try and remove integration both from integration and hacs. Webhook only gets registered during installation of the integration

doronazl commented 1 year ago

yes already done that.

doronazl commented 1 year ago

OK found the missing piece if you browse to the doorbell ip, go to settings, network, advanced and then port settings youl find HTTP port disabled by default switch that on , and done! working great so far!

mhoogenbosch commented 1 year ago

OK found the missing piece if you browse to the doorbell ip, go to settings, network, advanced and then port settings youl find HTTP port disabled by default switch that on , and done! working great so far!

Cool!

Boeng01 commented 1 year ago

I'm still struggling with getting the visitor sensor to work. I read all the posts here and tried what you all suggested. Deleted the integration, restarted HA, re-installed integration. Made sure my HA local adress is http. Made sure the http port is activated in the reolink doorbell. Even tried to hook up the doorbell per cable. Did all this a few times now but the result is always the same: no response from the visitor sensor. Also i recognized a massive delay of the video streams and also of the motion sensors. Video streams are delayed 3-4 seconds, no matter what quality i choose, no matter if i hook up the cam over wifi or cable. The delay is something i could live with, but the not working visitor sensor makes the doorbell absolete. Any more tips what exactly i can do to get this thing to work?

starkillerOG commented 1 year ago

@Boeng01 which firmware version of the reolink doorbell wifi are you using?

Boeng01 commented 1 year ago

@Boeng01 which firmware version of the reolink doorbell wifi are you using?

@starkillerOG Thanks for the reply.

Firmware is last officially available, its v3.0.0.1459_22102806

already asked reolink supoort if there's a beta firmware they could share, no answer till now.

Maybe i should mention that i'm running HA as Docker on a Synology Diskstation. Not sure if that could be the cause, since everything else works fine.

Je-sse commented 1 year ago

I have the same problem, maybe it's because I'm using HTTPS, but I don't want to disable it. Instead I found a workaround for now: I have enabled the “Last Notification” sensor in the Home Assistant app on my (Android) phone. When someone rings my doorbell, I get a notification from the Reolink app on my phone with the text “Visitor from NameOfDoorbell”. This is also the sensor text in Home Assistant and it’s the trigger for my automation.

If there is a way to fix the visitor sensor with HTTPS, that would be great.

Boeng01 commented 1 year ago

@Je-sse now that's quite a workaround XD does it work reliable? I want to trigger my indoor chimes e.g. my Echo Devices with this automation. On top i especially bought this cam to create a doorbell system without the use of an app / cloud service, would be a shame if that's not working now.

I tried everything with and without https, nothing works...

Je-sse commented 1 year ago

Haha, yes it is. I have tested it twice now and the response was really fast, but my phone was connected to my home Wi-Fi. I'll do some more tests tomorrow and also disconnect my Wi-Fi connection to see how that goes.

Boeng01 commented 1 year ago

Yes, would appreciate if you test it, so i don't configure everthing for nuts ;) Anyway there surely must be a reason for this sensor not going through. Hopefully there will be a fix fast ...

starkillerOG commented 1 year ago

@Je-sse the problem for you is defenetly you are using HTTPS, reolink can not send push notifications to HTTPS adresses, which is why you will have to have a local HTTP adress for reolink to send its push notifications to. You can still have a HTTPS externall HomeAssistant adress.

starkillerOG commented 1 year ago

@Boeng01 you are connecting the doorbell directly to HomeAssistant right, you are not using a NVR? (It will not work with the NVR at the current release firmware). Could you post the internal homeassistant adress you have set under Settings->system->network?

Could you turn on debug logging of the reolink integration, restart homeassistant, wait 5 minutes in which you make some motion events in front of the doorbell and press the doorbell to generate events, turn off debug logging and post the debug log here so I can look what is going on?

Boeng01 commented 1 year ago

@starkillerOG thanks for the help :)

I'm connecting directly to HA, not via NVR Internal HA Adress is: http://homeassistant.local:8123 (changed that from https: ...)

Will do the debugging later and post results. Never did something like that but i'm sure i figure out how to...

Boeng01 commented 1 year ago

home-assistant_reolink_2023-03-05T09-59-05.950Z.log

Did some logging - this thing is huge O.o. There are some components that are not working properly right now after the last HA update (Hue sync box, localtuya etc.) i'm still working on that but it shouldn't influence the reolink stuff, should it?

Hope you can find something in there

Je-sse commented 1 year ago

@starkillerOG Thank you. I just prefer not to disable HTTPS internally, also because browsers are moving away from HTTPS more and more. Reolink should be able to fix this with a software update, right? I will send them a feature request.

pkasarda commented 1 year ago

localhost ssl will be never supported as it doesn't provide valid certificate

Je-sse commented 1 year ago

But the Reolink doorbell sends the push notifications, right? If so, it doesn't use localhost, but the FQDN of HA

starkillerOG commented 1 year ago

@Boeng01 I would try using the IP of homeassistant, so http://192.168.1.IP:8123 instead of http://homeassistant.local:8123, ~Also I am not using the trailing "/", so http://192.168.1.IP:8123 instead of http://192.168.1.IP:8123/, not sure if that makes a diffrence though. (Of course fill in "IP")~

In your debug log I indeed do not see any ONVIF pushes coming in form the camera, although the subscription process completes correctly. This indicates that the reolink camera is unable to reach HomeAssistant on http://homeassistant.local:8123/api/webhook/reolink_38e7c0c35b6a_ONVIF

Boeng01 commented 1 year ago

@starkillerOG That did the Trick! Thanks for looking into it and your patience. I changed the internal adress as you mentioned and now the sensors work as they should. Movement, Person detection and above all the Button Press is shown instantly in HA. There's still the problem with the massive delay of the Video feeds, though. I get 2 different feeds: 'main' and 'sub'. The delay is different in those two feeds - 'sub' has around 4 seconds dely, 'main' is three seconds. You may have also an idea how to fix this? Anyway, many thanks for looking into this, appreciate your effort!

starkillerOG commented 1 year ago

@Boeng01 you could try the RTSPtoWeb - WebRTC addon in combination with the RTSPtoWebRTC integration. That will convert the RTSP streams offered by reolink to WebRTC streams which can have far less latency.

In my testing the latency reduced from +- 3 seconds to <0.5 second using that, but I did not figure out yet how to get it working when not on my LAN (although it is supposed to be able to work).

You can give it a try, but I did not write any of that, so can't offer support for it...

starkillerOG commented 1 year ago

Going to close this issue since I think it is resolved for everyone. If you still experiance issues, please open a new issue.

I will add a option in the configuration menu of the reolink integration to specify a diffrent HTTP adress than the global homeassistant network settings for edge cases such as having the camera's in a diffrent (second) house than the house where HomeAssistant is running. Advanced network configurations would be required in such cases like: A reverse proxy on a remote places which encryptes data to HA. Basically Camera -> HTTP -> ReverseProxy (re-encrypts with SSL ) -> HTTPS -> internet -> HASS (SSL)

Boeng01 commented 1 year ago

Sounds helpful, thank you.

starkillerOG commented 1 year ago

If you appreciate the reolink integration and want to support its development, please consider sponsering the upstream library.

starkillerOG commented 1 year ago

@home-assistant close

starkillerOG commented 1 year ago

@Kepro this issue has not been tagged for the reolink integration, therefore I cannot close it. Could you close it?

Kepro commented 1 year ago

@starkillerOG well it's not fixed as you closed https://github.com/home-assistant/core/pull/87545 but as you wish...

starkillerOG commented 1 year ago

@Kepro thanks, True, but this issue was massifly de-railed away from the Homekit issue towards the doorbell presses not beeing detected.

Kepro commented 1 year ago

yeah nobody was reading the issue :D only by the title :-D anyway, thanks for this integration