1

Topic: Raspberry Pi and Octopi on SD4

I didn't see a dedicated thread on this already; just a few oblique mentions here and there...so pardon if I'm revisiting an old subject.

I could use a stand-alone SD4: where I can either 'fire and forget' a print job to the SD4, or take the SD4 to locations where it can function as a stand-alone appliance.

Using a Raspberry Pi with Octopi seemed an easy choice for me, since I'm already familiar with the Rpi and Linux.  For the 'appliance' function, I have a 2.8" TFT touchscreen that I ordered from Adafruit.  My thought was to use the touchscreen to access the Octopi locally to execute gcode files.

Current Status:
Octopi's distro image works great, and requires very little configuration...I would consider it an out-of-the-box solution.  I have used a CAT5 and WiFi connection with equally good results.  The Rpi's camera module works very well with the mpeg-streamer service (neither requiring configuration). I've even configured my home router so that I can view the Rpi's camera from work or my Android, to monitor print status.

I'm encountering some difficulty getting the TFT screen to work with Octopi.  Whenever I install the necessary libraries and kernel to run the screen, it breaks Octopi.  I've tried a couple of different installation methods, with the same results.  The Adafruit Rpi image works fine (the screen is very clear and bright...the touch function works better than I expected).

My next plan of attack is...instead of installing the TFT screen onto the Octopi image...to try installing Octopi onto the
Adafruit TFT image.  I am confident of ultimate victory.

If anyone's interested in doing something similar, I'll post my progress here.  If not, then nyah, nyah, I have something you don't!

2

Re: Raspberry Pi and Octopi on SD4

The octoprint over adafruit is probably a good option... Good luck!

I have terrible performance trouble with the octopi + mpeg streamer over wifi. The web interface gets very slow when the camera is connected, as are uploads, and the camera refresh rate can be several seconds. With the camera disconnected it flies, and on lan it's blinding. You reckon the camera is running fine? What am I doing wrong?? :Z

SD3. Mk2b + glass, heated enclosure, GT2 belts, direct drive y shaft, linear bearings, bowden-feed E3D v5 w/ 0.9° stepper
Smoothieboard via Octoprint on RPi

3

Re: Raspberry Pi and Octopi on SD4

I have my Octopi overclocked to Turbo.  If I use Chromium on the pi to watch its own camera through Octopi, it gets a little laggy on the frame rate, and the CPU is almost maxed out.  When I use a different computer to monitor the camera, CPU usage is about half, and drops way low when the camera is not being viewed.

I have found that you don't need to have the GUI running for Octopi to work.  I'm sure it saves some horsepower, but can't say how much.

At the moment,  I can build OctoPrint from source code and install it on Adafruit's image, but can't get mjpg-streamer working.  Raspivid and Raspistill work correctly, so it's just something with mjpg-streamer.

4

Re: Raspberry Pi and Octopi on SD4

I should plug mine into a monitor and find out whether it's running the gui - I hope it isn't, but I don't remember changing any settings to turn it off...

SD3. Mk2b + glass, heated enclosure, GT2 belts, direct drive y shaft, linear bearings, bowden-feed E3D v5 w/ 0.9° stepper
Smoothieboard via Octoprint on RPi

5

Re: Raspberry Pi and Octopi on SD4

I did a little unscientific research into framerates, just to get an idea of performance level:

Using another computer on my home network, I set up Firefox to monitor the Pi's camera through Octopi, and VLC to monitor the camera stream directly.  I used Fraps to give an indication of framerate for each instance of the video stream.  Here's what I found:

With the Pi booted up to the text login, Firefox was showing a rate of 32fps, VLC 20fps.  When I logged in, the framerate only changed +/- 1 on each iteration.  ...about what I expected.

What was interesting was that when I started the GUI, it made no difference to the framerates.  Moving the mouse, changing the camera's image content, even going from very bright to very dim scene lighting, had no effect on fps.  Opening Midori or Chromium, or aggressively moving the mouse around did not affect the video stream's fps, even though the CPU meter fluctuated in response.

Another interesting observation was that with no program viewing the camera, the CPU usage was very low (based on the Raspbian CPU graph).  When one instance was viewing the stream, CPU usage went to about 50%.  Additional instances of viewing the video stream did not increase CPU usage.  The streamer must be using an omnicast mode, where every viewer is tapping into the same stream, not initiating a separate stream per viewer.

What WAS impacted, was when I tried viewing the video stream on the Pi itself using Chromium.  The Pi's video was very choppy whenever other remote viewers were active, but the remote streams were unaffected.  With local and remote viewing occurring, the CPU meter was maxed out, local video was choppy, streamed video through the network was unaffected.

Nothing I tried negatively affected the quality of the video stream when viewed externally.  I would venture a guess and say that perhaps the problem is with your wireless connection.  Possibly, either the wireless driver on your Pi, or your wireless router have configuration issues that are impacting video streaming.

6

Re: Raspberry Pi and Octopi on SD4

Wow, thanks. That is quite informative - I think I'll try on the wired ethernet connection, and rule out the wifi. I've already noticed a remarkable improvement in the upload speed by doing this, but haven't reinstalled the camera yet.

SD3. Mk2b + glass, heated enclosure, GT2 belts, direct drive y shaft, linear bearings, bowden-feed E3D v5 w/ 0.9° stepper
Smoothieboard via Octoprint on RPi

7 (edited by adrian 2014-07-07 08:44:24)

Re: Raspberry Pi and Octopi on SD4

BannanaPi Anyone?
RPi but with an A20 + DDR3 support instead (and SATA).. so considerably faster (Dual Core CPU at higher clock, plus faster RAM)

