Skip to content

Conversation

@pchev
Copy link

@pchev pchev commented Jan 16, 2026

Hi @BobDenny ,

The default alpyca http timeout of 5 seconds is not enough in some specific case.
This include using old, non async driver with Ascom Remote.
To address this case we need a timeout parameter when creating an instance of the Alpaca client.

This PR add the parameter so for the device that need it we can do:
T = Telescope('localhost:11111', 0, 'http', 30) # use 30 second timeout
while this format still use the default of 5 seconds:
T = Telescope('localhost:11111', 0)

This is probably the less intrusive way to do it despite not all the method do require the long timeout, but it can be very complicated to use a configurable different timeout for every method.

I see in the code that only Telescope.FindHome use a specific timeout of 60 seconds, this is not modified by this change, it still use 60 seconds as specified in the _put() call.

Patrick

@pchev
Copy link
Author

pchev commented Jan 17, 2026

More comment, maybe I do that a bit too quickly...

Now I think it is better if I copy telescope.py to MyOldTelescope.py and add the timeout parameter to the _put() that need it, principally the Park method.

So there is no problem for me if you prefer to not merge this change.
I am also convinced that we must promote async call as much as possible.

Patrick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant