You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned here (#114094) the Launch Library often times out and has its sensors set to "Unavailable" state. All fine.
Except, the library seems to be very unstable - seems like the updates are at random times, especially if a timeout was met:
To add salt to injury, every time I reload the integration's config the data is read correctly. I even created an automation to do that.
It would be great if the data was retrieved at specific time interval (30 minutes?) and/or we could have a setting to change that interval.
What version of Home Assistant Core has the issue?
core-2024.5.2
What was the last working version of Home Assistant Core?
Hey there @ludeeus, @DurgNomis-drol, mind taking a look at this issue as it has been labeled with an integration (launch_library) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of launch_library 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 launch_library 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.
You can see in the image pasted below that Next Launch information quite often cannot read the data from Starship related API.
This affects not only the Starship related sensor, but all available from the Launch Library. However, right after the "Next Launch" sensor state is set to "Unavailable" my own automation kicks in which triggers yet another refresh of the state - which ends with a success.
This results in all sensors being updated:
The reason for that, in my opinion, is that the Starship api is hella slow... This is the Network > Timing from Chrome (on 1GB/1GB internet connection):
And no wonder, as far as I can see it reads all the information it has related to the Starship. Which is a lot - about 1,5 MB:
What surprises me is that, it_seems, there is no caching of the data returned by API, even though Starship events are so rare. The server puts together all this information every time the request is made - thus the long response time.
I looked into the code of Launch Library, but I don't really know Python and the Home Assistant is a quite complex project already, so I had no luck in finding anything.
My ideas at this point are:
After the initial Starship refresh, if it fails, refresh it one more time
Do not make all sensors "Unavailable" when Starship refresh fails, make only the ones related to Starship
Change the Starship related data provider, e.g. https://nextspaceflight.com/starship/ - would require new additional logic for reading and/or parsing of the data. Maybe multiple providers with an option to select the one to be used?
Add an option to disable the Starship information update.
The problem
As mentioned here (#114094) the Launch Library often times out and has its sensors set to "Unavailable" state. All fine.
Except, the library seems to be very unstable - seems like the updates are at random times, especially if a timeout was met:
To add salt to injury, every time I reload the integration's config the data is read correctly. I even created an automation to do that.
It would be great if the data was retrieved at specific time interval (30 minutes?) and/or we could have a setting to change that interval.
What version of Home Assistant Core has the issue?
core-2024.5.2
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
Launch Library
Link to integration documentation on our website
https://www.home-assistant.io/integrations/launch_library
Diagnostics information
No response
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: