twrecked / hass-aarlo

Asynchronous Arlo Component for Home Assistant
GNU Lesser General Public License v3.0
394 stars 78 forks source link

404 Not Found error when Aarlo HACS integration starts in HA #780

Open evakq8r opened 1 year ago

evakq8r commented 1 year ago

Setup:

Hi,

I've recently updated my HACS integration for Aarlo to the latest version to address the authentication issues, however the integration is now throwing a 404 not found when authenticating.

As part of the update above, I've also added the following to the backend.py file for aarlo:

1. Line 659 - Remove "Source": "arloCamWeb" (commented out with #)
2. Line 854 - Add cloudscraper.create_scraper(ecdhCurve='secp384r1')

Current setup:

I've added the pyaarlo into debug log in HA and restarted it, and I'm getting an HTTP 404 error from the integration. Logs to this point are:

The problem is I don't know what URL it cannot find, as there's no indication of where it's trying to authenticate to. I've tried adding the host in the configuration.yaml manually, no change to the error.

I've removed the .pickle files (session and aarlo) and restarted HA several times, and no change to the outcome. I've also confirmed the HA host (Unraid) does not have any /etc/hosts forced redirects to any Arlo-specific FQDNs. Host has also been rebooted, no change.

I'm at a loss, so any help would be appreciated (knowing my luck it's something I've overlooked by mistake...).

Thank you.

twrecked commented 1 year ago

Your config looks good.

Turn on verbose debug and it will tell you what URL it's trying to connect to. If you can paste that in I can look.

evakq8r commented 1 year ago

Hmm, pardon my ignorance but my understanding was that adding debug to the specific HA logs was verbose debugging?

I haven't seen a specific command to add to the config file to make it read as verbose, so I added debug as the default and restarted HA. Some URLs are now seen, but they are truncated..

Examples:

2023-07-16 08:25:36.093 DEBUG (SyncWorker_5) [pyaarlo] <uniqueID>: set:ArloCamera/<uniqueID>/presignedLastImageUrl=https://arlos3-prod-z3.arlo.c

2023-07-16 08:25:36.093 DEBUG (SyncWorker_5) [pyaarlo] <uniqueID>: set:ArloCamera/<uniqueID>/presignedFullFrameSnapshotUrl=https://arlos3-prod-z

2023-07-16 08:25:36.093 DEBUG (SyncWorker_5) [pyaarlo] <uniqueID>: set:ArloCamera/<uniqueID>/presignedLastImageUrl=https://arlolastimage-z3.arlo

2023-07-16 08:25:36.094 DEBUG (SyncWorker_5) [pyaarlo] <uniqueID>: set:ArloDoorBell/<uniqueID>/presignedFullFrameSnapshotUrl=https://arlos3-prod

If there is a specific way you would like the debugging configured, please let me know how.

evakq8r commented 1 year ago

For what it's worth, if I go to my doorbell entity specifically, I see a broken image instead of a doorbell preview:

image

If I right click the broken image and load in new tab, I get 502: Bad Gateway with the following address (both internal URL and external URL):

http://homeassistant.local:8123/api/camera_proxy_stream/camera.aarlo_arlo_doorbell_front_door?token=

image

I assume it's because of the failed authentication, but that's just a guess.