# Amplifiers and Switches

## Amplifiers

Settings → **Amplifier** is a **list**: configure several amps (e.g. two SPEs
run in parallel), each with its own name and connection. Brands:

- **SPE Expert** (1.3K / 1.5K / 2K) — USB serial or an RS232-to-Ethernet
  bridge. OPERATE/STANDBY, ON/OFF, Low/Mid/High power level, live status.
  Switching the amplifier **on and off** uses the remote-on control lines, so
  it needs the **USB (or RS-232) connection**, not a network bridge — the ON
  button works even while the amplifier is off and reporting nothing.
- **ACOM** (500S / 600S / 700S / 1200S / 2020S) — serial or bridge.
  OPERATE/STANDBY/OFF, live power / SWR / PA temperature / band / fan.
  Power-ON works over serial when the cable wires the DTR/RTS pins.
- **PowerGenius XL** (4O3A) — direct TCP. Operate/Standby, fault display, and a
  **fan-mode** selector (Standard / Contest / Broadcast).

Where the controls appear:

- An **amplifier card** in the FlexRadio panel and in **Station Control**:
  OPERATE/STANDBY, ON/OFF, power level, output-power bar and live FWD /
  drain-current / temperature meters. Several amps → one card each.
- A **status chip per amp** in the bottom bar: green ON AIR = OPERATE, orange =
  STANDBY, red = offline. Clicking it toggles OPERATE/STANDBY.
- A **docked widget** (flame icon, next to the keyers): Operate, power ON/OFF,
  the SPE power level and live watts / SWR / temperature, in the narrow column
  format of the Tuner Genius widget. With several amplifiers configured, a
  dropdown on the icon picks which one it shows — or **All**.

### Band-follow (amp on a second COM port)

An ACOM or SPE that normally polls the radio for its frequency can follow
OpsLog instead: OpsLog answers the amp's polls **as a Kenwood rig** on a second
COM port (Settings → Amplifier → frequency port). Useful when the real radio's
CAT port is already taken by OpsLog itself.

## Tuner Genius XL (4O3A)

Settings → Tuner Genius (IP only; port fixed at 9010). Live **SWR and forward
power** with peak-hold, **Tune / Bypass / Operate-Standby**, and the two
channels A/B (source, frequency, antenna) shown and click-selectable. Available
as a docked widget, a card in the FlexRadio panel and a card in Station
Control. Direct TCP — uses one of the box's connection slots.

## Antenna Genius (4O3A) antenna switch

Over TCP / GSCP — a docked **A/B antenna-switch** widget:

- One row per configured antenna, with a **Port A** and **Port B** button.
- Colours: green = selected on port A, blue = selected on port B, red (pulsing) =
  that port is transmitting. Clicking a selected port deselects it (→ None).
- **Band filter** (funnel icon): shows only the antennas configured for the
  current band. Antennas with an unknown band mask are always shown.

Configure the host / password in Settings → Antenna Genius.

---

## Relay boards (Station Control)

Relay boards for antenna/accessory switching, with named buttons in Station
Control:

- **WebSwitch 1216H** (5 relays, LAN) and **KMTronic** 8-relay WEB (LAN, with
  optional HTTP authentication).
- **Dingtian IOT relay** (2 to 32 relays, LAN or WiFi), driven over its HTTP
  CGI. Give its IP address and pick the relay count; the **relay password** and
  **session ID** fields are only needed if you enabled them on the board's own
  web page — a factory board needs neither.
- **Denkovi** USB (4/8 relays, FT245) and generic **CH340 / LCUS** USB-serial
  boards.
- **HTTP relay (home-made / generic)** — see below.

### HTTP relay (home-made / generic)

For any box that switches on a plain HTTP GET: an ESP8266 with a web page, a
Shelly, a Sonoff on third-party firmware, a qro.cz board, a home-brew switch.
Pick the relay count, name the relays, and give the addresses.

There is **no Host field and no connection test**. This device type has no
address of its own — each relay carries its own full URL, and they need not
even be on the same box. Nothing is read back either: OpsLog remembers what it
commanded, so after a restart each managed relay is re-commanded once.

**Two ways to give the addresses**, and you can mix them.

**A — one URL per relay.** The reason this type exists: a hand-made switch
often has addresses with nothing in common between channels.

| Relay | ON URL | OFF URL |
|---|---|---|
| 1 | `http://192.168.1.9/FF0101` | `http://192.168.1.9/FF0100` |
| 2 | `http://192.168.1.9/relay2/on` | `http://192.168.1.9/relay2/off` |

