Help us shape the future of Go! Take the 2026 Go Developer Survey

knx

package module
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 9 Imported by: 0

README

go-knx

Go Version Go Reference CI Status Interop Code Coverage Latest Release

A native Go implementation of KNX over KNXnet/IP: frames, cEMI, datapoint types, discovery, a tunnelling client, routing, group communication and a KNXnet/IP server with virtual devices. Pure Go, no cgo, no dependencies; it runs on embedded Linux (ARM, ARM64) as well as servers, macOS and Windows.

go-knx is part of OT Fabric. Its command-line tool is knxctl; its interoperability tests against independent stacks live in knx-interop.

KNX is a registered trademark of KNX Association cvba. go-knx is an independent implementation, not affiliated with or endorsed by KNX Association, and not KNX certified (CONFORMANCE).

Features

Area Status
Individual and group addresses (3-level, 2-level, free), strict and reversible parsing ✅
KNXnet/IP frames: header, HPAI, DIB (all standard types), CRI/CRD, core, device management, tunnelling, routing and secure service bodies ✅ encode/decode, fuzzed
cEMI: L_Data.req/.ind/.con, L_Busmon, L_Raw, M_PropRead/Write/Info, M_FuncProp*, M_Reset; additional info; standard and extended frames ✅
TPCI and APCI (all application services named; group values with small values) ✅
Datapoint types: 1–14, 16–22, 26, 29, 232, 242, 251 (209 subtypes), ranges, units, text format/parse ✅
Discovery: multicast and directed search, extended search with parameters, description ✅
Tunnelling client over UDP (sequence handling, ACK and retransmission, L_Data.con, heartbeat, NAT, reconnect) and TCP (tunnelling v2), tunnelling v2 address request and feature services ✅
Device management client (devmgmt: M_PropRead/M_PropWrite of interface object properties) ✅
Remote device management over the KNX network (mgmt, client.Device: A_PropertyValue_Read/_Write, A_PropertyDescription_Read, A_DeviceDescriptor_Read; connectionless and in transport connections; the server's own device answers them) ✅
Busmonitor tunnelling (L_Busmon.ind; TP1 frame encode/decode with check octet) ✅
Routing: indications, ROUTING_BUSY flow control, rate limit, echo suppression ✅
Group communication: write, read (first or all responses), respond, subscriptions, callbacks ✅
KNXnet/IP server: discovery, description, tunnelling over UDP and TCP (multiple clients, channel limits, feature services), busmonitor, device management (device, router and KNXnet/IP parameter objects), routing, virtual group objects with flags ✅
KNX IP Secure: secure tunnelling sessions (client and server, over TCP and UDP), secure routing with timer synchronisation in the client and the server (secure, tunnel.WithSecure, server.WithSecure, routing.WithSecure, server.WithSecureRouting) ✅ from public sources, verified against xknx and Calimero (why not "conformant")
KNX Data Secure for group communication (S-A_Data, security tables, S-A_Sync, the surrogate role for tools such as Calimero; datasecure, client.WithDataSecure) ✅ same sources
KNX Data Secure point to point with tool access: secured remote device management with a device's tool key, as tool (client.WithToolKey) and as device (server.WithToolKey) ✅ same sources, verified with Calimero tools; device-to-device link keys and secure commissioning (FDSK) not implemented
ETS keyrings (.knxkeys): verify, decrypt, write test keyrings (keyring) ✅
KNX TP/RF media, ETS project import, KNX IoT ❌ out of scope

Interoperability, verified both ways against Calimero 3.0-M1, knxd 0.14.73, xknx 4.0.0 and KNXUltimate 6.3.1: INTEROPERABILITY.md.

Install

go get github.com/otfabric/go-knx

Go 1.23 or later.

Quick start

Group communication through a KNXnet/IP interface
c, err := client.DialTunnel(ctx, "192.168.1.10", nil)
if err != nil {
	return err
}
defer c.Close()

// Switch on (DPT 1.001).
err = c.GroupWrite(ctx, knx.MustParseGroupAddress("1/2/3"), true)

// Write a temperature (DPT 9.001).
err = c.GroupWrite(ctx, knx.MustParseGroupAddress("1/2/4"), 21.5, client.WithDPT("9.001"))

// Read a value: no response is guaranteed, the read times out (knx.ErrTimeout).
r, err := c.GroupRead(ctx, knx.MustParseGroupAddress("1/2/5"), client.WithDPT("9.001"))
fmt.Println(r.Source, r.Decoded)

// Watch group telegrams.
sub := c.Subscribe(64, knx.MustParseGroupAddress("1/2/3"))
for t := range sub.C() {
	fmt.Println(t.Source, t.Group, t.Service, t.Value.Data)
}

Behind NAT (Docker port mappings) use tunnel.WithNAT(true); to reconnect after a lost connection tunnel.WithReconnect(time.Second, 30*time.Second).

Routing
c, err := client.ListenRouting(ctx, []routing.Option{routing.WithInterface("eth0")},
	client.WithSource(knx.MustParseIndividualAddress("1.1.250")))
Discovery
servers, err := discovery.Search(ctx, discovery.WithTimeout(3*time.Second))
for _, s := range servers {
	d := s.Device()
	fmt.Println(s.Endpoint(), d.Name, d.Address)
}
dibs, err := discovery.Describe(ctx, "192.168.1.10")
A KNXnet/IP server with virtual devices
s, _ := server.New(server.WithName("simulator"),
	server.WithTunnelAddresses(knx.MustParseIndividualAddress("1.1.10"), knx.MustParseIndividualAddress("1.1.11")))
dev := device.New("living room", knx.MustParseIndividualAddress("1.1.1"))
light, _ := device.NewGroupObject("light", "1.001", "CRWU", "1/2/3")
temp, _ := device.NewGroupObject("temperature", "9.001", "CRT", "1/2/4")
_ = temp.Set(21.5)
dev.Add(light, temp)
s.AddDevice(dev)
err := s.Serve(ctx) // until ctx is done

KNXnet/IP clients (ETS-style tools, Home Assistant through xknx, Calimero, knxd) connect to it as to an IP interface; the virtual devices store written values and answer reads according to their flags. It is a KNXnet/IP server with an application-level device model, not an emulation of a KNX TP line.

Datapoint types
t := dpt.MustLookup("9.001")
b, _ := t.Encode(21.5)    // 0C 33
v, _ := t.Decode(b)       // 21.5
fmt.Println(t.Format(v))  // 21.5 °C

More in examples/ and the package documentation.

Packages

Package Purpose
knx Addresses, priorities, errors, Logger, Metrics, State
knxnetip KNXnet/IP frames
cemi cEMI frames
apdu TPCI and APCI
dpt Datapoint types
discovery Search and description
tunnel Tunnelling client (UDP, TCP, busmonitor, feature services)
devmgmt Device management client (interface object properties)
mgmt Remote device management services, device side responder
routing Routing
client Group communication over a tunnel or routing
server KNXnet/IP server
device Virtual devices and group objects

Design: ARCHITECTURE.md. Errors: ERRORS.md. Observability: OBSERVABILITY.md. Tests: TESTING.md. Limitations: LIMITATIONS.md.

Security

KNXnet/IP without KNX IP Secure has no authentication and no encryption: anyone on the network can read and send telegrams. Isolate KNX IP networks, and use KNX IP Secure and Data Secure where the installation supports them. See SECURITY.md for the threat model and what go-knx's KNX Secure covers.

Standards and licensing

What is implemented from which part of the standard: docs/standards/SPECIFICATIONS.md. Specification access and licensing: docs/standards/LICENSING.md. Status and roadmap: docs/IMPLEMENTATION-STATUS.md.

License

MIT, see LICENSE.

Documentation

Overview

Package knx holds the types shared by every part of go-knx: individual and group addresses, telegram priorities, the sentinel errors, the logging and metrics interfaces and the connection state.

The protocol is layered over the subpackages:

  • knxnetip: KNXnet/IP frames (header, HPAI, DIB, CRI/CRD and every core, tunnelling, routing, device management and secure service),
  • cemi: the common External Message Interface (L_Data, M_Prop*),
  • apdu: the transport and application layer of a telegram (TPCI, APCI),
  • dpt: datapoint types (encoders, decoders, registry),
  • discovery: KNXnet/IP search and description,
  • tunnel: the KNXnet/IP tunnelling client,
  • routing: KNXnet/IP routing over IP multicast,
  • client: group communication (read, write, response, subscriptions) over a tunnel or routing link,
  • server: a KNXnet/IP server (discovery, description, tunnelling, routing) with virtual group objects.

KNX is the building automation standard of the KNX Association (ISO/IEC 14543-3). go-knx is an independent implementation; it is not certified by the KNX Association.

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidAddress reports an individual or group address that is out
	// of range or not in one of the accepted presentations.
	ErrInvalidAddress = errors.New("knx: invalid address")

	// ErrMalformed reports a frame that cannot be decoded: too short, a
	// length field that disagrees with the data, a structure of the wrong
	// size or type. Decoders never panic on malformed input.
	ErrMalformed = errors.New("knx: malformed frame")

	// ErrUnsupported reports a service, connection type, frame or
	// datapoint type that is not implemented, or that the peer does not
	// support.
	ErrUnsupported = errors.New("knx: unsupported")

	// ErrInvalidOption reports an option or argument a function cannot be
	// called with.
	ErrInvalidOption = errors.New("knx: invalid option")

	// ErrInvalidValue reports a datapoint value outside the range of its
	// type, or data of the wrong size for it.
	ErrInvalidValue = errors.New("knx: invalid value")

	// ErrClosed reports an operation on a connection, client or server
	// that was closed.
	ErrClosed = errors.New("knx: closed")

	// ErrTimeout reports a request that the peer did not answer in time.
	ErrTimeout = errors.New("knx: timeout")

	// ErrConnectionLost reports that the peer ended the connection or
	// stopped answering heartbeats.
	ErrConnectionLost = errors.New("knx: connection lost")

	// ErrRejected reports a request the peer refused with a KNXnet/IP
	// status code; a *knxnetip.StatusError carries it.
	ErrRejected = errors.New("knx: rejected")

	// ErrBusy reports that a limit was reached: a full queue, no free
	// tunnelling channel, a routing busy indication.
	ErrBusy = errors.New("knx: busy")

	// ErrNotConfirmed reports a tunnelled telegram whose L_Data.con
	// reported an error, or did not arrive.
	ErrNotConfirmed = errors.New("knx: not confirmed")

	// ErrSecurity reports a KNX IP Secure or KNX Data Secure failure: an
	// authentication tag that does not verify, a replayed sequence number,
	// a missing key. Secure connections never fall back to plain ones.
	ErrSecurity = errors.New("knx: security failure")
)

