{"id":25419411,"url":"https://github.com/tyhil/rotary","last_synced_at":"2025-07-28T16:07:11.761Z","repository":{"id":275242535,"uuid":"604432493","full_name":"TyHil/rotary","owner":"TyHil","description":"Control of lights via a rotary phone dial.","archived":false,"fork":false,"pushed_at":"2025-05-08T19:41:01.000Z","size":2526,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T11:49:59.754Z","etag":null,"topics":["internet-of-things","python","rotary-dial","smartthings"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TyHil.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}},"created_at":"2023-02-21T03:30:48.000Z","updated_at":"2025-05-08T19:41:06.000Z","dependencies_parsed_at":"2025-05-09T00:00:17.921Z","dependency_job_id":"a140828b-aaa1-4464-928f-694b37a561bb","html_url":"https://github.com/TyHil/rotary","commit_stats":null,"previous_names":["tyhil/rotary"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TyHil/rotary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TyHil%2Frotary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TyHil%2Frotary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TyHil%2Frotary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TyHil%2Frotary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TyHil","download_url":"https://codeload.github.com/TyHil/rotary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TyHil%2Frotary/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267543269,"owners_count":24104538,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["internet-of-things","python","rotary-dial","smartthings"],"created_at":"2025-02-16T18:39:24.428Z","updated_at":"2025-07-28T16:07:11.730Z","avatar_url":"https://github.com/TyHil.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rotary\n\nSpecialized Python program run on my Raspberry Pi that interfaces with a rotary phone dial to control my bedside lamp and LED Strip. The lights are plugged into smart plugs which allows them to be controlled via Samsung's SmartThings API. The LED strip runs on an Arduino (code [here](https://github.com/TyHil/led-strip-effects-and-game/)) which allows it to be controlled over serial to change mode and act as a light alarm.\n\n\u003e [!IMPORTANT]\n\u003e This project requires a SmartThings Personal Access Token (PAT) generated before December 30th 2024. Otherwise, the token will need to be changed every 24 hours.\n\n\u003cimg alt=\"The device on the wall\" src=\"Photos/20250131_221023.jpg\" width=\"500\"/\u003e\n\n## Setup\n\n1. Clone the project and install packages:\n\n```\ngit clone https://github.com/TyHil/rotary.git\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\n2. Ensure the Serial interface is enabled by running `sudo raspi-config` and navigating to \"Interface Options\" then \"Serial\" and choosing \"No\" to the login shell over serial and \"Yes\" to enable the serial hardware.\n\n3. Run `cp src/config.example.py src/config.py` and add your SmartThings token to the new file.\n\n4. Run `cp src/alarms.example.py src/alarms.py` and add your alarm times to the new file.\n\n5. Run `cp rotary.example.service /etc/systemd/system/rotary.service`, edit the new file to have the correct `User` and `ExecStart` for you, and run `sudo systemctl daemon-reload`.\n\n6. Optionally add the contents of `example.bash_aliases` to your `~/.bash_aliases` or run `mv example.bash_aliases ~/.bash_aliases`.\n\n7. Connect your rotary dial to GND and GPIO18 (pins 6 and 12) and your RPI-\u003eArduino to 3V3-\u003e3V3, GPIO4-\u003eGND, GPIO14-\u003eRX, and GPIO15-\u003eTX (pins 1, 7, 8, and 12). Use a voltage level-shifter if your Arduino does not run in 3.3 volts.\n\n8. Finally run `source ~/.bash_aliases` and `rotary start` to start the progam.\n\n## License\n\nGPL-3.0 License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyhil%2Frotary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyhil%2Frotary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyhil%2Frotary/lists"}