{"id":22570489,"url":"https://github.com/knifa/led-matrix-zmq-http-bridge","last_synced_at":"2025-03-28T14:22:51.673Z","repository":{"id":263313286,"uuid":"889997484","full_name":"Knifa/led-matrix-zmq-http-bridge","owner":"Knifa","description":"HTTP JSON API for sending control messages to led-matrix-zmq-server.","archived":false,"fork":false,"pushed_at":"2024-12-05T01:08:35.000Z","size":194,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T14:37:09.926Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Knifa.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":"2024-11-17T18:57:53.000Z","updated_at":"2024-12-05T01:08:39.000Z","dependencies_parsed_at":"2024-11-17T20:17:32.756Z","dependency_job_id":"a62c577d-070f-4e83-827d-3d107acf28ba","html_url":"https://github.com/Knifa/led-matrix-zmq-http-bridge","commit_stats":null,"previous_names":["knifa/led-matrix-control-api","knifa/led-matrix-zmq-control-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knifa%2Fled-matrix-zmq-http-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knifa%2Fled-matrix-zmq-http-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knifa%2Fled-matrix-zmq-http-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knifa%2Fled-matrix-zmq-http-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Knifa","download_url":"https://codeload.github.com/Knifa/led-matrix-zmq-http-bridge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246042656,"owners_count":20714270,"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-08T01:09:11.969Z","updated_at":"2025-03-28T14:22:51.645Z","avatar_url":"https://github.com/Knifa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# led-matrix-zmq-http-bridge\n\nThis is an HTTP bridge for [led-matrix-zmq-server](https://github.com/knifa/led-matrix-zmq-server).\n\nYou can set brightness, color temperature, and get the configuration via a JSON API. You can also send frames via form data.\n\nZeroconf is used to publish the bridge as a service so it can be discovered by e.g. Home Assistant.\n\n## Docker\n\nA [Docker image](https://github.com/knifa/led-matrix-zmq-http-bridge/pkgs/container/led-matrix-zmq-http-bridge) is available for `amd64` and `arm64`.\n\nThe container must be run with `--network host` for Zeroconf to work.\n\n```shell\ndocker run \\\n  --rm \\\n  --network host \\\n  -e \"LMZ_CONTROL_ENDPOINT=ipc:///run/lmz/control.sock\" \\\n  -e \"LMZ_FRAME_ENDPOINT=ipc:///run/lmz/frame.sock\" \\\n  -e \"LMZ_ZEROCONF_NAME=My Matrix\" \\\n  -v /run/lmz:/run/lmz \\\n  ghcr.io/knifa/led-matrix-zmq-http-bridge:latest\n```\n\n## Usage\n\nSee [lmz/settings.py](lmz/settings.py) for possible environment variables.\n\n```bash\nuv sync\nuv run python -m lmz\n```\n\n### Control API\n\n#### GET `/brightness`\n\nGet the current brightness of the display (0-100%).\n\n```bash\ncurl http://localhost:4200/brightness\n\n# {\"brightness\": 50}\n```\n\n#### POST `/brightness`\n\nSet the brightness of the display (0-100%)\n\n```bash\ncurl \\\n    -X POST \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"brightness\": 50}' \\\n    http://localhost:4200/brightness\n\n# {\"status\": \"ok\"}\n```\n\n#### GET `/configuration`\n\nGet the configuration of the display, i.e., resolution.\n\n```bash\ncurl http://localhost:4200/configuration\n\n# {\"width\": 64, \"height\": 32}\n```\n\n#### GET `/temperature`\n```bash\ncurl http://localhost:4200/temperature\n\n# {\"temperature\": 2500}\n```\n\n####  POST `/temperature`\n\nSet the color temperature of the display (2000-6500K).\n\n```bash\ncurl \\\n    -X POST \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"temperature\": 2500}' \\\n    http://localhost:4200/temperature\n\n# {\"status\": \"ok\"}\n```\n\n### Frame API\n\n#### POST `/frame`\n\nSend a frame to the display. No error response is sent if the frame is invalid (e.g., wrong size).\n\n```bash\ncurl \\\n    -F frame=\"@frame.raw\" \\\n    http://localhost:4200/frame\n\n# {\"status\": \"ok\"}\n```\n\n## Zeroconf\n\nThe bridge is published as a Zeroconf service under the type `_lmz-http-bridge._tcp.local.`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknifa%2Fled-matrix-zmq-http-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknifa%2Fled-matrix-zmq-http-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknifa%2Fled-matrix-zmq-http-bridge/lists"}