Sentinel errors shared by every package. They are usually wrapped with detail; test with errors.Is.

Functions

func ParseGroupAddressWithFormat

func ParseGroupAddressWithFormat(s string) (GroupAddress, GroupAddressFormat, error)

ParseGroupAddressWithFormat is ParseGroupAddress that also returns the presentation s was written in, so that g.Format(f) == s.

Types

type ContextLogger

type ContextLogger interface {
	Logger

	DebugContext(ctx context.Context, msg string, keysAndValues ...any)
	InfoContext(ctx context.Context, msg string, keysAndValues ...any)
	WarnContext(ctx context.Context, msg string, keysAndValues ...any)
	ErrorContext(ctx context.Context, msg string, keysAndValues ...any)
}

ContextLogger extends Logger with context-aware structured logging, so that a handler can pick trace and span identifiers out of the context. When the Logger also implements ContextLogger, entries that belong to a request are logged with the context the request was called with.

type FieldLogger

type FieldLogger interface {
	Logger

	// With returns a logger that adds the given fields to every entry.
	With(keysAndValues ...any) FieldLogger

	DebugKV(msg string, keysAndValues ...any)
	InfoKV(msg string, keysAndValues ...any)
	WarnKV(msg string, keysAndValues ...any)
	ErrorKV(msg string, keysAndValues ...any)
}

