{"id":22494790,"url":"https://github.com/dmowcomber/hdmi-cec-homekit","last_synced_at":"2025-03-27T21:13:58.641Z","repository":{"id":147599136,"uuid":"122789954","full_name":"dmowcomber/hdmi-cec-homekit","owner":"dmowcomber","description":null,"archived":false,"fork":false,"pushed_at":"2018-03-03T04:50:42.000Z","size":478,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"add-homekit","last_synced_at":"2025-02-01T23:31:38.145Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dmowcomber.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":"2018-02-24T23:43:34.000Z","updated_at":"2021-12-09T22:14:04.000Z","dependencies_parsed_at":"2023-05-31T18:00:43.779Z","dependency_job_id":null,"html_url":"https://github.com/dmowcomber/hdmi-cec-homekit","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/dmowcomber%2Fhdmi-cec-homekit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmowcomber%2Fhdmi-cec-homekit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmowcomber%2Fhdmi-cec-homekit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmowcomber%2Fhdmi-cec-homekit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmowcomber","download_url":"https://codeload.github.com/dmowcomber/hdmi-cec-homekit/tar.gz/refs/heads/add-homekit","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245924519,"owners_count":20694730,"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-12-06T19:17:35.468Z","updated_at":"2025-03-27T21:13:58.608Z","avatar_url":"https://github.com/dmowcomber.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"HDMI CEC Rest API\n======\nRest api to interact with the consumer electronics control of a hdmi device. Great for turning a raspberry pi into a tv remote.\n\n\nAPI Reference\n------\n\n### /device\nGet list of all active devices\n\n\n#### GET\n* Request\n```\ncurl http://localhost:5000/device\n```\n\n* Response\n```json\n{\n  \"TV\": {\n    \"PowerStatus\": \"standby\",\n    \"PhysicalAddress\": \"0.0.0.0\",\n    \"ActiveSource\": false,\n    \"OSDName\": \"TV\",\n    \"Vendor\": \"Samsung\",\n    \"LogicalAddress\": 0\n  },\n  \"Playback\": {\n    \"PowerStatus\": \"on\",\n    \"PhysicalAddress\": \"1.0.0.0\",\n    \"ActiveSource\": false,\n    \"OSDName\": \"Roku 3\",\n    \"Vendor\": \"\",\n    \"LogicalAddress\": 4\n  },\n  \"Recording\": {\n    \"PowerStatus\": \"on\",\n    \"PhysicalAddress\": \"2.0.0.0\",\n    \"ActiveSource\": false,\n    \"OSDName\": \"cec.go\",\n    \"Vendor\": \"Pulse Eight\",\n    \"LogicalAddress\": 1\n  }\n}\n```\n\n\n\n### /device/[logical_address]\nGet details for single device by its physical address\n\n#### GET\n* Request\n```\ncurl http://localhost:5000/device/0\n```\n\n* Response\n```json\n{\n  \"PowerStatus\": \"standby\",\n  \"PhysicalAddress\": \"0.0.0.0\",\n  \"ActiveSource\": false,\n  \"OSDName\": \"TV\",\n  \"Vendor\": \"Samsung\",\n  \"LogicalAddress\": 0\n}\n```\n\n\n### /device/[logical_address]/power\nGet or set the power status for a device\n\n#### GET\n* Request\n```\ncurl http://localhost:5000/device/0/power\n```\n\n* Response\n```json\n{\n    \"status\": \"success\",\n    \"message\": \"standby\"\n}\n```\n\n#### POST\n* Request\n```\n# state can be \"on\" or \"off\"\ncurl -X POST -d '{\"state\": \"on\"}' http://localhost:5000/device/0/power\n```\n\n\n\n### /device/[logical_address]/volume\nSet the volume for a amplifier device\n\nThis will only work if the device is type Amplifier\n\n#### POST\n* Request\n```\n# state can be \"up\", \"down\", or \"mute\"\ncurl -X POST -d '{\"state\": \"up\"}' http://localhost:5000/device/0/volume\n```\n\n\nInstallation\n------\n\nThis assumes golang has been installed and $GOPATH set\n\n* Install Dependencies\n  * Ubuntu/Debian\n```bash\napt-get install libcec-dev cec-utils make\n```\n\n\n* Get Go Dependencies\n```bash\ngo get\n```\n\n* Compile Binary\n```bash\ngo build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmowcomber%2Fhdmi-cec-homekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmowcomber%2Fhdmi-cec-homekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmowcomber%2Fhdmi-cec-homekit/lists"}