core icon indicating copy to clipboard operation
core copied to clipboard

Reolink webhook URL unreachable

Open YoranT opened this issue 1 year ago • 8 comments

The problem

Can somebody help me with this problem.

Reolink webhook URL unreachable

Did not receive initial ONVIF state from Oprit. Most likely, the Reolink camera can not reach the current (local) Home Assistant URL http://10.88.88.31:8123, please configure a (local) HTTP address under "Home Assistant URL" in the network settings that points to Home Assistant. For example http://192.168.1.10:8123 where 192.168.1.10 is the IP of the Home Assistant device. Also, make sure the Reolink camera can reach that URL. Using fast motion/AI state polling until the first ONVIF push is received.

What version of Home Assistant Core has the issue?

2024.7.0

What was the last working version of Home Assistant Core?

2024.6.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Reolink

Link to integration documentation on our website

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

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

YoranT avatar Aug 19 '24 08:08 YoranT

Hey there @starkillerog, mind taking a look at this issue as it has been labeled with an integration (reolink) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of reolink can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign reolink Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


reolink documentation reolink source (message by IssueLinks)

home-assistant[bot] avatar Aug 19 '24 08:08 home-assistant[bot]

I'm getting a lot of Reolink integration errors since the recent upgrade. Don't have time right this minute to try to understand whether my problems and OP's are the same. For now I'm just assumign it's the same, not cluttering up with another ticket, saying "me too" and adding a screenshot of my system log here. If I need to provide more details, logs, separate ticket, etc, I'm happy to.

image

knwpsk avatar Aug 19 '24 13:08 knwpsk

@YoranT please have a look at https://www.home-assistant.io/integrations/reolink/#troubleshooting and https://www.home-assistant.io/integrations/reolink/#reducing-latency-of-motion-events

You either have a network issue (like seperate VLANs) or you have a wrong URL configured in HomeAssistant, see the error message.

Can you provide the diagnositc info: https://www.home-assistant.io/docs/configuration/troubleshooting/#download-diagnostics

starkillerOG avatar Aug 20 '24 08:08 starkillerOG

@knwpsk I would need a debug log for this, see https://www.home-assistant.io/docs/configuration/troubleshooting/#debug-logs-and-diagnostics

Please also provide the diagnostic info file, and open a seperate issue since it is totally unrelated to this issue.

starkillerOG avatar Aug 20 '24 08:08 starkillerOG

@starkillerOG thanks for responding. I'll wait and see if this settles down on its own, and will report a new ticket if it doesn't.

knwpsk avatar Aug 20 '24 12:08 knwpsk

Hi there. I've got the exact same issue.

  • Reolink Integration throws "Reolink webhook URL unreachable"
  • My HA instance is reachable via HTTP in the LAN, no VLANs or segmentation. The integration has happily worked for a couple of months.
  • Restarting HA does not solve the problem
  • Network settings are configured to use for Local Network a FQDN which is locally resolved.

I've enabled debug logging and restarted the integration. config_entry-reolink-01J70RATRQ5TKBW7BMHM3XGDE8.json

immagine 2024-10-10 17_14_39-Home Assistant - Work - Microsoft​ Edge

I see a timeout in the logs: 2024-10-10 17_19_12-Settings – Home Assistant – Mozilla Firefox

This error is interesting, because it's the camera's IP, not HA's.

auanasgheps avatar Oct 10 '24 15:10 auanasgheps

In my case, the real issue is with the camera (E1 Zoom), but I don't have an easy way to troubleshoot.

  • I can access the Web Interface over port 80.
  • If I use the mobile app, I can see the video stream
  • If I go to the camera settings in the app, it can't connect.

The camera in this state is soft-crashed. After a couple of minutes it starts to respond again.

I rebooted the camera, the error disappeared and it started to use OVIF Push again.

I don't know how I could report this issue to Reolink, as I don't have logs from the camera.

Either way the integration could be enhanced to report that this issue issue is the camera is not responding, instead of the network configuration. The entry is actually in the logs (the last screen I posted)

auanasgheps avatar Oct 10 '24 15:10 auanasgheps

What i did was just delete the whole integration and devices then reinstall it and it worked again.

YoranT avatar Oct 10 '24 15:10 YoranT

I am still regularly facing this issue, I think I will open a new case

auanasgheps avatar Oct 17 '24 10:10 auanasgheps

I am currently working on a brand new method to receive push events based on a TCP connection on port 9000. I expect that to be implemented next month. That will probably solve all these issues.

No that I am currently working on this and this is now at the top of my to do list.

starkillerOG avatar Oct 27 '24 13:10 starkillerOG

Thanks for the good news. I'm available if you need other evidences, logs, testing or similar.

auanasgheps avatar Oct 27 '24 21:10 auanasgheps

I am currently working on a brand new method to receive push events based on a TCP connection on port 9000. I expect that to be implemented next month. That will probably solve all these issues.

No that I am currently working on this and this is now at the top of my to do list.

Super happy and grateful for this, @starkillerOG . Thank you. And I'm happy to be a beta tester if that's useful (and possible)