FieldLogger extends Logger with structured key-value logging. When the Logger given to a client or server also implements FieldLogger, the library logs through it: every entry is a constant message plus fields such as "component", "remote", "session", "connection" and "error", instead of one formatted string. NewSlogLogger returns such a logger.

keysAndValues alternate string keys and values, as in log/slog.

func NewSlogFieldLogger

func NewSlogFieldLogger(h slog.Handler) FieldLogger

NewSlogFieldLogger is NewSlogLogger with the result typed as a FieldLogger, for callers that want to add fields with With before handing the logger to a client or server. A nil handler returns a no-op logger.

type GroupAddress

type GroupAddress uint16

GroupAddress is a 16-bit KNX group address. Its presentation (three levels, two levels or free) is a convention of the installation; the address on the wire is always the same 16 bits.

func MustParseGroupAddress

func MustParseGroupAddress(s string) GroupAddress

MustParseGroupAddress is ParseGroupAddress that panics on error, for constants in programs and tests.

func NewGroupAddress2

func NewGroupAddress2(main uint8, sub uint16) (GroupAddress, error)

NewGroupAddress2 returns main/sub. main must be 0..31, sub 0..2047.

func NewGroupAddress3

func NewGroupAddress3(main, middle, sub uint8) (GroupAddress, error)

