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
69.76k stars 28.91k forks source link

ISS integration: regular connection issues (instable integration) #119972

Open bcutter opened 2 weeks ago

bcutter commented 2 weeks ago

The problem

ISS integration with regular unavailable sensor data roughly for 3 weeks (according to InfluxDB exactly since June 1st 07:38 CEST). Very instable integration.

What version of Home Assistant Core has the issue?

core-2023.4.6

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

iss

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

#2 + #3 quite rarely, #1 is the core issue:

1)
Logger: homeassistant.components.iss
Source: helpers/update_coordinator.py:193
Integration: International Space Station (ISS) (documentation, issues)
First occurred: 15. Mai 2024 um 22:57:13 (5692 occurrences)
Last logged: 16:11:14

Error fetching iss data: Unable to retrieve data
Timeout fetching iss data

2)
Logger: homeassistant.components.iss
Source: components/iss/__init__.py:35
Integration: International Space Station (ISS) (documentation, issues)
First occurred: 11. Juni 2024 um 06:22:57 (512 occurrences)
Last logged: 14. Juni 2024 um 06:30:59

Unexpected error fetching iss data: Error server n 500
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 250, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 206, in _async_update_data
    return await self.update_method()
  File "/usr/src/homeassistant/homeassistant/components/iss/__init__.py", line 48, in async_update
    return await hass.async_add_executor_job(update, iss)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/iss/__init__.py", line 35, in update
    number_of_people_in_space=iss.number_of_people_in_space(),
  File "/usr/local/lib/python3.10/site-packages/pyiss/__init__.py", line 101, in number_of_people_in_space
    return self.people_in_space()['number']
  File "/usr/local/lib/python3.10/site-packages/pyiss/__init__.py", line 31, in people_in_space
    raise Exception("Error server n {}".format(data.status_code))
Exception: Error server n 500

3)
Logger: homeassistant.components.iss
Source: components/iss/__init__.py:36
Integration: International Space Station (ISS) (documentation, issues)
First occurred: 11. Juni 2024 um 07:03:41 (22 occurrences)
Last logged: 14. Juni 2024 um 00:30:51

Unexpected error fetching iss data: Error server n 500
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 250, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 206, in _async_update_data
    return await self.update_method()
  File "/usr/src/homeassistant/homeassistant/components/iss/__init__.py", line 48, in async_update
    return await hass.async_add_executor_job(update, iss)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/iss/__init__.py", line 36, in update
    current_location=iss.current_location(),
  File "/usr/local/lib/python3.10/site-packages/pyiss/__init__.py", line 45, in current_location
    raise Exception("Error server n {}".format(data.status_code))
Exception: Error server n 500

Additional information

grafik

home-assistant[bot] commented 2 weeks ago

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

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


iss documentation iss source (message by IssueLinks)

philipp-frank commented 1 week ago

Same problem here.

AlphaNumericPencil commented 6 days ago

Same here. I got around the issue by caching the values I want from this integration into template sensors, and referencing those. Something should probably be added to the integration itself to do something similar if the connection issue with the endpoint can't be resolved.