**B — one pattern for the whole board**, with the relay number filled in:

```
ON  pattern:  http://192.168.1.9/relay?n={relay}&state=on
OFF pattern:  http://192.168.1.9/relay?n={relay}&state=off
```

#### Substitutions

| In a URL or a pattern | Becomes |
|---|---|
| `{relay}` | the relay number, 1-based |
| `{relay-1}` | the relay number counting **from zero** — for boards whose channels are 0, 1, 2… |
| `{value}` | **that relay's label**, from the *Relay labels* row below |

`http` may be left off — it is assumed. `https` works and is used as typed.

`{value}` is for a switch addressed by antenna name rather than by channel
number. Name relay 1 **Ant1**, and:

```
Per-relay ON URL for relay 1:   http://10.10.10.100/relay?on={value}
Sent:                           http://10.10.10.100/relay?on=Ant1
```

Rename the antenna and the address follows it — the name on the button and the
name on the wire cannot drift apart, because they are the same text. A label
with a space or an accent is percent-encoded automatically. A relay whose URL
uses `{value}` **must have a label**; the editor warns you while you type.

A per-relay URL always wins over the pattern, so you can write a pattern for
the seven ordinary channels and one full URL for the odd one out.

### Manual switching

Every relay is a button in **Station Control** — click to toggle. The generic
HTTP board is never greyed out (there is no connection to wait for); the other
types are enabled once the board answers.

---

## Relay automatic control

Settings → **Relay automatic control** turns relays by frequency or band, the
equivalent of PstRotator's automatic control. Each relay of each configured
board gets a rule:

| Mode | Meaning |
|---|---|
| **Off** | OpsLog never touches this relay. |
| **Band** | ON while the current band is one of the bands you tick. |
| **Frequency** | ON while the frequency is inside a kHz range you type. |

Example — a three-way antenna switch on a KMTronic board:

| Relay | Label | Mode | Setting |
|---|---|---|---|
| 1 | Beam 20-10 | Band | 20m, 17m, 15m, 12m, 10m |
| 2 | 40 m dipole | Band | 40m |
| 3 | 80 m inverted-V | Band | 80m, 160m |
| 4 | 6 m preamp | Frequency | 50000 – 54000 kHz |

Rules to know:

- A relay is only switched when it is **not already** in the wanted position.
  On the first evaluation after launch OpsLog reads the boards' live state, so
  a relay already correct is left alone rather than clunking.
- An **unknown** frequency or band changes nothing. When CAT disconnects the
  frequency reads zero, and treating that as "out of range" would switch every
  relay off.
- The rules follow **your radio**. Changing band in the QSO entry strip drives
  the rig, the rig reports back, and the relays follow. **Without a CAT
  connection** the Band selector itself is the band change, and the relays
  follow that instead — unless the band or frequency 🔒 is on, which means the
  entry is deliberately decoupled from the rig (logging an old contact) and no
  hardware should move.

For a switch driven by a URL or a UDP message rather than by a relay board, see
[[Connections]].

---

## Bench power supply

Settings → **Power supply**. A programmable supply on a serial port speaking
**Modbus RTU** — BSIDE, Wanptek and the other supplies that use function codes
03 and 06.

Give the COM port. The other two fields are the factory settings and only need
changing if you changed them on the supply: **9600 baud**, **Modbus address 1**
(8 data bits, no parity, 1 stop bit).

A card appears in **Station Control**: an **Output** on/off button, the measured
volts / amps / watts, and — in small type — the voltage and current the supply
is *set* to. That pairing is the useful part: `13.80 V set` beside `0.020 A`
says at a glance that the supply is on and the radio is drawing nothing.

> **OpsLog only ever writes the output on/off.** The supply's register map also
> exposes the voltage and current set points and the three protection trip
> levels, and none of them belong to a logbook — a wrong value there is 30 V
> where a radio expected 13.8. They are read and displayed, never changed.
> Set them on the supply's own front panel.

If the protection has tripped, the card says so with the supply's status word.

---

## Station Control

The Station Control tab is a dashboard of fixed-width panels that wrap to fill
the window — amplifier(s), tuner, relays, rotator, power supply, Ultrabeam…
Drag a panel by the grip on its left edge to reorder; the order is remembered.
A column-count selector (Auto / 1–6) caps how many sit side by side.
