{"id":37075162,"url":"https://github.com/techzune/petsafe_smartfeed","last_synced_at":"2026-01-14T08:50:47.688Z","repository":{"id":43747540,"uuid":"264972211","full_name":"Techzune/petsafe_smartfeed","owner":"Techzune","description":"Connect and control a PetSafe Smart Feed device using the PetSafe-SmartFeed API.","archived":false,"fork":false,"pushed_at":"2023-07-25T21:23:27.000Z","size":56,"stargazers_count":9,"open_issues_count":5,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-11-08T03:32:25.505Z","etag":null,"topics":["automatic","feeder","petsafe","smartfeed"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Techzune.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}},"created_at":"2020-05-18T14:55:08.000Z","updated_at":"2025-10-24T18:27:21.000Z","dependencies_parsed_at":"2023-01-25T13:46:04.989Z","dependency_job_id":null,"html_url":"https://github.com/Techzune/petsafe_smartfeed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Techzune/petsafe_smartfeed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Techzune%2Fpetsafe_smartfeed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Techzune%2Fpetsafe_smartfeed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Techzune%2Fpetsafe_smartfeed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Techzune%2Fpetsafe_smartfeed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Techzune","download_url":"https://codeload.github.com/Techzune/petsafe_smartfeed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Techzune%2Fpetsafe_smartfeed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["automatic","feeder","petsafe","smartfeed"],"created_at":"2026-01-14T08:50:45.275Z","updated_at":"2026-01-14T08:50:47.676Z","avatar_url":"https://github.com/Techzune.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PetSafe Smart Feed - Python API\nConnect and control a PetSafe Smart Feed device using the PetSafe-SmartFeed API.\n\n\u003e **BREAKING CHANGE:** Version 2.0 uses the new PetSafe API.\n\u003e You will need to request new tokens.\n\n\u003e PetSafe will lock your account if you request data more often than once per 5 minutes.\n\n## Installation\n`pip install petsafe-smartfeed`\n\nIf installing from source code,\n`python setup.py install`\n\n## Login tokens\nYou **must** use tokens to interact with the PetSafe Smart-Feed API.  \nThere are two methods to retrieve tokens:\n\n#### Get tokens using command line\n1. Execute `python -m petsafe_smartfeed [email_address]` to request an email code.\n2. Check your email for an email code from PetSafe.\n3. Enter your code to generate tokens.\n\n#### Get tokens using Python\n```python\nimport petsafe_smartfeed as sf\n\n\n# replace with your email address\nclient = sf.PetSafeClient(email=\"email@example.com\")\nclient.request_code()\n\n# check your email for a code\ncode = input(\"Enter email code: \")\ntoken = client.request_tokens_from_code(code)\n\nprint(\"email:\", client.email)\nprint(\"id_token:\", client.id_token)\nprint(\"refresh_token:\", client.refresh_token)\nprint(\"access_token:\", client.access_token)\n```\n\n\n## Example usage\n#### List feeders\n\n```python\nimport petsafe_smartfeed as sf\n\nclient = sf.PetSafeClient(email=\"email@example.com\",\n                       id_token=\"YOUR_ID_TOKEN\",\n                       refresh_token=\"YOUR_REFRESH_TOKEN\",\n                       access_token=\"YOUR_ACCESS_TOKEN\")\nfeeders = client.feeders\n\n# print all feeders\nfor feeder in feeders:\n    print(feeder)\n\n```\n#### Feed 1/8 cup at normal speed\n```python\nimport petsafe_smartfeed as sf\n\nclient = sf.PetSafeClient(email=\"email@example.com\",\n                       id_token=\"YOUR_ID_TOKEN\",\n                       refresh_token=\"YOUR_REFRESH_TOKEN\",\n                       access_token=\"YOUR_ACCESS_TOKEN\")\nfeeders = client.feeders\n\n# get the first feeder\nfeeder = feeders[0]\nfeeder.feed(amount=1, slow_feed=False)\n\n```\n#### Get current battery level (0 - 100)\n```python\nimport petsafe_smartfeed as sf\n\nclient = sf.PetSafeClient(email=\"email@example.com\",\n                       id_token=\"YOUR_ID_TOKEN\",\n                       refresh_token=\"YOUR_REFRESH_TOKEN\",\n                       access_token=\"YOUR_ACCESS_TOKEN\")\nfeeders = client.feeders\n\n# get the first feeder\nfeeder = feeders[0]\nprint(feeder.battery_level)\n\n```\n#### Get current food level\n```python\nimport petsafe_smartfeed as sf\n\nclient = sf.PetSafeClient(email=\"email@example.com\",\n                       id_token=\"YOUR_ID_TOKEN\",\n                       refresh_token=\"YOUR_REFRESH_TOKEN\",\n                       access_token=\"YOUR_ACCESS_TOKEN\")\nfeeders = client.feeders\n\n# get the first feeder\nfeeder = feeders[0]\nstatus = feeder.food_low_status\n\nif status == 0:\n    print(\"Feeder has food.\")\nelif status == 1:\n    print(\"Feeder is low on food.\")\nelif status == 2:\n    print(\"Feeder is out of food.\")\n\n```\n\n## Contributing\nAll contributions are welcome. \nPlease, feel free to create a pull request!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechzune%2Fpetsafe_smartfeed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechzune%2Fpetsafe_smartfeed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechzune%2Fpetsafe_smartfeed/lists"}