A camera can finish an exposure and still fail to deliver the image. Starting the exposure again may be reasonable for a short frame; for a twenty-minute sub, recovering the pixels already in the camera is much more interesting.
ZWOgain, as in “ZWO Again,” is a ZWO ASI camera plugin for N.I.N.A. It runs the SDK in a separate Rust worker process and manages recovery while N.I.N.A. waits for the image. A worker crash or hang can be handled without taking the camera SDK down inside N.I.N.A.’s process.
The 0.2.0.0 release adds ASI6200MM Pro P25 direct capture and fixes several awkward cases around downloads, aborts, and restoring camera controls.
Retry the transfer, or repeat the exposure?
ZWOgain gives those operations separate budgets:
| Operation | Default |
|---|---|
| Retry downloading the same frame | Two retries, regardless of exposure length |
| Reconnect and take a replacement exposure | Three retries, for exposures of 30 seconds or less |
| Delay before reconnecting | Five seconds |
Each is configurable, and a zero retry count disables that kind of retry. SDK download retries depend on the SDK still reporting a ready frame. The experimental direct drivers for supported ASI2600, ASI6200, and ASI676 cameras can reread a retained frame from camera memory, starting the transfer at byte zero. The guide-camera path cannot reread the same frame.
That distinction keeps a failed transfer from automatically turning into a new long exposure. SDK fallback also respects the configured recapture limit.
Restore the camera before carrying on
After reconnecting, ZWOgain restores camera settings and the cooler setpoint. Before recapturing, it checks temperature and cooler output so imaging does not immediately resume with a camera still recovering thermally.
An abort stops the capture. Recovery can restore controls and cooling without taking another exposure. If the image downloaded successfully but a later stop or reset fails, ZWOgain keeps that image and reconnects before the next capture. If recovery cannot finish, the error reaches N.I.N.A.; the log contains the details.
An optional path around the SDK
The ZWO SDK remains the default backend. Version 0.2.0.0 also offers experimental direct USB capture for ASI676MC, ASI2600MM Pro (non-P25), ASI6200MM Pro P25, and the ASI220MM Mini guide camera. Direct mode still needs the ZWO Windows camera driver. SDK fallback is a separate opt-in.
The new ASI6200 P25 support includes RAW16 capture, defect correction, binning, cooling, and auxiliary controls. The release also fixes incomplete readout by waiting for all sensor rows before freezing the frame.
The validation has limits worth keeping with the feature list. Testing used dark frames and controlled transfer faults, including a 1,200-second direct ASI6200 P25 exposure in N.I.N.A. The full 2,000-second maximum, cable removal, and power-loss recovery were untested at this release. Its latest recovery fixes passed automated tests but had not yet been repeated on the physical camera. Live view and trigger modes are unsupported.
See the versioned documentation for the supported-camera details and links to hardware results.
Install it, or help add a camera
The plugin requires Windows x64, N.I.N.A. 3.2.0.9001 or newer, and the
ZWO Windows camera driver. Add https://nina-plugins.psf-guard.com/ as a plugin
repository, install ZWOgain, and restart. Select ZWOgain Retryable
Camera, open its setup, and choose the camera. Disconnect other applications
using that camera before connecting.
The release also includes a Camera Kit for collecting data on additional
models. Extract the kit, close other camera applications, cap the camera, and
run ZwoGain-CameraKit.exe. It records settings and SDK USB traffic in a
local ZIP, with optional image samples. Nothing uploads automatically; review
the bundle before sharing it. No compiler or Python installation is needed.
Release binaries are signed by StackFoundry LLC. ZWOgain is an independent, Apache-2.0 project, unaffiliated with and unsupported by ZWO; bundled components retain their own licenses.
Get the release, read about Field Kit’s safety and focus tools, or browse the astronomy software collection.