{"id":22503299,"url":"https://github.com/gannonprudhomme/raspberrypi-backlight-server","last_synced_at":"2026-05-03T04:39:14.988Z","repository":{"id":108740064,"uuid":"371498786","full_name":"gannonprudhomme/RaspberryPi-Backlight-Server","owner":"gannonprudhomme","description":"A Socket.io server for controlling the power \u0026 brightness of the official 7\" RaspberryPi Touchscreen Display ","archived":false,"fork":false,"pushed_at":"2021-06-03T21:20:33.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T01:13:51.248Z","etag":null,"topics":["python","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Python","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/gannonprudhomme.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":"2021-05-27T20:40:35.000Z","updated_at":"2021-06-03T21:20:35.000Z","dependencies_parsed_at":"2023-03-30T17:03:10.257Z","dependency_job_id":null,"html_url":"https://github.com/gannonprudhomme/RaspberryPi-Backlight-Server","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/gannonprudhomme%2FRaspberryPi-Backlight-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gannonprudhomme%2FRaspberryPi-Backlight-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gannonprudhomme%2FRaspberryPi-Backlight-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gannonprudhomme%2FRaspberryPi-Backlight-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gannonprudhomme","download_url":"https://codeload.github.com/gannonprudhomme/RaspberryPi-Backlight-Server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245938232,"owners_count":20697008,"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":["python","raspberry-pi"],"created_at":"2024-12-06T23:31:07.846Z","updated_at":"2026-05-03T04:39:14.952Z","avatar_url":"https://github.com/gannonprudhomme.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RaspberryPi Backlight Server\r\n\r\nA [Socket.io](https://python-socketio.readthedocs.io/en/latest/index.html) server for controlling an official 7\" RaspberryPi Touchscreen Display,\r\nusing the [rpi_backlight](https://pypi.org/project/rpi-backlight/) library.\r\n\r\nCurrently used to control my Pi's touchscreen from HomeAssistant using\r\n [ha-rpi-backlight](https://github.com/gannonprudhomme/ha-rpi-backlight).\r\n\r\n## Installation\r\n\r\n1. Install Python\r\n\r\n2. Create a virtual environment: `python3 -m venv env` then `source env/Scripts/activate` (or `source env/bin/activate` on Unix)\r\n\r\n3. Run `pip3 install -r requirements.txt`\r\n\r\n4. Run `python3 main.py` to start the server!\r\n\r\n## Configuration\r\n\r\nThe default port is [aiohttp](https://docs.aiohttp.org/en/stable/index.html)'s default port, which is 8080. To change it, create a `settings.json`\r\nfile in the root of the project, and provide a `port` key with the value of the port that is desired.\r\n\r\nFor example:\r\n\r\n```json\r\n{\r\n    \"port\": 3000\r\n}\r\n```\r\n\r\n## Available Events\r\n\r\n- `set_screen_power`: Takes boolean and sets the screen power accordingly\r\n\r\n- `get_screen_power`: Returns a boolean indicating the screen power\r\n\r\n- `set_brightness`: Takes an integer (or float, which is cast to an int) and sets the brightness accordingly\r\n\r\n- `get_brightness`: Returns an integer of the current brightness\r\n\r\n- `shutdown`: No arguments, calls `shutdown` on the Pi.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgannonprudhomme%2Fraspberrypi-backlight-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgannonprudhomme%2Fraspberrypi-backlight-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgannonprudhomme%2Fraspberrypi-backlight-server/lists"}