NewGroupAddress3 returns main/middle/sub. main must be 0..31, middle 0..7.

func ParseGroupAddress

func ParseGroupAddress(s string) (GroupAddress, error)

ParseGroupAddress parses a group address in any presentation: three parts ("1/2/3") are main/middle/sub, two parts ("1/515") main/sub, one part ("2563") the free 16-bit number. Fields are decimal without sign, leading zeros or spaces; out-of-range fields are errors.

Example
package main

import (
	"fmt"

	"github.com/otfabric/go-knx"
)

func main() {
	for _, s := range []string{"1/2/3", "1/515", "2563"} {
		g, err := knx.ParseGroupAddress(s)
		if err != nil {
			panic(err)
		}
		fmt.Println(s, "=", g, g.Format(knx.GroupTwoLevel), g.Format(knx.GroupFree))
	}
	_, err := knx.ParseGroupAddress("32/0/0")
	fmt.Println(err)
}
Output:
1/2/3 = 1/2/3 1/515 2563
1/515 = 1/2/3 1/515 2563
2563 = 1/2/3 1/515 2563
knx: invalid address: group address "32/0/0": main is 0..31, middle 0..7, sub 0..255

func (GroupAddress) Format

Format returns the address in presentation f.

func (GroupAddress) Main

func (g GroupAddress) Main() uint8

Main returns the main group (0..31) of both level presentations.

func (GroupAddress) MarshalText

func (g GroupAddress) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler (three levels).

func (GroupAddress) Middle

func (g GroupAddress) Middle() uint8

Middle returns the middle group (0..7) of the three-level presentation.

func (GroupAddress) String

func (g GroupAddress) String() string

String returns the three-level presentation main/middle/sub.

func (GroupAddress) Sub

func (g GroupAddress) Sub() uint8

Sub returns the sub group of the three-level presentation (0..255).

func (GroupAddress) Sub2

func (g GroupAddress) Sub2() uint16

Sub2 returns the sub group of the two-level presentation (0..2047).

func (GroupAddress) Uint16

func (g GroupAddress) Uint16() uint16

Uint16 returns the address as sent on the wire.

func (*GroupAddress) UnmarshalText

func (g *GroupAddress) UnmarshalText(b []byte) error

UnmarshalText implements encoding.TextUnmarshaler (any presentation).

type GroupAddressFormat

type GroupAddressFormat int

GroupAddressFormat selects the presentation of a GroupAddress.

