Control and automate your ham radio station using an Elgato Stream Deck device.
HamDeck allows you to control and automate your ham radio station using an Elgato Stream Deck device. You can define buttons using a JSON configuration file. HamDeck connects to the local pulseaudio server, to a Hamlib rigctld server, or to ExpertSDR through the TCI protocol. Currently the following actions are implemented as Stream Deck buttons:
vfo_op BAND_UP
).This tool is written in Go on Linux. It might also work on OSX or Windows, but I did not try that out.
Binary data, e.g. icons, are stored in the sub-directories of pkg/bindata
. All files are automatically embedded using the Go embed package (new with Go 1.16) when the hamdeck
binary is compiled.
To build the hamdeck
binary simply run
go build
HamDeck reads a JSON file on startup that must contain the definitions of all buttons. By default it uses the file ~/.config/hamradio/hamdeck.json
. The configuration file is not created automatically, you must create your configuration file manually. See example_conf.json for an example of a configuration file.
With the command line parameter --config=<config_filename.json>
you can define an alternative configuration file. This is handy if you want to have several different setups of your Stream Deck (e.g. one for rag chewing and one for contest operation).
The buttons for Hamlib and TCI are only available if you provide a corresponding host address (and port if it deviates from the standard):
--hamilb
command line parameter to connect to a Hamlib rigctld server (e.g. --hamlib=localhost:4532
).--tci
command line parameter to connect to a ExpertSDR instance through the TCI protocol (e.g. --hamlib=localhost:40001
).You can have both connections open at the same time.
The following describes the steps how to install hamdeck
on an Ubuntu 20.04 LTS (Focal Fossa) to start automatically when you plug-in your the Stream Deck device.
go install github.com/ftl/hamdeck
which hamdeck
The last command will give you the path to the installed binary, which you will need later.
Create /etc/udev/rules.d/99-hamdeck.rules
with the following content:
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", MODE:="666", GROUP="plugdev", SYMLINK="hamdeck", TAG+="systemd", ENV{SYSTEMD_WANTS}="hamdeck.service"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0063", MODE:="666", GROUP="plugdev", SYMLINK="hamdeck", TAG+="systemd", ENV{SYSTEMD_WANTS}="hamdeck.service"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006c", MODE:="666", GROUP="plugdev", SYMLINK="hamdeck", TAG+="systemd", ENV{SYSTEMD_WANTS}="hamdeck.service"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006d", MODE:="666", GROUP="plugdev", SYMLINK="hamdeck", TAG+="systemd", ENV{SYSTEMD_WANTS}="hamdeck.service"
ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="fd9/60/*", TAG+="systemd"
ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="fd9/63/*", TAG+="systemd"
ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="fd9/6c/*", TAG+="systemd"
ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="fd9/6d/*", TAG+="systemd"
(See systemd devices and systemd #7587 for a little bit of background about the UDEV rules.)
hamdeck
Create /etc/systemd/system/hamdeck.service
with the following content:
[Unit]
Description=HamDeck
After=syslog.target dev-streamdeck.device
BindsTo=dev-hamdeck.device
[Service]
ExecStart=<hamdeck binary, see above> --syslog --config=<your config file>
Under https://github.com/ftl/hamdeck/releases/latest you find the latest release of HamDeck als DEB package. This can be used to install HamDeck on distributions that are based on Debian (e.g. Ubuntu). The package installs the following files:
/usr/bin/hamdeck
- the executable binary/lib/systemd/system/hamdeck.service
- the systemd service definition/lib/udev/99-hamdeck.rules
- the udev rules/usr/share/hamdeck/example_conf.json
- an example configuration that is used by the systemd service by defaultAfter installing the package, you should adapt /lib/system/system/hamdeck.service
and /usr/share/hamdeck/example_conf.json
according to your needs.
This tool is published under the MIT License.
This repository and also the binary contains images from https://material.io, which are licensed under the Apache license version 2.0.
This repository and also the binary contains the DejaVuSans font version 2.37 from https://dejavu-fonts.github.io/, which is licensed under a free license.
Copyright Florian Thienel