{"id":16775086,"url":"https://github.com/juangesino/photon","last_synced_at":"2026-05-08T10:35:45.359Z","repository":{"id":79339638,"uuid":"134637832","full_name":"juangesino/photon","owner":"juangesino","description":"Meteor app to control Photon-connected lights.","archived":false,"fork":false,"pushed_at":"2018-05-24T12:47:21.000Z","size":1454,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-29T14:44:53.432Z","etag":null,"topics":["android","iot","iot-application","meteor","meteorjs","mobile","particle-io","particle-photon","photon","smart-home","smart-lights","smart-switch","smartswitch"],"latest_commit_sha":null,"homepage":null,"language":"CSS","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/juangesino.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":"2018-05-23T23:55:27.000Z","updated_at":"2018-05-24T12:47:22.000Z","dependencies_parsed_at":"2023-02-25T03:30:41.822Z","dependency_job_id":null,"html_url":"https://github.com/juangesino/photon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/juangesino/photon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juangesino%2Fphoton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juangesino%2Fphoton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juangesino%2Fphoton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juangesino%2Fphoton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juangesino","download_url":"https://codeload.github.com/juangesino/photon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juangesino%2Fphoton/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32776916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["android","iot","iot-application","meteor","meteorjs","mobile","particle-io","particle-photon","photon","smart-home","smart-lights","smart-switch","smartswitch"],"created_at":"2024-10-13T06:50:59.393Z","updated_at":"2026-05-08T10:35:45.340Z","avatar_url":"https://github.com/juangesino.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cimg src=\"public/assets/images/logo.png\" alt=\"Photon Logo\" width=\"100\" align=\"left\" /\u003e\u003cbr\u003e\u003ch1\u003e\u0026nbsp;\u0026nbsp;Photon\u003c/h1\u003e\u003cbr\u003e\n\n\u003cimg src=\"resources/mockups/mockup-both.png\" alt=\"Photon Screenshot\" width=\"400\" /\u003e\n\nMeteor app to control \u003ca href=\"https://store.particle.io/collections/photon\" target=\"_blank\"\u003ePhoton\u003c/a\u003e-connected lights.\n\n### About\n\nThis project contains the source code for my personal Android application for controlling my lights. The lights are controlled using a \u003ca href=\"https://store.particle.io/collections/photon\" target=\"_blank\"\u003ePhoton\u003c/a\u003e device and a relay. My lights are connected to the relay and this app triggers a function in the Photon to turn on/off the relay.\n\nThe app is built with Meteor which allows me to compile an APK for my Android phone.\n\n👉🏻 For the Photon-side of things checkout the project here: [github.com/juangesino/lux](https://github.com/juangesino/lux).\n\n## Setup\n\n1. **Install Meteor**\n\n    On Linux \u0026 Mac:\n\n    ```sh\n    \u003e curl https://install.meteor.com/ | sh\n    ```\n\n    This will setup [Meteor](http://github.com/meteor/meteor) (including [Node](https://github.com/nodejs/node) and [Mongo](https://github.com/mongodb/mongo) if necessary).\n\n    \u003e _Note:_ Windows users must [download installer](https://www.meteor.com/install).\n\n2. **Clone Repository**\n\n    ```sh\n    \u003e git clone https://github.com/juangesino/photon.git\n    \u003e cd photon\n    ```\n\n3. **Install Dependencies**\n\n    If you have npm installed:\n\n    ```sh\n    \u003e npm install\n    ```\n\n    If you only have meteor:\n\n    ```sh\n    \u003e meteor npm install\n    ```\n\n4. **Setup Keys**\n\n    In order for the application to connect with the Photon, we need to provide some auth key (the device ID and an access token).\n\n    Rename the file `/server/keys.js.example` to `/server/keys.js`.\n\n    Open the file and replace `\u003cDEVICE-ID\u003e` and `\u003cACCESS-TOKEN\u003e` with the device ID and an access token.\n\n    For info on how to get these variables see \u003ca href=\"https://docs.particle.io/guide/how-to-build-a-product/authentication/#access-tokens\" target=\"_blank\"\u003ethese docs\u003c/a\u003e.\n\n5. **Run**\n\n    While in repository directory run:\n\n    ```sh\n    \u003e meteor run\n    ```\n\n    Load browser and go to [http://localhost:3000/](http://localhost:3000/)\n\n    Alternatively, you can run:\n\n    ```sh\n    \u003e meteor run android-device\n    ```\n\n    With an Android phone connected to your computer and with USB debugging enabled to run the server on your computer and install the APK on your phone (connected to the same network). More info about running Meteor on Android \u003ca href=\"https://guide.meteor.com/mobile.html#running-on-android\" target=\"_blank\"\u003ehere\u003c/a\u003e and more info on debugging \u003ca href=\"https://guide.meteor.com/mobile.html#remote-debugging-android\" target=\"_blank\"\u003ehere\u003c/a\u003e.\n\n## Deploy\n\n### Hardware\n\nThis project requires my \u003ca href=\"https://github.com/juangesino/lux\" target=\"_blank\"\u003eLux\u003c/a\u003e project. Go check it out here: \u003ca href=\"https://github.com/juangesino/lux\" target=\"_blank\"\u003egithub.com/juangesino/lux\u003c/a\u003e.\n\n### Server\n\nThe meteor application requires a server. We can do this by deploying the server to Heroku for free.\n\nFollow \u003ca href=\"https://medium.com/@leonardykris/how-to-run-a-meteor-js-application-on-heroku-in-10-steps-7aceb12de234#.lmg8s462o\" target=\"_blank\"\u003ethese\u003c/a\u003e steps to deploy the Meteor app on Heroku.\n\nAfter that we need to setup our two environment variables: `deviceId` and `accessToken`. To do so, we need to add the following Config Var to our Heroku application:\n\n```\nMETEOR_SETTINGS = {\"secrets\": {\"deviceId\":\"\u003cDEVICE-ID\u003e\", \"accessToken\": \"\u003cACCESS-TOKEN\u003e\"} }\n```\n\nWhere `\u003cDEVICE-ID\u003e` and `\u003cACCESS-TOKEN\u003e` are the device ID and access token for the Photon device.\n\n👉🏻 For info on how to get these variables see \u003ca href=\"https://github.com/juangesino/lux\" target=\"_blank\"\u003egithub.com/juangesino/lux\u003c/a\u003e.\n\n👉🏻 For info on how to set these variables in Heroku see \u003ca href=\"https://devcenter.heroku.com/articles/config-vars#setting-up-config-vars-for-a-deployed-application\" target=\"_blank\"\u003ethese docs\u003c/a\u003e.\n\n**Note**: You will need to deploy this server for the Android app to work.\n\n**Note 2**: The name of the config variable is `METEOR_SETTINGS` and the value for it is everything to the right of the `=` sign.\n\n### Android\n\nTo build for Android run:\n\n```sh\n\u003e meteor build ../\u003cPATH-TO-BUILD\u003e/photon --debug --server=https://\u003cYOUR-HEROKU-APP-NAME\u003e.herokuapp.com/\n```\n\nReplace `\u003cPATH-TO-BUILD\u003e` with the actual path where you want your build to be generated.\nReplace `\u003cYOUR-HEROKU-APP-NAME\u003e` with the name of the Heroku app for your server. If you are not using Heroku, replace the entire `--server` argument with your server's URL.\n\n## Contributing\n\n1. Fork it ( https://github.com/juangesino/photon/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## License\n\nSee [MIT-LICENSE](https://github.com/juangesino/photon/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuangesino%2Fphoton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuangesino%2Fphoton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuangesino%2Fphoton/lists"}