AlpacaPi

Home SkyTravel Drivers Client Apps Moon Phase SkyImage AAVSO

Alpaca is the new protocol from the ASCOM community for controlling astronomy equipment. Alpaca is 100% backwards compatible with ASCOM but instead of using COM (Component Object Mode) which is exclusive to Windows, Alpaca uses HTTP and JSON for data communications. This allows it to run across multiple machines in a client/server or user/driver mode. It also allows you to use any platform you want and no longer are tied to Windows. In fact you can run the system with no Windows machines at all.

AlpacaPi is my implementation of the Alpaca protocol to run on Linux, specifically it was designed to run on the Raspberry-Pi, which is why I call it AlpacaPi. It will run on just about any flavor of Linux and will run on both 32-bit and 64-bit Linux.

AlpacaPi implements all of the drivers in one application. On startup, it looks to see what is attached, for example if it discovered 2 ZWO cameras and 1 ATIK Camera, it would create 3 camera drivers (0,1,2) that could be used interdependently. I have actually done this and it works just fine.

My normal configuration in my observatory is 3 imaging scopes on one mount, each of a different size. Each one has one Raspberry-Pi to control it. Each imaging setup has a camera, a filter wheel, a Moonlite NiteCrawler focuser which is implemented as a focuser AND a rotator.
This only requires one copy of the alpacapi driver, which handles all of 4 of the above listed devices.

AlpacaPi is written in C/C++ and runs on Linux, it is open source. https://github.com/msproul/AlpacaPi


Installation

AlpacaPi uses opencv for all of the graphics and image processing such as saving images from the camera. In almost all cases, opencv is required. The only time it is not required is when AlpacaPi is only used for a driver such as a roll off roof.

OpenCV version 4.5.1 or earlier must be used in order to get support for the mouse wheel. The mouse wheel stopped working after that and they refuse to fix the bug.

The AlpacaPi project was started with opencv version 3 which supported the C interface as well as the C++ interface. Version 4 and later no longer support the C interface. AlpcaPi is now using the C++ interface. It will still compile with older versions back to 2.9, however that support is being phased out.

You can copy the text that is in green and paste into your terminal window. The command to paste into a terminal window is SHIFT-CTRL-V

  1. Make sure git is installed

    	git --version
    		git version 2.39.2
    	
    If it is not installed (any version will work)
    	sudo apt-get install git
    	
  2. Make sure gcc is installed

    	gcc --version
    		gcc (Debian 12.2.0-14) 12.2.0
    		Copyright (C) 2022 Free Software Foundation, Inc.
    		This is free software; see the source for copying conditions.  There is NO
    		warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    
    	g++ --version
    		g++ (Debian 12.2.0-14) 12.2.0
    		Copyright (C) 2022 Free Software Foundation, Inc.
    		This is free software; see the source for copying conditions.  There is NO
    		warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    	make --version
    		GNU Make 4.3
    		Built for aarch64-unknown-linux-gnu
    		Copyright (C) 1988-2020 Free Software Foundation, Inc.
    		License GPLv3+: GNU GPL version 3 or later 
    		This is free software: you are free to change and redistribute it.
    		There is NO WARRANTY, to the extent permitted by law.
    	
    Your version numbers may be different. The above output is from a Raspberry-Pi 5.

    If any of these fail, install the build tools with this command. Note: this is not normally needed on the Raspberry Pi but is needed on the current Ubuntu release.

    	sudo apt-get install build-essential
    	
  3. Install OpenCV 4.5.1

    	
    	git clone https://github.com/msproul/opencv451.git
    	cd opencv451
    	./install_opencv451.sh
    	./install_pkgconfig.sh
    	cd
    	
    	
    NOTE: This downloads, compiles, and installs opencv version 4.5.1. It is best if opencv has not been previously installed, however, it normally works even if there is another version.

    IMPORTANT!!!!: This can take several HOURS to complete.

    It will ask you some questions, make sure to answer "y" to all of the questions.

  4. Install AlpacaPi

    	
    	git clone https://github.com/msproul/AlpacaPi.git
    	cd AlpacaPi
    	./install_everything.sh
    	
    	
    To build SkyTravel
    	
    	make skycv4
    	./skytravel
    	
    	
    If you are using skytravel, you can download the NGC data and Milkyway outline data with this command. This can be done at anytime.
    	
    	./download_extra_data.sh
    	
    	
    There is another script that will prompt you if you want to download various libraries for cameras etc.
    	
    	./install_libraries.sh
    	
    	
    To build the various drivers, click on the DRIVERS link at the top of this page. There are a very large number of options in the building of drivers. If what you are looking for is not listed on the drivers page, PLEASE contact me for specifics on how to build a particular driver. msproul -at- skychariot.com