Running from source: Raspberry Pi - smart-underworld/seestar_alp GitHub Wiki

Overview

Pi

Raspberry Pi are a series of small single-board computers (SBCs) developed in the United Kingdom by the Raspberry Pi Foundation in association with Broadcom.

In the case of this project, we use it as a convenient reference platform to run a python based application (seestar_alp) for command and control of the SeeStar S50 telescope.

Note that these instructions assume some basic knowledge of linux systems, and is not intended to be a general tutorial on how to use a Raspberry Pi system running Linux.

Which Pi should I buy?

Most any Pi with networking should work. We recommend Pi 3 or newer. Avoid Pi Zero, and Pico variants.

Building Raspberry Pi

Use the Raspberry Pi imager to write a Raspberry Pi OS to a micro SD Card. The size of the SD Card will depend on what else you may using the Raspberry Pi for, but 32 GB should be more than sufficient.

Launch the Raspberry Pi imager and select the Raspberry Pi Device you are imaging for (Pi5, Pi4, Pi3, etc), select the Operating System, then choose the storage (the SD Card) where the OS should be written.

For the Operating System Selection you can choose what makes you happy but make sure it is a 64-bit OS. If you are using this as a purpose built device to run just SeeStar Alp then the Raspberry Pi OS Lite (64-bit) is a great choice. If you want to run a browser and Stellarium on the Raspberry Pi along with SeeStar Alp then the Raspberry Pi OS (64-bit) includes the desktop and other bits needed for that.

Next the Raspberry Pi imager will prompt for the OS customization. Edit the settings and on the GENERAL tab set the hostname, set up a username and password, configure the wireless lan, and set the time zone and keyboard layout. Select the SERVICES tab and enable SSH.

When setting the hostname set it to something other than seestar. Setting the hostname to seestar will conflict with the hostname set on the SeeStar (seestar.local) by default. Use seestaralp, seestarssc, or what ever you would like that is not seestar. This hostname is what you will use to access SeeStar Alp.

Once you have the customization set, Save and select YES to apply the customizations. The selected Raspberry Pi OS with the customizations will be written to the SD Card and verified. This will take a few minutes. Once completed install the SD Card in the Raspberry Pi and power it on.

After booting the Raspberry Pi should be accessible using SSH. If not validate your wireless lan settings.

Installing SeeStar Alp

These insructions are based from a fresh install of Raspberry Pi OS Lite (64 bit), written by the Raspberry Pi imager as outlined above.

To automatically set up the Raspberry Pi for Seestar_alp, run the following command as a non-root user:

curl -s https://raw.githubusercontent.com/smart-underworld/seestar_alp/main/raspberry_pi/setup.sh | bash

This will:

  1. Update the software on the system, and install dependencies needed for git
  2. Clone the seestar_alp software from github
  3. Install the python dependencies needed for the application
  4. Modify the default config file to work on all network interfaces (wifi and ethernet)
  5. Set up systemd services to start the seestar service at boot time
  6. Starts the service

Once the SeeStar Alp setup completes and the service is started you should be able to access the Simple SeeStar Controller (SSC) from a web browser using the address http://hostname.local:5432/ (replace hostname with the hostname of the Raspberry Pi).

YouTube and Other Resources

There have been some YouTube tutorials on how to set up a Raspberry Pi

Discover Easy Seestar Automation with Raspberry Pi

SeeStarALP RPi Demo

Seestar ALP Install on Raspberry Pi P400

Blog posts:

Simple SeeStar Controller with SeeStar Alp on a Raspberry Pi

Connectivity

SeeStar in Station Mode connecting to the same wireless network as the SeeStar Alp. Connecting to the SSC can be over wired or wireless. SeeStar Alp The Raspberry Pi running SeeStar Alp can also be set up as a wireless access point as described here.

Updating SeeStar Alp

An update script is provided to properly stop the seestar service, and update the software appropriately

To update, on the raspberry pi run the following command:

