Continuing from my previous post about controlling a telescope and camera with Astroberry on a Raspberry Pi, part 2 looks at telescope control and planetarium software.
Telescope remote control
In order to connect a Celestron NexStar telescope, you need a USB to RS232 Serial port adaptor and a 9-pin serial to RJ9/RJ10/RJ22 lead. These can be bought from astronomy suppliers or because I wanted a short one, I bought a generic screw terminal 9-pin serial connector (eBay), a RJ9/RJ10/RJ22 lead, cut it in half and connected them together as per the instructions on NexStarSite. Connect the lead into the bottom of the NexStar handset, not into the AUX socket on the mount.
When connecting the USB to serial adaptor and running dmesg, you should see messages similar to:
[232802.875086] usb 1-1.4: new full-speed USB device number 3 using xhci_hcd
[232803.009515] usb 1-1.4: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 4.00
[232803.009537] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[232803.009555] usb 1-1.4: Product: USB-Serial Controller D
[232803.009573] usb 1-1.4: Manufacturer: Prolific Technology Inc.
[232803.122032] usbcore: registered new interface driver usbserial_generic
[232803.122094] usbserial: USB Serial support registered for generic
[232803.125443] usbcore: registered new interface driver pl2303
[232803.125506] usbserial: USB Serial support registered for pl2303
[232803.125610] pl2303 1-1.4:1.0: pl2303 converter detected
[232803.143704] usb 1-1.4: pl2303 converter now attached to ttyUSB0
We can see our device is using /dev/ttyUSB0.
KStars, EKOS and INDI
Section currently being updated for Astroberry 3.
Astroberry comes with INDI configured for controlling and driving astronomy devices, see https://www.indilib.org. You can use the INDI interfaces in KStars to configure your telescope and camera. Show the desktop and start KStars from the Astroberry menu.
- Hit the observatory icon to Toggle Ekos
- Under profile, hit the + to create a new profile
- Create a profile for your camera and telescope/mount configuration.
- Note that KStars requires a camera to function
- Initially I had problems getting the telescope to attach. Go through the alignment process first.

- Click save
- Press the ‘play’ button to start Ekos
- You should now have more icons along the top of the Ekos screen. Go to the mount icon.
- The telescope should now be able to be driven from the buttons on the EKos panel
- Speed is controlled from the slider underneath
- When slewing the telescope, the cross hairs on KStars should move to match, as should the position information on the Ekos screen.
- Starting video in the preview window of KStars should show you a video feed.
Closing down the EKOS windows and going back to the original KStars planetarium view, you should now see a red crosshair showing where the telescope is pointing. If you select another target, with a double click, you can then right click, select your telescope and tell it to Go To. The telescope will slew round accordingly.
Under the camera tab you can turn on a stream to see output direct from the camera, or hit disconnect to use one of the other imaging applications. You can still control the telescope from this tab while the camera is disabled.
Astroberry manager
When you connect to Astroberry, you are presented with a star map provided by Astroberry manager. Going to equipment, you can build an INDI profile and start. One check to see if it is really running is to launch a command line and do sudo netstat -plnt. There should be an INDI process running on port 7624. Stellarium can connect remotely in the same way, as below.
You can also see your telescope cross hairs on this map. However at the time of writing, I could not figure out how to use this interface to slew the telescope. It may be a system still in development.
Stellarium on a Pi
This section is legacy for Astroberry 2. I was able to install Stellarium direct from the repositories with apt, but performance was so poor, it was unusable. Starting full screen and not responding to commands to drop into windowed mode, I had to SSH in to kill it remotely.
Although Astroberry comes with KStars and other planetarium software packages which will also allow telescope control, being a fan of Stellarium, I wanted to try and get this running. Requiring OpenGL, this is slower and more resource hungry than other included applications. A number of snap installs are available, but I found all of these failed. Downloading the Stellarium source and building from scratch resolved the issue, though colour definition was lower than the usual desktop edition. Follow the build instructions in the file with the source download.
Stellarium does not install in the menu items by default and will need to be created manually, or run it with /opt/stellarium/bin/stellarium. Start it up, go to Configuration -> Plug-ins -> Telescope Control, select load at startup, before quitting and restarting. Make sure EKOS is not running, stopping Celestron control from the panel in KStars.
On restart, either go down the same path for Telescope Control and click Configure, or hit the telescope button added to the lower control panel and select Configure from there. Give the telescope a name, select Start/connect at startup, set the serial port to /dev/ttyUSB0 and the model to Celestron NexStar (compatible). Click ok then Start.
Leaving the telescope control panel open, you should be able to select objects, then click ‘Slew’ to move to them. Performance is not great from Stellarium on a Pi.
Stellarium remotely
Stellarium can connect to a remote INDI server, which is exactly what Astroberry is running. This means you can control your telescope from a copy of Stellarium from your local PC.
Enable the Telescope Plug-In as before, go to Configure telescopes and add a new scope. Select INDI/INDIGO as the type, give it a name such as Remote Pi, enter the address of the Pi and the default port of 7624. If you then hit Refresh Devices, you should see it pick up the INDI devices you configured. Select the telescope from the list and Ok. Start the server and you should now see the telescope crosshair appear. As before you can select and object and tell the scope to slew to it. With some versions, you also get four directional arrows.
Rather than having to free up the local USB port by stopping INDI/EKOS, you can connect to a remote INDI scope with the hostname localhost and do this internally.
This allows remote control and viewing of the telescope (with camera attached), but in order to be a fully remote set up, remote focus control is required. This is addressed in my next post.