In my previous post, NexStar SE, Meet Raspberry Pi, I detailed basically all of the components of my hardware configuration. You don't need all of this for StellarSocks, just USB to RS232 and computer, such as a Raspberry Pi or a laptop, will suffice. However, the purpose of all of this is to remotely control and view my telescope for astrophotography. This post will cover my newly released StellarSocks v0.1.0, which will help us control our telescope.
StellarSocks was inspired by another NodeJS server called node-telescope-server written by a brilliant fellow from Barcelona, Spain. This server implemented the portion of the NexStar protocol (amongst other protocols) necessary for communicating with Stellarium.
My goal was to control my GoTo mount remotely, but in a slightly different fashion: from a remote Android device. I purchased SkySafari 4 and soon found that it used portions of the NexStar protocol not implemented in the aforementioned package.
I began looking into contributing to this package, but as I learned about the protocol, I began to realize I was approaching it from the wrong angle. Hence the birth of StellarSocks, a telescope and planetarium software agnostic TCP socket server.
StellarSocks is written in NodeJS, and functions simply as a passthrough for planetarium software to communicate with a GoTo telescope via serial port.
This server application was initially designed for a Raspberry Pi, but you can realistically install it on any device that supports the following:
- Serial/USB Communication
- Network Connectivity
Installing NodeJS and configuring an environment are outside the scope of this post, but I'll note what I'm using:
After you have your environment configured, all you have to do to install StellarSocks is run the following command:
npm install stellar-socks
Starting the Server
Before you start the server, you'll want to make sure you have your telescope on and aligned, as well as the Raspberry Pi (or other device) connected to the serial port on the telescope (see NexStar SE, Meet Raspberry Pi for more information about the serial connection). You'll also want to make sure you have the configuration file
config.json set up properly for your environment.
To start the server, navigate to the installation directory from the installation step, and run the following command:
When you run the command, the service will start up and announce its status as shown in the image below.
You are now ready to configure your remote planetarium software to connect to the server.
GoTo Mount Connection Using SkySafari 4
To connect to the server, you need only the IP address of the device hosting StellarSocks, and the TCP port you configured. Go to Settings -> Communication Settings and configure the IP Address and Port accordingly.
Once you go back to the main planetarium screen, tap the Scope button from the icon menu to show the telescope control submenu. It should look like this:
Now it's time to make the connection. Note that your phone must be able to access the network used by the server hosting StellarSocks. This means you need to connect to the same WiFi hotspot, or if you want to get advanced, configure port forwarding on your router. Tap Connect on the scope menu and your device should connect and show you where the telescope is pointed using the teal colored crosshairs (assuming you've already aligned it!).
Now we're in good shape. We can select objects in the sky and tap the GoTo button to slew the scope to that image. Here's an example of me selecting Vega...
... and tapping the GoTo button.
Please keep in mind that this is the very first release of StellarSocks. I've tested it with SkySafari and Stellarium so far, against my NexStar 4SE telescope. If you have any problems or questions about support for a specific telescope or planetarium software, shoot me an email!
Next time I'll cover connecting using Stellarium.