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
71.73k stars 29.99k forks source link

Freebox : need to reauthent everytime homeassistant start #116723

Closed slallemand closed 1 month ago

slallemand commented 4 months ago

The problem

Every time I restart home-assistant (container restart), the Freebox integration asks for re-authentification on the Freebox. I tried to delete the .storage/freebox directory without success. I also tried to delete the integration as well but still the same issue and reauthenticate.

Anyway when I allow the authentification on the freebox, everything works fine (until I restart home-assistant).

The Freebox is a Freebox Pop and the freebox api is version 11.1.

What I see in the logs is the following : 2024-05-03 17:37:45.653 INFO (MainThread) [freebox_api.aiofreepybox] Read application authorization file 2024-05-03 17:37:45.654 INFO (MainThread) [freebox_api.aiofreepybox] No valid authorization file found

Content of my .storage/freebox/xxxxxxxx_fbxos_fr.conf { "app_id": "hass", "app_name": "Home Assistant", "app_version": "0.106", "device_name": "my_device_name", "app_token": "my_token", "track_id": 3 }

This happened since I switch from a raspberry to a NUC server (a few weeks ago).

Let me know if you have an idea or something I can try.

What version of Home Assistant Core has the issue?

core-2024.5.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

freebox

Link to integration documentation on our website

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

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

home-assistant[bot] commented 4 months ago

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

Code owner commands Code owners of `freebox` 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 freebox` 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)


freebox documentation freebox source (message by IssueLinks)

Quentame commented 4 months ago

Hi ! Thanks for reporting ☺️ Maybe same as #86393

slallemand commented 1 month ago

Hi @Quentame , is there a way to configure the location of the auth file ? From my understanding, the auth file seems to be located in /usr/local/lib/python3.12/site-packages/freebox_api/app_auth which may be the issue in my setup (I'm using HASS based on podman in rootless mode).

slallemand commented 1 month ago

I finally found what was the issue. It's not at all due to the freebox integration ; the authentication on the freebox needs a permanent hostname which I didn't manage on my setup ... So, once I fix the hostname of my HA container, everything is working.