{"id":15132822,"url":"https://github.com/thequib/rondo","last_synced_at":"2026-02-02T17:39:09.963Z","repository":{"id":255692411,"uuid":"844799031","full_name":"TheQuib/Rondo","owner":"TheQuib","description":"Trigger API calls at scale with just a Raspberry Pi, a button, and Ansible.","archived":false,"fork":false,"pushed_at":"2024-11-04T15:54:33.000Z","size":615,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T08:51:35.048Z","etag":null,"topics":["ansible","api","automation","linux","raspberry-pi","semaphore-ui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheQuib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-08-20T01:51:53.000Z","updated_at":"2024-11-04T15:50:00.000Z","dependencies_parsed_at":"2024-09-13T02:25:15.008Z","dependency_job_id":"b58cb3a1-cd98-46fd-8c62-7c0193e93777","html_url":"https://github.com/TheQuib/Rondo","commit_stats":null,"previous_names":["thequib/rondo"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheQuib%2FRondo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheQuib%2FRondo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheQuib%2FRondo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheQuib%2FRondo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheQuib","download_url":"https://codeload.github.com/TheQuib/Rondo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246096781,"owners_count":20723019,"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":["ansible","api","automation","linux","raspberry-pi","semaphore-ui"],"created_at":"2024-09-26T04:40:36.398Z","updated_at":"2026-02-02T17:39:09.889Z","avatar_url":"https://github.com/TheQuib.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rondo\nTrigger API calls at scale with just a Raspberry Pi, a button, and Ansible.\n\nOut of the box, the packaged Ansible Playbook and Docker Container will make an API call to a specified endpoint with an API key, passing out `user_id` and `door_id` variables, designed to unlock doors remotely using a button.\n\n# tl;dr\n - Rondo will make API calls to an endpoint using custom headers and payloads.\n - The `config.yml` file contains each variable that can be set. Add / remove the variables you want to specify for the headers and the body.\n - Once you are satisfied with the variables, add them into Ansible as environment variables (store them as you please, hopefully securely). **IF USING ANSIBLE SEMAPHORE**: Use extra secret variables or inventory host variables ([explained below](#modifying-variables))\n\n# Setup\n## Variables\nAt base level, you will need:\n\n**Required:**\n - `api_url`, *string*: The API endpoint URL Python will make calls to.\n - `x-api-key`, *string*: The API key Python will use to authenticate to the API.\n - `door_id`, *string*: The ID of the door to unlock.\n - `user_id`, *string*: The ID of the user that will unlock the door.\n\n**Optional:**\n - `led_enabled`, *bool*: If you want to enable status LED functionality\n   - *Default*: `false`\n - `led_pin`, *int*: GPIO pin for LED connection\n   - *Default*: `23`\n - `button_pin`, *int*: GPIO pin for button connection\n   - *Default*: `17`\n\n## Modifying variables\nThe variables in the configuration can be modified to your use case. Add or remove them, and the script will update the headers and body accordingly.\n\n## Configure Variables in Semaphore UI\nThere are two type of variables that you can configure in Semaphore:\n - Per host\n - Globally\n\n### Per host variables\nConfigure per host variables using the Ansible inventory.\n\nIn Semaphore:\n - Navigate to `Inventory`.\n - Go to `New Inventory` \u003e `Ansible Inventory`.\n - Give it a friendly name.\n - Select credentials as necessary.\n - Select `Static YAML` as the type.\n - Use the following template.\n   - Set variables that you want to change per host as desired.\n```yaml\nnotes:\n  hosts:\n    pi1:\n      ansible_host: 192.168.1.101\n      ansible_user: pi\n      DOOR_ID: e3a1d7f9-6b3c-4f59-b813-1a728a214d89\n      USER_ID: pi1_user\n    pi2:\n      ansible_host: 192.168.1.102\n      ansible_user: pi\n      DOOR_ID: e3a1d7f9-6b3c-4f59-b813-1a728a214d89\n      USER_ID: pi2_user\n    pi3:\n      ansible_host: 192.168.1.103\n      ansible_user: pi\n      DOOR_ID: 7c5e8a92-2b41-4de6-8a3f-4d182bb5f2e9\n      USER_ID: pi3_user\n```\n\n\n### Global variabes\nConfigure global variables (variables that will apply to all hosts) using Semaphore's *Environment* feature.\n\nIn Semaphore:\n - Navigate to `Environment`.\n - Go to `New Environment`.\n - Give it a friendly name.\n - For each variable you want to configure for all hosts, make sure you're configuring `Extra Variables`.\n - Use `Secrets` if you want to use Semaphore's built-in secret manager.\n\n## LED functionality\nIf the `led_enabled` variable is set to `true`, a status LED is triggered on GPIO pin 23 (set by the `led_pin` variable if you wish to change it).\n\nCurrent statuses:\n - *Solid*: `main.py` is running, awaiting a button press.\n - *Blinking*: Button has been pressed and `button_handler.py` is currently running API actions.\n\n# Default pinout connections\nThe following is a diagram showing what pins to connect to if using the default pin configuration:\n\n![RPi3 GPIO Pinout](/rpi3-gpio-pinout.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthequib%2Frondo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthequib%2Frondo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthequib%2Frondo/lists"}