{"id":37095530,"url":"https://github.com/greenstatic/knx-go","last_synced_at":"2026-01-14T11:46:27.875Z","repository":{"id":57704478,"uuid":"497887660","full_name":"greenstatic/knx-go","owner":"greenstatic","description":"KNX clients and protocol implementation in Go","archived":false,"fork":true,"pushed_at":"2022-05-30T11:23:11.000Z","size":348,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-13T19:42:02.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"pevecyan/knx-go","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/greenstatic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-30T10:08:00.000Z","updated_at":"2022-05-30T11:18:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/greenstatic/knx-go","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/greenstatic/knx-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenstatic%2Fknx-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenstatic%2Fknx-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenstatic%2Fknx-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenstatic%2Fknx-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greenstatic","download_url":"https://codeload.github.com/greenstatic/knx-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenstatic%2Fknx-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419257,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T11:46:27.396Z","updated_at":"2026-01-14T11:46:27.870Z","avatar_url":"https://github.com/greenstatic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/vapourismo/knx-go.svg?branch=master)](https://travis-ci.org/vapourismo/knx-go)\n[![GoDoc](https://godoc.org/github.com/vapourismo/knx-go?status.svg)](https://godoc.org/github.com/vapourismo/knx-go)\n\n# knx-go\n\nThis repository contains a collection of Go packages that provide the means to communicate with KNX\nnetworks.\n\n## Packages\n\n Package           | Description\n-------------------|--------------------------------------------------------------------\n **knx**           | Abstractions to communicate with KNXnet/IP servers\n **knx/knxnet**    | KNXnet/IP protocol services\n **knx/dpt**       | Datapoint types\n **knx/cemi**      | CEMI-encoded frames\n **cmd/knxbridge** | Tool to bridge KNX networks between a KNXnet/IP router and gateway\n\n## Installation\n\nSimply run the following command.\n\n\t$ go get -u github.com/vapourismo/knx-go/...\n\n## Examples\n\n### KNXnet/IP Group Client\n\nIf you simply want to send and receive group communication, the\n[GroupTunnel](https://godoc.org/github.com/vapourismo/knx-go/knx#GroupTunnel) or\n[GroupRouter](https://godoc.org/github.com/vapourismo/knx-go/knx#GroupRouter)\nmight be sufficient to you.\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/greenstatic/knx-go/knx\"\n\t\"github.com/greenstatic/knx-go/knx/cemi\"\n\t\"github.com/greenstatic/knx-go/knx/dpt\"\n\t\"github.com/greenstatic/knx-go/knx/util\"\n)\n\nfunc main() {\n\t// Setup logger for auxiliary logging. This enables us to see log messages from internal\n\t// routines.\n\tutil.Logger = log.New(os.Stdout, \"\", log.LstdFlags)\n\n\t// Connect to the gateway.\n\tclient, err := knx.NewGroupTunnel(\"10.0.0.7:3671\", knx.DefaultTunnelConfig)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Close upon exiting. Even if the gateway closes the connection, we still have to clean up.\n\tdefer client.Close()\n\n\t// Send 20.5°C to group 1/2/3.\n\terr = client.Send(knx.GroupEvent{\n\t\tCommand:     knx.GroupWrite,\n\t\tDestination: cemi.NewGroupAddr3(1, 2, 3),\n\t\tData:        dpt.DPT_9001(20.5).Pack(),\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Receive messages from the gateway. The inbound channel is closed with the connection.\n\tfor msg := range client.Inbound() {\n\t\tvar temp dpt.DPT_9001\n\n\t\terr := temp.Unpack(msg.Data)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tutil.Logger.Printf(\"%+v: %v\", msg, temp)\n\t}\n}\n```\n\nIn case you want to access a KNXnet/IP router instead of a gateway, simply replace\n\n```go\nclient, err := knx.NewGroupTunnel(\"10.0.0.7:3671\", knx.DefaultTunnelConfig)\n```\n\nwith\n\n```go\nclient, err := knx.NewGroupRouter(\"224.0.23.12:3671\", knx.DefaultRouterConfig)\n```\n\n### KNXnet/IP CEMI Client\n\nUse [Tunnel](https://godoc.org/github.com/vapourismo/knx-go/knx#Tunnel) or\n[Router](https://godoc.org/github.com/vapourismo/knx-go/knx#Router) for finer control over the\ncommunication with a gateway or router.\n\n### KNX Bridge\n\nThe **knxbridge** tool (in package `cmd/knxbridge`) has multiple use cases.\n\nExpose a KNX network behind a gateway at `10.0.0.2:3671` on the multicast group `224.0.23.12:3671`.\nThis allows routers and router clients to access the network.\n\n\t$ knxbridge 10.0.0.2:3671 224.0.23.12:3671\n\nConnect two KNX networks through gateways. In this example one gateway is at `10.0.0.2:3671`, the\nother is at `10.0.0.3:3671`.\n\n\t$ knxbridge 10.0.0.2:3671 10.0.0.3:3671\n\n### Discover all KNXnet/IP Servers\n\nThe following example shows how to discover all routers/gateways on a network.\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/kr/pretty\"\n\n\t\"github.com/greenstatic/knx-go/knx\"\n\t\"github.com/greenstatic/knx-go/knx/util\"\n)\n\nfunc main() {\n\t// Setup logger for auxiliary logging. This enables us to see log messages from internal\n\t// routines.\n\tutil.Logger = log.New(os.Stdout, \"\", log.LstdFlags)\n\n\tservers, err := knx.Discover(\"224.0.23.12:3671\", time.Millisecond*750)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tutil.Logger.Printf(\"%# v\", pretty.Formatter(servers))\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreenstatic%2Fknx-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreenstatic%2Fknx-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreenstatic%2Fknx-go/lists"}