ASCOM SafetyMonitor Hub

The ASCOM SafetyMonitor Hub SetupDialog.
Figure 1: The ASCOM SafetyMonitor Hub SetupDialog.
SafetyMonitor Hub is a driver that allows to connect multiple SafetyMonitors1, like the ASCOM Generic UPS driver, to an ASCOM application that has only a single interface available, such as Sequence Generator Pro (SGP). It is written in C# .NET using Visual Studio, has passed the ASCOM Conform test (report is included in the zip file). Version 0.2.0 and can now be downloaded from my server: http://www.dehilster.info/docs/SafetyMonitorHub-Setup.zip
It automatically detects all installed SafetyMonitor drivers and creates a SetupDialog with a maximum of 5 SafetyMonitor interfaces. Each of these interfaces will be populated with all currently installed SafetyMonitor drivers. The user can then decide how many SafetyMonitors will be monitored by the Hub.


Setup

The pull-down lists allow to choose a driver. Each driver can only be selected once. Left of the pull down lists are the properties and connect buttons. Once set-up the settings will be stored in the ASCOM profile and automatically retrieved when the Hub and the connected SafetyMonitors are re-opened. If no SafetyMonitor interfaces are connected to the Hub prior to connecting the Hub to the ASCOM application, the SafetyMonitor status will be unsafe. Only when at least one SafetyMonitor driver is selected and connected, the Hub will be Safe when all connected SafetyMonitor drivers are safe.


Behaviour

The SafetyMonitor Hub showing that the Generic UPS driver detected a power loss.
Figure 2: The SafetyMonitor Hub showing that the Generic UPS driver detected a power loss.
Clicking the properties button of the Hub at runtime will show the Hub's SetupDialog with all functionality disabled. No changes can be made, but the SetupDialog shows the current status of all connected SafetyMonitors. A short blink is built in the 'status leds' on purpose to show that the status are actually monitored, which is done every 2.5 seconds.
If one of the SafetyMonitors is the ASCOM Generic UPS driver, count-down timer (in seconds) will be shown in the coloured status window when mains is lost. When all is safe this window is green (see figure 1), but turns orange when power is lost (see figure 2), while the time since power was lost remains within the Set Unsafe Delay time. When the window is orange the SafetyMonitor Hub still reports the SAFE status to the ASCOM application. It will count down until the Set Unsafe Delay has expired, after which the status window will turn red (and the reported status turns UNSAFE). The count-down timer keeps on ticking, now showing negative time in seconds, indicating the period since the status went UNSAFE.


Change log

v.0.0.1 (23/06/2019): The first stable version.
v.0.1.0 (10/07/2019): Implementation of orange status to show the power-lost-period.
v.0.1.1 (10/07/2019): Improved version of showing the power-lost-period. This version is still available.
v.0.2.0 (31/12/2020): Main change is the way it connects to the underlying SafetyMonitors. The previous version created several unintended and unused instances of the connected SafetyMonitors. In this version no more than a single connection is made to each SafetyMonitor at all times. In addition the current version allows to access the settings of the connected SafetyMonitors, even when these and the Hub are already connected. It has improved status-LEDs and is now provided with tooltips.


Disclaimer

[1]: This driver is freeware, it's use is at your own risk! I cannot be held responsible for any damage caused due to improper set-up or malfunctioning of the driver.


If you have any questions and/or remarks please let me know.


Home Geodesy Navigation Astronomy Literature
InFINNity Deck... Astrophotography... Astro-Software... Astro Reach-out... Equipment... White papers...
ASCOM Generic UPS driver ASCOM Envir. SafetyMonitor ASCOM File SafetyMonitor ASCOM SafetyMonitor Hub Astronomical Twilight FITSalize Log10mGrabber MountCMD MountMonitor