core: Freebox : ClientConnectorError while setup when router is in bridge mode
The problem
I switched my freebox to bridge mode. The freebox integration stopped working from this instant. I tried to create a new fresh configuration but I doesn’t work anymore.
What is version of Home Assistant Core has the issue?
core-2021.5.5
What was the last working version of Home Assistant Core?
core-2021.5.5
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/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Nothing in the logs.
But this error message when I click "Soumettre" :
Erreur inconnue: veuillez réessayer plus tard
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 20 (2 by maintainers)
Not stale, I’ll try to fix that
I workaround the problem by having a valid IPv6 address, so that XXX.fbxos.fr:YYYY is done through IPv6.
curl --cacert Freebox_ECC_Root_CA.pem -v4 https://XXXX.fbxos.fr:YYYYfails butcurl --cacert Freebox_ECC_Root_CA.pem -v6 https://XXXX.fbxos.fr:YYYYsucceeds. In bash, I needed to specify the ROOT CA (as shown above) but home assistant seems to already accept it (to be double checked as I did lots of tests before finding the correct way). The PEM can be obtained fromhttps://dev.freebox.fr/sdk/os/#https-accessHowever, there was still another problem. Even with an IPv6 address reachable from the internal network, the home assistant code calls
get_hosts_listfrom thefreebox_apipackage. However, in bridge mode, the freebox answers:So, I needed to comment-out the
await fbx.lan.get_hosts_list()line inconfig_flow.pyand to replacefbx_devices: list[dict[str, Any]] = await self._api.lan.get_hosts_list()byfbx_devices: list[dict[str, Any]] = []inrouter.py(better fixes to be found here, but it seems ok that in bridge mode, no list of hosts exists)Still up
Following documentation: https://dev.freebox.fr/sdk/os/# and trying at home, we should access the API internally (especially when in bridge) through url like http://mafreebox.freebox.fr/api/v4/login/
Documentation says: Building the API request URL
Once you’ve discovered a Freebox on the local network you can access the API at the following URL:
https://[api_domain]:[freebox_port]/[api_base_url]/v[major_api_version]/[api_url]
or for local access
But does not solve the problem for now …
@JigSawFr don’t think any changes related to this issue has been made