fwestenberg / reolink_dev

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

Sensors go Unavailable periodically #445

Open hugalafutro opened 2 years ago

hugalafutro commented 2 years ago

Describe the bug The sensors generated by the integration go Unavailable every x hours : x minutes with (mostly) exactly 1h delay between the occurrences.

To Reproduce Use the integration, there is nothing you have to do this has been happening ever since I start using it about 6 months ago, which is coincidentally also the length of time it took me to procrastinate and submit the issue.

Expected behaviour Sensors available all the time camera is online

Screenshots image image

Environment: Please provide useful information about your environment, like:

Additional context Does not seem to cause any issues, but I presume any automations depending on the sensor fail if the trigger happens on the second exactly while the sensor is unavailable.

theBOFH commented 2 years ago

+1 seems to be a mix of groups of 1 hour up to 3 hours between the "unavailable" image

image

Have been trying various configs but the issue seems to remain (direct connection to the camera, moving vlans, remove intermediate firewalls etc). One of the above is an NVR ( RLN8-410 Build No. build 2110099) and the other is a RLC-1220A Firmware: v3.1.0.764_21121705

I can see errors in the logs for "[custom_components.reolink_dev] Timeout fetching reolink.Front.motion_states data" or even indications of credential errors but the events are not as frequent as the "unavailable"

2022-02-09 14:21:08 ERROR (MainThread) [custom_components.reolink_dev] Unexpected error fetching reolink.Garage-Rear data: File "/config/custom_components/reolink_dev/__init__.py", line 98, in async_update_data File "/config/custom_components/reolink_dev/base.py", line 250, in update_states File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 453, in get_states File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 1710, in send reolink.exceptions.CredentialsInvalidError

As the camera seems to be still working and recording at the time of at least one of the "unavailable"'s not convinced the camera/nvr are crashing/rebooting

ALEdmonds commented 2 years ago

I have the same issue with RLC-820A and RLC-520 cameras. I'm going to try to find a workaround, as this bug makes the Last Event sensor essentially worthless.

Abruzzi04 commented 2 years ago

the same problem. thanks

andriej commented 2 years ago

Same with RLC520

drlauridsen commented 2 years ago

Same with RLC520A..

timknowlden commented 2 years ago

Same issue with my 6 cameras. Also triggers a motion event in node red when they reconnect

cpainchaud commented 2 years ago

This is because you are supposed to ignore events in NodeRed if previous value was not available.

leroyloren commented 2 years ago

Has anyone figured out why this behavior is happening? with my 820A, I noticed that at regular intervals (about 1 hour) the sensors became unavailable for a while.

hugalafutro commented 2 years ago

It's still happening with latest ha + hacs. One of my cameras recently died and I noticed it now happens in 2-3 hour intervals instead of 1-2hours. No idea if that is relevant.

hselmemo commented 2 years ago

I have the same issue where the camera and sensors becomes unavailable. It is an E1 Zoom image

leroyloren commented 2 years ago

@cpainchaud If it is due to camera limitations, would it be possible to filter similar messages in the log?

rw377 commented 1 year ago

About a year later and issue is happening for me on a new Reolink Trackmix POE install w/ latest firmware. Any workarounds to this yet?