hass-aarlo icon indicating copy to clipboard operation
hass-aarlo copied to clipboard

media_retry required to get Image and Last Captured Time updated

Open rainieryoung opened this issue 2 years ago • 1 comments

Problem Camera images and several fields (Streaming, Recording, Recent Activity) would only update upon restart of Home Assistant.

Solution I was able to 'fix' this problem by adding media_retry: [5, 15, 25] documented in the advanced use section.

Steps to Reproduce Since discovering that setting, I re-confirmed I can reproduce the issue in my environment by removing the media_retry setting. I have confirmed that I need the media_retry setting for both mqtt and backend: sse configurations.

As the documentation seems to regard this as an unlikely case, I felt I should at least share what I experienced, especially if someone else is having the same problem. For better or worse I took me a long time to try out this particular setting so I was chasing a lot of dead ends.

Environment Version of software running.

  • HomeAssistant 2022.4.5 (and a few prior versions) using the Windows Hyper-V image
  • HACS 1.24.5
  • Aarlo Integration 0.7.2.b.8.2 and Aarlo Lovelace 0.2.0b5 (and a few prior versions of each)

Make of cameras and base stations you have.

  • Arlo Pro 2 Hub (Device Info > Hardware: VMB4000r3)
  • (qty5) Arlo Pro 2 Cameras (Device Info > Hardware: H3, H3, H4, H4, H6)
  • No subscription

Original Problem (What you were doing or expecting) I had Aarlo running without any issues on my Home Assistant installation for the last couple months*. A couple weeks ago, I noticed the cameras weren't updating their images. I realized the problem was more specific, specifically that I could see recent_activity was updating (Streaming, Recording, Recent Activity), but the last_capture time, available clips (and the count of captured_today, and the camera image itself were not updating.

I tried several changes without success, including:

  • backend: sse
  • Various settings such as user_agent and recent_time: 0
  • Uninstalling aarlo and reinstalling

I also enabled debug logs in each scenario (and multiple combinations). I kept finding the "motion" events so it seemed less and less of a 'missing events' problem.

I had read the Advanced use settings before but didn't think to try the media_retry until yesterday. That solved it.

*I am a new Home Assistant user (first trying out and then transitioning over from smartthings) so I was taking a pretty aggressive approach to updates. I had assumed an update to HA or Aarlo started the problem, but unfortunately I don't have specific enough info to know for sure that the problem started with a specific version.

Include debug logs if available. n/a (but I can recreate the issue and capture logs if that is useful...)

Next Steps? I'm unsure if I happened to have landed in an edge case where using media_retry is expected and normal. -- Feel free to close this issue if that is the case -- my only suggestion might be a small addition to Missing/Incorrect Values, such as:

In some edge cases, the Advanced Use setting media_retry may be needed to workaround for Arlo issues where the camera never gets a media upload notification.

Knowing there is a setting that fixes my problem, I have no problem with this issue getting closed. I felt I should share back what I ran into and how I solved it in case that helps out the community overall. Thanks!

rainieryoung avatar Apr 20 '22 20:04 rainieryoung

Update: The solution above worked for more than seven days, then within the last day or two I started seeing the same symptoms.

Dealing with the same problem again, I tried disabling media_retry, no luck. I re-enabled that setting, also no change in behavior. I also tried a couple different user_agents.

New this time, was after fully restarting homeassistant, which would get the "latest" thumbnail and data (but no updates after that point), was I noticed at least one Camera's battery level was not updating. That led me to try backend: sse. The integration is working again, but I'm less confident in understanding the problem. It's almost as if I need to change a significant enough config setting to get something to reset.

rainieryoung avatar May 01 '22 19:05 rainieryoung