Precision & Connectivity
Mount correction, time, computer health, network services and remote access.
Atmospheric updates to the 10Micron mount
Why precision is not only an optical problem
A well-focused telescope is only one part of precise astronomical operation. The 10Micron GM2000 HPS mount also depends on consistent timing, site information and the atmospheric parameters used for refraction calculations. Meanwhile, a remote observatory can lose an entire night through an operating-system restart, a frozen background process, a stopped container or a power outage even when the optics themselves are in perfect condition.
The installation therefore combines specialist astronomical utilities with a set of Python and PowerShell background services, scheduled watchdogs and Home Assistant supervision. Each layer has a well-defined task rather than issuing unrelated commands to the mount.
Atmospheric-update Python service
A dedicated Windows Python program, the atmospheric-update Python service, reads absolute atmospheric pressure and ambient temperature directly from AAG CloudWatcher Solo. It sends the permitted measurements to the 10Micron through the mount's ASCOM driver, then reads them back to verify what the mount actually accepted.
Home Assistant is not part of the measurement path: the updater gets weather values from the Solo itself. Home Assistant does, however, provide the independent operating-state control that determines whether an update is allowed.
A change to pressure or temperature during an imaging sequence or a mount-model construction procedure could interfere with the assumption that the operating configuration remains constant. The updater therefore follows a strict two-condition interlock:
- N.I.N.A. observing sequence must be OFF.
- 10Micron MODEL BUILDING must be OFF.
Both conditions must be satisfied. If either is ON—or the needed N.I.N.A. status is not reliably known—the updater does not change the mount values.
How N.I.N.A. and Model Building control the updater
N.I.N.A. publishes its observing-state transitions over MQTT. A retained-state mechanism is used to help software that restarts learn whether a sequence has ended cleanly, but an old “OFF” cannot be trusted after a new “ON” starts. The logic therefore invalidates the old retained OFF when acquisition begins and defaults to blocked when N.I.N.A.'s current state is uncertain.
Home Assistant separately exposes a MODEL BUILDING mode. Turning it on publishes a blocking MQTT state, and HA renews the ON state every five minutes while it remains enabled. Turning it off announces the end of model building. The Python updater interprets N.I.N.A. and MODEL BUILDING as independent blocking conditions.
If N.I.N.A. becomes OFF while MODEL BUILDING is still ON, nothing is written. If MODEL BUILDING becomes OFF while N.I.N.A. is still ON, nothing is written. Once both are OFF, the program requests an update immediately and, in ordinary idle conditions, continues checking approximately every five minutes.
This conservative approach also handles unusual combinations such as the two modes being ON simultaneously, without assuming that such a combination is safe simply because it is uncommon.
Reading, writing and verifying pressure and temperature
When an update is permitted, the Python program:
- Reads Solo's current absolute pressure and ambient temperature.
- Tries to connect to the GM2000 through the local 10Micron ASCOM driver.
- Skips the update if the mount is off or unavailable.
- Sends the mount's supported pressure and temperature settings.
- Reads the values back to check that the mount has accepted them.
- Publishes diagnostic status and a software heartbeat for external supervision.
Reading back a value is more reliable than equating “command sent” with “configuration changed.” It is one of the same design principles used for roof-limit switches and device-status refreshes.
Recovery and supervision of the Python weather updater
The updater is launched automatically by a Windows scheduled task. A separate PowerShell watchdog checks every five minutes whether the correct Python process is running; if it has disappeared, the watchdog attempts a local restart.
Independently, the Python process publishes an MQTT heartbeat. Home Assistant monitors heartbeat availability, and the alert waits two minutes of unavailable status before reporting a fault when the mount is actually reachable. This avoids complaining that the updater is inactive merely because the mount was deliberately switched off.
Three facts are kept separate: a process may be alive, the mount may be reachable, and a weather update may have been successfully applied. None guarantees the other two.
Time synchronization
The time chain: internet reference → Windows → mount
Time is central to object coordinates, meridian calculations, pointing and the timestamps attached to images. The observatory Windows computer uses Meinberg NTP with an external time reference to discipline its operating-system clock. Its polling configuration checks the reference at roughly 64–128-second intervals. Windows' competing time-discipline service is disabled to prevent two applications fighting to set the clock.
The astronomical software uses the corrected Windows time. N.I.N.A.'s own mount time synchronization remains disabled, because a dedicated 10Micron Clock Sync utility is responsible for keeping the GM2000's internal time aligned with the Windows reference. Site-coordinate synchronization is similarly kept under deliberate control rather than having multiple programs update the same values.
The overall time path is:
Network time reference → Meinberg NTP → observatory computer clock → 10Micron Clock Sync → GM2000 clock.
This path is independent of the Python weather updater: that program is for pressure and temperature, not time setting.
Watching Clock Sync itself
A local Clock Sync watchdog checks whether the mount is reachable, whether the synchronization utility is running, whether it is connected and what offset it reports. It can attempt to start the utility if the mount is active and the process is absent.
The watchdog publishes status, clock offset and heartbeat over MQTT, where Home Assistant can distinguish a stopped watchdog from a running tool that has lost its mount connection. The state vocabulary includes conditions such as MOUNT OFF, STARTING, OK, NOT CONNECTED, HIGH OFFSET and READ ERROR.
Clock synchronization monitors an offset threshold of approximately 5 milliseconds and can report the measured offset hourly while the mount is powered and reachable. The trend over time is more informative than a single reading.
Windows and PC resilience
Windows systems: preventing unplanned restart
Windows updates are scheduled under operator control to avoid an unattended restart during imaging. Maintenance is performed with the roof closed and sequences stopped, followed by checks of the essential services.
The Windows maintenance workflow includes checking restart policies and essential services after updates.
Monitoring the observatory PC in several dimensions
Home Assistant receives computer information through HASS.Agent and network reachability checks. It can distinguish:
- PC reachability: whether the host answers on the observatory LAN.
- Mains versus battery: whether the computer still has external supply.
- Battery level: the currently reported remaining percentage and band transitions.
- Ethernet: whether the relevant physical network interface is up.
- Dependent application heartbeats: whether services such as the Denkovi bridge are still running.
One reason for this approach is that a PC can remain reachable on its battery after an electrical supply fails, while an application can stop publishing even though Windows is running normally. The HA automation for the PC and SwitchBot batteries notifies changes of battery bands rather than every one-percent variation; the automation uses thresholds of approximately 89% and 34% for these bands.
When the computer cannot be reached, HA correlates the failure with the Shelly-powered supply to distinguish an apparent power problem from other causes. A return to network reachability is reported, but other dependent services must still be checked before assuming full recovery.
The Overview also consolidates electrical and infrastructure telemetry: UPS online/battery state, total and UPS-excluded power and energy, temperatures, and voltage/current/power readings for individual KinConyBM channels. Controller digital and analogue inputs are shown separately, so the dashboard can help locate whether a problem is in a supply, a load, a physical input or the network. The UPS/incoming-mains state also feeds N.I.N.A.’s Safety Monitor; mains loss makes it Unsafe and initiates roof closure while backup power remains.
HASS.Agent: command execution and health monitoring
HASS.Agent serves two separate functions: it publishes Windows state information and, on the server, can request a specifically configured scheduled emergency task. The task launches the dedicated N.I.N.A. recovery chain with an interactive desktop session, rather than requiring the dashboard to run arbitrary Windows instructions.
Its heartbeat is monitored separately from the server's ping. In the automations, the HASS.Agent alert is raised after three minutes unavailable, provided the server is still reachable, and is then repeated hourly while the condition persists. That check makes it possible to diagnose “Windows works but the remote command agent has failed.”
Jeedom, Ajax and supporting services
Docker, Jeedom and the Ajax alarm bridge
A Jeedom installation supports a separate part of the site's security system. Home Assistant can read Ajax alarm states through a SIA integration, but the active ARM/DISARM command route passes through MQTT → Jeedom → the Ajax plugin. The reading and command paths are intentionally different.
Jeedom runs in Docker with a database container. A local watchdog runs every five minutes to check the containers and attempt restart in the correct dependency order when needed. Home Assistant also monitors a Jeedom heartbeat and sends a Telegram warning after a sustained failure.
A second watchdog addresses a subtler fault: Docker and Jeedom may both be working even though the authenticated Ajax session has expired. The Jeedom logic combines recent plugin-error evidence with an active read-only session test. Home Assistant receives the result and, in the automation, raises a warning after two continuous minutes of failed session status. This does not mean an alarm is automatically armed or disarmed during a test.
Other background monitors and supporting services
Home Assistant also includes:
- CloudWatcher/Raspberry API health: detects whether the application delivering Solo configuration values has stopped, distinguishing the Raspberry, the instrument and the API layer.
- AllSky public-upload health: detects when the Cloudflare R2 upload status remains down for five minutes.
- Denkovi bridge health: identifies an unreachable PC, unreachable controller or stopped Python/MQTT bridge.
- Electrical anomalies: UPS transfers to battery, restoration, protected-circuit changes and overvoltage warnings.
- Facility states: door contacts, motor activity, ventilation, physical STOP and remote maintenance.
- Clock Sync and weather-updater diagnostics: show that the mount's supporting software is alive, not just that the mount responds to a ping.
A short Home Assistant notification-suppression period after restart is used to reduce false alerts from some automations while entities initialize. It should not be assumed to suppress all historical notifications unless each automation explicitly checks the suppression state.
Remote interfaces and separation
Protected control network and public pages
The observatory separates the public-facing website from the internal control network. The site can display a current AllSky image through a cloud object, while the camera-management computer remains private. Administrative remote access is protected through a dedicated reverse-proxy and service-specific authentication, including multi-factor authentication where configured.
An internal Python proxy supports an authenticated configuration interface on a local Windows computer. The proxy is restricted to the internal management environment.
What reliability means in practice
Reliable remote control requires three successive questions: was an action requested, did it actually happen, and can the system still be trusted to report the result? The 10Micron weather updater reads back applied parameters; the roof relies on end-switch confirmation; watchdogs use heartbeats in addition to ping; and imaging reports count stored files rather than only intended exposures.
These mechanisms do not make the observatory infallible. They make failures more visible, recoverable where safe and more specific to diagnose. The operating principle is to keep astronomical acquisition, local process recovery, weather safety and human escalation as separate but cooperative layers.