Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saturngod/picontrol
reboot and shutdown the raspberry pi from web browser
https://github.com/saturngod/picontrol
Last synced: 2 months ago
JSON representation
reboot and shutdown the raspberry pi from web browser
- Host: GitHub
- URL: https://github.com/saturngod/picontrol
- Owner: saturngod
- Created: 2013-01-29T06:21:33.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-12T15:55:55.000Z (almost 12 years ago)
- Last Synced: 2024-04-08T17:02:02.884Z (9 months ago)
- Language: JavaScript
- Homepage: http://en.saturngod.net/shutdown-raspberry-pi-via-web
- Size: 246 KB
- Stars: 25
- Watchers: 6
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
piControl is allow reboot and shutdown from browser in local network. It's using node.js.
## Install Node.js
cd /usr/src
sudo wget http://nodejs.org/dist/v0.8.18/node-v0.8.18.tar.gz
sudo tar xvzf node-v0.8.18.tar.gz
cd node-v0.8.18
sudo ./configure
sudo make
sudo make install
The make process can take quite a while, well over **a hour** in most case.If you want to install node.js automatically , call
sudo sh ./install.sh
## Install forever
npm install forever -g
## Copy filesudo mkdir /opt/piControl/
Copy all files to /opt/piControl/or you can make git clone
cd /opt
sudo git clone git://github.com/saturngod/piControl.git piControl## Edit Control file
Open the pictlnode.
Edit **forever** and **APP** path.
## Create Service
sudo cp /opt/piControl/pictlnode /etc/init.d/pictlnode
sudo chmod +x /etc/init.d/pictlnode
update-rc.d pictlnode defaults
sudo insserv pictlnode
reboot
After reboot , check your ip first.ifconfig
After you know the IP , call ***http://[your_ip_address]:1337*** from any browser in your local network.Recommend to use static IP to control the raspberry pi.
## API
### Shutdown
http://[yourip]:1337/shutdown
### Restart
http://[yourip]:1337/restart
### Free Space
http://[yourip]:1337/freedisk
## Todo
- Make installer like `npm install picontrol` and everything done.