{"id":40344652,"url":"https://github.com/dyrkin/zigbee-steward","last_synced_at":"2026-01-20T09:07:08.649Z","repository":{"id":48130958,"uuid":"170411712","full_name":"dyrkin/zigbee-steward","owner":"dyrkin","description":"ZigBee hub","archived":false,"fork":false,"pushed_at":"2020-01-21T19:28:23.000Z","size":40,"stargazers_count":15,"open_issues_count":2,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-06-20T08:15:39.376Z","etag":null,"topics":["cc2531","coordinator","hub","zigbee"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dyrkin.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":"2019-02-13T00:15:14.000Z","updated_at":"2024-04-02T17:40:29.000Z","dependencies_parsed_at":"2022-08-12T19:20:30.517Z","dependency_job_id":null,"html_url":"https://github.com/dyrkin/zigbee-steward","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dyrkin/zigbee-steward","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyrkin%2Fzigbee-steward","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyrkin%2Fzigbee-steward/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyrkin%2Fzigbee-steward/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyrkin%2Fzigbee-steward/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dyrkin","download_url":"https://codeload.github.com/dyrkin/zigbee-steward/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyrkin%2Fzigbee-steward/sbom","scorecard":{"id":362494,"data":{"date":"2025-08-11","repo":{"name":"github.com/dyrkin/zigbee-steward","commit":"a1dc32edfb8560969ea4aedb6f85d05d8279cd7a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T11:09:00.853Z","repository_id":48130958,"created_at":"2025-08-18T11:09:00.853Z","updated_at":"2025-08-18T11:09:00.853Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28599869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T08:51:33.170Z","status":"ssl_error","status_checked_at":"2026-01-20T08:51:10.855Z","response_time":117,"last_error":"SSL_read: 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":["cc2531","coordinator","hub","zigbee"],"created_at":"2026-01-20T09:07:07.542Z","updated_at":"2026-01-20T09:07:08.642Z","avatar_url":"https://github.com/dyrkin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZigBee-Steward\n\n[![Build Status](https://cloud.drone.io/api/badges/dyrkin/zigbee-steward/status.svg??branch=master)](https://cloud.drone.io/dyrkin/zigbee-steward)\n\n## Overview\n\nBla bla bla\n\n## Example\n\nIn this example, we are going to send **toggle** command to IKEA TRÅDFRI bulb using Xiaomi  Aqara Wireless Remote Switch. \nTo prepare, follow the steps:\n\n1. Connect ZigBee stick cc2531 to USB;\n2. Flash it using instruction: https://www.zigbee2mqtt.io/getting_started/flashing_the_cc2531.html;\n3. Run the example;\n4. Pair IKEA TRÅDFRI bulb by repeating 6 ONs and 5 OFFs one by one (ON -\u003e OFF, ON -\u003e OFF, ON -\u003e OFF, ON -\u003e OFF, ON -\u003e OFF, ON);\n5. Pair Xiaomi  Aqara Wireless Remote Switch by holding the button for ~10 seconds until blue LEDs start blinking.\n\nNow you can toggle the bulb using the remote switch. Just click on it.\n\n\n```go\nimport (\n\t\"fmt\"\n\t\"github.com/davecgh/go-spew/spew\"\n\t\"github.com/dyrkin/zcl-go/cluster\"\n\t\"github.com/dyrkin/zigbee-steward\"\n\t\"github.com/dyrkin/zigbee-steward/configuration\"\n\t\"github.com/dyrkin/zigbee-steward/model\"\n\t\"sync\"\n)\n\n//simple device database\nvar devices = map[string]*model.Device{}\n\nfunc main() {\n\n\tconf := configuration.Default()\n\tconf.PermitJoin = true\n\n\tstewie := steward.New(conf)\n\n\teventListener := func() {\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase device := \u003c-stewie.Channels().OnDeviceRegistered():\n\t\t\t\tsaveDevice(device)\n\t\t\tcase device := \u003c-stewie.Channels().OnDeviceUnregistered():\n\t\t\t\tdeleteDevice(device)\n\t\t\tcase device := \u003c-stewie.Channels().OnDeviceBecameAvailable():\n\t\t\t\tsaveDevice(device)\n\t\t\tcase deviceIncomingMessage := \u003c-stewie.Channels().OnDeviceIncomingMessage():\n\t\t\t\tfmt.Printf(\"Device received incoming message:\\n%s\", spew.Sdump(deviceIncomingMessage))\n\t\t\t\ttoggleIkeaBulb(stewie, deviceIncomingMessage)\n\t\t\t}\n\t\t}\n\t}\n\n\tgo eventListener()\n\tstewie.Start()\n\tinfiniteWait()\n}\n\nfunc toggleIkeaBulb(stewie *steward.Steward, message *model.DeviceIncomingMessage) {\n\tif isXiaomiButtonSingleClick(message) {\n\t\tif ikeaBulb, registered := devices[\"TRADFRI bulb E27 W opal 1000lm\"]; registered {\n\t\t\ttoggleTarget(stewie, ikeaBulb.NetworkAddress)\n\t\t} else {\n\t\t\tfmt.Println(\"IKEA bulb is not available\")\n\t\t}\n\t}\n}\n\nfunc toggleTarget(stewie *steward.Steward, networkAddress string) {\n\tgo func() {\n\t\tstewie.Functions().Cluster().Local().OnOff().Toggle(networkAddress, 0xFF)\n\t}()\n}\n\nfunc isXiaomiButtonSingleClick(message *model.DeviceIncomingMessage) bool {\n\tcommand, ok := message.IncomingMessage.Data.Command.(*cluster.ReportAttributesCommand)\n\n\treturn ok \u0026\u0026 message.Device.Manufacturer == \"LUMI\" \u0026\u0026\n\t\tmessage.Device.Model == \"lumi.remote.b186acn01\\x00\\x00\\x00\" \u0026\u0026\n\t\tisSingleClick(command)\n}\n\nfunc isSingleClick(command *cluster.ReportAttributesCommand) bool {\n\tclick, ok := command.AttributeReports[0].Attribute.Value.(uint64)\n\treturn ok \u0026\u0026 click == uint64(1)\n}\n\nfunc saveDevice(device *model.Device) {\n\tfmt.Printf(\"Registering device:\\n%s\", spew.Sdump(device))\n\tdevices[device.Model] = device\n}\n\nfunc deleteDevice(device *model.Device) {\n\tfmt.Printf(\"Unregistering device:\\n%s\", spew.Sdump(device))\n\tdelete(devices, device.Model)\n}\n\nfunc infiniteWait() {\n\twg := \u0026sync.WaitGroup{}\n\twg.Add(1)\n\twg.Wait()\n}\n```\n\nFull [examples](example/example.go)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyrkin%2Fzigbee-steward","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyrkin%2Fzigbee-steward","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyrkin%2Fzigbee-steward/lists"}