[{"data":1,"prerenderedAt":479},["ShallowReactive",2],{"Categories":3,"NavIndexCategoriesCountFooter":203,"content-\u002F2019\u002F01\u002F09\u002Foctopi-setup\u002F":204},[4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,70,71,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202],{"category":5},"System Administration",{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},"Software Development",{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":27},{"category":27},{"category":67},"Drones & RC",{"category":69},"DIY Projects",{"category":67},{"category":72},"Photography",{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":67},{"category":67},{"category":72},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":5},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":67},{"category":67},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":72},{"category":67},{"category":138},"3D Printing - Laser Cutting - CNC",{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":5},{"category":138},{"category":27},{"category":27},{"category":138},{"category":138},{"category":72},{"category":158},"Photography,3D Printing - Laser Cutting - CNC",{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":67},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":181},"Home Assistant",{"category":181},{"category":72},{"category":27},{"category":27},{"category":72},{"category":138},{"category":5},{"category":72},{"category":72},{"category":138},{"category":27},{"category":181},{"category":181},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},191,{"id":205,"title":206,"body":207,"category":138,"date":463,"description":213,"embedImage":464,"extension":465,"image":464,"intro":466,"meta":467,"navigation":468,"path":469,"seo":470,"series":464,"sitemap":471,"stem":472,"tags":473,"__hash__":478},"content\u002F2019\u002F01\u002F09\u002Foctopi-setup.md","Octopi Setup",{"type":208,"value":209,"toc":459},"minimark",[210,214,217,220,223,237,240,243,274,277,280,307,313,316,324,331,334,339,342,345,348,382,389,392,399,422,429,432,436,439,449,452,455],[211,212,213],"p",{},"Back before I got the prusa mk3 printer - I was using octopi on a raspberry pi zero w to run octopi with the pi camera v2.",[211,215,216],{},"Up until recently - I have been using the prusa only via the SD card.",[211,218,219],{},"But - I have just picked up a couple of raspberry pi 3b+ units (along with raspberry's PoE hats - which also work really well).",[211,221,222],{},"I decided to give octopi a go - but on a 3b+ - a USB cable is less invasive than installing the zero onto the prusa board (and easier to remove if it needs to be).",[211,224,225,226,236],{},"Normal installation of octopi onto the memory card is covered well enough on ",[227,228,235],"a",{"href":229,"rel":230,"target":234},"https:\u002F\u002Foctoprint.org\u002Fdownload\u002F",[231,232,233],"nofollow","noopener","noreferer","_blank","the octoprint site",".",[211,238,239],{},"This will be running ethernet - let's disable the wifi and bluetooth stacks.",[211,241,242],{},"In config.txt:",[244,245,250],"pre",{"className":246,"code":247,"language":248,"meta":249,"style":249},"language-ini shiki shiki-themes github-dark","dtoverlay=pi3-disable-wifi\ndtoverlay=pi3-disable-bt\n","ini","",[251,252,253,266],"code",{"__ignoreMap":249},[254,255,258,262],"span",{"class":256,"line":257},"line",1,[254,259,261],{"class":260},"snl16","dtoverlay",[254,263,265],{"class":264},"s95oV","=pi3-disable-wifi\n",[254,267,269,271],{"class":256,"line":268},2,[254,270,261],{"class":260},[254,272,273],{"class":264},"=pi3-disable-bt\n",[211,275,276],{},"Next - the main camera is the pi v2 camera - let's force that to be the main octoprint camera:",[211,278,279],{},"In octopi.txt the only uncommented lines are:",[244,281,283],{"className":246,"code":282,"language":248,"meta":249,"style":249},"camera=\"raspi\"\ncamera_raspi_options=\"-fps 30 -x 1920 -y 1080\"\n",[251,284,285,297],{"__ignoreMap":249},[254,286,287,290,293],{"class":256,"line":257},[254,288,289],{"class":260},"camera",[254,291,292],{"class":264},"=",[254,294,296],{"class":295},"sU2Wk","\"raspi\"\n",[254,298,299,302,304],{"class":256,"line":268},[254,300,301],{"class":260},"camera_raspi_options",[254,303,292],{"class":264},[254,305,306],{"class":295},"\"-fps 30 -x 1920 -y 1080\"\n",[211,308,309,310,312],{},"The setting for ",[251,311,289],{}," could be left on auto - but later on a second USB camera will be added that will be configured outside of octoprint and to avoid having issues with device ordering this forces it to choose the pi cam.",[211,314,315],{},"In the octopi settings - the following settings:",[244,317,322],{"className":318,"code":320,"language":321,"meta":249},[319],"language-text","Stream URL - \u002Fwebcam\u002F?action=stream\nSnapshot URL - http:\u002F\u002F127.0.0.1:8080\u002F?action=snapshot\n","text",[251,323,320],{"__ignoreMap":249},[211,325,326,327,330],{},"The first goes thru the running haproxy instance that octopi is running - the other is direct (note that this unit is not exposed to the wider internet and so hasn't had much done yet - so the webcam stream is available on the LAN on ",[251,328,329],{},"http:\u002F\u002FIP_OR_HOSTNAME:8080",")",[211,332,333],{},"At this point both the camera on the control page and the timelapse functionality should work.",[335,336,338],"h2",{"id":337},"second-camera","Second camera",[211,340,341],{},"I have an old USB webcam lying around. I also wanted to test out octolapse - and that from above (the pi cam is mounted on an arm on a corner of the build plate to keep it stationary relative to the plate). So I wanted to see if I could add a second camera.",[211,343,344],{},"There is a plugin for octoprint called multicam - which recommends a separate pi. But - I won't be loading this second cam very highly - so I went with it on the same 3b+.",[211,346,347],{},"To test - logged in as the pi user over ssh:",[244,349,353],{"className":350,"code":351,"language":352,"meta":249,"style":249},"language-shell shiki shiki-themes github-dark","cd ~\u002Fmjpg-streamer\n.\u002Fmjpg_streamer -i \".\u002Finput_uvc.so -f 3 -r 1280x720\" -o \".\u002Foutput_http.so -w .\u002Fwww-octopi -p 8800\"\n","shell",[251,354,355,364],{"__ignoreMap":249},[254,356,357,361],{"class":256,"line":257},[254,358,360],{"class":359},"sDLfK","cd",[254,362,363],{"class":295}," ~\u002Fmjpg-streamer\n",[254,365,366,370,373,376,379],{"class":256,"line":268},[254,367,369],{"class":368},"svObZ",".\u002Fmjpg_streamer",[254,371,372],{"class":359}," -i",[254,374,375],{"class":295}," \".\u002Finput_uvc.so -f 3 -r 1280x720\"",[254,377,378],{"class":359}," -o",[254,380,381],{"class":295}," \".\u002Foutput_http.so -w .\u002Fwww-octopi -p 8800\"\n",[211,383,384,385,388],{},"Then test ",[251,386,387],{},"http:\u002F\u002FIP_OR_HOSTNAME:8800"," - it should show a snapshot and a stream. Note that this is at a very low framerate - since all we need here is the snapshot function - we won't be needing a good stream framerate (nor do we want to load the Pi heavily by adding a higher framerate).",[211,390,391],{},"Next step - let's run this when the machine starts. It seems the simplest way to do so is via crontab.",[211,393,394,395,398],{},"Run ",[251,396,397],{},"sudo crontab -e"," to edit root's crontab file and add:",[244,400,402],{"className":350,"code":401,"language":352,"meta":249,"style":249},"@reboot \u002Fhome\u002Fpi\u002Fmjpg-streamer\u002Fmjpg_streamer -i \"\u002Fhome\u002Fpi\u002Fmjpg-streamer\u002Finput_uvc.so -f 3 -r 1280x720\" -o \"\u002Fhome\u002Fpi\u002Fmjpg-streamer\u002Foutput_http.so -w \u002Fhome\u002Fpi\u002Fmjpg-streamer\u002Fwww-octopi -p 8800\"\n",[251,403,404],{"__ignoreMap":249},[254,405,406,409,412,414,417,419],{"class":256,"line":257},[254,407,408],{"class":368},"@reboot",[254,410,411],{"class":295}," \u002Fhome\u002Fpi\u002Fmjpg-streamer\u002Fmjpg_streamer",[254,413,372],{"class":359},[254,415,416],{"class":295}," \"\u002Fhome\u002Fpi\u002Fmjpg-streamer\u002Finput_uvc.so -f 3 -r 1280x720\"",[254,418,378],{"class":359},[254,420,421],{"class":295}," \"\u002Fhome\u002Fpi\u002Fmjpg-streamer\u002Foutput_http.so -w \u002Fhome\u002Fpi\u002Fmjpg-streamer\u002Fwww-octopi -p 8800\"\n",[211,423,424,425,428],{},"Lastly - the multicam plugin config. Rename Default to Pi and add a new camera called USB with the URL ",[251,426,427],{},"http:\u002F\u002FIP_OR_HOSTNAME:8800\u002F?action=stream",". It seems that the multicam plugin will simply be changing the URL of the player when run in the browser - so localhost doesn't work here. You could add configuration to haproxy and just use a different path (similar to the default camera) if you wish.",[211,430,431],{},"At this point - you should be able to switch between cameras in the control tab. The inbuilt timelapse is still using the Pi camera.",[335,433,435],{"id":434},"octolapse","Octolapse",[211,437,438],{},"This is a relatively complex plugin to setup - so here we'll only look at the camera.",[211,440,441,442,445,446,448],{},"Under ",[251,443,444],{},"Settings > Octolapse > Camera"," add a second camera. Type set to Webcam, base address to ",[251,447,387],{},". The only other setting is the Snapshot delay - that is calculated as 1000\u002Fframerate - so set that to match.",[211,450,451],{},"Octolapse now captures from both cameras (you can check\u002Funcheck them if you only want one).",[211,453,454],{},"However - I have other issues with octolapse that I haven't spent time on (the movement of the head out of the way is sometimes crashing when it moves back to the part - and I haven't looked into why yet). But at least the camera is working fine :)",[456,457,458],"style",{},"html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}",{"title":249,"searchDepth":268,"depth":268,"links":460},[461,462],{"id":337,"depth":268,"text":338},{"id":434,"depth":268,"text":435},"2019-01-09 10:12 +0100",null,"md","Octopi on a raspberry pi 3 with a prusa mk3",{},true,"\u002F2019\u002F01\u002F09\u002Foctopi-setup",{"title":206,"description":213},{"loc":469},"2019\u002F01\u002F09\u002Foctopi-setup",[474,475,476,477,434],"prusa","mk3","octopi","timelapse","QXcp5JkLogapac6yuf4g-Cex0syYvscfo4MrVAubqb4",1775293009769]