{"id":16747016,"url":"https://github.com/selfup/sinio","last_synced_at":"2025-08-20T23:05:50.258Z","repository":{"id":71266625,"uuid":"92261376","full_name":"selfup/sinio","owner":"selfup","description":"Sinatra Micro Service API for Raspberry Pi GPIO :smile:","archived":false,"fork":false,"pushed_at":"2017-09-07T00:00:14.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T02:27:16.644Z","etag":null,"topics":["api","gpio","gpio-pins","microservice","raspberrypi","ruby","sinatra"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/selfup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-05-24T07:09:19.000Z","updated_at":"2017-05-28T10:44:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"460dfe76-fd86-4b71-93cd-79a564cea377","html_url":"https://github.com/selfup/sinio","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"f08978bac32cbf82621822d7faf8e86568d2593b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/selfup/sinio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2Fsinio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2Fsinio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2Fsinio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2Fsinio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selfup","download_url":"https://codeload.github.com/selfup/sinio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2Fsinio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271400259,"owners_count":24752830,"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-08-20T02:00:09.606Z","response_time":69,"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":["api","gpio","gpio-pins","microservice","raspberrypi","ruby","sinatra"],"created_at":"2024-10-13T02:08:53.608Z","updated_at":"2025-08-20T23:05:50.241Z","avatar_url":"https://github.com/selfup.png","language":"Ruby","readme":"# Sinatra GPIO API (sinio)\n\nMust run on: Raspberry Pi 2 B or newer\n\nDefault is direction out on pin 17 only. You can mess around with the config :tada:\n\nTo be used as an internal node. Another application on the RPI should talk to this!\n\nHave another app serve the api/webpage from the same raspberry pi and have it proxy via internal api calls.\n\n*Because* we must use **sudo** to run this GPIO Server, it is best to have it as extracted as possible (micro/pico service).\n\n### Requirements\n\n**An up to date raspberry pi** To be sure, run `sudo apt-get update -y`\n\n**ruby 2.3.4** *or greater* installed via `rbenv` or `rvm` on the raspberry pi\n\n--\n\n**rbenv sudo** [rbenv sudo](https://github.com/dcarley/rbenv-sudo)\n\nOR\n\n**rvmsudo** [rvmsudo](https://rvm.io/integration/sudo)\n\n--\n\n### Scripts (rpi only)\n\nThere is a production script that will run the app on `localhost:9292`\n\nRun it like so: `./scripts/production.sh`\n\nIt will *run the app as a daemon* and set the RPI=true ENV VAR for you\n\n--\n\nThere is a dev script that will not run as a daemon\n\nIt will run on the same host/port as the above script\n\nRun it like so: `./scripts/development.sh`\n\n--\n\n*these scripts assume you are using `rbenv sudo` you may change them to use `rvmsudo` :rocket:*\n\n### Options\n\n* to set base ip: `bundle exec rackup --host 0.0.0.0`\n* to set a port: `bundle exec rackup -p 8080`\n* to run as daemon: `bundle exec rackup -D` (you can also use screen or tmux and detach instead of `-D`)\n\n* to set all three (ip, port, daemon): `bundle exec rackup --host 0.0.0.0 -p 8080 -D`\n\n**don't forget to use rbenv/rvm sudo!** ex: `rbenv sudo bundle exec rackup`\n\n### Api\n\n**GET (fetch pin state)**\n\nGET -\u003e `/pins`\n\n**GET (update pin state)**\n\nGET -\u003e `/set?17=true`\n\n*This will turn on GPIO 17*\n\nGET -\u003e `/set?17=false`\n\n*This will turn off GPIO 17*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfup%2Fsinio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselfup%2Fsinio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfup%2Fsinio/lists"}