const (
	// GroupThreeLevel is main/middle/sub: main 0..31 (5 bits), middle 0..7
	// (3 bits), sub 0..255 (8 bits), for example 1/2/3.
	GroupThreeLevel GroupAddressFormat = iota
	// GroupTwoLevel is main/sub: main 0..31 (5 bits), sub 0..2047
	// (11 bits), for example 1/515.
	GroupTwoLevel
	// GroupFree is the address as one decimal number 0..65535.
	GroupFree
)

Group address presentations.

func ParseGroupAddressFormat

func ParseGroupAddressFormat(s string) (GroupAddressFormat, error)

ParseGroupAddressFormat parses "3-level" ("3", "three"), "2-level" ("2", "two") or "free".

func (GroupAddressFormat) String

func (f GroupAddressFormat) String() string

String names the format: "3-level", "2-level" or "free".

type IndividualAddress

type IndividualAddress uint16

IndividualAddress is the 16-bit address of a KNX device: area (4 bits), line (4 bits) and device (8 bits), written "area.line.device", for example 1.1.10.

func MustParseIndividualAddress

func MustParseIndividualAddress(s string) IndividualAddress

MustParseIndividualAddress is ParseIndividualAddress that panics on error, for constants in programs and tests.

func NewIndividualAddress

func NewIndividualAddress(area, line, device uint8) (IndividualAddress, error)

NewIndividualAddress returns the address area.line.device. area and line must be 0..15.

func ParseIndividualAddress

func ParseIndividualAddress(s string) (IndividualAddress, error)

ParseIndividualAddress parses "area.line.device" (decimal, no sign, no leading zeros, no spaces). The result formats back to s exactly.

Example
package main

import (
	"fmt"

	"github.com/otfabric/go-knx"
)

func main() {
	a, err := knx.ParseIndividualAddress("1.1.10")
	if err != nil {
		panic(err)
	}
	fmt.Println(a.Area(), a.Line(), a.Device())
	fmt.Printf("0x%04X\n", a.Uint16())
}
Output:
1 1 10
0x110A

func (IndividualAddress) Area

func (a IndividualAddress) Area() uint8

Area returns the area (0..15).

func (IndividualAddress) Device

func (a IndividualAddress) Device() uint8

Device returns the device (0..255).

func (IndividualAddress) Line

func (a IndividualAddress) Line() uint8

Line returns the line (0..15).

func (IndividualAddress) MarshalText

func (a IndividualAddress) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (IndividualAddress) String

func (a IndividualAddress) String() string

String returns "area.line.device".

func (IndividualAddress) Uint16

func (a IndividualAddress) Uint16() uint16

Uint16 returns the address as sent on the wire.

func (*IndividualAddress) UnmarshalText

