OctoPrint on Windows - Tiny Pilot - Dual Boot - 2022 - Chris's Basement

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today is a bit of a revisit if you will we're going to take another run at octoprint on windows [Music] what's up everyone chris here i hope you're all well and a couple of years ago now we tried to run octoprint on windows and it worked pretty well but as most of you know windows changes a lot all the patches that come out change how things work also octoprint has been upgraded a lot since then we're now on python 3. now all of the hard work on this configuration has already been done for us gina does a great job at keeping all the documentation up to date even on things like this where it's kind of a hacked version of octoprint not running on a raspberry pi not saying that octoprint was designed to run on a pi but that's most of the configurations that you see but now with raspberry pi being really hard to get i thought it would be a great time to walk through this setup one more time because there's probably a lot of folks out there that have an old windows machine that they can use now i did buy and set up a couple of months ago one of these windows micro computers just for this so that's what we're going to be doing it on today now this is pretty low powered so pretty much anything that you have at home that you don't use anymore is going to work for this setup but we're just going to walk through it step by step get it up and running we'll take a look at cameras how to get it updated all that good stuff so let's jump right in i'll give you a quick look at the hardware we're going to use so if you remember a little while back we did set up our micro computer this one has a raspberry pi 4 attached to it it's running tiny pilot remember tiny pilot is a kvm over ip so that i can see the console that's pretty much all i use it for if you need to reboot or do bio settings this can be really handy i have linux dual boot on this so if it gets hung up you can see what it's doing before the os actually comes up not necessary for the windows build because we're just focused on windows today but we probably will use this when we jump into linux installs and for the camera today i'm just using a c920 we might try to get two spun up we'll just see how it goes we'll throw a couple of different printers on here i've got the ander 3 over here we'll just see how it all lines up but we're going to mostly be focused on the os install and how you get it all running as i said before all the hard work here has been done for us gina does a great job at maintaining this whole project she's a sole creator of octoprint so please consider supporting her efforts over on patreon github wherever she might be but the updated windows guide is here pretty much all the commands everything you need to know is in this dock we're just going to run through it see if we see any snags and then i'll show you some different configuration changes you can make to make windows a little easier to get along with i will be using vnc viewer for this video today so that we can share the screen with the studio pc with our mini pc there's a lot of great ways to do this you can use remote desktop client whatever you might have i have vnc so i use it all the time so that's what we're going with today the first thing i would suggest you do any windows project a hacking project like this create a system restore point you can just search for restore create a restore point and then go down here to create just type in the description let's say before octoprint and then it's going to create that restore point now what this enables you to do we're going to make a bunch of changes here installing things if something goes sideways you can just come in here do system restore select this restore point that we're creating right now and you can fall back just like nothing ever happened in fact i'll show you system restore choose a different restore point and there's the one we just created here so restore that you'll be good to go so that's the first thing i do so the next most important thing that we need to do for octoprint is python remember we are now on python 3. so at least 3 7 is what gina suggests so we can just open up a browser and go to python.org we're on the downloads page today the current one is 3105. we'll take that for windows and when that downloads done let's hit the exact and we'll start our install i want to add the 310 to the path environment that makes things easier to use we can take a look at the custom installation options want the documentation you need to make sure you install pip that's going to help us install octoprint we really don't need tcltk or the testing suite we're not going to develop on this computer we just want to run octoprint we do need the python launcher pi launcher so hit next and so for all users i usually do that with most of these types of pcs i don't have multiple users create shortcuts associate python files that's good add the python environment variables precompile standard libraries we really don't need any of the debugging stuff that's a lot of extra weight so let's just hit install setup was successful it can be somewhat useful to disable path link here in windows i always do that if it conflicts with other things on your pc consider that but for this install we're just worried about octoprint so i'm going to go ahead and hit close now we need some tools that we can use in visual studio it's visualstudio.microsoft.com i usually just search for it visual studio download will work here's our downloads page links to all this in the description of course scroll down a bit we want tools for visual studio we'll expand that and then build tools for visual studio right here so we'll download there's a couple of options here we'll open the installer continue it's going to download a couple of things here this is pretty large it can take a little bit and we only want select tools the key here is some of these are pretty large so we don't want to install anything we don't have to so we'll go to available and we want build tools visual studio build tools here hit install and we just need parts of the desktop development with c plus plus so we'll check that and you want to make sure you have the right boxes checked over here we just need msvc and windows 10 sdk you can uncheck these other three if you'd like you'll notice total space required seven gig they are pretty big but we're going to have to have them this will take a while because it's going to download them as well so we'll let this start crunching away here our build tools stall is complete that does take a little while probably around 30 minutes on my machine but we're all done with that now let's just go ahead and check to make sure we're on the right python version you can do windows key r to bring this up i usually just go down here and type in cmd to get to command prompt then from here you can just do a p y dash dash version we're on 3 10 5 so that's the version we installed we should be good to go now let's make a directory you can do it from here if you like dos command or you can just open up file explorer we're just going to make it in the local c let's do a new folder and we'll call it octoprint back to command prompt we can change directory cd into c colon backslash octoprint this is where we're going to install it then we're going to set up our virtual environment p y for python dash m v e n v space v env and after it's installed you can take a look in there and just do a dir we've got our venv environment now we just need to run the activate.bat under here there's some script files but you can just do it directly from here v env backslash scripts backslash activate dot bat now we're in our virtual environment from here we can install octoprint use pip for that so pip space install octoprint it's going to pull down the latest version get everything installed right here in this octoprint directory octoprint has been installed it did give us a warning about the pip version you can install the new version you can upgrade it if you want to we should be okay for now but they give you the command right here if you want to go ahead and run it now all we have to do is start octoprint you can just do octoprint s-e-r-v-e you'll probably get a warning from windows defender firewall if you're confident in your network just go ahead and allow access that way you can access octoprint from outside this pc allow access and when you see done down here info octoprint is up and available now to get to it from your local machine remember we're still on our mini pc that's hosting octoprint for now you can just do local host and you need port 5000 such as colon 5000 now the first time you run it it's going to be just like any other octoprint you're going to go through the wizard you have to set up your username and password there's a few other options set up your default printer profile all that good stuff but mine's already set up because i have done this before but now you have octoprint running under windows now to make octoprint easier to start and to enable you to run multiple octoprint instances there's some things you can do so for now we'll just open up our command prompt window let's do control c to close it so back to file explorer now we need to create some shortcuts so that you can launch more than one octoprint instance we're going to use the same code base here for octoprint but you have to split up the base directory that's all the specific information for each octoprint instance plugins appearance all that good stuff because you want them to be separate now we need some information to be able to build these out so let's go into octoprint v e and v scripts and we need the location of the octoprint.exe which is right here but we'll just start with the base location so we'll right-click up here and we'll copy it and let's just paste it in a notepad so we can use it later now you need the location of those base directories because we have to create multiples if we want to use multiple instances so let's go back to the c drive users your username and then you want to go to app data you might have to go to view and tick hidden files so that you can see app data but go to app data then you want to go to roaming and then there's your base octoprint directory i'm just going to create two new ones so i'm going to control c to copy and then just ctrl v to paste it and i'm going to ctrl v one more time because i'm going to make two completely separate ones so now we have two copies of everything in the original base directory i'm just going to rename the first one octoprint one and the second one you guessed it octoprint two and now we need the location of these so we'll go up here ctrl c to copy that guy put it in our notepad now we only need one more thing we need the ip of this hostname so that we can get into it from other pcs so go to the windows key do cmd and then do ipconfig you'll find your wan adapter your wi-fi adapter ethernet whatever it might be this is your ip right here it's going to be something similar if you have a home network so we'll copy that and paste it in our dock now we have everything to create our shortcuts so just out here on the desktop right click new shortcut and we'll just build it all right here in this first panel so back to our notepad let's grab our octoprint script that we need to run so we'll paste that and then you need to do slash octoprint and then after that you need serve s-e-r-v-e so we're good for octoprint now we need to tell it to go to the base directory that we want it to go to so dash dash base dir equals and then in quotes we need to add our information back to notepad we need this roaming directory paste it right there and then after that you need that base stir you created so octoprint one quotes good there now we need to tell it what host to use so that's that ip dash dash 192.168.1.81 and then the port to use for the first one you can just go with the default port so dash dash port i'm sorry on the ip i forgot host you need dash dash host equals that ip and then on the port you need dash dash port equals 5000 so there you go you're good there then hit next you can call it whatever you like we'll just call this one octoprint one and we'll hit finish so there's our first one now we can just copy that one and make a few minor edits right click copy paste and let's go ahead and rename it octoprint2 right click properties and we just need to make a minor change here let's go back just a little bit faster octoprint 2 to use our second set host is the same and then you just need a new port to be able to use it on i just i'm just going to go with the next one in line 5001 hit apply hit okay now we can spin these up now if you're having problems notepad is not the best thing to copy and paste from if you have problems it says it can't find files i've had this many times in the past either use something like notepad plus plus or just hand type in these responses a lot of times the copy and paste isn't all that good it puts in characters that it shouldn't so do that if the copy and paste isn't working if your shortcut doesn't complete successfully but let's go ahead and start octoprint one we'll just double click on it it's coming up and then octoprint 2. we can go ahead and open our browser and we'll start these with that host equals you will have to use the ip now 192.168.1 and then colon 5000 for the first one and we have our brand new base dir so we have to go through the wizard that's a good thing that's all your config files but let's go ahead and duplicate that and we'll just change this one to five thousand and one and here's our new wizard let's just run through one of them real quick i just want you to verify that they are both separate so let's do next enter in your username and password you'd like to use we'll create account we'll hit next online connectivity check yes good anonymous we'll go ahead and send our data that's helpful to the project next enable plug-in blacklist next default printer let's just change this so that we can see that it changes octoprint 1. and server commands you're not going to be able to use these you're going to have to control it with that command line window so you won't have a power button but you'll have to use it out there on the desktop remote into the pc all that good stuff to get it to restart next webcam we'll talk about this here in a minute next and finish and just for fun let's go to settings and we'll go to appearance let's change this to octoprint 1 and the color let's make this one red we'll save and then our next one i'm going to go through and do all the same things only on this one i'm going to go ahead and create that profile octoprint 2. that's done let's go to settings we'll change this one up as well appearance talk to print two and let's make this one blue save and now that they're set up everything's saved the wizards are good let's go ahead and close these out real quick let's control cm you can see these go to sleep servers offline let's go back to our desktop let's start them up when they're back up all we want to do is make sure we have our octoprint one it's red and our octoprint 2 in blue now we need to plug in some printers so back at our mini pc here i have a regular inter 3 and 3v2 just as an example and i'm going to use this hub now depending on how many things you plug in how many cameras how many printers you might need a powered hub this is one but in this demonstration i'm just going to use it as a passive hub because i found you can do quite a bit with the windows install with a regular passive hub so all i'm going to do is plug in the first printer and power it up we'll just plug that to any port on your hub we'll power up i hate that sound then we'll go back to octoprint and if you have the correct drivers you might need a ch340 driver or something to be able to use these but once the printer is up and plugged in you can usually just refresh your octoprint instance and then you should have a serial port to select see now we have com3 windows is really good about keeping track of these way easier than linux so let's just go ahead and say save that connection we'll just let it auto connect when it comes up and we'll let it pick the baud rate it's going to be either 250 000 or 11.52 but let's go ahead and connect and we're up we can even see all of the g-code files on the usb card temperatures reporting correctly terminal we're good to go so there's the first printer and what i like to do is just go and rename these so it's not going to forget the com ports windows won't forget until you dump it you would actually have to go do that on your own so it's going to save these so i just go into settings and then in appearance i like to put my com port up here so that i know exactly which one i'm on so we'll hit save that way if i unplug them plug them back in when it comes up as com3 i know to go in here and go boom com3 now let's plug in our second printer we'll just plug that in again to any port on the hub and we'll power up and then go to our second instance we'll refresh it and you can see in serial port we have auto here but we have three from our first printer and now we have four same thing i'm just going to let it save we can connect it's super quick we do get this warning up here this is the notorious industry v2 this is the original firmware octoprint is telling us that this firmware is broken doesn't work all that well but you get the point after you upgrade the firmware on your v2 it would be fine but we are connected the terminal is reading all the temps by all means we are ready to go but then i just like to come up here to settings go to appearance and octoprint two again i just like to save that com port so i know exactly where to go if i want to unplug all this stuff and we're good multiple printers running on windows under octoprint and any plugins you want to use anything like that they're going to be separate you can install them it works the same way remember the only thing that doesn't really work is the power down and the updating octoprint you have to do that command line but you only have to do it once since we're using the same code base so now that i've created a huge mess here that's how you get multiple instances of octoprint running on windows and they do run really well now for cameras cameras aren't that easy you have to have another application to be able to run them running one is very straightforward i'll show you how to do that running multiples is not you have to run them in service mode you have to change up some config files i do have a lengthy tutorial how to get that done i will leave a link below for the hardcore users but let me show you just how to get one up and running real quick so all this is going to do is serve that webcam for you again one is fairly straightforward we need to enable http and streaming so we can do both video and time lapse we will need a plugin for time lapse we'll talk about that in a second settings go to device we're just going to select that c920 that we plugged in change to c920 there's our preview over here so we're already up and running you can see some of the studio not real exciting go to settings and edit settings we're just concerned with http this is for snapshots we can leave it on the default port we'll set that up in octoprint i'll show you that and then stream you will need to make sure this says mjpeg not javascript it won't work with javascript so make sure that's setting set correctly and the default port of 8081 just for one instance should be okay you can come in here and set image quality by default it's very low we can bump it up a little bit set that however you want so we'll hit okay with those two turned on and this running you can run this as a service again that's more advanced that'll be in the other video but we'll go to octoprint and you just want to open up settings and go to webcam time lapse and for video streaming you're going to want http colon forward slash forward slash then the ip of this machine remember from ipconfig all and then you have to have colon8081 that's the setting in your cam you can update that to whatever port you like but that's the default one and then your default name for that stream feed is video.mjpg so type all of that in and you can hit test and there is our stream here in octoprint so we can close that then for our snapshot url you can just use localhost so do http colon forward slash forward slash localhost and then colon you saw it in the settings in your cam the default port is eight eight eight eight forward slash out dot jpg so that'll get your snapshots you can hit test and there's your snapshot now you do need an ffmpeg plugin to be able to take those time lapses and you can get those from a lot of different places on the web this is just one that i found the one from the previous video actually was expired it's no longer there so i'll leave i'll update that one and leave this in the description but i'm just going to grab this 7-zip file for the essentials right here you might need 7-zip to extract these i've already extracted mine but you should be able to just right-click if you have it you can extract here to a folder and this is what it looks like after it's been expanded it's a big long name but in here in the bin files this is actually the one that you need so i like to put these in a location that's easier to get to so i'm just going to go back up to the parent folder i'm just going to take off everything except that ffmpeg and i'm going to right click and copy it and let's just put it in our user folder so we'll go back to c windows not windows that's just what c is called on my machine c users my username and let's just paste it right here now we can take the path to this folder we'll just go in copy this and then back to octoprint you can paste that path in here you have to fix it up we need to go to the bin directory and then backslash again ffmpe dot exe and then you can test it path is valid you should be good to go hit save go to control tab it's very low quality but there is our camera you can adjust that quality inside yaw cam if you'd like so now you can set up time lapse however you want you can use this camera to watch your print straight from windows and just to make sure it works from other machines we can get out of vnc here and go to our main pc and we'll just open up a browser and let's head to the ip for our new windows octoprint machine 5000 we can log in and there's our instance go to control there's our cam we are good to go so there you go octoprint on windows it's not that hard to get set up and you can even run multiple octoprint instances fairly easily now the camera on the other hand it's not that straightforward just one camera with yaw cam isn't too bad but if you want to run multiples there's lots of hacking around you have to do to be able to run multiple instances of yaw cam i do have a video on how to get that done you can check it out if you'd like to but maybe it's not worth all the trouble this is probably just for folks that want to run multiple printers on a windows machine it should do that fairly well so hopefully you found this helpful that will be it for today and i'll see you really soon on the next one you
Info
Channel: Chris Riley
Views: 23,213
Rating: undefined out of 5
Keywords: 3D, printer, Printing, 3D Printing, 3D Printer, ChrisBasement, ChrissBasement, Chris'sBasement, Chris Basement, Chriss Basement, Chris's Basement, ChrisRiley, Chris Riley, benchy, 3dbenchy, 3d, OctoPrint, Tiny Pilot, Dual Boot, Multiple Instances, Camera Install, Windows2022
Id: T3GImtrLVjY
Channel Id: undefined
Length: 28min 8sec (1688 seconds)
Published: Wed Jul 13 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.