The hard-coded emitters each speak one published format at one fixed moment.
This is the escape hatch, and it exists mainly for antenna switches: they are
driven by a URL, and the band change is the trigger they want.
Four triggers, each carrying its own field set: band change (the RADIO's band,
not the entry form — a switch follows the rig, not what is being typed), QSO
logged, rotator command and callsign lookup. The panel prints the fields the
selected trigger can fill, which is the point of the whole thing: a placeholder
the trigger does not carry renders as nothing, and without the list an operator
writes {freq} on a band change and has no way to learn why the switch never
moved.
Three things the panel cannot show, handled here:
- Escaping. A URL needs every value percent-encoded; a UDP payload must not
be touched. The first portable callsign, F4BPO/P, puts a path separator in
the middle of a query string otherwise — it works on the bench and fails on
the air.
- Blocking. An HTTP call to a switch that is unplugged would otherwise sit
for the operating system's timeout, on the path of a band change. It runs
in the background with a 3 s limit.
- Silence. A switch answering 404 after a firmware update fails exactly like
success looks from here, so the status code is logged, throttled per row.
The rotator trigger hooks the COMMAND rather than the SP/LP buttons, so the
compass and a spot click fire it too, and the path ("SP"/"LP") is passed
through because an azimuth alone cannot say which was taken — 137° is short
path to one station and long to another.
Credentials in a URL are stored as typed. That is the operator's call, on the
grounds that this is LAN gear, and the hint in the panel says so.
18 lines
1018 B
SQL
18 lines
1018 B
SQL
-- Custom outbound messages: a trigger, a template, and a transport.
|
|
--
|
|
-- Until now an outbound row was one of a handful of hard-coded emitters, each
|
|
-- with its own format and its own moment. This adds the general case: pick what
|
|
-- fires it, write what it says, and choose whether it leaves as a UDP datagram
|
|
-- or an HTTP request.
|
|
--
|
|
-- The HTTP half is what makes it useful for antenna switches — most of them are
|
|
-- driven by a URL like http://192.168.1.50/antenna?band=20m — and the band
|
|
-- change is the trigger they want, being rare by nature.
|
|
--
|
|
-- Empty on every existing row, which is what the hard-coded services expect.
|
|
ALTER TABLE integrations_udp ADD COLUMN trig TEXT NOT NULL DEFAULT '';
|
|
ALTER TABLE integrations_udp ADD COLUMN template TEXT NOT NULL DEFAULT '';
|
|
ALTER TABLE integrations_udp ADD COLUMN transport TEXT NOT NULL DEFAULT '';
|
|
ALTER TABLE integrations_udp ADD COLUMN url TEXT NOT NULL DEFAULT '';
|
|
ALTER TABLE integrations_udp ADD COLUMN line_end TEXT NOT NULL DEFAULT '';
|