Command line tools

Reference for knxproj, knxprobe, knxdownload, knxprogram and knxcap.

Five tools live under cmd/ in the repository and share their code with the application. Build them with go build -o bin/ ./cmd/... (see Build). All of them use Go’s flag package, so -h prints the flags and a flag can be written -name value or -name=value.

ToolPurposeTouches the bus?Changes a device?
knxprojInspect a .knxproj fileNoNo
knxprobeDiscover gateways, listen, and run read-only diagnosticsListens. Some options send read requestsNo
knxdownloadBuild the memory image a device should hold and compare it with the deviceOnly with -verify, read-onlyNo, never
knxprogramLoad a project device into a real deviceYesOnly with -write
knxcapDecode KNXnet/IP tunnelling captures (tshark output)NoNo

Conventions

  • Project passwords are never taken on the command line. Use -pwfile FILE (the file holds the password, line breaks at the end are removed). knxproj also reads the environment variable KNXPROJ_PASSWORD when -pwfile is not given. A project without a password needs neither.
  • Addresses. Individual addresses are written area.line.device (1.1.21). Group addresses are written main/middle/sub (3/0/10); the tools that send a group read also accept the two-level form main/sub.
  • Gateways. -addr (knxprobe), -gateway (knxprogram) and -verify (knxdownload) take a host:port address. -tcp selects tunnelling over TCP instead of UDP.
  • No default gateway. knxprobe and knxprogram refuse to start without -addr or -gateway, except for knxprobe -discover (multicast) and -usb-list.
  • Exit status. 0 on success, 1 for an error, 2 for a usage error.

knxproj

Inspect an ETS 6 project file from the command line.

knxprobe

Discover gateways, listen to the bus, and run read-only diagnostics from the command line.

knxdownload

Build the memory image a device should hold for a project and compare it with the device. Read-only.

knxprogram

Load a project device into a real KNX device. Reads only unless -write is given.

knxcap

Decode KNXnet/IP tunnelling captures made with tshark.