core icon indicating copy to clipboard operation
core copied to clipboard

Error fetching co2signal data

Open KitHubek opened this issue 3 years ago • 6 comments
trafficstars

The problem

Error fetching co2signal data

What version of Home Assistant Core has the issue?

2022.8.0

What was the last working version of Home Assistant Core?

2022.7.x

What type of installation are you running?

Home Assistant Core

Integration causing the issue

CO2 Signal

Link to integration documentation on our website

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

Diagnostics information

Logger: homeassistant.components.co2signal Source: helpers/update_coordinator.py:151 Integration: CO2 Signal (documentation, issues) First occurred: 3 sierpnia 2022, 19:24:42 (3 occurrences) Last logged: 3 sierpnia 2022, 23:09:42

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Error fetching co2signal data: request to https://api.electricitymap.org/v1/co2?lon=MYCOORD&lat=MYCOORD failed, reason: getaddrinfo ENOTFOUND api.electricitymap.org

Additional information

No response

KitHubek avatar Aug 04 '22 21:08 KitHubek

This shouldn't be stale I see the same in the latest HA

akshaya-a avatar Sep 04 '22 20:09 akshaya-a

I also have this warning sometime with Home Assistant 2022.9.6.

2022-09-26 05:20:27.251 ERROR (MainThread) [homeassistant.components.co2signal] Error fetching co2signal data: request to https://api.electricitymap.org/v1/co2?lon=xxx&lat=yyy failed, reason: getaddrinfo ENOTFOUND api.electricitymap.org

I don't really have found a constant to know when and what make it happening. It can be only once or can be a lot of times on an hour. It looks like it is only the CO2Signal integration which cannot resolve the host or the api.electricitymap.org DNS zone is strangely managed.

The only solution I see is to filter it from being logged by adding a log filter in the logger YAML configuration but it is not a solution, only a way to avoid the log to be polluted :slightly_smiling_face:

Nardol avatar Sep 26 '22 12:09 Nardol

Hi, same here.

Logger: homeassistant.components.co2signal Source: helpers/update_coordinator.py:151 Integration: CO2 Signal (documentation, issues) First occurred: 8:26:55 PM (3 occurrences) Last logged: 9:41:55 PM

Error fetching co2signal data: request to https://api.electricitymap.org/v1/co2?lon=19.079684615135196&lat=47.48064860371008 failed, reason: getaddrinfo ENOTFOUND api.electricitymap.org

csszokolai avatar Nov 03 '22 21:11 csszokolai

Same here, HA 2022.11.1

holdestmade avatar Nov 04 '22 08:11 holdestmade

I’m getting this a lot now with the latest 2022.11 release. Before it would happen intermittently but then resolve itself. Now the entities go unavailable.

I can fix it each time by reloading the integration but then the issue will persist. Sometime about how it calls the url on reload verses regular use, but I don’t know.

zSprawl avatar Nov 06 '22 17:11 zSprawl

same here, HA 2022.11.2

xm4rcell0x avatar Nov 10 '22 15:11 xm4rcell0x

Hey everyone, developer at Electricity Maps/CO2Signal here 👋

I'm very sorry for the problems you have encountered here, it should be working fine again since 11th of November.

Why it happened: As amount of HA users making frequent calls to the API increased, our API server was once in a while crashing under the pressure. While restarting, it would return the weird error message shared above.

We have now migrated to more scalable infrastructure and added more caching layers, so this shouldn't happen again :)

madsnedergaard avatar Nov 23 '22 14:11 madsnedergaard

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.