{"id":15619727,"url":"https://github.com/drbragg/iotonrails","last_synced_at":"2025-02-22T04:24:55.364Z","repository":{"id":122870696,"uuid":"130254093","full_name":"DRBragg/IoTonRails","owner":"DRBragg","description":null,"archived":false,"fork":false,"pushed_at":"2018-04-19T18:51:44.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-02T17:22:18.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DRBragg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-04-19T18:07:27.000Z","updated_at":"2018-04-19T18:51:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a553427-2bc1-4f2e-a8a3-c4b1ae1539b6","html_url":"https://github.com/DRBragg/IoTonRails","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRBragg%2FIoTonRails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRBragg%2FIoTonRails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRBragg%2FIoTonRails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRBragg%2FIoTonRails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DRBragg","download_url":"https://codeload.github.com/DRBragg/IoTonRails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240125303,"owners_count":19751686,"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-10-03T08:41:19.354Z","updated_at":"2025-02-22T04:24:55.345Z","avatar_url":"https://github.com/DRBragg.png","language":"Ruby","readme":"# Security Device App\n\n## Overview\n\nThis repository contains code to run a Ruby on Rails web application for a \"security\" device, which consists of a motion sensor, a sound sensor, and a vibration sensor connected to a TI C32200sf board via a Grove Base Boosterpack.\n\nThe web application allows users to see data from the sensors in a browser window.\n\n## Requirements\n\nIn order to use this code, you will need to have rails installed and bundler installed.\n\nTo see the live updating web app functionality implemented in the `live_update`branch or the `live_update_red` branch, you will also need to have a redis server installed. If you are on a mac, you can do this by running `brew install redis`.\n\n## Set up\n\nConnect one end of a USB cable to the port at the top of the TI C32200SF board and the other end to a USB port on your computer.\n\nConnect the three sensors to the following ports on the Grove Base Boosterpack:\n* Connect the vibration sensor to port J6.\n* Connect the sound sensor to port J9.\n* Connect the motion sensor to port J11.  \n\n\nFor more information about the sensors and their interfaces, see [the Apiotics Portal page for a Security Device worker](https://portal.apiotics.com/workers/108).\n\n## Branches\n\nThere are four branches in this repository.\n\n* The `master` branch contains code for a rails application for the Security Device.\n* The `red_row` branch builds off the master branch and contains additional logic to turn the background of the row for any device red if the devices sensors detect motion or vibration above a certain threshold, or if the sound sensor value is greater than 100.\n* The `live_update` branch also builds off the master branch but contains additional logic to automatically update the data from the sensors on the web app without needing to refresh the page.\n* The `live_update_red` branch contains the additional logic from the change_display branch AND the live_update branch, to both update the display AND automatically update the web app with data from the sensors.\n\nNote: For the `live_update` branch and the `live_update_red` branch, you will need to install a redis server in order to see updates on the web app without refreshing the page.\n\n\n## Implementation\n\n1. Decide which branch in the repository has the functionality you want, and clone it onto your local machine.\n\n2. If you are using Linux, uncomment the following line in the Gemfile:\n`# gem 'mini_racer', platforms: :ruby`.\n\n3. If you don't already have bundler installed, run `gem install bundler` then run `bundle`.\n\n4. Run `rake db:migrate`.\n\n5. To start communication with the web app, run `rake dev_comms:start`.\n\n6. If you are using the live_update or live_app_update branch and want to see the values update automatically, you will need to start a redis server by opening a new terminal and running `redis-server`.  Leave this terminal open in the background.  If you are using the `master` or `app_update` branch, skip this step.\n\n7. To start your Rails server, run `rails server` (or `rails s`).\n\n8. To see the web app, browse to \u003chttp://localhost:3000/security_devices\u003e.\n\nNote:\nIf you decide to modify any code in the rails app, you will need to run `dev_comms:restart` (or `dev_comms:stop` then `dev_comms:start`) in order to see the updated functionality on the web app.\n\n## More Info\n* [Ruby on Rails Apiotics Gem](https://portal.apiotics.com/docs/4)\n* [Security Device page in Apiotics Portal](https://portal.apiotics.com/workers/108)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbragg%2Fiotonrails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrbragg%2Fiotonrails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbragg%2Fiotonrails/lists"}