knwpsk avatar Oct 28 '24 12:10 knwpsk

@starkillerOG I've noticed some issues in particular with my wifi cameras. (I have two Duo wifi cameras, and several wired cameras.) On the Duo's, I frequently see certain associated entities or attributes that are "unavailable", but this never happens with the wired cams. I can't tell if this is because it's the Duo model in particular (although my other single-lens camera never seems to have this problem); or if maybe it's because it's wifi (slower) vs wired.

When I see this happening, i see some logging that says "Error fetching reolink.RLN8-410 NVR data: Host 192.168.86.72:443 error mapping responses to requests, received 1 responses while requesting 6 responses Error fetching reolink.RLN8-410 NVR data: Host 192.168.86.72:443 error mapping responses to requests, received 1 responses while requesting 4 responses Error fetching reolink.RLN8-410 NVR data: Host 192.168.86.72:443 error mapping responses to requests, received 1 responses while requesting 3 responses"

If this isn't already obvious and related to the other stuff..... let me know and I can provide more info

Thanks!

knwpsk avatar Oct 28 '24 16:10 knwpsk

The PR that will implement the new TCP push event connection is ready for testing: https://github.com/home-assistant/core/pull/129490

It will most likely be available in the HA 2024.12.0 release, if we are very lucky in the HA 2024.11.0 release (but the beta cut is today).

starkillerOG avatar Oct 30 '24 13:10 starkillerOG

@knwpsk the "error mapping responses to requests," is likely to be either a connection issue (spotty wifi) or because the camera is beeing overloaded with requests. In the second case the PR mentioned above could actually help.

But I would need a debug log to investigate in more detail. I suggest you either test the above PR or wait unitill it is available in a new HA release. If you then still experiance the issue, please open a new issue and I will investigate further.

starkillerOG avatar Oct 30 '24 13:10 starkillerOG

@starkillerOG I'm not aware of how one would test this PR pre-release. If you care, and want me to try, give me a little help on how to do that? (I'm guessing since it's part of HA core, I really can't test it, or not easily. One would have to organize a test build of HA to do that?)

I'm happy to wait for the HA release and see how it goes.

knwpsk avatar Oct 30 '24 13:10 knwpsk

Can be done as a custom component, but lets just wait untill it makes it into the next HA release

starkillerOG avatar Oct 30 '24 13:10 starkillerOG

Good news, the PR was just merged and squeezed in before the beta cut later today.

That means it will be included in HA 2024.11.0 available next week. Later today HA 2024.11.0b0 will be released, so tonight you could already test it if you join the beta: https://www.home-assistant.io/common-tasks/os/#running-a-beta-version

starkillerOG avatar Oct 30 '24 13:10 starkillerOG

Closing this now since it should be resolved. If you still experiance issues after updating to HA 2024.11.0, please open a new issue.

If you appreciate the reolink integration and want to support its development, please consider sponsering the upstream library or purchase Reolink products through this affiliate link.

starkillerOG avatar Oct 30 '24 13:10 starkillerOG

Hi @starkillerOG thanks for this, I am looking forward to try the new release.

May I ask a "nice to have": could you expose the Event Connectivity as an entity? It would make troubleshooting super easy!

auanasgheps avatar Oct 31 '24 18:10 auanasgheps

I have made a PR for a event_connection entity in the past, but it was rejected since it is only for debugging/diagnostics.

That is why it is now present in the diagnostics info

starkillerOG avatar Oct 31 '24 18:10 starkillerOG

Upgraded HA yesterday, and now the reolink integration is failing to set up.

Source: config_entries.py:635
First occurred: 8:25:58 AM (4 occurrences)
Last logged: 11:20:59 AM

Error setting up entry Reolink NVR RLN8-410 for reolink
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/reolink/__init__.py", line 66, in async_setup_entry
    await host.async_init()
  File "/usr/src/homeassistant/homeassistant/components/reolink/host.py", line 149, in async_init
    await self._api.get_host_data()
  File "/usr/local/lib/python3.12/site-packages/reolink_aio/api.py", line 2276, in get_host_data
    json_data = await self.send(body, expected_response_type="json")
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/reolink_aio/api.py", line 5034, in send
    response.extend(await self.send_chunk(body[chunk:chunk_end], param, expected_response_type, retry))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/reolink_aio/api.py", line 5127, in send_chunk
    response = await self._aiohttp_session.post(url=self._url, json=body, params=param, allow_redirects=False, timeout=self._timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 690, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1058, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/streams.py", line 643, in read
    await self._waiter
asyncio.exceptions.CancelledError

knwpsk avatar Nov 11 '24 16:11 knwpsk

@knwpsk not sure what is going on there, but it seems to be a diffrent issue. Could you please make a new issue to keep things a bit seperated

Also please turn on debug logging and then restart HA and post the resulting debug log in the new issue.

starkillerOG avatar Nov 11 '24 19:11 starkillerOG

@starkillerOG yes, happy to, thanks

knwpsk avatar Nov 11 '24 19:11 knwpsk