http://www.banana-pi.com

8

Re: Raspberry Pi and Octopi on SD4

I just installed a new WiFi device from Adafruit:
http://www.adafruit.com/products/814?gc … AsD68P8HAQ

Painless installation, works perfectly, no detriment to framerates. 

I realize that the default framerate for the streamer is 10fps;  I suspect that the framerates Fraps was reporting indicates how fast the respective viewers refreshed.

9

Re: Raspberry Pi and Octopi on SD4

Adrian, that Banana Pi looks pretty interesting.  More expensive than the Raspberry Pi, but more capable too.

Intriguing idea...being able to run Rasbian images, Linux, or Android.  I'm going to get one, but I'll have to finish some current projects before I get a chance to play with it.

I wonder what sort of community support will spring up around it.

10

Re: Raspberry Pi and Octopi on SD4

I finally got it working tonight!  I have my RPi running OctoPi with the RPi camera and Adafruit's TFT display.

I had been having trouble getting OctoPrint installed onto Adafruit's image.  I went back to my original plan of putting the Adafruit TFT kernel and files onto OctoPi.  The problem was that Adafruit's files were based on an older version of Raspbian, and there were module version conflicts between OctoPrint, OctoPi, and Adafruit.

After some experimentation, I found that I could use OctoPi version .8 (current version is .9), and install the TFT files onto that image.  I still have some details to finish, but it looks like it's going to work after all.

11 (edited by knowack 2014-07-21 13:16:13)

Re: Raspberry Pi and Octopi on SD4

Here's a screenshot:

Post's attachments

OctoPiTFT.jpg
OctoPiTFT.jpg 327.04 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

12

Re: Raspberry Pi and Octopi on SD4

Nice! I've got octoprint running on my printer now, but maybe it's time to add a pitft for a local interface... would be nice to jog locally! smile

SD3. Mk2b + glass, heated enclosure, GT2 belts, direct drive y shaft, linear bearings, bowden-feed E3D v5 w/ 0.9° stepper
Smoothieboard via Octoprint on RPi

13

Re: Raspberry Pi and Octopi on SD4

Hi

Does anyone know how to setup 2 octopi to run 2 separate printer?  I tried to change the hostname of the 2nd server to octopi2 but I am having trouble connecting to it via "octopi2.local".  I can still find it using the ip address.

Anyone have any idea how i can make the "octopi2.local" option work?

Thanks

14

Re: Raspberry Pi and Octopi on SD4

weiterk wrote:

Hi

Does anyone know how to setup 2 octopi to run 2 separate printer?  I tried to change the hostname of the 2nd server to octopi2 but I am having trouble connecting to it via "octopi2.local".  I can still find it using the ip address.

Anyone have any idea how i can make the "octopi2.local" option work?

Thanks


When you say you changed the host name, you did this in /etc/hosts file?

15

Re: Raspberry Pi and Octopi on SD4

I used raspi-config.

16

Re: Raspberry Pi and Octopi on SD4

weiterk wrote:

I used raspi-config.

Doh! You are actually using two separate devices, not two instances of Octopi-server? Hmm....

Try on your windows PC to change your hosts file to list IP and hostname for static routing. You may have to do this in your router as well.

17

Re: Raspberry Pi and Octopi on SD4

Why is it not set in the raspberrypi but on the internet hub?

18 (edited by Retroplayer 2014-08-07 22:55:03)

Re: Raspberry Pi and Octopi on SD4

You are trying to get your PC to recognize octopi2.local as the server at IP ##, right?

Octopi2.local is, well, local to the octopi just like 127.0.0.1 is "LocalHost" to your PC. You cannot reach 127.0.0.1 from external network interface so your computer is not able to resolve the hostname to an IP address. Well, unless you have the bonjour service installed as recommended. Do you have that installed?

Update:
I don't have two raspberry pis to try it, but on my PC Octopi would not connect using octopi.local even with the bonjour print service installed. However, when I added 192.168.1.107 octopi.local to my windows/system32/drivers/etc/hosts file in windows, it resolves just fine. Add an entry for both and be done with it. The only downsides would be that you would need to do this on any PC you wanted to use that way and your octopi would need a static IP address.

19

Re: Raspberry Pi and Octopi on SD4

anyone can help me with my s4 and octopi on my raspberry pi? When I click on connect it's stay on "connecting"

20 (edited by grob 2014-10-22 23:08:41)

Re: Raspberry Pi and Octopi on SD4

letroll wrote:

anyone can help me with my s4 and octopi on my raspberry pi? When I click on connect it's stay on "connecting"

To start, check your connection settings in octoprint:
- make sure the COM port is correct (if in doubt, try another from the list!)
- check your baud rate (250000 should work from memory, it's a while since I've been to the connection settings page).

Let us know how you go with that...

SD3. Mk2b + glass, heated enclosure, GT2 belts, direct drive y shaft, linear bearings, bowden-feed E3D v5 w/ 0.9° stepper
Smoothieboard via Octoprint on RPi

21

Re: Raspberry Pi and Octopi on SD4

Confirm these settings:

http://i.imgur.com/DuRARdo.png

22

Re: Raspberry Pi and Octopi on SD4

^^ that
Thanks, Tim.

SD3. Mk2b + glass, heated enclosure, GT2 belts, direct drive y shaft, linear bearings, bowden-feed E3D v5 w/ 0.9° stepper
Smoothieboard via Octoprint on RPi

23 (edited by letroll 2014-10-24 17:23:41)

Re: Raspberry Pi and Octopi on SD4

works now, I don't know what change I have made but... It alive ^^

with dev/ttyACM0 on baudrate 250000. Thank you for your help big_smile