Smarter 3D Printing with OctoPrint // Full Setup Guide

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone it's ryan with smart house and on today's video we're going to do something kind of completely different we're going to be talking about a application that you can set up to enhance your 3d printer now i know if you are a fan of this channel it may not be something that you typically are into you may not even have a 3d printer but if you stay tuned you might learn something about 3d printers and it may encourage you to go ahead and jump into the hobby now i put a poll up a few weeks ago asking if people wanted to see more 3d printing content and a lot of you said you did so i hope you like this video and if you haven't already played with octopi or octoprint it gives you an insight of what you can do with your 3d printer and really enhance your 3d printing capabilities so last month i picked up the creality ender 3 version 2 from micro center for 1.99 now this was an open box 3d printer and it was about 50 off the normal price for 200 i figured it was worth a shot let's go ahead and try it out well if you know me i jumped in the 3d printing with both feet and now i have got a kitted out 3d printer that i use for all sorts of different things so a big part of the setup is my octoprint install now if you're not familiar with what octoprint is it is an application that runs on a piece of hardware like a raspberry pi for example that will monitor and control your 3d printer and allow you to have some advanced functions that isn't available with just the stock printer now this software is compatible with almost every 3d printer on the market as long as it can be controlled over a usb connection if you're curious i have a link down here below which will take you to the compatibility list for different various 3d printers so basically instead of uploading your g-code to an sd card and putting it in the printer the software streams each g-code command one at a time to the printer giving you an increased level of control this also makes it super convenient because you can remotely start prints and monitor them from anywhere in the world this is especially helpful if you attach a camera to your octoprint device and be able to remotely monitor and make really cool time lapses there's also a whole list of plugins that you can use to enhance your 3d printer and make your 3d prints more reliable i'll take a look at some of my favorite plugins in an upcoming video so now that we know what octoprint is let's take a look at what's required to get this set up alright so you know me and almost all of my projects involve the ubiquitous raspberry pi now this particular project you can either use a 3b or you can use a pi 4. so it's up to you if you happen to have a 3b laying around that's completely compatible i haven't heard of any real issues because it's not a super high speed processor intensive setup except for maybe the time lapses they may take a little longer to process but for overall i've heard it's pretty much you can use either ones whatever you happen to have laying around so in mine i actually have a raspberry pi 4 4 gig in there right now because that's what i happen to have and of course because this is a raspberry pi project you're going to have to have a compatible power supply and sd card you can use almost any size sd card you want but if you're going to be doing time lapses i'd recommend using a larger sd card so you have more space to store your video time lapses so of course for any project that's going to sit out in the open you want to make sure you have a case board now you can use any off-the-shelf case that you want to choose or you can 3d print one that can connect to the actual frame of your 3d printer now i've got links in the blog post to various different 3d prints for example my ender 3 and if you go out on thingiverse or things you can find a number of different raspberry pi cases that can interface or connect directly to the frame of your 3d printer now the last required part for this project is a micro usb cable now you probably have a whole drawer full of these somewhere in your house but you have to make sure that it is a data compatible cable and not just a power cable now i've put together a kit for this project that you'll find links for below now mine has a one foot micro usb cable that keeps it short and tidy i also have a short usbc cable for my camera now for the last piece of hardware this is an optional component but it's super helpful and most people end up putting this on their octoprint setup anyway and that's a camera now there's a whole list of compatible cameras that are available for the octoprint software and the raspberry pi but most people recommend either using a logitech web camera or using one of the raspberry pi camera whether it's the standard raspberry pi camera or the new advanced raspberry pi camera that has interchangeable lenses and you can find a ton of really cool 3d prints to support that camera and place it wherever you happen to need it on your printer now i'm actually using a wise version 2 camera flashed with the webcam firmware back to the pandemic wise released a version of their firmware that converts their version two cameras into a compatible web camera for your computer this was at the height of everybody moving to work from home and there not being a lot of webcams available in the marketplace they made a very smart decision to release a firmware flash plug it into a computer and use it as a web camera now this is directly compatible with a raspberry pi and octoprint and i happen to have a spare one laying around so that's why i used it it's a little bit of a disadvantage because of the wide angle but it works fine for my setup on that on that reference blog post i have some information on how to verify that your raspberry pi is going to work with the wise camera if you happen to want to go that way now one more optional accessory that you can put on the 3d printer is led lighting now on mine i actually have addressable led lights uh ws2812 bs that i can use with different color patterns but you can put any light you want you can even just put a stick on dumb light that way you can see the 3d printer better and also you get better footage out of your camera and your time lapses so there are a whole plethora of options and it all depends on your 3d printer itself some of them you power directly off the 3d printer some of them you externally power so this is a good add-on if you want to have that enhanced quality for your time lapses or when you remotely check in on your prints be able to see it even if it's in a dark room all right there you go that's all the hardware required for this project let's go ahead and get the software loaded on the sd card and i'll show you a cool trick with the raspberry pi flasher all right so i've got the raspberry pi imager loaded up here um in the past i've used the etcher software but this new raspberry pi imager is super good now it allows you to install a variety of different images it has a lot of neat features that were adopted from applications like pi bakery so we'll go ahead and jump into it if you haven't already there's a link here below on where to download and install it it's obviously free once you get it installed and set up go ahead and pop your sd card in your computer all right so let's open up the raspberry pi imager click choose os and now it has a bunch of options in here for other os's now the raspberry pi imager has more than just the standard rasping image available in it you have a lot of other options similar to the kodi you can install retropie home assistant has a direct installer from here right now so does home bridge but if we go under the other specific purpose os's you'll see octopi now octopi similar to home assistant or what used to be called hassio is a purpose-built image that you can flash on your raspberry pi to have it go ahead and to go ahead and install the prerequisites to run octoprint on your raspberry pi now this is the recommended way of doing it except for if you happen to be running this on a different piece of hardware say you wanted to use the screen you wanted to use this for more than one purpose you can install octoprint over the top of an existing raspbian image but for the purposes of this video we're going to go and just flash the purpose built octopi so we'll go ahead and select octopi and the latest version choose which storage you want to use make sure you're using the correct one but before we flash the image i want to show you a real quick trick that i learned if you hold down control shift and x on your keyboard it'll bring up the advanced installer menu this allows you to set up certain options like enabling ssh adding the hostname and also setting up your wi-fi before you flash the image so we'll go ahead and give it a name enable ssh and set a super secure password and then go ahead and then go ahead and configure our wi-fi make sure you set your country so that way you get access to the different frequencies of your particular country and you probably want to go ahead and set up your time zone that way you make sure that you've got the right time stamp on your server and then go and hit save and then we'll click right and of course it's going to prompt us all right now that's done let's go ahead and pop it into our raspberry pi boot it up and get octoprint configured all right so let's go ahead and open up a browser and we'll get octopi configured so you can go to octopi.local or if you set a custom hostname go to that one now if your computer cannot find your octoprint instance go ahead and open up your router or whatever your firewalls that hands out addresses and look forward to your dhcp log to be able to identify it's probably the latest device to jump on your network or you use something like a ping scanner or ping sweeper to find the device on your network we are in the setup wizard so go ahead and hit next on the first one if you have you know if this was not your first install you can actually take a backup file and restore it go ahead and click next now we want to go ahead and give it a name username and password and then click create account then we'll click next now this is completely optional but i go ahead and leave it in the defaults what this is going to do is this is going to ping out and make sure that it's still connected to the internet so you can just go ahead and either enable or disable connectivity check up to you if you want to enroll in the anonymous usage tracking you can do that as well there's also an option to enable what's called plug-in blacklisting so that way if a plug-in becomes malicious and the developers decide to pull the plugin it will actually if you have this enabled it will actually disable it on your your printer instance so it's entirely up to you if this is something that you want to add a safety feature or you want to risk having a plugin taken away enable or disable it your choice and now we come to the important part which is to set up your printer profile now in my case this is an ender 3 v2 it's just a name and same thing you can give it a custom name and you can give it a model now the key pieces is your print bed and build volume now you can find this by googling your particular printer or checking the manual you'll find the recommended build plate size online so i'll go ahead and go to google real quick and google return an entry directly on there for me so mine's 220 by 220 by 250 millimeter so we'll switch back over to octoprint now in my case i have a heated bed on my printer so i'm leave that checked and since this is a rectangular printer and not a circular printer i'm gonna leave that there now depending on how your printer so when you when you home your printer when it goes to check the z-axis whether it goes into the center or it goes out to the side and and checks it again this is something you can look up for your particular printer i know mine is a lower left for that z-axis homing so this would be something that you would probably know from if you use something like cura or if you use another software slicer package for your printer this would be uh information that's available from that and so that's all set so we're going to hit next read through the warnings you know printers have caught fire not a good idea to print unattended so i'd avoid doing that now that we've got octoprint configured let's go ahead and do a test connection to our printer so we can do that by clicking connect here so this is going to automatically find the serial port and baud rate just using tests built into the software so go ahead and click connect and there we go it went ahead and found the location and baud rate for my particular printer disconnected go ahead and tick these two boxes so that will it'll automatically connect when the server starts up and it saves the connection settings click connection again now my particular printer has a flaw in its usb control that gives incorrect temperature information so octoprint already prompted me and said hey you need to install this plugin so if you don't have an inter ender 3 you may not have this particular problem but i'll go ahead and install this plug-in just to make sure i don't have this issue but i'll go into how to how to install those in a minute all right so let's take a quick tour of the octoprint software now we already saw the connection window up here once you're connected to your printer it will go ahead and auto hide that you've got your state window here which tells you the current state of your printer whether it's printing canceling whatever it is it'll show up in this particular window and so unless you see the status of the printer it also tells you the status of a print if you happen to be printing something at the time then below that is your your basic controls you've got you can print so you can start a print job pause it or go ahead and cancel it and it will prompt you to confirm cancellation below that we have a list of files now this is the file manager for both the sd card that's currently plugged into your printer and also octoprint itself so you can actually store your print files on octoprint and remotely start them using the app or the website or you can load them onto the sd card and print off of there now it's highly recommended to go ahead and load your gcode load it into octoprint instead of the sd card to print because it's faster that way so you have options in here you can download them to your computer you can move them between the sd card and the octoprint you can delete them load them from there or you can go ahead and initiate a print right from here you can also format the sd card reload it and then configure it too and then if you have any printer notifications i'll show up here at the bottom now over here are a variety of different options for this front menu here so the first one is your temperature this is going to show a temperature graph of your bed if you have a heated bed and the tool the hot end of your printer so i can for example the nice thing here is i can go ahead and preheat up my printer if i know i'm going to print something while i'm slicing it so i go ahead and click here and i can say set for pla and set the bed for pla and then click go and that's as you see here this first line indicates the targets of the bed and the hot end and then the darker line indicates what the current temperature is of each of those objects right now i'm preheating my bed for a print job so that's the temperature menu if you go to the control menu you'll see it already loaded in my camera now this is my wise v2 camera that i've got plugged in on my printer if you have a compatible camera it will go ahead and pre-connect it you don't need to do any settings or any changes whatsoever if you are using a not directly compatible one you may have to go into terminal and change some drivers around or load a custom driver set but as long as you follow the one of the recommended ones like the logitech or the raspberry pi camera you should have to worry about any of this also under this menu so that's the current view of your printer you also have control here so you can you can move the print head you can tell it to home you can change the z-axis this is great when you have a failed job that you can lift the printhead up so you can scoop out all of the spaghetti from underneath you can also test your extruder here so you can tell it to go ahead and once it hits temperature extrude or retract you can test that you can change your modifiers of your rates and this is cool because this is the step rate so if i want to take a very tiny step of 0.1 millimeters i can click that one or if i want to make it a much larger step i can control that from these buttons down here you also have the option of turning off the motors if you wanted to make a manual adjustment or turning the fans on or off the next tab is the g-code viewer so if you were as you're printing something you would see the current movement of the printhead on the bed itself so this is kind of neat to watch the different layers of your print job moving along i currently don't have anything printing but as an example you can see here this is what it looks like when it prints a job terminal shows you the live g-code coming being sent to and from the printer and allows you to insert your own code if you happen to want to do that and then the time lapse this is the configuration for the time lapse now built in to octoprint is a time-lapse function now this time-lapse function is a little bit more basic but it gets the job done if all you want to do is take a periodic snapshot of your print job so you get those nice fast-forwarded time lapses at the end of a long print job there is a plug-in that will enhance this that i'll show you in a future video that gives you those really cool videos where the print head stays still or it moves the printhead out of the way and it looks like it just magically grows that's a plug-in called octolapse and we'll go over a setup for that in the next video so if you wanted to set up a time lapse you can either set one up for me a time so every so many minutes it's gonna take a picture or whenever the z-axis changes so when it finishes the layer and moves up to the next layer you can have it set to do that set a minimum interval how many the target frame rate of the time lapse how many seconds after the video you want to be able to have a snapshot of the printed project and you can also have it take a picture whenever you're doing a z-hop retraction so you click save changes this will apply this for every future print will take a time lapse automatically you don't have to do any more configuration then up at the top here you'll notice you've got your account which allows you to change your user settings like passwords or log off any printer notifications or notifications from octoprint about an update you've got your power options here that allow you to shut down the system reboot the system restart just the octoprint software or put it in a safe mode if you happen to run into a problem and finally we've got the settings menu now this is important because this is where you can change all the printer profile information you can set your different presets you can set up your features go into more details about your webcam you can even set up your webcam to be able to be remotely viewed by going to this url here you obviously have to put in the ip address or octopi.local webcam and be able to put this in so you can actually view this camera remotely adding new users enabling the api which this is super important the api is super important because this is how you allow other applications to access your octoprint instance so if you happen to be wanting to use something like the spaghetti detective or one of the mobile apps you'll need to use the api to configure that now don't not to worry i'm going to erase this api key when i'm done here you also have the new ability to create application keys the difference between the api and the application key is api gives you global access to everything basically admin or root level control over your octoprint instance application keys can be used to reduce that down to just giving them the same permissions as a particular user so this is the recommended way and they have said in the new version 2.0 whenever that comes out they're going to remove the global api keys and go with just this more restrictive more secure method out of all the rest of these the other important ones here are going to be updates this will allow you to check for updates for everything including octoprint itself and any of your plugins backup and restore which allows you to take a backup snapshot which i recommend doing once you've got your octoprint set the way you wanted to just in case you have an sd card failure and also the plugin manager which this is where we'll be spending a lot of time in the future this is where you can go in to add additional plugins to augment your current octoprint setup so you do that by clicking the get more and this shows you all of the available plugins that are in the store from octoprint or you can set a custom url or upload the file manually now here in a minute i'll show you some critical plugins that are used to interface with home assistant and other things all right now that the basic setup has been finished for octopi and you've taken a tour of the software let's get some essential plugins installed then we can add it to home assistant so we'll click the wrench icon go down to plugin manager and get more the first plugin we're going to install is the mqtt plug-in now home assistant does have a direct integration with octopi and it works for some basic stuff but i find the mqtt1 a lot better you get a lot more extended information and so i recommend installing it instead of setting up the default integration with home assistant now you'll need obviously need an mqtt broker and if you haven't set one up you can click on this video above where i describe how to set up the mqtt broker as part of another project the second one we're going to install is the home assistant discovery now again this modifies the mqtt plugin to be compatible with the home assistant auto discover function makes it much easier to set up now one of the things i do recommend is setting up a smart plug connected to your 3d printer so you can shut it off when it's not in use saving yourself some energy and you can monitor the energy usage of your 3d printer now i'm not going to recommend a specific one because you can use anything that has an on off control there is a function another plug-in you can install if you wanted to call psu control mqtt this allows you to control the 8 and mqtt device in a home assistant for example to control it from the front end of octoprints you can actually use it to turn it on and off and it will automatically when receiving a request turn that on now i'm not going to show you how to configure that because it's so dependent on what you particularly have there are also other plugins like a tasmoto mqtt and there are psu controls directly for home assistant tuya openhab other various systems that you can use to control that particular that power supply unit so again select one that works well for you now the last plugin i'll suggest that you install is octo everywhere this is a free premium supported application that allows you to create a secure tunnel from the internet to your octoprint instance so this allows you to do outside control so if you happen to be away on your way home you want to turn on the 3d printer have a warm up or go ahead and start a print you can do that using this application i'll show you how to set it up here in a second they do have a premium tier that you can subscribe for that gives you some additional add-ons but the free tier is functional and allows you to set up one of the recommended mobile apps through the application and so you can control it from your phone from anywhere in the world now i've got it i've got links to all the mobile apps in the blog post there are quite a few that are both directly compatible with octoprint also ones that are compatible with octo everywhere all right now that we've got those installed it's going to prompt us to go ahead and restart to get those set up so we'll go ahead and restart our octoprint now one thing i will note is you cannot modify your plugins while the printer is printing this obviously makes sense but it may trip you up if you want to go in and make a non-essential configuration change you cannot do that while the printer is printing if the text is in printing mode it locks you out of that menu and it will warn you about that so just be aware all right so once it finishes rebooting the first thing you're going to see pop up on your screen is it's going to take you through the setup for octo everywhere so it's it's a very quick and easy setup so go ahead and click complete setup now it's going to take you out to the octo everywhere website and it's going to have you set up for an account so i'm going to create a different account for this this will be kind of a test one you can use google facebook apple for a login or you can set it up manually all right so we got to give it a name and then click finish setup so there we go now the printer has been set up and we can connect to it and make changes right here from the interface or from one of the mobile apps they do have a new function for printer notifications that you can set up through telegram or discord but i do this through a different plugin so it's not that important so you can see a preview of the webcam on the printer you can click connect and it will send you in to the portal page so now you see you've got your logon this is the logon we set up before just like if you're going to log into this through a web interface it just basically creates a secure tunnel that gets you where you need to be and there we go now i'm connected through the octo everywhere tunnel now like i did mention there is a premium tier that gets you some extra features so there you go now that's the essential plug-in setup now i know i haven't covered the mqtt setup i'll do that here in the next step and do all of the setup for home assistant so let's go and jump into that all right so now that we've got everything set up let's go and get this added to home assistant so we can view it from our home assistant instance make control changes and also view the web camera all in one all right so the first thing we need to do is go ahead and configure our mqtt plugin so that way our octoprint instance can go ahead and talk to home assistant via mqtt so do that let's click on the wrench again scroll down to mqtt so under plugins now you'll notice some new options in here one of them being mqtt so go ahead and put the ip address of your mqtt broker in and if this is of course running on home assistant then it will be the same ip address as your home assistant instance if you do have username and password configured go ahead and make sure to check this box and enter the username and password when you click save then it's going to attempt to establish a connection and if you use something like mqtt explorer you can verify that everything's working fine all right so there we go now you can see that it's properly communicating with our home assistant instance however it's its own topic and not part of the home assistant topic so it won't work for auto discover so let's click back on the wrench icon scroll down to the home assistant discovery and make sure that's enabled so make sure home assistant is enabled and you've got the device information on here and if we were to explore home assistant now we should be able to see new sensors in here for printing now of course to add that to home assistant all we need to do is click on configuration integrations and then under our mosquito broker we'll click one device and we see octoprint now that loads all this information in to your home assistant which you can actually add with a single click down here at the bottom and add it to wherever you want on your home assistant instance and now you'll see all this information you can see your target temperature the current temperature of the beds enable disable snapshots cancel the print if it's currently printing disconnect the printer check its status see what the current height of the z do an emergency stop see what the last event was pause the print see how much time is left which files printing how how long through the print it is what its current status of the actual octoprint is print time print time left what it's doing do a shutdown of the system which this will actually shut down the software itself and then you get information about what progress it is if you're using a slicer the temperature of the actual raspberry pi and the target temperature and current temperature of the hot end tool so all that information is available it also gives you a snapshot from the camera which works sometimes as an image but i like to add the camera in as an actual dedicated camera so i can get a live feed and the simplest way to do this is to jump back into our octoprint instance click on the wrench again go to webcam and time lapse and then grab this url right here and if we were to hop up into our browser here and paste that url in after the either ip address or the name of our octoprint printer we'd be able to see a live stream from the printer so i'm gonna go ahead and grab that entire url hop back over into our home assistant so we want to go to visual studio code so you're gonna go ahead and open so go ahead and open up your configuration.yaml if you do have a camera.gaml you add it to that if you don't you can add it just into the root of your configuration.yaml i do have a snippet of this code as an example in the blog post bullet so it's just an mjpeg platform you give it a name you give it a still image url and it's that same url we saw before except for its question mark action snapshot because it's just going to give you a snapshot of the image not an actual stream and then for the mjpeg url same thing slash webcam action equals stream this will give you the live feed coming from the actual camera so we'll go ahead and make sure our indentations look correct hit save go to configuration server and reload the generic ip cameras and entities now that doesn't work obviously you have to do a restart of your home assistant instance so check configuration and go ahead and restart it so check everything's working we click on developer tools go to states search for camera we scroll down and we find octoprint ender3 v2 click the i and there we go there's the live feed from the camera now of course we want to add this into our home assistant dashboard so we'll go ahead and grab the name hop back over to our interface edit dashboard add card go by entity paste that in and click continue add the levels ui and there we go there's a live view of our octoprint printer now there you go you got a fully set up octoprint instance you've got a webcam if you wanted to get that installed and now we've integrated into home system so we can now start a print job from anywhere in the world we can monitor it either using the octo everywhere software or using our home assistant instance and be able to do things like cancel our print jobs or pause them or even just check in on them i've added in my live interface i've added some nice graphs so i can see the current temperature similar to the octoprint instance or be able to track the progress of my print now in an upcoming video i'll show you some of my favorite plugins and how i configure them to be able to control it using my telegram messenger and integrating with some other pieces of software and how i do my power supply control so stay tuned for that video that should be coming up in the next couple of weeks thanks again for watching this video and if you happen to be a smart home person hopefully this interests you and if you haven't already got into 3d printing it gives you some ideas what you can do with the 3d printer more than just the basics of being able to print off an sd card so again thanks again for joining us on this week's video i hope you have a great rest of the week and happy printing
Info
Channel: This Smart House
Views: 471
Rating: undefined out of 5
Keywords: 3d printing, raspberry pi, 3d printer, octoprint setup, setup octopi, 3d print, install octoprint, raspberry pi projects, installing octoprint on raspberry pi 4, octoprint installation, wifi 3d printing, how to, octopi setup, 3d printer projects, octoprint setup ender 3, ender 3 v2 upgrades, ender 3 v2, octoprint home assistant, octoprint mqtt, octoprint plugins, home assistant octoprint, home assistant octoprint lovelace, home assistant octopi
Id: 2gLclgja--0
Channel Id: undefined
Length: 28min 2sec (1682 seconds)
Published: Tue Oct 26 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.