{"id":23840506,"url":"https://github.com/shonp40/ios-rest-battery","last_synced_at":"2026-04-17T09:31:26.684Z","repository":{"id":164105861,"uuid":"619857640","full_name":"ShonP40/iOS-REST-Battery","owner":"ShonP40","description":"A REST API for reporting the battery percentage of jailbroken iOS devices","archived":false,"fork":false,"pushed_at":"2026-02-16T18:01:37.000Z","size":67,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-17T00:52:49.244Z","etag":null,"topics":["home-assistant","jailbreak"],"latest_commit_sha":null,"homepage":"https://shon.codes","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShonP40.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-27T14:54:54.000Z","updated_at":"2026-02-16T18:01:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d44ccd7-b804-48d6-a5dd-e13a79bd904f","html_url":"https://github.com/ShonP40/iOS-REST-Battery","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ShonP40/iOS-REST-Battery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShonP40%2FiOS-REST-Battery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShonP40%2FiOS-REST-Battery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShonP40%2FiOS-REST-Battery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShonP40%2FiOS-REST-Battery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShonP40","download_url":"https://codeload.github.com/ShonP40/iOS-REST-Battery/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShonP40%2FiOS-REST-Battery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31923079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T09:10:15.403Z","status":"ssl_error","status_checked_at":"2026-04-17T09:10:14.455Z","response_time":62,"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":["home-assistant","jailbreak"],"created_at":"2025-01-02T17:58:21.607Z","updated_at":"2026-04-17T09:31:26.668Z","avatar_url":"https://github.com/ShonP40.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iOS REST Battery\nA REST API for reporting the battery percentage of jailbroken iOS devices\n\n## Installation\n\n### Requirements\n- Jailbroken iOS device\n- Terminal/SSH access to your iOS device\n- (Recommended) A tweak that keeps Wi-Fi on even when the device is locked (like `iNoSleep`)\n- Git CLI (`apt-get install git`) on your iOS device\n- Awk (`apt-get install gawk`) on your iOS device\n- Screen (`apt-get install screen`) on your iOS device\n- Python 2.5.1 (`apt-get install python`) (32-bit) / Python 3.9.9 (`apt-get install python3`) (64-bit) on your iOS device\n\n## Setup (32-bit)\n1. Meet the requirements\n2. Follow the instructions [here](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) to generate an SSH key on your iOS device to be able to access GitHub\n3. Run `cat /path/to/\u003cyour key\u003e.pub` and copy its contents to this [GitHub](https://github.com/settings/ssh/new) page\n4. Clone this repository to your iOS device (`git clone git@github.com:ShonP40/iOS-REST-Battery.git`)\n5. Clone the `SimpleJSON` repository to your iOS device (`git clone git@github.com:simplejson/simplejson.git`)\n6. cd into the `simplejson` directory\n7. Install the `simplejson` package using `python setup.py install`\n8. cd into the `iOS-REST-Battery` directory\n9. Install `batterydata` using `dpkg -i batterydata-arm32.deb`\n10. Start the script by running `python battery-arm32.py` to test it out\n11. Press `Ctrl + C` to stop the script\n\n## Setup (64-bit)\n1. Meet the requirements\n2. Clone this repository to your iOS device (`git clone https://github.com/ShonP40/iOS-REST-Battery`)\n3. cd into the `iOS-REST-Battery` directory\n4. Install `batterydata` using `dpkg -i batterydata-arm64-rootfull.deb` or `dpkg -i batterydata-arm64-rootless.deb` (depending on your setup)\n5. Start the script by running `python3 battery-arm64-rootfull.py` or `python3 battery-arm64-rootless.py` (depending on your setup) to test it out\n6. Press `Ctrl + C` to stop the script\n\n## Running (You will need to do this every time you reboot your device)\n1. cd into the `iOS-REST-Battery` directory\n2. Create a new screen session by running `screen -S battery`\n3. Start the script\n4. Detach from the screen session by pressing `Ctrl + A + D`\n\n## Updating\n1. Reattach to the screen session by running `screen -r battery`\n2. Press `Ctrl + C` to stop the script\n3. Run `git pull`\n4. Start the script again\n5. Detach from the screen session by pressing `Ctrl + A + D`\n\n## Usage\nIf you are using this script to display the battery status of your iOS device on Home Assistant, you can use the following configuration as an example:\n\n```yaml\nsensor:\n  - platform: rest\n    name: iPad battery status\n    unique_id: ipad_battery_status\n    resource: http://\u003ciPad IP\u003e:8000/status\n    method: GET\n    value_template: \"{{ value_json.Battery }}\"\n    unit_of_measurement: \"%\"\n    device_class: battery\n    json_attributes:\n      - Battery\n      - Battery status\n    timeout: 60\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshonp40%2Fios-rest-battery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshonp40%2Fios-rest-battery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshonp40%2Fios-rest-battery/lists"}