Skip to content

apos/PiFinder_Stellarmate

Repository files navigation

PiFinder on Stellarmate

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.

⚠️ Disclaimer

  • 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.

Current Version

  • Works with PiFinder software 2.3.0, Raspberry Pi 4, Stellarmate OS (Debian Bookworm).

Key Features & Changes

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_lx200 INDI 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 diff patches, 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.

Installation

The setup process is designed to be straightforward. It will guide you through a fresh installation or updating an existing one.

Prerequisites

  • 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.

Setup Steps

  1. 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 Options and enable both I4 SPI and I5 I2C.

  2. 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
  3. 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 release branch version and re-apply all patches.
  4. 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.sh

    After this, the installation will complete, the PiFinder services will be started, and the INDI driver will be installed.

Using the INDI Driver

The setup script automatically installs the pifinder_lx200 INDI driver. To use it:

  1. Start KStars and open the Ekos Profile Wizard (Ctrl+P).
  2. Create a new equipment profile or edit an existing one.
  3. In the "Telescope" dropdown, select "PiFinder LX200" and click "Add".
  4. Save the profile and start INDI.
  5. In the INDI Control Panel, go to the "PiFinder LX200" tab, then the "Connection" tab.
  6. Ensure the IP address is 127.0.0.1 and the port is 4030.
  7. 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.

Uninstallation

A script is provided to safely remove the PiFinder installation and services.

~/PiFinder_Stellarmate/bin/uninstall_pifinder_stellarmate.sh

This 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.

About

Install and use PiFinder Software alongside Stellarmate

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •