or run it in a separate stack…
create and enter a directory for it, like ~/rotator
copy to file docker-compose.yml
:
services:
rotctld:
image: librespace/hamlib:4.0
user: '999'
read_only: true
environment:
MODEL: "202"
SERIAL_SPEED: "9600"
SET_CONF: "min_az=0,max_az=360,min_el=0,max_el=90"
ROT_FILE: "/dev/rotator"
ports:
- '4533:4533'
device_cgroup_rules:
- 'c 188:* rwm'
devices:
- '/dev/ttyACM0:/dev/rotator'
restart: 'unless-stopped'
command: 'rotctld'
stop_grace_period: 1s
you need to change the line with the device mapping to /dev/rotator
, but only on the left side of the colon.
the format is <source>:<target>
and only change source.
you can change the MODEL, SERIAL_SPEED and SET_CONF as you like, the ROT_FILE should not be touched.
bring it up with docker compose up -d
and down with docker compose down
when you don’t need it.
check the logs with docker compose logs -f
and query it with docker compose exec -it rotctld rotctl -m 2
like enter the p
command:
Rotator command: p
Azimuth: 179.00
Elevation: 147.00
edit: depending on compose version, you might need to change docker compose
to docker-compose