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.

25 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?

  2. Dale, awesome plug-in. I use app.voicemonkey.io for smart home stuff and it allows for me to send a URL message such that I can plan text to speech on smart speaker. Is is possible to add a “send url” option? All info for authorization would be in the message. It would need:
    access token – static
    secret token – static
    device name – static (select from list) during message
    announcement

  3. Thanks Dale,
    Any chance to get this to work with simple sequencer and mostly simple messages such as : sequence started, errors, meridian flip, end of sequence etc…. ?. Looks great anyhow and got it configured easy on telegram. Franck.

    1. No, Simple Sequencer is not intended to use plugin functionality. You must use Advanced Sequencer for the extra functionality.

  4. Great plugin Dale, thank you !
    Would it be possible to make it works without internet access, as it can be the case when imaging from the country side, to escape city light pollution? Possibly using a local WiFi hotspot that can link a smartphone to the computer running NINA?

    1. Ground Station’s functions require Internet access, and it uses the system’s access in whatever form that is. If you tether your imaging computer to your 4G/5G phone, then you will have internet access and Ground Station’s functions will work.

      1. OK I understand. I was referring to a situation, like in the mountains, where there is no 4G/5G connection, hence the idea of a local WiFi hotspot.

        1. No, that is not possible. The various messaging services that Ground Station supports requires internet access that allows them to be reached and used. If you are looking for an alerting system that works on a local network, then you might look at the commercial solution called Good Night System (GNS) from Lunatico Astro and the separate plugin for NINA that supports it.

  5. great job! works perfect.

    It would be great if switches were also supported. I have a Pegasus Astro Power box which can display various things like voltage, current, watts and how aggressive the dew heater is. Would this be possible?

    With nice Regards
    Patrick

    1. Hi Patrick,

      I have an idea for including switches. The hard part about switches is that there can be different types of switches and different numbers of them, but I think I have a solution for including them when I have available time to do so.

  6. Hello Dale.

    Could you advise please, when setting up Email: Can the From address be the same as the Default recipient?

    Ta

    Graeme

  7. I have. But the test email doesn’t work.

    I used smtp.gmail.com for the SMTP host, the pre populated 587 as the SMTP port.

    I used my gmail user name and password for user name, should that be something something else?

  8. I’m testing the plugin to notify me with Telegram. It works very well, what happens is that I can’t get this chat to notify me with sound… the rest does. What can be?

  9. Dale,
    FlyingKiwis made a plug-in that sends messages to discord webhooks, but it is a much simpler project, and seems like it might even be abandoned.

    Could you implement discord webhooks into GroundStation? It would be a huge win for me, and I would assume others. Or Collab with Kiwis? Either way – From my end I just want Groundstation functionality delivered to my Discord webhooks. Thanks.

  10. Great work Dale, I use Ground Station with Pushover with success as trigger. Is it possible to have notification for a star guide lost? This issue sometime occours but I do no not understand how to receive the notification.

Leave a Reply

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