Moved setup instructions for Raspbian to a wiki page.

master
Gina Häußge 2013-03-16 00:34:40 +01:00
parent 3350b48a76
commit 1e381cc793
1 changed files with 1 additions and 78 deletions

View File

@ -228,84 +228,7 @@ settings dialog within OctoPrint:
Setup on a Raspberry Pi running Raspbian
----------------------------------------
I currently run the OctoPrint on a Raspberry Pi running Raspbian (http://www.raspbian.org/). I recommend to use
a maximum baudrate of 115200 baud in your printer firmware, as the used Python serial module does not support
250000 baud in all Linux distributions yet (Raspbian being not one of them, at least according to my experience).
For the basic package you'll need Python 2.7 (should be installed by default), pip and a couple of dependencies
listed in requirements.txt:
cd ~
sudo apt-get install python-pip git
git clone https://github.com/foosel/OctoPrint.git
cd OctoPrint
sudo pip install -r requirements.txt
You should then be able to start the OctoPrint server:
pi@raspberrypi ~/OctoPrint $ ./run
* Running on http://0.0.0.0:5000/
If you also want webcam and timelapse support, you'll need to download and compile MJPG-Streamer:
cd ~
sudo apt-get install subversion libjpeg8-dev imagemagick libav-tools
wget -Omjpg-streamer.tar.gz http://mjpg-streamer.svn.sourceforge.net/viewvc/mjpg-streamer/mjpg-streamer/?view=tar
tar xfz mjpg-streamer.tar.gz
cd mjpg-streamer
make
This should hopefully run through without any compilation errors. You should then be able to start the webcam server:
pi@raspberrypi ~/mjpg-streamer $ ./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so"
MJPG Streamer Version: svn rev:
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: MJPEG
[...]
o: www-folder-path...: disabled
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled
If you now point your browser to `http://<your Raspi's IP>:8080/?action=stream`, you should see a moving picture at 5fps.
Open `~/.octoprint/config.yaml` and add the following lines to it:
webcam:
stream: http://<your Raspi's IP>:8080/?action=stream
snapshot: http://127.0.0.1:8080/?action=snapshot
ffmpeg: /usr/bin/avconv
Restart the OctoPrint server and reload its frontend. You should now see a "Webcam" tab with content.
If you want to be able to shutdown and restart your Pi via the webinterface, you'll first have to add a `sudo` rule
for the system user OctoPrint is running under (for me that's the default user `pi`):
pi@raspberrypi ~ $ sudo -s
root@raspberrypi:/home/pi# cat > /etc/sudoers.d/octoprint-shutdown
pi ALL=NOPASSWD: /sbin/shutdown
^D
root@raspberrypi:/home/pi# exit
Then add the following lines to your `~/.octoprint/config.yaml`:
system:
actions:
- name: Shutdown
command: sudo shutdown -h now
action: shutdown
confirm: You are about to shutdown the system.
- name: Reboot
command: sudo shutdown -r now
action: reboot
confirm: You are about to reboot the system
After restarting and reloading OctoPrint, this should add a System menu to the top right where you'll find the two
commands. Both are configured to show you a confirmation message before being executed (the `confirm` part) so that
you'll hopefully not shutdown or reboot your Pi accidentally.
Once everything works, add the startup commands to `/etc/rc.local`.
A comprehensive setup guide can be found [on the wiki](https://github.com/foosel/OctoPrint/wiki/Setup-on-a-Raspberry-Pi-running-Raspbian).
Credits
-------