Skip to content

Repository files navigation

# WeatherWatcher SafetyMonitor

## Overview

WeatherWatcher SafetyMonitor is an ASCOM SafetyMonitor driver designed to provide a simple and reliable weather safety interface for observatory automation systems.

The driver monitors a weather status file generated by WeatherWatcher2 and exposes a single ASCOM SafetyMonitor state indicating whether conditions are safe for observatory operation.

This allows ASCOM-compatible applications to automatically respond to changing weather conditions and make informed decisions regarding roof operation, telescope protection, and automated observing.

---

## Features

### ASCOM SafetyMonitor Interface

Implements the ASCOM SafetyMonitor V3 standard, making weather safety information available to any ASCOM-compatible application.

Compatible applications include:

* NINA
* Voyager
* ACP
* TheSkyX
* Sequence Generator Pro
* ASCOM Remote / Alpaca
* Custom ASCOM applications

---

### Real-Time Safety Monitoring

The driver continuously evaluates a weather status file and reports a simple:

```text
SAFE
```

or

```text
UNSAFE
```

state through the ASCOM SafetyMonitor interface.

Applications can use this information to:

* Prevent roof opening
* Trigger observatory shutdown procedures
* Pause imaging operations
* Protect equipment during unsafe conditions

---

### WeatherWatcher2 Integration

The driver is designed to work directly with WeatherWatcher2 generated data files.

Default file location:

```text
C:\ProgramData\WeatherWatcher2\weatherdata.txt
```

The location may be customized through the Setup Dialog.

---

### Automatic File Monitoring

The driver performs several validation checks before declaring conditions safe.

Checks include:

#### File Exists

The configured weather data file must exist.

#### File Age Verification

The file must be actively updated.

Files older than:

```text
120 seconds
```

are automatically considered unsafe.

This protects against:

* Weather station failures
* Application crashes
* Network interruptions
* Stale weather data

#### File Content Validation

The file must contain valid data.

Empty files are considered unsafe.

---

### Fail-Safe Operation

The driver follows a fail-safe philosophy.

If any error occurs, the driver reports:

```text
UNSAFE
```

Examples include:

* Missing file
* Corrupt file
* Stale data
* Read errors
* Unexpected exceptions

This ensures observatory equipment remains protected during abnormal conditions.

---

### Logging Support

Optional diagnostic logging is available through the ASCOM Trace Logger.

Logging records:

* Driver startup
* Connection activity
* Safety evaluations
* File age checks
* Error conditions
* Safe/Unsafe transitions

This information can be invaluable when troubleshooting observatory automation systems.

---

## How Safety Is Determined

The driver reads the configured weather file and examines the final character.

### Safe

If the last character is:

```text
0
```

the driver reports:

```text
IsSafe = True
```

### Unsafe

Any other value results in:

```text
IsSafe = False
```

This simple design allows WeatherWatcher2 to make all weather decisions while the SafetyMonitor acts as a reliable ASCOM interface layer.

---

## Typical Workflow

```text
Weather Sensors
        ↓
WeatherWatcher2
        ↓
weatherdata.txt
        ↓
WeatherWatcher SafetyMonitor
        ↓
ASCOM SafetyMonitor
        ↓
NINA / Voyager / ACP
```

The astronomy application can then respond automatically to unsafe weather conditions.

---

## Configuration

### Data File Location

Specifies the WeatherWatcher2 safety file to monitor.

Default:

```text
C:\ProgramData\WeatherWatcher2\weatherdata.txt
```

### Trace Logging

Enables diagnostic logging for troubleshooting and system verification.

Default:

```text
Disabled
```

---

## ASCOM Device Information

| Property           | Value                         |
| ------------------ | ----------------------------- |
| Device Type        | SafetyMonitor                 |
| Interface Version  | 3                             |
| Driver Name        | WeatherWatcher Safety Monitor |
| Driver Description | WeatherWatcher SafetyMonitor  |
| ASCOM Interface    | ISafetyMonitorV3              |

---

## Alpaca Compatibility

The driver may be exposed through ASCOM Remote Server, allowing weather safety information to be shared across a network using the Alpaca protocol.

This enables remote observatory systems and distributed automation architectures while maintaining full ASCOM compatibility.

---

## Design Goals

WeatherWatcher SafetyMonitor was developed with the following objectives:

* Reliability
* Simplicity
* Fail-safe operation
* Weather protection
* Observatory automation compatibility
* ASCOM standards compliance

The driver intentionally focuses on a single task: providing a dependable weather safety state to observatory automation software.

---

## Future Enhancements

Potential future enhancements include:

* Native cloud sensor integration
* Rain sensor monitoring
* Wind safety limits
* Humidity thresholds
* Temperature thresholds
* Multi-source weather validation
* Native Alpaca implementation
* Advanced safety diagnostics

---

## Installation

### Requirements

* Windows 10 or Windows 11
* ASCOM Platform 7 or later
* WeatherWatcher2
* Valid weather data file

### Installation Steps

1. Install ASCOM Platform.
2. Install WeatherWatcher SafetyMonitor.
3. Open the ASCOM Chooser.
4. Select WeatherWatcher Safety Monitor.
5. Open Setup.
6. Configure the weather data file location.
7. Connect from your automation software.

---

## Summary

WeatherWatcher SafetyMonitor provides a lightweight, dependable bridge between WeatherWatcher2 and ASCOM-compatible observatory automation software. By continuously validating weather data and reporting a simple safe/unsafe state, it enables automated systems to protect valuable equipment and maintain safe observatory operation under changing weather conditions.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages