Forum

Installing OctoPrin...
 

Installing OctoPrint and Octoprint-TFT to control your 3D Printer, with a touch screen!  

Page 1 / 2
  RSS

CrackedConsole
(@crackedconsole)
Member Admin
Joined: 9 months ago
Posts: 278
07/01/2019 8:24 pm  

I recently installed and setup OctoPrint on a Raspberry Pi B3 + to use with my new Ender 3, I figured I would share a write up I made as I went through the install and configuration.

Also, I am using the following hardware

 

First, we need to download OctoPi and create a MicroSD image from their downloads.

https://octoprint.org/download/

Once you have the most recent version of OctoPi downloaded and ready, insert the MicroSD card you will be using into your computer and upload the image to it.

A popular and simple tool to do so is Etcher.

https://www.balena.io/etcher/

Below is taken from the OctoPrint.org/download guide, under the Getting Started with OctoPi.


 

Please follow these steps after downloading
  1. Unzip the image and install the contained .img file to an SD card like any other Raspberry Pi image.
  2. Configure your WiFi connection by editing octopi-wpa-supplicant.txt on the root of the flashed card when using it like a thumb drive. Important: Do not use WordPad (Windows) or TextEdit (MacOS X)for this, those editors are known to mangle the file, making configuration fail. Use something like Notepad++, Atom or VSCode instead or at the very least heed the warnings in the file.

    Note: This changed with OctoPi 0.15.0, earlier versions had you edit octopi-network.txt which has a different format. This old method is no longer supported and the contents of this file will be ignored. Just use octopi-wpa-supplicant.txt.

    Please also refer take a look at the full WiFi setup guide in the FAQ that also includes Troubleshooting tips.
  3. Boot the Pi from the card.
  4. Log into your Pi via SSH (it is located at octopi.local if your computer supports bonjour or the IP address assigned by your router), default username is “pi”, default password is “raspberry”. Change the password using the passwd command. You do not need to expand the filesystem, current versions of OctoPi do this automatically.
  5. Access OctoPrint through  http://octopi.local  or  http://<your  pi's ip address>. https is available too, with a self-signed certificate.
Please also refer to OctoPi’s README, especially the “How to use it” section.

Once your Raspberry Pi is booted and you are able to SSH into your device, we can now start to configure the touch screen, and other software.

To SSH or connect to your device, first be sure to complete the WiFi setup above, or connect with an ethernet cable into your Raspberry Pi.
You can then use Putty as an SSH client to connect to the Raspberry Pi / OctoPi installation.
The name you will connect to is octopi.local

First lets run some updates to get everything ready.

sudo apt-get update
sudo apt update
sudo apt dist-upgrade
sudo apt clean
sudo reboot

We also need to setup autologin, to do so run

sudo raspi-config

And navigate to Boot Options - Desktop CLI - and choose Console Auto Login

 

For my specific LCD, I was able to locate the manual and other details here

http://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)

 

You can download and install the files with the following

git clone  https://github.com/waveshare/LCD-show.git 

cd LCD-show/

sudo chmod +x LCD35-show

sudo ./LCD35-show

The device will reboot, once it's booted we can log back in and continue.

Next we can rotate the display with the following command.

cd LCD-Show
sudo ./LCD35-show 270

Reboot your Raspberry Pi and make sure you get video on your LCD.

If your screen is not rotated correctly with the above command, do the following.

sudo nano /boot/config.txt

And change the line for your display to add :rotate=270 as shown below

dtoverlay=waveshare35a:rotate=270

Now that we have our LCD functional and working, lets install a user interface.

First is the X desktop environment, then Touch-TFT and its requirements

https://github.com/mcuadros/OctoPrint-TFT

 

sudo apt-get install libgtk-3-0

sudo apt install xserver-xorg xinit xserver-xorg-video-fbdev

 

Once X is installed, we can follow up with the installation of OctoPrint-TFT

wget  https://github.com/mcuadros/OctoPrint-TFT/releases/download/v0.1.2/octoprint-tft_0.1.2-1.stretch_armhf.deb 
sudo dpkg -i octoprint-tft_0.1.2-1.stretch_armhf.deb

sudo systemctl set-default graphical.target

 

Lastly we need to remove the 99-fbturbo.conf file from our Xorg directory.

sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf.old

Now on reboot OctoPrint-TFT should load and start attempting to connect

 

Next we can enable the Raspberry Pi camera, to do so get into the raspi config menu;

sudo raspi-config

Navigate to option 5 Interfacing Options, and enable the Camera under option 1.

I also like to disable the camera LED, this can be done with the following;

sudo nano /boot/config.txt

and add the following line

disable_camera_led=1

On next reboot the camera LED will be disabled.

 

I also modified my Raspberry Pi to connect to a network share housing gcode files for my printer, to do so I did the following.


sudo nano /etc/fstab

And added the following line (modify for your network and setup)

//server/share/Data/3D/gcode /home/pi/.octoprint/uploads/_network cifs username=pi,password=raspberry,domain=workgroup 0 0

 

//server will be the computer your network share is located and /share is the shared folder.

Some users have reported having to specify their cifs version for this to work correctly.
I've also noted, uploading files to the shared folder requires a refresh of the WebUI of OctoPrint for them to display in the file menu if you have navigated to it in your current session.

 

Upon reboot, it will mount my network share from \\Server\share to the Ocotprint Uploads folder on my Raspberry Pi.

 

This topic was modified 9 months ago 33 times by CrackedConsole
This topic was modified 8 months ago by CrackedConsole
This topic was modified 7 months ago by CrackedConsole
This topic was modified 6 months ago 2 times by CrackedConsole

Quote
CrackedConsole
(@crackedconsole)
Member Admin
Joined: 9 months ago
Posts: 278
17/01/2019 10:06 am  

Trouble Shooting

A full list of issues can be found in the official OctoPrint-TFT Github

Here

 

OctoPrint-TFT fails to load.

Check the following files

/etc/octoprint-tft-environment

And look for any invalid characters or formatting of the text

 


ReplyQuote
CrackedConsole
(@crackedconsole)
Member Admin
Joined: 9 months ago
Posts: 278
20/01/2019 10:32 pm  

A Quick video on how I am powering my Raspberry Pi running OctoPrint.


ReplyQuote
CrackedConsole
(@crackedconsole)
Member Admin
Joined: 9 months ago
Posts: 278
16/03/2019 11:18 pm  

I came across a discussion on Social Media regarding OctroPrint-TFT that linked backed to a fork of the Original.

It looks like in this build it includes a working fix for the screen blanking issue that plagues the current build.
I will be testing this build and and looking to utilize it and update the instructions (or supplement them for an option)

https://github.com/darksid3r/OctoPrint-TFT

 

(Place holder for updated v2 instructions to utilize the darksid3r build as an additional option)

This post was modified 6 months ago by CrackedConsole

ReplyQuote
tetranet
(@tetranet)
New Member
Joined: 4 months ago
Posts: 1
26/06/2019 3:48 am  

Hello,

Thanks for this great post 🙂 Now my display work.

Could help to unpaused display please ? What is the command line ?

Tetra


ReplyQuote
CrackedConsole
(@crackedconsole)
Member Admin
Joined: 9 months ago
Posts: 278
26/06/2019 10:50 am  
Posted by: tetranet

Hello,

Thanks for this great post 🙂 Now my display work.

Could help to unpaused display please ? What is the command line ?

Tetra

If you are refering to the screen going Blank or to Sleep and not being able to use the screen or press any buttons.
Thats a huge known issue for Octoprint-TFT sadly. There is a fork of the application that has the fix built in https://github.com/darksid3r/OctoPrint-TFT

Hopefully this weekend I can get around to installing it and writing up instructions on how to do so. 


ReplyQuote
Codiferous
(@codiferous)
New Member
Joined: 4 months ago
Posts: 2
30/06/2019 12:23 am  

This is a great guide! This is the closest I've been to getting this to work on my pi. Thank you!

I am having some small issues though. The screen flashes back to the console every few seconds which is odd. The other issue is that even setting the resolution correctly, it does not occupy the whole screen. Would you know what is going on with that?


ReplyQuote
CrackedConsole
(@crackedconsole)
Member Admin
Joined: 9 months ago
Posts: 278
01/07/2019 10:07 am  
Posted by: Codiferous

This is a great guide! This is the closest I've been to getting this to work on my pi. Thank you!

I am having some small issues though. The screen flashes back to the console every few seconds which is odd. The other issue is that even setting the resolution correctly, it does not occupy the whole screen. Would you know what is going on with that?

What screen are you using? Size and Resolution as well. 
The tutorial above is for a specific subset of screens and the UI Octoprint uses is for a specific resolution, can you attach a pic of the screen and what you are seeing?


ReplyQuote
Codiferous
(@codiferous)
New Member
Joined: 4 months ago
Posts: 2
06/07/2019 9:04 pm  

Thanks for the reply! I apologize for my delayed response.

