New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Météo France integration fails #94839
Comments
Hey there @hacf-fr, @oncleben31, @Quentame, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) meteo_france documentation |
Hi, Same issue on my HA installation. Note that at the time this integration started failing, Meteo France's website suffered a downtime but has since resumed normal operations. |
The problem come from Meteo France, the call for Forecast works but the call to get current phenomenons return a 502 from the server. We should wait ... I could check later to edit the source code of the integration to avoid block everything if only one endpoint doesn't work |
Maybe an issu of the API : |
Yeap that would be nice |
The issue is that when you restart HA, the integration does not start anymore. |
Issue is not linked to Home Assistant version. Not starting is normal: requests to the API fail in some cases. I got this very interesting log line:
The 2 last 502 seems to indicate that this endpoint is deprecated. But the 404 actually works perfectly in browser. See the issue opened in the python client: hacf-fr/meteofrance-api#629 |
Meteo France has informed on Twitter about an issue with their website and webservice since yesterday : They said that the issue is solved since this morning but in fact, it's not true. I think, this is why we have issue with API. |
same problem for me |
Thé same for me. Let s wait for météo France ! |
Météo-France seems to have modify/shut down the weather warning API from 18-06-2023 18:40:00+02:00 (Europe/Paris) Error requesting Météo-France alert for department 69 data: 502 Server Error: Bad Gateway for url: https://webservice.meteofrance.com/warning/currentphenomenons?token=REDACTED&domain=69&depth=0 Will catch that for the next fix to prevent all the integration from failing. If you don't reboot all other entities are working except the warning one. |
Interesting info:
|
Nice finding @vingerha, thanks ! Did you get the API token this way ?
From #92197 (comment) Or else how ? |
Source error: Error setting up entry Lyon - Rhône-Alpes (69) - FR for meteo_france
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/meteo_france/__init__.py", line 94, in async_setup_entry
await coordinator_forecast.async_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 262, in async_refresh
await self._async_refresh(log_failures=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 242, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/meteo_france/__init__.py", line 69, in _async_update_data_forecast_forecast
return await hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError |
There was an outage for the whole meteo france website a couple of days ago, so maybe they changed the limitations of the API |
I have the same token, so I think the token is the same for all and generated for HA globally. |
Everyone using the Météo-France API (including HA) is using the same HARDCODED token that was originally retrieve from the official Météo-France mobile app. |
Fix provided in this PR #94911 🥳 Alert sensor will not be created if an error occurs at integration initialisation, further investigation is needed to make it work properly. |
I found it directly vsible in the logs (not even in debug log) |
There was this PR: #44422 |
Hello, |
Just wait for next release of HA where the PR is included. |
Browse to the /homeassistant/components/meteo_france folder on your system, find the file init.py (make a backup, just in case), replace with init.py file provided by Quentame in #94911, finally restart HomeAssistant. That’s it ! |
@Quentame I am not sure if I was supposed to be able to but I 'approved' the PR, seems a bit odd that I can do this...let's see. In any case, code change looks simple and along what I would expect ...and it works :) |
I looked for a while in ssh this folder meteo_france or components. |
Just wait for 2023.6.3 or you may break your HA |
I'm a big guy :) |
Of course you can, anyone can (and should 😉) review PRs and comments/request changes/approve, but always with kindness 😌 I haven't seen when it changes but now PRs need an HA member approval, but still, your review is usefull, and maybe one day you will be promoted to an HA member !
Indeed, nowadays patch releases seems to be bigger but less often. |
Nah, am not a dev nor willing to become one on this level. Just trying to see where I can help and possibly increase functional value for the end-user |
Hello,
I use a Raspberry |
Hi, sorry but I used the path that you can see in Quentame #94911 and it worked for me. That said it is quite strange that you cannot find HomeAssistant folders structure … Are you sure to search directly from the host (not using the terminal inside HomeAssistant) ? |
This comment was marked as spam.
This comment was marked as spam.
|
I see, you are using command line inside home assistant, I suppose this why you cannot see the folders, using embedded home assistant command line will not allow you to see the folders and sub folders even with root privileges. It depends on how you installed home assistant but without full control of the host machine, you might have to wait for PR approval and new HA update as some other users have already mentioned in previous posts. |
How can we patch in our case ? |
Please move your discussion elsewhere, this has nothing to do with the issue |
The integration restarted working suddenly on my side (without any update). Seems it was a meteo france server issue ? (so long to fix ! oo) Only Weather alert sensor is missing currently. |
Yes it is back on my side as well, weather alert sensor state is currently unknown |
Same for me works again doing nothing
Le jeu. 22 juin 2023, 13:07, Kolia56 ***@***.***> a écrit :
… Yes it is back on my side as well, weather alert sensor state is currently
unknown
—
Reply to this email directly, view it on GitHub
<#94839 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANAXMNZVIWSQG54NF3F5EZ3XMQRQDANCNFSM6AAAAAAZLNQZ4Y>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes indeed it works because the url (phenomenon) is back alive although it doesn’t show anything interesting in strings… But the changes are still needed in order to avoid the issue to be back if something goes wrong again with Meteo France’s api. |
@Quentame not sure how else to reach you so misusing this for one question (do point me elsewhere to discuss). Since the json provides both daily and hourly information, why not create both weather sensors at the same time.... I am sure that you know this is highly saught after. I would not mind spending a bit of time on the dev side but if it gets rejects already at this stage of an 'idea' then I'd rather not spend the effort :) |
The integration is working again. |
The problem
Météo France integration have been failing to initialize for at least one day. It has been working before that. No change in HA version
What version of Home Assistant Core has the issue?
2023.3.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Météo France
Link to integration documentation on our website
https://www.home-assistant.io/integrations/meteo_france
Diagnostics information
I have been restarting HA. Here are various log events after startup
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: