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
69.85k stars 28.95k forks source link

Failed to subscribe long_poll in Reolink integration #121177

Closed xavimarquez closed 1 day ago

xavimarquez commented 5 days ago

The problem

Reolink integration gets the following error message in the log "Reolink camtest event long polling subscription lost: Host 192.168.1.100:443: failed to subscribe long_poll: Host 192.168.1.100:443: connection timeout exception."

However, the integration seems to work fine. I can see the camera, check on/off the light, siren, etc.

Reolink cameras are PoE, no wifi, and network is reliable.

What version of Home Assistant Core has the issue?

core-2024.7.0

What was the last working version of Home Assistant Core?

No response

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

config_entry-reolink-1ffc6f37068a029c417193b27430e8d8 (1).json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Home Assistant is running in a Virtual Machine in a Synology DS923+ Home Assistant runs under https, without a proxy. It could be related. I have read other users with similar problems, for example https://github.com/home-assistant/core/issues/111640

home-assistant[bot] commented 5 days ago

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)

starkillerOG commented 1 day ago

@xavimarquez thank you for already including the diagnostic info, in the diagnostics there is: "event connection": "Fast polling", That means the primary and secondary methods (ONVIF push and ONVIF long polling) for receiving motion/AI events are both failing. The last resort method of fast polling is now requesting the motion/AI state each 5 seconds.

This is very demanding on the CPU of your camera and can cause it to be less responsive. Besides you now have a delay of up to 5 seconds before HA detects motion/AI events.

This is caused by a network issue, probably related to your VM and not allowing http connections. Please read https://www.home-assistant.io/integrations/reolink/#reducing-latency-of-motion-events and https://www.home-assistant.io/integrations/reolink/#troubleshooting

Please also make sure that you did not block the ONVIF port in your network configuration.

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.