Preview build View the live site

Decision logic

How Vigil decides to cut power.

Power is the last resort, not the first. Every decision runs through the same sequence, and the relay only ever cuts power for about 30 seconds before closing again.

Two products

Vigil and the relay board are not the same thing.

This page explains how Vigil — the OPNsense plugin — decides to cut power. The relay board is a separate, standalone product with its own watchdog.

Software · licensed

Vigil os-vigil

  • Runs on an OPNsense firewall
  • Drives a USB relay over USB
  • Checks in daily — keeps itself updated
  • Recovers with the DHCP-renewal logic below

Hardware · standalone

Relay board NET2D

  • No firewall needed
  • 2-channel Ethernet relay
  • Ping watchdog that reads gateway + WAN state
  • Cycles the router and the modem
  • No licence — support & firmware renewal

Not sure which fits your site? See the relay board or ask us.

Vigil · where it sits

In line, between the modem and its power supply.

The relay is wired into the modem’s DC line through COM and NC — a normally-closed contact — so the modem keeps power even if the relay fails. The NO terminal is left unused.

UPLINK UP — modem powered, relay at rest UPLINK DOWN — the ISP stopped handing out a lease RELAY TRIGGERED — power-cycling the modem OPNsense firewall runs os-vigil USB (control) 12V DC adapter modem PSU USB relay VIGIL COM NC NO modem DC IN PWR uplink modem + line runs through COM → NC · NO unused
Watch the cycle. The uplink drops, the firewall notices the lost lease, and the USB relay cuts the modem’s power for about 30 seconds — then restores it. Wired COM + NC, so the modem stays powered if the relay fails.

Relay board · where it sits

Two relays: one for the modem, one for the router.

The board pings the local gateway and the WAN IP. Gateway up + WAN down → cycle the modem. Gateway down → cycle both. No firewall involved.

ALL UP — modem and router powered WAN DOWN · gateway up — cycle the modem GATEWAY DOWN — cycle both relays network no firewall Ethernet — pings gateway + WAN NET2D 2-channel relay modem PSU 12V DC router PSU 12V DC modem DC IN router DC IN WAN gateway COM NC NO relay 1 relay 2 each relay wires the + line through COM → NC · NO unused
The board pings the local gateway and the WAN IP. Gateway up but WAN down means a modem fault, so relay 1 cycles the modem. Gateway down means the router itself is unreachable, so it cycles both.
01

The uplink goes quiet

Vigil notices the WAN connection has lost its DHCP lease.

02

Try the safe fix first

A DHCP renewal is requested. This alone often restores the link with no outage at all.

03

Check whether it can even help

If the WAN gateway still answers, the fault is upstream and a power cycle cannot help — so Vigil does not cycle.

04

Respect the budget

A rolling 24-hour cap limits how often it can switch, so a fault it cannot fix never becomes a modem rebooting all night.

05

Cycle, then restore

The relay opens briefly to cut the modem, then closes to restore power. On crash, on signal, on service stop, on package removal, on reboot — the contact stays closed and the modem keeps running.

Why it is safe

The wiring fails closed.

The relay is wired COM + NC — normally closed. At rest the contact is closed and the modem is powered; the firewall energizes the relay only to cut power for a power-cycle. If the relay loses power, is unplugged, or crashes, the contact stays closed and the modem keeps running.

That is a property of the wiring, not a software promise.

The trade-off: a failed device cannot power-cycle a hung modem. That is deliberate — a dead watchdog must never take a live site down.

Failure matrix

Every failure keeps the modem on

  • daemon crashcontact closed → modem stays powered
  • service stopcontact closed → modem stays powered
  • package removalcontact closed → modem stays powered
  • firewall rebootcontact closed → modem stays powered
  • USB unpluggedcontact closed → modem stays powered

Honest limits

What Vigil is not.

Not enforcement

An unlicensed device power-cycles modems exactly like a licensed one. A lapsed licence costs updates, nothing else.

OPNsense today, more coming

Vigil supports OPNsense today. The watchdog is not OPNsense-specific, and Windows, Linux, Ubiquiti EdgeOS and OpenWRT are in progress — no dates promised.

No marketing numbers

We will not quote uptime or recovery-rate figures. Nothing has run long enough in production to support a number.

Next step

Put it on the site nobody is at.