This project provides a set of scripts to seamlessly install, patch, and integrate the PiFinder software into a Stellarmate environment. It automates the entire setup process, ensuring that PiFinder works correctly alongside Stellarmate's existing services.
The primary goal is to allow users to leverage the powerful plate-solving and object-finding capabilities of PiFinder on a device that is also running Stellarmate for astrophotography, EAA, and full equipment control.
- This is a community project and is not officially affiliated with PiFinder or Stellarmate.
- Use these scripts at your own risk. The author is not responsible for any damage to your hardware or software.
- This process has been tested with the PiFinder version specified in
version.txt.
- Works with PiFinder software 2.3.0, Raspberry Pi 4, Stellarmate OS (Debian Bookworm).
This setup modifies the stock PiFinder installation to better integrate with Stellarmate:
- Automated Installation: A single script handles downloading the correct PiFinder version, creating a Python virtual environment, installing dependencies, and applying all necessary patches.
- INDI Driver for KStars/Ekos: The setup script automatically compiles and installs a custom
pifinder_lx200INDI driver. This allows KStars/Ekos to read the PiFinder's coordinates, perfect for plate-solving and mount alignment. - Stellarmate GPS Integration: PiFinder is configured to use Stellarmate/KStars as its GPS source, removing the need for a separate GPS module on the PiFinder.
- Network Management Disabled: All network configuration options (WiFi Mode, AP/Client switching) have been removed from the PiFinder's OLED menu and Web Interface. This prevents conflicts, as Stellarmate is responsible for all network management.
- Robust Patching: Changes are applied using
diffpatches, making the process more reliable and easier to maintain than manual file edits. - Compatibility: The scripts are designed for Raspberry Pi 4 running Stellarmate OS (based on Debian Bookworm). Raspberry Pi 5 support is highly experimental, in development, and not fully functional yet.
- Comprehensive IP Address Display: The web interface and the device's OLED status screen now show all available non-localhost IP addresses, providing better network visibility.
- Dynamic User: The web interface authentication is patched to use the current system user (e.g.,
stellarmate) instead of a hardcoded default.
The setup process is designed to be straightforward. It will guide you through a fresh installation or updating an existing one.
- A Raspberry Pi 4 with PiFinder hardware (hat, screen, etc.).
- Stellarmate OS (based on Debian Bookworm) installed and running.
- Basic familiarity with the Linux command line.
-
Enable Hardware Interfaces: Before running the script, you must enable SPI and I2C using the Raspberry Pi Configuration tool.
sudo raspi-config
Navigate to
3 Interface Optionsand enable bothI4 SPIandI5 I2C. -
Clone the Repository: Open a terminal on your Stellarmate device and clone this repository:
git clone https://github.com/apos/PiFinder_Stellarmate.git cd PiFinder_Stellarmate -
Run the Setup Script: Execute the main setup script. It will detect if a PiFinder installation exists and give you options.
./pifinder_stellarmate_setup.sh
- If no PiFinder is found: The script will clone the official PiFinder repository and apply all the necessary patches.
- If PiFinder is found: You will be prompted to either:
- 1. Reinstall from scratch: This will completely delete the existing PiFinder directory and perform a fresh installation.
- 2. Update: This will reset your local PiFinder to the official
releasebranch version and re-apply all patches.
-
Python Virtual Environment (First Run Only): The first time you run the script on a fresh system, it will stop after creating a Python virtual environment (
.venv). You must activate it manually and re-run the script to complete the installation of dependencies. The script will provide the exact commands to run, which will look like this:source /home/stellarmate/PiFinder/python/.venv/bin/activate ./pifinder_stellarmate_setup.shAfter this, the installation will complete, the PiFinder services will be started, and the INDI driver will be installed.
The setup script automatically installs the pifinder_lx200 INDI driver. To use it:
- Start KStars and open the Ekos Profile Wizard (
Ctrl+P). - Create a new equipment profile or edit an existing one.
- In the "Telescope" dropdown, select "PiFinder LX200" and click "Add".
- Save the profile and start INDI.
- In the INDI Control Panel, go to the "PiFinder LX200" tab, then the "Connection" tab.
- Ensure the IP address is
127.0.0.1and the port is4030. - Click "Connect".
You should now see the PiFinder's RA and Dec values in Ekos, which can be used for alignment or as a reference.
A script is provided to safely remove the PiFinder installation and services.
~/PiFinder_Stellarmate/bin/uninstall_pifinder_stellarmate.shThis will stop and disable the pifinder services, remove the systemd files, and delete the ~/PiFinder directory. It will not remove the ~/PiFinder_data directory or the PiFinder_Stellarmate repository itself.