Install on an Advantech UNO¶
The Uno edition runs on an Advantech UNO-220, a Raspberry Pi based device, as a Linux service. Copy one Debian package to the device and install it with apt. The package prepares the device on its first install. Each release carries two packages, one for each kind of Raspberry Pi OS:
| Package | For |
|---|---|
triggergate_<version>_arm64.deb |
Raspberry Pi OS Lite 64-bit. Recommended: this is the package tested on a UNO-220 (a Raspberry Pi 4 Model B) running Raspberry Pi OS Lite 64-bit, Debian 13 "Trixie". |
triggergate_<version>_armhf.deb |
Raspberry Pi OS Lite 32-bit, Bookworm or later. Tested only in containers, not yet on a device. |
During pre-release the packages are supplied on request: get in touch. Choose the one that matches the device: dpkg --print-architecture on the device prints arm64 or armhf.
An apt repository at https://triggergate.gameshow.pro/apt/ is planned but is not available yet, so install the downloaded file as described below. An organization with many devices can wrap the package in its own deployment tooling.
What you need¶
| Item | Requirement |
|---|---|
| Device | An Advantech UNO-220 running Raspberry Pi OS Lite, 64-bit (recommended) or 32-bit, based on Debian 12 "Bookworm" or later (glibc 2.36 or later). Raspberry Pi OS 11 (Bullseye) is too old: both apt and dpkg -i refuse the package before anything on the device is changed, and there is no in-place upgrade from it. Write a new image to such a device instead. |
| Device account | A user with sudo rights, and SSH or console access to the device. Current Raspberry Pi OS no longer gives the first user passwordless sudo by default, so sudo may ask for your password. |
| Network | Your computer must reach the device to copy the package to it. |
Advantech's UNO-220 driver packages are not needed. TriggerGate reads the UNO-220's input expander itself, over I2C bus 1 at address 0x27.
Real-time clock¶
The UNO-220's real-time clock (an RX8010) has no driver in the current Raspberry Pi OS kernel: kernel 6.18 has no rtc-rx8010 module. A device running this operating system therefore keeps time from the network (NTP) only and has no usable battery-backed clock. See Clocks and time.
Prepare the device¶
Write Raspberry Pi OS Lite to the device's storage with Raspberry Pi Imager. Set up a user with sudo rights and SSH or console access. The package enables and tunes I2C on a first install; there is no separate I2C preparation step. If you opt out of automatic setup, run sudo triggergate-setup yourself when ready, then restart the device.
Install¶
-
Get the package for the device's architecture,
triggergate_<version>_arm64.debortriggergate_<version>_armhf.deb, and copy it to the device, for example withscp: -
On the device, install it:
Keep the
./: without it,apt-getlooks for a package of that name in its repositories instead of the file. The examples on this page use the 64-bit package; on a 32-bit system use thearmhffile name. A package for the other architecture is refused.
The package:
- puts the program in
/usr/lib/triggergate, - creates the data folder
/var/lib/GameshowPro/TriggerGate, - installs the systemd service
triggergate.service, which runs asroot, starts after the network is up, restarts 5 seconds after any exit, and reads optional environment variables from/etc/default/triggergate, - starts the service and enables it at boot.
On a first install, including a takeover of an older installation, the package also runs triggergate-setup. It enables I2C in the boot configuration, arranges for i2c-dev to load at boot (and tries to load it immediately), sets the I2C bus to 400 kHz and sets core_freq_min=500 under [all]. The boot configuration is /boot/firmware/config.txt, or /boot/config.txt on older images. Before changing it for the first time, setup saves config.txt.bak-triggergate beside it and never overwrites an existing backup. Repeated setup runs leave settings already in place alone.
Restart the device after installation so the boot settings take effect:
The package and triggergate-setup never restart the device themselves. Until that restart, /dev/i2c-1 may be missing, leaving the service unable to read inputs, or the bus may still run at its old speed. Check with triggergate-setup --check after the restart. The 400 kHz setting affects every device on I2C bus 1; check that any other device on that bus supports it. Holding the core clock at 500 MHz can slightly raise idle power.
Skip or undo device setup¶
To skip automatic setup on a first install, pass the environment variable after sudo:
Alternatively, create /etc/triggergate/no-setup before installation. Either opt-out leaves the device settings alone; installation still checks them and prints a note if something is missing or a restart is pending. The environment variable is recognized when nonempty. These opt-outs do not disable the service. If I2C is off, it cannot read inputs until you run setup and restart.
To undo the boot settings, inspect the saved config.txt.bak-triggergate beside config.txt, then restore it or edit config.txt to remove the changes. The backup may predate other boot configuration edits, so check those before copying it over the current file. Restart for boot changes to take effect. If you want to stop loading i2c-dev at boot, remove /etc/modules-load.d/triggergate-i2c.conf only if setup created it and no other software needs it. Purging the package removes that module-load file but deliberately leaves config.txt and its backup untouched.
Check or apply device setup¶
triggergate-setup is installed at /usr/bin/triggergate-setup. Run a read-only check without sudo:
It prints the boot configuration path; whether I2C is enabled, its configured clock and core_freq_min; whether i2c-dev loads at boot; and, where available, the clock and core settings in effect and whether /dev/i2c-1 exists. Values that cannot be read are shown as unknown. It then prints Everything is in place., or a Missing: list with Run: sudo triggergate-setup (then restart the device), a Not yet in effect: list with Restart the device., or both lists. A configured setting can still be pending until restart.
To apply setup yourself or reapply it after a change:
It prints what it changed, including the backup path when it first changes config.txt, and ends with Restart needed: ... or Nothing to change; no restart needed. The command never restarts the device. triggergate-setup --help prints its usage.
| Exit code | Meaning |
|---|---|
0 |
--check: everything is configured and in effect. Apply: finished without error. Also used by --help. |
1 |
--check: something is missing or a restart is pending. Apply: not run as root. |
2 |
No recognized boot config.txt was found; nothing was checked or changed. |
64 |
Invalid option or too many arguments. |
If setup fails during installation, the package reports the failure and continues installing. Run sudo triggergate-setup later, then restart. On a system without a recognized boot configuration, the package makes no setup change and prints no setup note.
Upgrade¶
Install the newer package the same way:
If the service was running, it restarts once the files are replaced. Settings, logs and the HTTPS identity are kept, and so is /etc/default/triggergate: upgrades never overwrite what you edit there. Only the program folder is replaced, appsettings.json among its files. An upgrade checks device setup and prints a note if settings are missing or a restart is pending; it does not reapply boot settings or restart the device.
From an installation made by the earlier deployment tool¶
Earlier versions were installed to the device by a deployment command, not by a package, with the program in /usr/Fremantle/TriggerGate and the data in /usr/share/Fremantle/TriggerGate. Installing the package over such a device takes over from it: the package stops the service, moves the data to /var/lib/GameshowPro/TriggerGate, removes the old program folder, and starts the new service. If the data folder at the new place already exists, the old data is left where it was and the installation prints a warning.
An existing /etc/default/triggergate is kept. If apt asks whether to keep or replace it, answer to keep your version, or avoid the question:
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::=--force-confold ./triggergate_<version>_arm64.deb
Remove¶
This stops and disables the service and deletes the program. The settings, logs and HTTPS identity stay on the device, and so does /etc/default/triggergate, so a later installation continues where this one stopped. Device boot settings and the i2c-dev module-load file also remain.
To delete those as well:
Purging removes /etc/default/triggergate, the data folder /var/lib/GameshowPro/TriggerGate, the HTTPS identity in /var/lib/gameshowpro/triggergate, and /etc/modules-load.d/triggergate-i2c.conf. It leaves the boot config.txt and config.txt.bak-triggergate alone. Purging cannot be undone, and after it the device creates a new certificate authority, which every browser must trust again. See Open the web page over HTTPS.
Where things are on the device¶
| What | Where |
|---|---|
| Program | /usr/lib/triggergate |
| Settings | /var/lib/GameshowPro/TriggerGate/settings.json |
| Service log | /var/lib/GameshowPro/TriggerGate/logs, one file per UTC day, the last four kept. The service also writes to the system journal. |
| HTTPS certificate authority and keys | /var/lib/gameshowpro/triggergate/tls, readable only by root |
| Optional environment variables | /etc/default/triggergate, for example TriggerGate__HttpsPort=0. Restart the service after changing it. |
/usr/share/GameshowPro/TriggerGate is a link to the data folder. The service looks for its data at that path, and the package keeps the two together. Use /var/lib/GameshowPro/TriggerGate in your own scripts.
| Port | Use |
|---|---|
| 9090 (HTTP) | The hub at /TriggerGate, used by applications, and the certificate page for browsers. |
| 443 (HTTPS) | The web page. |
Service settings¶
The service-wide settings listed in Install on Windows that apply on the UNO are:
Setting under TriggerGate |
Default on the UNO |
|---|---|
ServicePort |
9090 |
WebUiPort |
none |
HttpsPort |
443 |
TlsStorageDirectory |
/var/lib/gameshowpro/triggergate/tls |
CertificatePath, CertificateKeyPath, CertificatePassword |
none |
EdgeHandoffWarnMilliseconds |
5 |
UnoInputRead |
Native |
UnoNativePriority |
50 (in Native mode) |
WindowsDevice, InterruptDiscriminationMicroseconds and FaceoffIdleStates concern Windows hardware and have no effect here. Set the settings as environment variables in /etc/default/triggergate, one per line, with a double underscore in place of the colon, then restart the service:
The file is the package's configuration file: upgrades leave it as it is, whereas they overwrite the files in the program folder, appsettings.json among them. What the HTTPS settings do is in HTTPS settings and your own certificate.
The UNO reads inputs in Native mode by default: a native real-time thread polls the input expander independently of the .NET runtime and hands changes to the service. If that reader cannot load or start, the service logs why and automatically uses SingleTransfer. SingleTransfer uses a managed loop with one I2C transfer per read, with periodic checks that the expander is still pointing at the input register. TwoTransfer writes the register address and reads it in separate transfers on every poll. Combined writes the address and reads it in one combined transaction on every poll. The managed modes are useful when diagnosing native reader availability or comparing read behavior; TwoTransfer and Combined avoid reliance on a persistent register pointer, at the cost of more bus time.
For example, to select the managed single-transfer reader, put this line in /etc/default/triggergate and restart the service:
Set it to Native, TwoTransfer, or Combined to select those modes. To change Native's requested real-time scheduling priority, set TriggerGate__UnoNativePriority=50 with a value from 1 to 99, or 0 for normal scheduling. An invalid priority warns and uses 50; an unknown read mode warns and uses Native. Changing this setting only affects the service's reader, not the device boot setup. See Advantech UNO and Ordering accuracy for the measured behavior and its limits.
Open the web page¶
The web page needs HTTPS from another computer. Open the device's address on port 9090 in a browser: it takes you to the certificate page, where you install TriggerGate's certificate once and continue to the secure address. See Open the web page over HTTPS.
Applications connect to the hub at http://<device>:9090/TriggerGate. The service also advertises its hub over mDNS as _gp-triggergate._tcp.
Check the service¶
Over SSH on the device:
To see which version is installed:
See Read the service log for the format of the log, and Device log to download it from the web page without SSH.
Clock¶
The device's settings dialog on the web page can set its NTP server when the device keeps time with systemd-timesyncd. The UNO-220 has no usable battery-backed clock under Raspberry Pi OS (see above), so the device's time comes from NTP only. See Clocks and time.