Ground Station: Notifications for NINA

Alerts and remote notifications are undeniably useful and can bring peace of mind when running unattended astrophotography sequences. NINA has lacked this feature, however. Not because it was seen as unwanted, but NINA’s rapid internal evolution and the myriad of ways that people prefer to do alerts made the prospect of designing something that was built-in daunting and chasing a moving target. NINA’s Advanced Sequencer and the new plugin system that came along with it changed this situation for the better. The combination of these two features offers far more flexibility in implementing such a facility.

Ground Station is my take on implementing alerts and notifications in NINA. It is a single plugin that adds a set of triggers and instructions to Advanced Sequencer. These triggers and instructions can be placed anywhere within the flow.

Chad of Patriot Astro made a fantastic overview video of Ground Station:

Alert Triggers

The triggers are geared towards reporting instruction failures. The trigger fires if the just-completed sequence instruction finished in a failure state. The trigger will then emit a message to its associated service with the name the of failed instruction and some other information.

It is important to note that triggers do not run after the last instruction in the sequence executes. This is because triggers currently run only prior to instructions, not after them. This mechanism may change in the future and the Failure trigger would be able to fire if the last instruction fails for some reason. For now, a workaround would be to make the final instruction in the sequence a no-op, such as using the Wait for Timespan instruction set to 1 second.

Alert Instructions

Ground Station’s sequence instructions can be placed anywhere in a sequence and are meant to allow you to emit a free-form message to a service. You might put one at the start of your sequence, or at the end. You might also use them to manipulate IoT devices around your observatory or house. More on this below. There isn’t must else to say about these instructions.

Supported Services

Ground Station is meant to be modular. It’s not meant to do only email, or only push notifications, or the like. Out of the door, Ground Station is able to interact with three different services. Which ones you choose to utilize is a matter of your own requirements and familiarity with configuring and using them. Here’s an overview of the ones Ground Station currently interfaces with.

Pushover logo

Pushover is a smart device and desktop notification system. It has an app for iOS and Android devices, as well as an in-browser client for desktops. It’s very simple. You can specify a message title, body, a priority level (there are 4), and select a notification sound from a menu of available ones. When a Pushover trigger or instruction fires in NINA, the configured message is sent to Pushover’s servers, which then push it to your set of devices. Pushover also supports grouped devices so that multiple people can receive the same message. It is a very good and natural evolution from pager or SMS-based systems.

IFTTT logo

IFTTT stands for “If This Then That.” It is an online service that acts as a device automation gateway. As a user, you can create applets that take input (say, an alert from Ground Station) and do something with it – send it on to an SMS service, turn on or off an IoT light, open an IoT garage door, and any number of other things – including ordering a pizza from Domino’s! Sounds like a good thing to put in your Start of Sequence area, no? IFTTT integrates with a wide range of services. If Ground Station does not support a particular service directly, then IFTTT is a good place to look for it.

Telegram is a general instant messaging platform that has specific provisions for bots. Bots are any software that receive or emit messages to or from individuals or groups. Setup of a Telegram bot for Ground Station to talk through is a bit complicated and is outlined in the Telegram bot documentation.

Email logo

Ah, Email. The time-tested digital communications medium. Loathed by some, loved by probably not many more. It can still be effective, depending on how the receiving end is set up. If you own a mobile phone, email is possibly one of the last remaining ways to get alerts turned into SMS messages without having to pay for a 3rd party direct SMS gateway.

Most mobile phone providers still offer email-to-text gateways, where you send an email to an address and it gets forwarded to the phone number associated with that address as an SMS or MMS message. Be aware that this may not be 100% reliable as most mobile providers have message rate restrictions and have rather strict spam filtering in place. I would look for different services if alerts and notifications must be received reliably.

MQTT logo

MQTT is a lightweight protocol designed for messaging between devices, including embedded devices. It works in a publish-subscribe mode of operation which can be far more efficient to do for low-bandwidth networks and small, embedded devices. It is often used by IoT devices and Home Automation systems. Using it requires a MQTT broker that is often hosted by such systems which can be hosted locally, rather than relying on an external orchestration service such as IFTTT.

Installing Ground Station

Ground Station requires NINA 1.11 build 106 or later. Simply go to the Plugins manager, click on Available, select Ground Station, and press the Install button. You must then restart NINA for it to become active. The triggers and instructions it implements may be found under the Ground Station category in Advanced Sequencer.

Getting Help

The place to get help with this plugin is the #plugin-discussions channel on NINA’s Discord server. If you’re looking for help with implementing or setting up one of the supported services, there are a lot of various tutorials and videos online regarding that. I do not want to become a support agent for those services, so please try to look up these resources if you’re stuck. But if you have issues setting up the plugin or have questions or suggestions concerning it, please feel free to bring it up on the Discord chat.

5 Replies to “Ground Station: Notifications for NINA”

  1. when sending a message (e.g. to IFTTT) – can you put ‘smart’ tags in the three values, which will get populated by the actual values? e.g. target name, temperature, etc?

Leave a Reply

Your email address will not be published. Required fields are marked *