Rowland's Astro Blog
Part 5: Running RoboTarget Manager Remotely
Overview
RoboTarget is Voyager Advanced’s automated scheduling system that chooses and runs targets from a database of possible targets you create and maintain. See the other blog posts in this series to get an overview of Voyager Advanced, learn about RoboTarget Manager, the user interface to the target database, or the RoboTarget section of Voyager Advanced where you can start and monitor RoboTarget.
By default, the RoboTarget Manager will manage the targets maintained in a database on the same PC. Actually, it will connect to the Voyager application server at the “localhost” IP address, and the application server manages the database.
In addition, you can define one or more remote Voyager RoboTarget “sites,” which are instances of Voyager running on other PC’s. You can then run RoboTarget Manager on one PC (we’ll call this the “client”) and manage the RoboTarget databases on another one as long as you can reach it over the network. The network may be a LAN, a VPN, or the Internet as long as the IP address of the remote machine and the application server’s port number are accessible.
Another excellent way to access a remote machine over the Internet is with ZeroTier, explained here:
This “remote site” capbaility is great if you have more than one instance of Voyager Advanced, or if you simply want to sit in the comfort of your office, run RoboTarget Manager there, and connect to a remote PC that runs your imaging setup. I fall into both categories 🙂 !
Security
You may secure access to a remote site with a username / password combination, and an optional “Shared Secret” which is an arbitary character string used to encrypt traffic between the client and server PC’s.Â
On the remote PC, open Voyager’s Setup -> Remote panel:
Under Application Server Authentication, choose either None to allow open access, or set a username and password to require a login. Set the username and password in the “Default Remote User” panel and click Apply. Restart Voyager to have these take effect.
If you wish to use a Shared Secret, enter it in the RoboTarget Shared Secret field and click Apply. The new value will be used immediately. You do not need to restart Voyager.
The choices you make here for username / password and/or shared secret must match the values entered in the Site Manager, as shown below.
Â
Client Setup
Make sure you have the latest version of Voyager installed on your client PC so your version of the RoboTarget Manager is current and matches the one on the remote sites. If you don’t have Voyager installed yet on your client PC, download the current version and install it.
Once installed, you can run VoyagerRoboTargetManager.exe to bring up the Voyager Site Manager. You will find it in the same directory as your Voyager main program, which is currently named Voyager2.exe. By default this is the c:\Program Files (x86)\Voyager folder.
For convenience, you may wish to create a shortcut to the VoyagerRoboTargetManager.exe file so it is easy to start.
Voyager Site Manager
In order to connect to a remote site, you first define it with the Voyager Site Manager. You’ll find this in the Remote menu of the RoboTarget Manager. Read about the RoboTarget Manager, including how to invoke it, in Part 3 of this series.
This brings up the Site Manager. On the left, you’ll see a folder with all the sites you’ve defined. When you start, there will be just one, Local, which is the machine Site Manager is running on. Click a site in the My Sites folder to select it. The currently selected site is marked with a red triangle icon – “Local” in this screen shot:
At the bottom left, you’ll find four buttons. Â
New Site:Â Create a new, empty site definition
Set Default: Make the currently selected site in the My Sites folder the default site – the one that is selected in the list of sites drop-down menu when you start the Site manager. If you don’t touch the drop-down and just click Connect, this is the one you will access
Modify:Â Edit the details of the currently selected site in the My Sites folder
Remove: Delete the site definition. This does not delete the site, only the definition of the site in this PC’s Site Manager. You can add it back later if needed
Â
Â
Adding a Site
Click the New Site button on the lower left to add a new site. A settings panel opens up on the right:
Site Name:Â An aribtrary name for this site definition
IP Address / Host Name: The IP address or host name that resolves to the PC containing the remote site. Â
Default Host:  Will reset this to Localhost or the IP address of the local machine. This button label will change to Reset.
Port: The port number of the Voyager application server on the remote PC. The default port number is 5950.  This remote PC and port number must be accessible to your computer. If it is behind a firewall, it must be configured to forward the port, or some other means of access such as a VPN must be in place.
Authentication: If the remote application server is protected by a username / pasword, click the “Username / Pasword” radio button and enter the values in the Username and Password fields. Click the “eye” icon to see the password as you type it
RoboTarget Shared Secret: You can further protect communication between the client and remote site with a Shared Secret, which is an arbitray string of characters. It must match the one stored for the remote site.
Click the Save button to save the changes to the site definition, or click cancel to ignore them.
Click the “x” icon in the upper right corner of the Site Manager to close the window.
Â
Connecting to and Disconnecting from a Site
Click the drop-down list under the Voyager Site label to view the list of sites defined in your Site Manager. Note – only sites you have manually added, as shown above, will appear in the list. I.e., this list is not automatically populated if you install Voyager Advanced on a new PC on your network.
Click the name of the site you wish to use, and then click the Connect button.
The Data tree will be populated with information from the remote site, and the Connect button is replaced by a Disconnect button.
To switch to a different remote site, click the Disconnect button, select the new site from the drop-down list, and click Connect.
If you get an error when attempting to connect to a site, make sure the site’s PC and the application server’s port are accessible to the client PC. Make sure the username / password and shared secret match.
Â
Done
That’s it! You can now easily run the RoboTarget Manager from the comfort of your desktop or laptop PC, connecting to a remote PC running Voyager Advanced. If you have mutiple PC’s, you can switch between them and work on your sets, targets and shots. Â
Part 4: Voyager RoboTarget at Runtime
Imaging with Voyager RoboTarget
Once you have added some targets to the RoboTarget database, if any of them are eligible – visible and with all constraints met – RoboTarget can run them for you automatically at the times that meet the constraints.
There are two ways to invoke RoboTarget, manually or from a DragScript:
–>Manually: Prepare your setup the way you would before running a Voyager sequence – connect your equipment, etc. Then open the RoboTarget section and click RoboTarget Run. RoboTarget will take over and run your gear all night, selecting targets from the RoboTarget database (see Part 3: Voyager’s RoboTarget Manager): Â
–>From DragScript: Use the RoboTarget action – found under Actions -> Session in the DragScript Editor Elements panel. Add this action to your DragScript instead of the Sequence action, and RoboTarget will start selecting targets and taking shots. The example below just shows the action – you also need to handle the status values returned by RoboTarget. Â
RoboTarget Settings
When you run RoboTarget manually, its settings are accessed from the gear icon in the lower right corner of the RoboTarget section:
When you run it from a DragScript, the same settings are accessed from the dialog box that appears when you double-click the RoboTarget action in your DragScript. It’s the dialog box shown above in the “running from a DragScript” section of this blog post.
Let’s run through the settings and what they do:
Scheduler Type: The “Scheduler” is the algorithm used to select the target to run from the pool of eligible targets. At this time there is only one scheduler, but more will made available later. The Default scheduler chooses the highest priority target that was added to the database the longest time ago.
Night Type: Astronomical, Nautical or Civil – this together with the Night Start and End Offsets, determines the starting and ending time during which RoboTarget will take shots. Your coordinates, returned by your mount or set in Voyager Setup, are used together with your selections here to determine the clock times for starting and ending the night. Â
Night Start Offset:Â The offset, which may be negative, is added to the time computed by the Night Type you choose to determine the starting clock time of your run.
Night End Offset:Â The offset, which may be negative, is added to the time computed by the Night Type you choose to determine the ending clock time of your run.
Advanced
If there are NO Target Selections from the Scheduler:Â If the “Run Targets that have exceeded the maximum Shot time per Night if available” box is checked, RoboTarget will run an eligible target rather than sit idle, even if all eligible targets have already run the maximum shot time per night that you chose in the target defintion.
Sequence Minimum Duration:Â Only start an eligible sequence if its constraints will be met for at least this number of minutes – unless the number of minutes left to finish the target is less than this number, in which case the target will be eligible to run.
Moon Down Altitude: The altitude of the moon in degrees, which may be negative, used in the calculation of the Moon Down constraint. Â
Scheduler Soft Error Retry: The number of times RoboTarget will retry a sequence when a scheduler internal error occurs. Examples include: cannot start scheduler process, cannot read scheduler ephemeris data, internal action errors
Sequence Max Retries in a Single RoboTarget Run in Case of Error: The maximum number of times a recoverable error can occur in a sequence for a single target for a single night. Each target has its own counter. Examples of the types of errors counted can be seen here in the $$SEQUENCE_FAIL_STATUS possible flags:
https://wiki.starkeeper.it/index.php/DragScript_Environment_Variables
Do not start Sequence for a Target in No Goto Meridian Zone: If checked, RoboTarget will not start a sequence if the target’s position is inside the zone around the meridian which is defined as “No Goto.” These are the values in Setup -> Mount -> GEM Meridian Flip Manager:
Running from the RoboTarget Section
You can run RoboTarget “on the fly” from the RoboTarget Section, accessed from the top toolbar or from the Section ribbon:
The RoboTarget section is your “dashboard” during a RoboTarget run – you will find useful information here, updated in real time, whether you start it from this section, or from a DragScript:
Let’s take a look at the sections of this screen.
Settings
Most of the yellow captioned fields are values you entered in the RoboTarget settings panel, as explained above. In addition to these, you’ll find:
Night Start:Â The night starting date and time based on your choice of Night Type
Night End:Â Â The night ending date and time based on your choice of Night Type
BEGIN Time:Â The time your RoboTarget session begins, based on Night Start and the Offset Night Start
END Time:Â The time your RoboTarget session ends, based on Night End and the Offset Night End
The blue captioned fields provide information about the running target, if there is one.
Running Target: The name of the running target. Â
Submitted:Â The date and time the running target was submitted to the RoboTarget database
Sequence Start:Â The date and time the running sequence started
Sequence End: The latest date and time the running sequence can run, based on meeting constraints. E.g., if the altitude constraint is to run at or above 30 degrees, and the target dips below 30 degrees after 90 minutes, that would determine the ending time. The sequence would end earlier if all shots are completed before this time.
Targets
There are two tabs – you can shoose to view the targets from the Last Scheduling Selection, or All targets in the database.
N°: The target number. If there is a current running target, its Target Number field has a blue background. Idle targets have a green background. Â
Status: Idle, Running, Suspended or Finished. Â
Target Name:Â The name of the target you entered in the RoboTarget database
Set Name:Â Â The name of the target set to which this target belongs
Priority:Â The priority you assigned to this target in the RoboTarget database
LastRun:Â The date and time this target was last run
Progress:Â The percent completion of all shots defined for this target in the RoboTarget database, even if multiple sessions are needed to complete the target
Reject Reason: The last reason this target was not chosen, unless the scheduler found a target to run before examining this one. At the beginning of a run, this field is wiped clean for all targets.
Ephemeris: A useful “Night at a Glance” informational panel about each target. The X axis is time.
Green vertical lines: Begin and End Times of action for the night
Blue lines and blue shaded area:Â Sequence start and end times for the running target
Yellow line:Â Moon altitude for the night
Cyan:Â Target altitude for the night
Magenta:Â Moon phase – scale is 0 to 100%
Blue: Moon distance from the target in degrees, scale is 0 to180°
Red Arrow:Â The current clock time is outside the graph
Green Arrow:Â The current clock time when it is inside the graph
Runtime Actions
You can also right-click a target and remove a suspension, if the target had one in place, or abort the running sequence.
The Select Running Target button will bring the running target into view, especially convenient when you have a long list of targets.
The Reload button will requery the RoboTarget database and refresh the target information.
On the lower left, you can see the status of RoboTarget – IDLE in this image. The Status can also be SLEEP, SCHEDULING, and TARGET RUN.
Abort Running Target: Click to abort the sequence for the running target. RoboTarget will enter the SLEEP status briefly, and then look for the next eligible target to run.