The screen I am using is here: https://www.amazon.com/gp/product/B06X99HF17/ref=ppx_yo_dt_b_asin_image_o01_s01?ie=UTF8&psc=1

And what I am getting is this (though when I first set it up, the buttons were displayed): 

This post was modified 3 months ago by Codiferous

ReplyQuote
CrackedConsole
(@crackedconsole)
Member Admin
Joined: 9 months ago
Posts: 278
06/07/2019 10:48 pm  
Posted by: Codiferous

Thanks for the reply! I apologize for my delayed response.

The screen I am using is here: https://www.amazon.com/gp/product/B06X99HF17/ref=ppx_yo_dt_b_asin_image_o01_s01?ie=UTF8&psc=1

And what I am getting is this (though when I first set it up, the buttons were displayed): 

Interesting, I wonder if you toy with the resolution settings in the config file, if it will fix the display

 

https://github.com/mcuadros/OctoPrint-TFT/blob/master/README.md

 

Basic Configuration

The basic configuration is handled via environment variables, if you are using the .deb package you can configure it at /etc/octoprint-tft-environment.

OCTOPRINT_TFT_RESOLUTION - Resolution of the application, should be configured to the resolution of your screen, for example 800x480. By default 480x320.


ReplyQuote
sardauker
(@sardauker)
Active Member
Joined: 2 months ago
Posts: 6
09/08/2019 4:36 am  

@crackedconsole

Hi. I've followed your really clear and complete guide step by step.
BUT I'm stuck in the logo / connecting to octoprint screen.
i've tried also adding the IP or localhost in the ...environment file.

I can reach Octoprint via external http. 

Is there anything that I can check to solve the problem?

Thanks in advance.


ReplyQuote
CrackedConsole
(@crackedconsole)
Member Admin
Joined: 9 months ago
Posts: 278
09/08/2019 6:36 pm  
Posted by: @sardauker

@crackedconsole

Hi. I've followed your really clear and complete guide step by step.
BUT I'm stuck in the logo / connecting to octoprint screen.
i've tried also adding the IP or localhost in the ...environment file.

I can reach Octoprint via external http. 

Is there anything that I can check to solve the problem?

Thanks in advance.

For the screen to come up, your printer has to be in "Connected" mode from the WebUI.

Octoprint-TTFT Issue #32

Login to your WebUI and verify the printer is connected to Octoprint, you may need to choose "Auto Connect" to assure the printer connects at startup.
If you aren't getting a connection at all, try a different USB port on your Raspberry Pi.

Octoprint TFT Connection

You can find additional connection options by clicking the Wrench in the top right of the WebUI

Octoprint TFT Connection 2

Octoprint TFT Connection 3

This post was modified 2 months ago by CrackedConsole

ReplyQuote
sardauker
(@sardauker)
Active Member
Joined: 2 months ago
Posts: 6
11/08/2019 11:19 am  

Thank you in advance. It seems that the pi isn't connecting via wi-fi; I've tried with raspi-config to adjust the settings, but it does not appear in a connected IP scan.
With your tips the Raspi now connects to the printer, but still needs a cable to connect to the lan, and then everything works fine.
I have also tried to setup a fixed ip when connected via LAN and then reboot without the cable, but nothing, the only difference removing the ip in ...environment is that now I have a "dial tcp 192.168(text cropped)"
It still does not appear in the connected items list. 


ReplyQuote
CrackedConsole
(@crackedconsole)
Member Admin
Joined: 9 months ago
Posts: 278
11/08/2019 4:01 pm  
Posted by: @sardauker

Thank you in advance. It seems that the pi isn't connecting via wi-fi; I've tried with raspi-config to adjust the settings, but it does not appear in a connected IP scan.
With your tips the Raspi now connects to the printer, but still needs a cable to connect to the lan, and then everything works fine.
I have also tried to setup a fixed ip when connected via LAN and then reboot without the cable, but nothing, the only difference removing the ip in ...environment is that now I have a "dial tcp 192.168(text cropped)"
It still does not appear in the connected items list. 

Put your SD card in your computer and look at the root folder of the SD card for a file called octopi-network.txt edit this file (with something like Notepad ++) and remove the from the WPA/WPA2 section and fill in your WiFi details

image

Toss the SD back into your RaspberryPi, boot and you should be on WiFi.


ReplyQuote
sardauker
(@sardauker)
Active Member
Joined: 2 months ago
Posts: 6
12/08/2019 7:12 am  

@crackedconsole

Thank you.
I already tried editing ...supplicant and ...environment, this will be the next tray.
Again, thanks 🙂

 


ReplyQuote
Page 1 / 2
Share:

Please Login or Register