In this repository you can find an eaxmple of how to create a new ASCOM Alpaca device. The following components have been implemented:
- Alpaca discovery - a tiny UDP server, which tells to the ASCOM client application that there is an Alpaca device
- Alpaca Management API - a REST/JSON API, which tells what ASCOM devices the current Alpaca device provides
- Alpaca Device API - also a REST/JSON API for managing a concrete ASCOM device. This API isn't fully implemented in this repo, only some of the routes were added for testing purposes.
The full information about what is Alpaca device and specification for all its components you can find in the official documentation.
- Install Ruby 3.1.0 using you favorite way. Usually, I use asdf as Ruby version manager.
- Clone the repo and run
foreman start
. You should see the similar output
% foreman start
21:33:06 discovery.1 | started with pid 81582
21:33:06 api.1 | started with pid 81583
21:33:07 api.1 | Puma starting in single mode...
21:33:07 api.1 | * Puma version: 5.5.2 (ruby 3.1.0-p0) ("Zawgyi")
21:33:07 api.1 | * Min threads: 0
21:33:07 api.1 | * Max threads: 5
21:33:07 api.1 | * Environment: development
21:33:07 api.1 | * PID: 81583
21:33:07 api.1 | * Listening on http://0.0.0.0:9000
21:33:07 api.1 | Use Ctrl-C to stop
- Go to Windows and use ASCOM Diagnostics app, for instance. There choose the
Choose device -> Choose and Connect to Device
- In the opened window choose
Focuser
and click onChoose
- Finally, the
ASCOM Focuser Chooser
window should open - Enable Alpaca discovery under the
Alpaca
menu - The
SG Focuser
device should be discovered - Select it and click
OK
- The ASCOM platform will create a COM wrapper for the
SG Focuser
device, so that we can use it in ASCOM COM based clients
That's it! Please, be aware that no device is implemented here - the SG Focuser
can be discovered, but nothing more.