Setting up Octoprint

A place where discussions are about 3D printing.
User avatar
GAP
Trainee Driver
Trainee Driver
Posts: 690
Joined: Sun Dec 23, 2012 10:34 pm
Location: Bundaberg QLD Australia
Contact:

Setting up Octoprint

Post by GAP » Wed Oct 11, 2023 9:56 am

Has anybody set up Octoprint using an Ethernet cable directly between a computer and a raspberry pi?

I have downloaded the imager and put octoprint onto an SD card but not enabling the wifi settings.

I have connected the 3D printer, loaded the image to my pi by turning it on with the SD card in its spot and waiting 5 minutes for it to do its thing; but when I try to find the pi on the Ethernet so I can connect the 2 computers together I cannot for the life find the pi.

I am using Win11 but most of what I can find is for older versions of windows.

I have downloaded "PUTTY" but just do not know what to look for IP settings etc.

Has anybody done this or give me some directions on how to get the 2 computers talking to each other?
Graeme
From the home of the Ringbalin Light Railway
https://ringbalin-light-railway.blogspo ... -page.html

User avatar
philipy
Moderator
Moderator
Posts: 5098
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants

Re: Setting up Octoprint

Post by philipy » Wed Oct 11, 2023 11:35 am

I managed to do it several years ago, but I'm afraid I can't for the life of me remember how, so not much use I'm afraid. :roll:
I do seem to remember it was a bit hit and miss to find the right settings though, but it has been completely stable ever since, so worth persevering. I'm using Win10 and wifi rather than ethernet, but I don't see why that would make a big difference?
BTW, what is PUTTY that you have downloaded?

Edited to add that when I set mine up, I was recommended to this YT video and it helped considerably https://www.youtube.com/watch?v=HBd0olxI-No

I asked a lot of questions and got a lot of help on here, so it might be worth you browing through my thread on the subject. https://gardenrails.org/forum/viewtopic ... nt#p167712
Philip

User avatar
GAP
Trainee Driver
Trainee Driver
Posts: 690
Joined: Sun Dec 23, 2012 10:34 pm
Location: Bundaberg QLD Australia
Contact:

Re: Setting up Octoprint

Post by GAP » Wed Oct 11, 2023 11:48 am

philipy wrote: Wed Oct 11, 2023 11:35 am I managed to do it several years ago, but I'm afraid I can't for the life of me remember how, so not much use I'm afraid. :roll:
I do seem to remember it was a bit hit and miss to find the right settings though, but it has been completely stable ever since, so worth persevering. I'm using Win10 and wifi rather than ethernet, but I don't see why that would make a big difference?
BTW, what is PUTTY that you have downloaded?
Putty according tom the blurb is; "PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is open source software that is available with source code and is developed and supported by a group of volunteers."
Using it has let me "talk" to my pi but I do not know how to open octoprint from the linux screen.
Graeme
From the home of the Ringbalin Light Railway
https://ringbalin-light-railway.blogspo ... -page.html

User avatar
GAP
Trainee Driver
Trainee Driver
Posts: 690
Joined: Sun Dec 23, 2012 10:34 pm
Location: Bundaberg QLD Australia
Contact:

Re: Setting up Octoprint

Post by GAP » Wed Oct 11, 2023 11:57 am

When I access the pi through PuTTY I get this screen but do not know how to get octopi to open.

Linux raspberrypi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Sep 22 02:33:53 2022 from fe80::4d11:b8a6:7d2e:4ccb%eth0

------------------------------------------------------------------------------
Access OctoPrint from a web browser on your network by navigating to any of:

http://raspberrypi.local
http://169.254.74.226

https is also available, with a self-signed certificate.
------------------------------------------------------------------------------
This image comes without a desktop environment installed because it's not
required for running OctoPrint. If you want a desktop environment you can
install it via

sudo /home/pi/scripts/install-desktop
------------------------------------------------------------------------------
OctoPrint version : 1.9.3
OctoPi version : 1.0.0
------------------------------------------------------------------------------

pi@raspberrypi:~ $------------------------------------------------------------
Graeme
From the home of the Ringbalin Light Railway
https://ringbalin-light-railway.blogspo ... -page.html

User avatar
philipy
Moderator
Moderator
Posts: 5098
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants

Re: Setting up Octoprint

Post by philipy » Wed Oct 11, 2023 1:36 pm

I've just looked again at the YT link I posted earlier and I remember now that I followed that with little problem after originally trying to use manuals etc to do it myself. There is a load of sponsorship blah at the beginning, but if you ff to about 5 or 6mins in, that's when he starts the actual setup, although some of the stuff about power supplies etc is relevant.

I'm not sure what those two links you posted are, they don't open for me, but I suspect you need to somehow/somewhere insert the actual IP for the Octoprint on your own network.
Philip

User avatar
GAP
Trainee Driver
Trainee Driver
Posts: 690
Joined: Sun Dec 23, 2012 10:34 pm
Location: Bundaberg QLD Australia
Contact:

Re: Setting up Octoprint

Post by GAP » Wed Oct 11, 2023 11:10 pm

Well after the pi had a little lie down overnight (powered everything down) I switched everything on and typed http://169.254.74.226 into the search/ address bar at the top of my browser and Octoprint opened.
The address bar changed to the host name I had given the pi.
So now it onward and upward I hope, if I get stuck again be sure I'll yell out.
Graeme
From the home of the Ringbalin Light Railway
https://ringbalin-light-railway.blogspo ... -page.html

User avatar
GAP
Trainee Driver
Trainee Driver
Posts: 690
Joined: Sun Dec 23, 2012 10:34 pm
Location: Bundaberg QLD Australia
Contact:

Re: Setting up Octoprint

Post by GAP » Thu Oct 12, 2023 12:56 am

Success!!!!!
I now have octoprint working

I have tested a print and it worked just need to tweak the bed level now. One thing, as the pi is not connected to the internet auto updates will not be available but I think I can live with that for a while.
Thanks for all the help
Graeme
From the home of the Ringbalin Light Railway
https://ringbalin-light-railway.blogspo ... -page.html

User avatar
philipy
Moderator
Moderator
Posts: 5098
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants

Re: Setting up Octoprint

Post by philipy » Thu Oct 12, 2023 7:27 am

Glad you got it sorted, well done.

At the risk of teaching granny to suck eggs, a small tip that you may have already seen anyway. Obviously, it's never a good idea to simply pull the plug on a computer, but the Pi doesn't have a built in shut down procedure so there is little alternative, unless you add an additional board to do it ( they call them "shields"). However, at the top of the Octoprint interface screen is an on/off symbol and if you click on that it gives an option to "close system" which does safely shut things down. It took me ages to accidentally find it when I first started with Octoprint.
Philip

User avatar
-steves-
Administrator
Administrator
Posts: 2444
Joined: Thu Jul 28, 2011 1:50 pm
Location: Cambridge & Peterborough

Re: Setting up Octoprint

Post by -steves- » Thu Oct 12, 2023 10:16 am

You shouldn't have a 169.254.***.*** IP address? This means that you don't have a DHCP server working and something has assigned that address itself. You should either have a 192.168.***.*** or 10.***.***.*** IP range (in 99% of cases).

As for Octoprint, as long as you have a working DHCP server it should assign an IP address in your given home range. This address should show on the screen once Octoprint has finished loading (always best to attach a computer monitor to the Raspberry PI to see what's happening, even if it is just until it's working properly. After that, it's all really straight forward. If you are using a Creality printer you will need to load the additional package that fixes the temperature output of Creality printers as their coding is wrong, but as I say, there is a simple package that fixes this which can be loaded from the GUI.

I use Octoprint on 3 of my printers and have loaded it many times for various reasons.

Also ensure you are using a decent micro SD card otherwise it will crash after a while and need reloading.

Any questions on Octoprint, please feel free to ask and I will answer if I can.
The buck stops here .......

Ditton Meadow Light Railway (DMLR)
Member of Peterborough and District Association
http://peterborough.16mm.org.uk/

User avatar
GAP
Trainee Driver
Trainee Driver
Posts: 690
Joined: Sun Dec 23, 2012 10:34 pm
Location: Bundaberg QLD Australia
Contact:

Re: Setting up Octoprint

Post by GAP » Thu Oct 12, 2023 10:02 pm

-steves- wrote: Thu Oct 12, 2023 10:16 am You shouldn't have a 169.254.***.*** IP address? This means that you don't have a DHCP server working and something has assigned that address itself. You should either have a 192.168.***.*** or 10.***.***.*** IP range (in 99% of cases).

As for Octoprint, as long as you have a working DHCP server it should assign an IP address in your given home range. This address should show on the screen once Octoprint has finished loading (always best to attach a computer monitor to the Raspberry PI to see what's happening, even if it is just until it's working properly. After that, it's all really straight forward. If you are using a Creality printer you will need to load the additional package that fixes the temperature output of Creality printers as their coding is wrong, but as I say, there is a simple package that fixes this which can be loaded from the GUI.

I use Octoprint on 3 of my printers and have loaded it many times for various reasons.

Also ensure you are using a decent micro SD card otherwise it will crash after a while and need reloading.

Any questions on Octoprint, please feel free to ask and I will answer if I can.
My DHCP is disabled in Ethernet setting so I will have to try to enable it.

Do you use seperate pi's for each printer or just the one. If just one how did you do it?

As I am using Octoprint via an Ethernet cable the pi cannot access the internet so auto updates are not available because I did not enable the wifi. If I enable the wifi setting in Octoprint can I still use the cable without going via my wifi and just use wifi for upgrades?
I am just a bit iffy about using wifi.
Graeme
From the home of the Ringbalin Light Railway
https://ringbalin-light-railway.blogspo ... -page.html

User avatar
philipy
Moderator
Moderator
Posts: 5098
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants

Re: Setting up Octoprint

Post by philipy » Fri Oct 13, 2023 6:28 am

GAP wrote: Thu Oct 12, 2023 10:02 pm
If I enable the wifi setting in Octoprint can I still use the cable without going via my wifi and just use wifi for upgrades?
I am just a bit iffy about using wifi.
You could always just switch the wifi on occasionally to check for updates and then disable it again.
The updates are not very frequent and are rarely more than just cosmetic type tweaks, so once you have it initially set up and running as you want, with whatever plugins you think would be useful, I wouldn't see it as a major issue.
Philip

User avatar
GAP
Trainee Driver
Trainee Driver
Posts: 690
Joined: Sun Dec 23, 2012 10:34 pm
Location: Bundaberg QLD Australia
Contact:

Re: Setting up Octoprint

Post by GAP » Fri Oct 13, 2023 9:46 pm

philipy wrote: Fri Oct 13, 2023 6:28 am
GAP wrote: Thu Oct 12, 2023 10:02 pm
If I enable the wifi setting in Octoprint can I still use the cable without going via my wifi and just use wifi for upgrades?
I am just a bit iffy about using wifi.
You could always just switch the wifi on occasionally to check for updates and then disable it again.
The updates are not very frequent and are rarely more than just cosmetic type tweaks, so once you have it initially set up and running as you want, with whatever plugins you think would be useful, I wouldn't see it as a major issue.
Thanks Phillip
I will just stick to what I have running as it is working well doing what I want it to do which is removing the need for using an SD card.
Graeme
From the home of the Ringbalin Light Railway
https://ringbalin-light-railway.blogspo ... -page.html

User avatar
GAP
Trainee Driver
Trainee Driver
Posts: 690
Joined: Sun Dec 23, 2012 10:34 pm
Location: Bundaberg QLD Australia
Contact:

Re: Setting up Octoprint

Post by GAP » Sat Oct 14, 2023 9:39 am

Another question what do people do with the raspberry pi in an octoprint set up; power down the pi or leave it running?

As I have no monitor/keyboard connected (a headless config) I cannot go to the "shut down" command and shut down my pi prior to powering down not doing this can and most likely will lead to SD card corruption.
Graeme
From the home of the Ringbalin Light Railway
https://ringbalin-light-railway.blogspo ... -page.html

User avatar
philipy
Moderator
Moderator
Posts: 5098
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants

Re: Setting up Octoprint

Post by philipy » Sat Oct 14, 2023 11:09 am

GAP wrote: Sat Oct 14, 2023 9:39 am Another question what do people do with the raspberry pi in an octoprint set up; power down the pi or leave it running?

As I have no monitor/keyboard connected (a headless config) I cannot go to the "shut down" command and shut down my pi prior to powering down not doing this can and most likely will lead to SD card corruption.
I always shut it down once the job is finished.
As I mentioned above, there is a "shim" available ( maybe more than one, I don't know) which is supposed to be soldered onto the I/O pins on the Pi and allows for a proper on/off switch to be fitted. I had one and couldn't get it to work, although that may just be me rather than the board.
https://shop.pimoroni.com/products/onof ... 1102600138

Without access to a keyboard and monitor ( how do you know what is happening?) I think your only options would be to leave it on 24/7 or crash it off and pray nothing goes wrong.
Philip

User avatar
-steves-
Administrator
Administrator
Posts: 2444
Joined: Thu Jul 28, 2011 1:50 pm
Location: Cambridge & Peterborough

Re: Setting up Octoprint

Post by -steves- » Sat Oct 14, 2023 11:35 am

I have one PI per printer and connect to them using the webpage of the IP Address. Giving them Wifi is not an issue for me, it's linux and is pretty secure in the first place, other than that someone would have to break into your home network to get anything from them and then all they can do is set prints off, no biggy. I also run a separate DHCP server on my NAS box (which is where I store all my STL files) and set the printers to a reserved IP address, that way I always know what IP they are on, I do this for many things on the network, though some are outside of the scope and run static addresses like the NAS box, the server, the WAP's etc.

I leave my Pi's switched on all the time, simply as it takes a while to boot up and unless I put them on a smart switch I would have no way of turning it on other than go upstairs and do it manually. My computer is downstairs and all my printers are upstairs, all working over the network. You can power them down via the gui if you so wished to, but still the issue of getting them back on. I only go to the printers to remove the print and refill the filament. The printers are already on smart switches to save power, but not the PI's. I also run headless and only use the gui webpage and Cura for connection to them. BTW don't upload files to the SD direct from the Webpage GUi, it's super slow. If you do pull the plug to power down, as you thought, expect loads of corruption and reinstalls.
The buck stops here .......

Ditton Meadow Light Railway (DMLR)
Member of Peterborough and District Association
http://peterborough.16mm.org.uk/

User avatar
GAP
Trainee Driver
Trainee Driver
Posts: 690
Joined: Sun Dec 23, 2012 10:34 pm
Location: Bundaberg QLD Australia
Contact:

Re: Setting up Octoprint

Post by GAP » Sat Oct 14, 2023 10:27 pm

I left my pi powered overnight but used "System Shutdown" on octoprint and when I turned on the computer I got a "could not find server message" I finally resorted to power down/up of the pi and rebooted it.
Not sue if System Shutdown had anything to do with what happened but will no to that again and just leave the pi running.

Another problem that has just surfaced is that the printer is displaying "SD init fail" message even when a card is not inserted so perhaps my card reader is dying, recommendations on the net is just use octoprint.

I am having a bit of trouble communicating with the printer via octoprint it is a bit hit and miss but perseverance pays off.
I did enable DHCP yesterday so I will disable it again to see if that caused a problem. I really have to make only 1 change at a time not multiple ones.
I may go the wifi route eventually to overcome any possible ethernet issues.
Graeme
From the home of the Ringbalin Light Railway
https://ringbalin-light-railway.blogspo ... -page.html

User avatar
philipy
Moderator
Moderator
Posts: 5098
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants

Re: Setting up Octoprint

Post by philipy » Sun Oct 15, 2023 7:27 am

GAP wrote: Sat Oct 14, 2023 10:27 pm I left my pi powered overnight but used "System Shutdown" on octoprint and when I turned on the computer I got a "could not find server message" I finally resorted to power down/up of the pi and rebooted it.
Not sue if System Shutdown had anything to do with what happened but will no to that again and just leave the pi running.
'System shutdown', does power down the Pi safely, which is why I suggested it a couple of days ago and that is the reason that Octoprint couldn't find it. In this context 'server' means Pi. You simply need to apply power to the Pi and wait a good couple of minutes for it to boot up before opening Octoprint. It always takes a lot longer than you might expect.

I know it isn't the way you want to run things, but for info, I have my Pi and the printer plugged into the same Alexa controlled Tapo smart plug in my workroom. Sitting in the Living room with my laptop, I simply say " Alexa... Printer on" and that remotely powers up both printer and Pi at the same time, then by the time I'm ready to send a file to the printer by pressing the "Print with Octoprint" button in Cura, both are sitting there ready to go. To shut down, I go to the Octoprint interface and do System Shutdown and when it confirms that it has done it, say, "Alexa ... printer off" and that kills the power to both, ready for next time.
GAP wrote: Sat Oct 14, 2023 10:27 pm Another problem that has just surfaced is that the printer is displaying "SD init fail" message even when a card is not inserted so perhaps my card reader is dying, recommendations on the net is just use octoprint.
Never seen that message myself, but never tried starting it without the SD card in the Pi SD slot - I've never taken it out since Day One. However, if you haven't got an SD card in, it would make sense that the printer looks for it and tells you it can't start without it?
Philip

User avatar
GAP
Trainee Driver
Trainee Driver
Posts: 690
Joined: Sun Dec 23, 2012 10:34 pm
Location: Bundaberg QLD Australia
Contact:

Re: Setting up Octoprint

Post by GAP » Sun Oct 15, 2023 10:26 am

philipy wrote: Sun Oct 15, 2023 7:27 am
GAP wrote: Sat Oct 14, 2023 10:27 pm I left my pi powered overnight but used "System Shutdown" on octoprint and when I turned on the computer I got a "could not find server message" I finally resorted to power down/up of the pi and rebooted it.
Not sue if System Shutdown had anything to do with what happened but will no to that again and just leave the pi running.
'System shutdown', does power down the Pi safely, which is why I suggested it a couple of days ago and that is the reason that Octoprint couldn't find it. In this context 'server' means Pi. You simply need to apply power to the Pi and wait a good couple of minutes for it to boot up before opening Octoprint. It always takes a lot longer than you might expect.

I know it isn't the way you want to run things, but for info, I have my Pi and the printer plugged into the same Alexa controlled Tapo smart plug in my workroom. Sitting in the Living room with my laptop, I simply say " Alexa... Printer on" and that remotely powers up both printer and Pi at the same time, then by the time I'm ready to send a file to the printer by pressing the "Print with Octoprint" button in Cura, both are sitting there ready to go. To shut down, I go to the Octoprint interface and do System Shutdown and when it confirms that it has done it, say, "Alexa ... printer off" and that kills the power to both, ready for next time.
GAP wrote: Sat Oct 14, 2023 10:27 pm Another problem that has just surfaced is that the printer is displaying "SD init fail" message even when a card is not inserted so perhaps my card reader is dying, recommendations on the net is just use octoprint.
Never seen that message myself, but never tried starting it without the SD card in the Pi SD slot - I've never taken it out since Day One. However, if you haven't got an SD card in, it would make sense that the printer looks for it and tells you it can't start without it?
Thanks for the tip about "system shutdown" powering down the pi safely I missed that bit in your post last Thursday. If I had read that I would be better off, that will teach me not to skim over posts.

The "SD init fail" is being sent by the printer I think the SD card reader or the main board in the printer may be dying. Doesn't seem to affect Octoprint so may not be a big deal (I hope).
Graeme
From the home of the Ringbalin Light Railway
https://ringbalin-light-railway.blogspo ... -page.html

User avatar
-steves-
Administrator
Administrator
Posts: 2444
Joined: Thu Jul 28, 2011 1:50 pm
Location: Cambridge & Peterborough

Re: Setting up Octoprint

Post by -steves- » Sun Oct 15, 2023 11:06 am

Some important stuff to note.

Creality write the printer settings to the SD card so always leave a good working SD card in the printer, it can be a small one, or you will lose Z height offsets etc when you power it off and on, really important if you use a BL Touch or Creality equivalent.

If you intend to shutdown the printer and not the PI make sure you use a USB voltage blocker or you will definitely get issues, this is essential. Philip is OK as he powers both up and down at the same time. This is where I got mine in the UK.
https://www.amazon.co.uk/PortaPow-USB-P ... C68&sr=8-3

I use this method as I am too impatient to wait for the PI to boot up everytime as I frequently power the printer off and on as I print quite a bit.
The buck stops here .......

Ditton Meadow Light Railway (DMLR)
Member of Peterborough and District Association
http://peterborough.16mm.org.uk/

User avatar
philipy
Moderator
Moderator
Posts: 5098
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants

Re: Setting up Octoprint

Post by philipy » Sun Oct 15, 2023 11:41 am

-steves- wrote: Sun Oct 15, 2023 11:06 am
If you intend to shutdown the printer and not the PI make sure you use a USB voltage blocker or you will definitely get issues, this is essential. Philip is OK as he powers both up and down at the same time. This is where I got mine in the UK.
https://www.amazon.co.uk/PortaPow-USB-P ... C68&sr=8-3
Yep, I have one of those as well, to be sure, otherwise you get reverse power from the printer to the Pi. You can find all sorts of workarounds on the web, including the appropriate pinstape in the socket or 'surgery' to disconnect the appropriate pins, but I decided to do it properly with this.
Philip

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests