{"id":18368677,"url":"https://github.com/openbmc/phosphor-led-sysfs","last_synced_at":"2025-04-06T17:31:48.956Z","repository":{"id":74554834,"uuid":"75148180","full_name":"openbmc/phosphor-led-sysfs","owner":"openbmc","description":"Application to manage BMC-owned LEDs using Linux sysfs interfaces","archived":false,"fork":false,"pushed_at":"2025-02-03T00:46:41.000Z","size":962,"stargazers_count":5,"open_issues_count":0,"forks_count":6,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-22T04:02:08.869Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openbmc.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-30T03:37:45.000Z","updated_at":"2025-03-19T06:40:05.000Z","dependencies_parsed_at":"2023-02-28T17:01:37.653Z","dependency_job_id":"63ed21a9-1834-4ba1-ad51-13483ef7fd44","html_url":"https://github.com/openbmc/phosphor-led-sysfs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbmc%2Fphosphor-led-sysfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbmc%2Fphosphor-led-sysfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbmc%2Fphosphor-led-sysfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbmc%2Fphosphor-led-sysfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openbmc","download_url":"https://codeload.github.com/openbmc/phosphor-led-sysfs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247522404,"owners_count":20952542,"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":"2024-11-05T23:26:57.608Z","updated_at":"2025-04-06T17:31:48.483Z","avatar_url":"https://github.com/openbmc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phosphor-led-sysfs\n\nThis project exposes physical LEDs on dbus.\n\n## Example\n\nSay we have 'identify' LED in our system, which may be declared in devicetree.\n\n```text\nleds {\n    compatible = \"gpio-leds\";\n\n    identify {\n        gpios = \u003c\u0026gpio ASPEED_GPIO(S, 6) GPIO_ACTIVE_HIGH\u003e;\n    };\n};\n```\n\nWe can add an LED via the helper program. The main service is then started via\ndbus-activation.\n\n```sh\n./add-led-action --path /sys/class/leds/identify\n```\n\nwhich will expose following dbus objects:\n\n```text\nbusctl tree xyz.openbmc_project.LED.Controller\n`- /xyz\n  `- /xyz/openbmc_project\n    `- /xyz/openbmc_project/led\n      `- /xyz/openbmc_project/led/physical\n        `- /xyz/openbmc_project/led/physical/identify\n\nbusctl introspect  xyz.openbmc_project.LED.Controller /xyz/openbmc_project/led/physical/identify\nNAME                                TYPE      SIGNATURE  RESULT/VALUE                             FLAGS\n...\nxyz.openbmc_project.Led.Physical    interface -          -                                        -\n.Color                              property  s          \"xyz.openbmc_project.Led.Physical.Pal... emits-change writable\n.DutyOn                             property  y          50                                       emits-change writable\n.Period                             property  q          1000                                     emits-change writable\n.State                              property  s          \"xyz.openbmc_project.Led.Physical.Act... emits-change writable\n```\n\nIn the above output, the usual org.freedesktop.\\* interfaces have been removed\nto keep it readable.\n\n## Example: using the dbus interface\n\nQuery the LED State\n\n```text\nbusctl get-property  xyz.openbmc_project.LED.Controller \\\n/xyz/openbmc_project/led/physical/identify \\\nxyz.openbmc_project.Led.Physical State \\\ns \"xyz.openbmc_project.Led.Physical.Action.Off\"\n```\n\nSet the LED State\n\n```text\nbusctl set-property  xyz.openbmc_project.LED.Controller \\\n/xyz/openbmc_project/led/physical/identify \\\nxyz.openbmc_project.Led.Physical State s \\\n\"xyz.openbmc_project.Led.Physical.Action.Off\"\n```\n\n## How to Build\n\n```sh\nmeson setup build\ncd build\nninja\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbmc%2Fphosphor-led-sysfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenbmc%2Fphosphor-led-sysfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbmc%2Fphosphor-led-sysfs/lists"}