{"id":22468493,"url":"https://github.com/projectweekend/pi-control-client","last_synced_at":"2025-08-02T08:32:21.956Z","repository":{"id":25318834,"uuid":"28745708","full_name":"projectweekend/Pi-Control-Client","owner":"projectweekend","description":"A client for remotely controlling a Raspberry Pi running Pi-Control-Service (https://github.com/projectweekend/Pi-Control-Service)","archived":false,"fork":false,"pushed_at":"2015-02-18T02:36:00.000Z","size":196,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-17T17:30:24.459Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/projectweekend.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","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":"2015-01-03T14:27:37.000Z","updated_at":"2018-07-02T12:04:53.000Z","dependencies_parsed_at":"2022-08-24T04:40:18.674Z","dependency_job_id":null,"html_url":"https://github.com/projectweekend/Pi-Control-Client","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2FPi-Control-Client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2FPi-Control-Client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2FPi-Control-Client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2FPi-Control-Client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectweekend","download_url":"https://codeload.github.com/projectweekend/Pi-Control-Client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228453982,"owners_count":17922585,"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-06T11:16:59.157Z","updated_at":"2024-12-06T11:16:59.926Z","avatar_url":"https://github.com/projectweekend.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a client library for remotely controlling a Raspberry Pi that is running [Pi-Control-Service](https://github.com/projectweekend/Pi-Control-Service). After following the instructions for setting up the service, you will need to reuse the same RabbitMQ connection string and device key values to start a client.\n\n\n## Install it\n\n```\npip install Pi-Control-Client\n```\n\n## GPIO client\n\nThe GPIO client (`pi_control_client.GPIOClient`) is used to control a Raspberry Pi running the GPIO service. More information about the service can be found [here](https://github.com/projectweekend/Pi-Control-Service) in the **GPIO service** section.\n\n\n### Using the GPIO client\n\n```python\nfrom pi_control_client import GPIOClient\n\n# The RabbitMQ connection string (must match the one used when starting the service)\nRABBIT_URL='some_actual_connection_string'\n\n# A unique string you make up to identify a single Raspberry Pi (must match the one used when starting the service)\nDEVICE_KEY='my_awesome_raspberry_pi'\n\npins_client = GPIOClient(rabbit_url=RABBIT_URL)\n\n# Get all pins config\nresult = pins_client.read_config(DEVICE_KEY)\n\n# Get a pin config\nresult = pins_client.read_config(DEVICE_KEY, 18)\n\n# Turn a pin on\npins_client.on(DEVICE_KEY, 18)\n\n# Turn a pin off\npins_client.off(DEVICE_KEY, 18)\n\n# Read a pin value\nresult = pins_client.read_value(DEVICE_KEY, 18)\n```\n\n\n## Custom action client\n\nThe custom action service (`pi_control_service.CustomActionService`) is used to control a Raspberry Pi running the custom action service. More information about the service can be found [here](https://github.com/projectweekend/Pi-Control-Service) in the **Custom action service** section.\n\n\n### Using the custom action client\n\n```python\nfrom pi_control_client import CustomActionClient\n\n# The RabbitMQ connection string (must match the one used when starting the service)\nRABBIT_URL='some_actual_connection_string'\n\n# A unique string you make up to identify a single Raspberry Pi (must match the one used when starting the service)\nDEVICE_KEY='my_awesome_raspberry_pi'\n\nactions_client = CustomActionClient(rabbit_url=RABBIT_URL)\n\n# Call a custom action\nresult = actions_client.call(DEVICE_KEY, 'name_of_action_method')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectweekend%2Fpi-control-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectweekend%2Fpi-control-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectweekend%2Fpi-control-client/lists"}