alpyca icon indicating copy to clipboard operation
alpyca copied to clipboard

FilterWheel.Position setting is synchronous and the HTTP timeout is hardcoded

Open astrobokonon opened this issue 10 months ago • 0 comments

When using ASCOM Remote to expose a filter wheel (Moravian EFW-3L) and connecting to it in Alpaca via filterwheel, changing the position appears to be a synchronous property and the corresponding PUT on the Alpaca API blocks for the duration of the filter movement.

I have no way of telling whether that's an Alpaca thing, an ASCOM Remote thing, or a Moravian ASCOM driver thing, but the end result is that if the wheel motion takes longer than 5 seconds, requests.exceptions.ReadTimeout is raised. I couldn't easily change that timeout value in the current version (2.0.4) because the timeout value (5 seconds) is not well exposed at the top level classes. It is there in the low level _get and _put methods at least (tmo keyword argument).

I ended up working around this by subclassing alpaca.filterwheel and making the changes locally, but it'd nice to have a better way to specify that timeout value for blocking filter movements rather than having to subclass an entire device! I also don't know if the Position setter blocking is a known/expected quirk or if it's device dependent.

astrobokonon avatar Apr 01 '24 19:04 astrobokonon