{"id":18091111,"url":"https://github.com/ryarnyah/nodejs-rpi-controller","last_synced_at":"2025-10-24T18:53:26.968Z","repository":{"id":13521276,"uuid":"16212454","full_name":"ryarnyah/nodejs-rpi-controller","owner":"ryarnyah","description":"NodeJS/AngularJS Raspberry PI controller","archived":false,"fork":false,"pushed_at":"2014-01-28T18:30:08.000Z","size":2416,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-19T13:51:08.498Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ryarnyah.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}},"created_at":"2014-01-24T18:07:47.000Z","updated_at":"2021-08-19T13:07:09.000Z","dependencies_parsed_at":"2022-09-05T08:10:42.127Z","dependency_job_id":null,"html_url":"https://github.com/ryarnyah/nodejs-rpi-controller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryarnyah/nodejs-rpi-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryarnyah%2Fnodejs-rpi-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryarnyah%2Fnodejs-rpi-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryarnyah%2Fnodejs-rpi-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryarnyah%2Fnodejs-rpi-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryarnyah","download_url":"https://codeload.github.com/ryarnyah/nodejs-rpi-controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryarnyah%2Fnodejs-rpi-controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271083357,"owners_count":24696276,"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-18T02:00:08.743Z","response_time":89,"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":[],"created_at":"2024-10-31T18:09:23.664Z","updated_at":"2025-10-24T18:53:21.936Z","avatar_url":"https://github.com/ryarnyah.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NodeJS AngularJS RPI Controller\r\n\r\nNodeJS RPI Controller have the following API:\r\n* /api/info\r\n\tReturn info about the RPI\r\n* /api/uptime\r\n\tReturn the RPI uptime\r\n* /api/load\r\n\tReturn the RPI load average\r\n* /api/mem\r\n\tReturn the RPI memory status\r\n* /api/mounts\r\n\tReturn the RPI mount points\r\n* /api/network\r\n\tReturn the RPI network interfaces\r\n* /api/shutdown\r\n\tShutdown the RPI\r\n* /api/reboot\r\n\tReboot the RPI\r\n\r\n## Install\r\n\r\nPre-requisite:\r\n* Node JS\r\n* NPM\r\n\r\nClone the nodejs-rpi-controller repository, run `npm install` to grab the dependencies!\r\n\r\n### Install to RPI\r\n\r\nPre-requisite:\r\n* Node JS\r\n* NPM\r\n\r\nClone the nodejs-rpi-controller repository.\r\nCreate a file secret.json inside nodejs-rpi-controller:\r\n\r\n    {\r\n        \"host\": \"\u003cHostname\u003e\",\r\n        \"username\": \"\u003cPi user\u003e\",\r\n        \"password\": \"\u003cPi user password\u003e\"\r\n    }\r\n\r\nAnd run `npm install \u0026\u0026 grunt deploy` to install minimal version of the application!\r\n\r\n### Running the app\r\n\r\nRuns like a typical express app:\r\n\r\n    node app.js\r\n\r\n### Install on RPI init.d\r\n* Create directory /opt/node/apps `sudo mkdir -p /opt/node/apps \u0026\u0026 sudo chown -R pi:pi /opt/node/apps`\r\n* Clone git repository into /opt/node/apps `cd /opt/node/apps \u0026\u0026 git clone https://github.com/ryarnyah/nodejs-rpi-controller.git`\r\n* Install dependencies `cd nodejs-rpi-controller \u0026\u0026 npm install`\r\n* Create nodejs-rpi-controller startup script `sudo nano /etc/init.d/nodejs-rpi-controller-startup.sh`\r\n\r\nPaste this:\r\n\r\n    #!/bin/bash\r\n    \r\n    NODE=/opt/node/bin/node\r\n    SERVER_JS_FILE=/opt/node/apps/nodejs-rpi-controller/app.js\r\n    USER=pi\r\n    OUT=/opt/node/apps/nodejs-rpi-controller/nodejs.log\r\n    \r\n    case \"$1\" in\r\n    \r\n    start)\r\n         echo \"starting node: $NODE $SERVER_JS_FILE\"\r\n         sudo -u $USER $NODE $SERVER_JS_FILE \u003e $OUT 2\u003e$OUT \u0026\r\n         ;;\r\n    \r\n    stop)\r\n         killall $NODE\r\n         ;;\r\n    \r\n    *)\r\n         echo \"usage: $0 (start|stop)\"\r\n    esac\r\n    \r\n    exit 0\r\n\r\nStart nodejs server `sudo chmod +x /etc/init.d/nodejs-rpi-controller-startup.sh \u0026\u0026 sudo /etc/init.d/nodejs-rpi-controller-startup.sh start \u0026\u0026 sudo update-rc.d nodejs-rpi-controller-startup.sh defaults`\r\n\r\nGo to `http://raspberrypi.local:3000/`\r\n## License\r\nMIT\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryarnyah%2Fnodejs-rpi-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryarnyah%2Fnodejs-rpi-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryarnyah%2Fnodejs-rpi-controller/lists"}