{"id":25694588,"url":"https://github.com/hybridgroup/go-bthome","last_synced_at":"2025-12-30T04:01:43.820Z","repository":{"id":271081774,"uuid":"912341011","full_name":"hybridgroup/go-bthome","owner":"hybridgroup","description":"Minimal package for creating and parsing BTHome service data using Go/TinyGo.","archived":false,"fork":false,"pushed_at":"2025-01-07T06:34:30.000Z","size":22,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T08:35:41.112Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hybridgroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-05T09:56:23.000Z","updated_at":"2025-01-23T02:19:08.000Z","dependencies_parsed_at":"2025-01-05T11:27:51.092Z","dependency_job_id":"c2da5169-5434-4971-a751-e0b99ed840d8","html_url":"https://github.com/hybridgroup/go-bthome","commit_stats":null,"previous_names":["hybridgroup/go-bthome"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgo-bthome","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgo-bthome/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgo-bthome/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgo-bthome/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hybridgroup","download_url":"https://codeload.github.com/hybridgroup/go-bthome/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240576456,"owners_count":19823293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-02-25T00:01:13.307Z","updated_at":"2025-12-30T04:01:43.725Z","avatar_url":"https://github.com/hybridgroup.png","language":"Go","funding_links":[],"categories":["Embedded Systems"],"sub_categories":["Protocol implementations"],"readme":"# go-bthome\n\nMinimal package for creating and parsing [BTHome](https://bthome.io/) service data using Go/TinyGo.\n\n## How to use\n\n### Create a BTHome Payload\n\n```go\n// create the data payload\nbuf := \u0026bthome.Payload{}\n\n// add some data\nvalue := bthome.NewDataValue(bthome.Acceleration)\nvalue.Set(float32(1.23))\nerr := buf.AddData(value)\nif err != nil {\n    t.Error(err)\n}\n\n// now publish the bluetooth.ServiceDataElement\ndata := buf.ServiceData()\n```\n\n### Parse a BTHome Payload\n\n```go\ndata := []byte{...}\nbuf := bthome.NewPayload(data)\nvalues, _ := buf.Parse()\nfor _, v := range values {\n\tprintln(v.Type().Name(), v.Get())\n}\n```\n\n## Examples\n\n### Thermometer\n\n[examples/thermometer](./examples/thermometer)\n\nThermometer beacon device written using TinyGo\n\n```shell\n$ tinygo flash -target nano-rp2040 -monitor ./examples/thermometer/\nConnected to /dev/ttyACM0. Press Ctrl-C to exit.\nadvertising...\nGo BTHome / D2:00:10:09:05:0A\nGo BTHome / D2:00:10:09:05:0A\n...\n```\n\n## CLI Tools\n\n### bthomescan\n\n[cmd/bthomescan](./cmd/bthomescan)\n\nScans for any devices that are advertising BTHome packets, then displays the data.\n\n```shell\ngo run ./cmd/bthomescan\n```\n\n```shell\n$ go run ./cmd/bthomescan/\nscanning...\n...\nfound device: 58:BF:25:3A:EB:D2 -50 Go BTHome\nBTHome device found\ntemperature: 18.5\n...\nfound device: 58:BF:25:3A:EB:D2 -50 Go BTHome\nBTHome device found\ntemperature: 15.400001\n...\nfound device: 58:BF:25:3A:EB:D2 -51 Go BTHome\nBTHome device found\ntemperature: 24.6\n```\n\n\n## Missing features\n\n- Encryption\n- Events\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhybridgroup%2Fgo-bthome","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhybridgroup%2Fgo-bthome","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhybridgroup%2Fgo-bthome/lists"}