~/seestar_alp/raspberry_pi/update.sh

Sometimes on major updates the script itself needs to be updated before you run it (e.g. you may receive errors during the update). In this case use the following commands:

cd ~/seestar_alp
git pull
./raspberry_pi/update.sh --force

As part of the update process a copy or "backup" of the current configuration in the ~/seestar_alp/device/config.toml file is made. The configuration backup can be found at ~/seestar_alp/device/config.toml.bak

Checking logs

In the event of something going wrong, the first thing to check is the log from the service.

This can be found in the logs subfolder.

user@astro:~/seestar_alp $ ls logs/
alpyca.log  alpyca.log.2

Note that logs are rotated on a timer, and appended with an integer. The log without an integer is the newest log.

Service status

The seestar service is controlled via systemd.

Super user access(root) is not needed for getting status.

The command to run is:

systemctl status seestar

Eg:

user@astro:~/seestar_alp $ systemctl status seestar
● seestar.service - SeeStar ALP communications
     Loaded: loaded (/etc/systemd/system/seestar.service; enabled; preset: enabled)
     Active: active (running) since Mon 2024-08-05 17:23:11 EDT; 3h 5min ago
   Main PID: 4345 (python3)
      Tasks: 8 (limit: 1582)
        CPU: 7.282s
     CGroup: /system.slice/seestar.service
             └─4345 /usr/bin/python3 /home/bguthro/seestar_alp/root_app.py

Aug 05 17:23:11 astro systemd[1]: Started seestar.service - SeeStar ALP communications.

Service control (start, stop, restart)

The seestar service can be started/stopped/restarted using the appropriate verb via the following command:

sudo systemctl stop seestar

Replace the stop verb with the appropriate action that you are trying to achieve.

The service should start at boot time, without the need for a manual start.

Persistent logs

Should you find the need to look over systemd logs across boots, you can use journalctl to do so.

Eg:

journalctl -u seestar

Reinstalling SeeStar Alp

If the SeeStar Alp software becomes corrupt and needs to be reinstalled you can do so while saving your configuration settings using the following script:

# Change to home dir
cd ~

# Stop services
sudo systemctl stop seestar.service
sudo systemctl stop INDI.service

# Back up config.toml
cp ./seestar_alp/device/config.toml .

# remove and redo the setup
rm -rf ./seestar_alp
curl -s https://raw.githubusercontent.com/smart-underworld/seestar_alp/main/raspberry_pi/setup.sh | bash

# stop the services again
sudo systemctl stop seestar.service
sudo systemctl stop INDI.service

# restore your config
cp ./config.toml ./seestar_alp/device/config.toml

# start the services again
sudo systemctl start seestar.service
sudo systemctl start INDI.service

Getting help

This is very much still a system under development. Things go wrong.

Most of the developers are responsive on the #seestar_alp-ask-developers channel of the Smart Telescope Underworld discord server.

Additional RPi specifics may be foun din the #seestar_alp-raspberry-pi channel.

See the How to get Support section of the top-level README.md file for details.

Stellarium control via INDI

Stellarium may be used to control the seestar, by using an INDI proxy server running on the RPi.

Service control

Similar to the seestar service, this service is orchestrated by the systemd init system.

The INDI service can be started/stopped/restarted using the appropriate verb via the following command:

sudo systemctl stop INDI

Replace the stop verb with the appropriate action that you are trying to achieve.

The service should start at boot time, without the need for a manual start.

Stellarium configuration

Stellarium configuration largely mirrors the steps laid out in this wiki page - starting on step 2 - with one modification:

Under "INDI Settings" in the "Configure Telescope" section - you will need to change your "Host" setting to point to your RPi hostname / IP address. Eg:

Host: my-s50-pi.local
Post 7624

Tips

Avoid using mDNS. Set DHCP reservations for the SeeStar and SeeStar Alp. Configure connectivity for SeeStar Alp to Seestar and Stellarium to SeeStar Alp to use the IP Addresses not mDNS (.local).