func (a *IndividualAddress) UnmarshalText(b []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type Logger

type Logger interface {
	Debugf(format string, args ...any)
	Infof(format string, args ...any)
	Warnf(format string, args ...any)
	Errorf(format string, args ...any)
}

Logger is the logging interface accepted by the client and the server. Implement it to integrate any logging library.

Logging is silent by default. Methods are invoked synchronously on the protocol path and must not block.

func NewSlogLogger

func NewSlogLogger(h slog.Handler) Logger

NewSlogLogger wraps a slog.Handler. The result implements FieldLogger and ContextLogger, so the library logs structured fields through it; messages are only built when the handler is enabled for their level. A nil handler returns a no-op logger.

func NewStdLogger

func NewStdLogger(l *log.Logger) Logger

NewStdLogger wraps a standard library logger. Each message is prefixed with its level. A nil l logs to os.Stderr with the standard flags.

func NopLogger

func NopLogger() Logger

NopLogger returns a Logger that discards everything.

type Metrics

type Metrics interface {
	// OnConnect is called when a tunnelling connection was established
	// (client) or accepted (server) on channel.
	OnConnect(remote net.Addr, channel uint8)

	// OnDisconnect is called when a tunnelling connection ended. err is
	// nil when the application closed it.
	OnDisconnect(remote net.Addr, channel uint8, err error)

	// OnFrameSent is called after a KNXnet/IP frame was written. service is
	// its service type identifier, size its length on the wire.
	OnFrameSent(remote net.Addr, service uint16, size int)

	// OnFrameReceived is called for every KNXnet/IP frame read.
	OnFrameReceived(remote net.Addr, service uint16, size int)

	// OnDecodeError is called when a frame could not be decoded and was
	// dropped.
	OnDecodeError(remote net.Addr, err error)

	// OnRetransmit is called when a tunnelling request is repeated because
	// its acknowledgement did not arrive in time.
	OnRetransmit(remote net.Addr, channel uint8)

	// OnDropped is called when an inbound telegram is dropped: a full
	// queue, a duplicate, a sequence number out of order, a routing rate
	// limit. reason is a short constant string.
	OnDropped(remote net.Addr, reason string)
}

Metrics is an optional callback interface for observing connections and traffic of a tunnel, a routing link, a client or a server. A nil Metrics disables collection.

The methods are called synchronously on the protocol path, possibly from several goroutines at once; implementations must be safe for concurrent use and must not block (increment a counter, send on a buffered channel).

Embed NopMetrics to implement only the callbacks you need and to stay compatible when methods are added.

type NopMetrics

type NopMetrics struct{}

NopMetrics is a Metrics that does nothing. Embed it in your own type.

func (NopMetrics) OnConnect

func (NopMetrics) OnConnect(net.Addr, uint8)

OnConnect does nothing.

func (NopMetrics) OnDecodeError

func (NopMetrics) OnDecodeError(net.Addr, error)

OnDecodeError does nothing.

func (NopMetrics) OnDisconnect

func (NopMetrics) OnDisconnect(net.Addr, uint8, error)

OnDisconnect does nothing.

func (NopMetrics) OnDropped

func (NopMetrics) OnDropped(net.Addr, string)

OnDropped does nothing.

func (NopMetrics) OnFrameReceived

func (NopMetrics) OnFrameReceived(net.Addr, uint16, int)

OnFrameReceived does nothing.

func (NopMetrics) OnFrameSent

func (NopMetrics) OnFrameSent(net.Addr, uint16, int)

OnFrameSent does nothing.

func (NopMetrics) OnRetransmit

func (NopMetrics) OnRetransmit(net.Addr, uint8)

OnRetransmit does nothing.

type Priority

type Priority uint8

Priority is the priority of a telegram (2 bits of the control field).

const (
	PrioritySystem Priority = 0
	PriorityNormal Priority = 1
	PriorityUrgent Priority = 2
	PriorityLow    Priority = 3
)

Priorities, as encoded on the wire.

func ParsePriority

func ParsePriority(s string) (Priority, error)

ParsePriority parses "system", "normal", "urgent" or "low".

func (Priority) String

func (p Priority) String() string

String names the priority.

type State

type State int

State is the state of a connection.

const (
	StateDisconnected State = iota
	StateConnecting
	StateConnected
	StateReconnecting
	StateClosed
)

Connection states.

func (State) String

func (s State) String() string

String names the state.

Directories

Path Synopsis
Package apdu decodes and encodes the transport layer control information (TPCI) and the application layer protocol data unit (APCI and data) carried in the TPDU of an L_Data frame.
Package apdu decodes and encodes the transport layer control information (TPCI) and the application layer protocol data unit (APCI and data) carried in the TPDU of an L_Data frame.
Package cemi encodes and decodes frames of the common External Message Interface (cEMI): the data link layer messages (L_Data, L_Busmon, L_Raw) that KNXnet/IP tunnelling and routing carry, and the local device management messages (M_PropRead, M_PropWrite, M_Reset, function properties) of KNXnet/IP device management.
Package cemi encodes and decodes frames of the common External Message Interface (cEMI): the data link layer messages (L_Data, L_Busmon, L_Raw) that KNXnet/IP tunnelling and routing carry, and the local device management messages (M_PropRead, M_PropWrite, M_Reset, function properties) of KNXnet/IP device management.
Package client is KNX group communication over a link: a KNXnet/IP tunnel (package tunnel) or routing (package routing).
Package client is KNX group communication over a link: a KNXnet/IP tunnel (package tunnel) or routing (package routing).
Package datasecure implements KNX Data Secure for group communication: the S-A_Data service that authenticates, and optionally encrypts, the APDU of a telegram end to end with a group key and a 48-bit sequence number per sender.
Package datasecure implements KNX Data Secure for group communication: the S-A_Data service that authenticates, and optionally encrypts, the APDU of a telegram end to end with a group key and a 48-bit sequence number per sender.
Package device models virtual KNX devices: an individual address and group objects (communication objects) with their datapoint type, group addresses, communication flags and current value.
Package device models virtual KNX devices: an individual address and group objects (communication objects) with their datapoint type, group addresses, communication flags and current value.
Package devmgmt is a KNXnet/IP device management client: it reads and writes the interface object properties of a KNXnet/IP server (local device management with M_PropRead and M_PropWrite) over a device management connection.
Package devmgmt is a KNXnet/IP device management client: it reads and writes the interface object properties of a KNXnet/IP server (local device management with M_PropRead and M_PropWrite) over a device management connection.
Package discovery finds KNXnet/IP servers (SEARCH_REQUEST, multicast or directed unicast, standard or extended) and reads their self description (DESCRIPTION_REQUEST).
Package discovery finds KNXnet/IP servers (SEARCH_REQUEST, multicast or directed unicast, standard or extended) and reads their self description (DESCRIPTION_REQUEST).
Package dpt encodes and decodes KNX datapoint types (DPT): the standardised representations of application values in group telegrams.
Package dpt encodes and decodes KNX datapoint types (DPT): the standardised representations of application values in group telegrams.
examples
dpt command
Command dpt encodes and decodes datapoint values.
Command dpt encodes and decodes datapoint values.
routing-monitor command
Command routing-monitor prints the routing indications on the KNXnet/IP multicast group.
Command routing-monitor prints the routing indications on the KNXnet/IP multicast group.
tunnel-client command
Command tunnel-client connects to a KNXnet/IP interface or router, switches a group object and prints the group telegrams it sees.
Command tunnel-client connects to a KNXnet/IP interface or router, switches a group object and prints the group telegrams it sees.
virtual-server command
Command virtual-server runs a KNXnet/IP server with a virtual device on the loopback interface, connects a tunnelling client to it, writes a switch and reads a temperature.
Command virtual-server runs a KNXnet/IP server with a virtual device on the loopback interface, connects a tunnelling client to it, writes a switch and reads a temperature.
internal
ccm
Package ccm holds the two halves of the AES-CCM construction that KNX IP Secure and KNX Data Secure use with their own block 0 and counter 0 formats: the CBC-MAC and the CTR encryption.
Package ccm holds the two halves of the AES-CCM construction that KNX IP Secure and KNX Data Secure use with their own block 0 and counter 0 formats: the CBC-MAC and the CTR encryption.
fakeknx
Package fakeknx is a scriptable fake KNXnet/IP peer for tests: a UDP socket on the loopback interface that queues the KNXnet/IP messages it receives, lets a test answer them one by one, and can answer some of them automatically.
Package fakeknx is a scriptable fake KNXnet/IP peer for tests: a UDP socket on the loopback interface that queues the KNXnet/IP messages it receives, lets a test answer them one by one, and can answer some of them automatically.
leak
Package leak checks tests for goroutines they leave behind.
Package leak checks tests for goroutines they leave behind.
mcast
Package mcast opens the IPv4 multicast sockets of KNXnet/IP discovery and routing with the standard library only: joining a group, selecting the outgoing interface, the loopback and the TTL of multicast datagrams.
Package mcast opens the IPv4 multicast sockets of KNXnet/IP discovery and routing with the standard library only: joining a group, selecting the outgoing interface, the loopback and the TTL of multicast datagrams.
pbkdf2
Package pbkdf2 implements PBKDF2 (RFC 8018) with HMAC-SHA256: the key derivation of KNX IP Secure passwords and of keyrings.
Package pbkdf2 implements PBKDF2 (RFC 8018) with HMAC-SHA256: the key derivation of KNX IP Secure passwords and of keyrings.
ratelimit
Package ratelimit is a token bucket.
Package ratelimit is a token bucket.
udp
Package udp holds the UDP helpers shared by the KNXnet/IP client, discovery, routing and server code.
Package udp holds the UDP helpers shared by the KNXnet/IP client, discovery, routing and server code.
interop
node command
Command node is go-knx's adapter for the knx-interop matrix: it implements the knx-interop container contract (version 1.4) directly on the go-knx library, built from this repository's sources.
Command node is go-knx's adapter for the knx-interop matrix: it implements the knx-interop container contract (version 1.4) directly on the go-knx library, built from this repository's sources.
Package keyring reads and writes KNX keyring files (.knxkeys, namespace http://knx.org/xml/keyring/1), the export of the secure keys and passwords of an ETS project: the backbone key of secure routing, the users and passwords of secure tunnelling, the group keys and senders of Data Secure, and the device keys.
Package keyring reads and writes KNX keyring files (.knxkeys, namespace http://knx.org/xml/keyring/1), the export of the secure keys and passwords of an ETS project: the backbone key of secure routing, the users and passwords of secure tunnelling, the group keys and senders of Data Secure, and the device keys.
Package knxnetip encodes and decodes KNXnet/IP frames: the header, host protocol address information (HPAI), description information blocks (DIB), connection request and response information (CRI, CRD) and the bodies of the core, device management, tunnelling, routing and secure services.
Package knxnetip encodes and decodes KNXnet/IP frames: the header, host protocol address information (HPAI), description information blocks (DIB), connection request and response information (CRI, CRD) and the bodies of the core, device management, tunnelling, routing and secure services.
Package mgmt implements remote device management over the KNX network: the application layer services a tool sends to a device's individual address (A_PropertyValue_Read, _Write and _Response, A_DeviceDescriptor_Read and _Response), connectionless or in a transport layer connection, optionally secured with the device's tool key (KNX Data Secure point to point, S-A_Data with tool access).
Package mgmt implements remote device management over the KNX network: the application layer services a tool sends to a device's individual address (A_PropertyValue_Read, _Write and _Response, A_DeviceDescriptor_Read and _Response), connectionless or in a transport layer connection, optionally secured with the device's tool key (KNX Data Secure point to point, S-A_Data with tool access).
Package routing sends and receives KNX telegrams with KNXnet/IP routing: ROUTING_INDICATIONs on an IP multicast group (224.0.23.12:3671 by default), with flow control.
Package routing sends and receives KNX telegrams with KNXnet/IP routing: ROUTING_INDICATIONs on an IP multicast group (224.0.23.12:3671 by default), with flow control.
Package secure implements KNX IP Secure (KNXnet/IP Secure): the key derivations, the session handshake of secure tunnelling, the SECURE_WRAPPER encryption, and the timer of secure routing.
Package secure implements KNX IP Secure (KNXnet/IP Secure): the key derivations, the session handshake of secure tunnelling, the SECURE_WRAPPER encryption, and the timer of secure routing.
Package server is a KNXnet/IP server: it answers discovery (search, extended search) and description requests, accepts tunnelling connections from KNXnet/IP clients, and optionally routes over IP multicast.
Package server is a KNXnet/IP server: it answers discovery (search, extended search) and description requests, accepts tunnelling connections from KNXnet/IP clients, and optionally routes over IP multicast.
Package tunnel is a KNXnet/IP tunnelling client over UDP: it connects to a KNXnet/IP server (an IP interface or router), sends cEMI frames with acknowledgement and retransmission, receives telegrams with sequence checking and duplicate suppression, keeps the connection alive with heartbeats and, optionally, reconnects.
Package tunnel is a KNXnet/IP tunnelling client over UDP: it connects to a KNXnet/IP server (an IP interface or router), sends cEMI frames with acknowledgement and retransmission, receives telegrams with sequence checking and duplicate suppression, keeps the connection alive with heartbeats and, optionally, reconnects.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL