What is the problem?
Adding a static web page and modifying OctoPrint HTML pages
What did you already try to solve it?
Asked about it on the multi-printer thread and it was suggested I post it as a separate question.
I'd like to do two things that concern the web interface for OctoPrint. I'm running OctoPi on a Pi4. I know OctoPrint, by default, uses port 5000 and that's configured in /etc/haproxy/haproxy.cfg. Also note that I have multiple instances of OctoPrint running on this Pi. I've asked about this on the multi-printer super-thread and it was suggested I make this as a separate post. What I'm doing does tie in with the mutli-printer thing, but not in a way that I think changes my question.
I'm using menegroth has the hostname for my OctoPi Pi4. I have things set up, in Haproxy, so I can easily get to the different printers and webcams. So http://menegroth/prusa gives me one printer (the one on port 5000) and http://menegroth/creality gives me the other printer (the one on port 5010).
Here's what I want to do:
-
I want to make it so http://menegroth brings up a static webpage. I'll edit the HTML source for this myself. While it's not important for the question, this page will have links to each camera and each webcam stream.
-
On my OctoPrint pages, preferably on the main page, I'd like to add a link or button or icon I can click that will go back to the static page created in step 1.
As I said, the multi-printer thing is not really part of the question, but it may help people see why I'm doing this.
You could also use OctoFarm
I does pretty much what you want to do and even more
Wow. Yes, it does. Now I'm feeling like Majikthise in Hitchhiker's Guide to the Galaxy:
Majikthise:
I mean, what's the use of our sitting around half the night arguing whether there may...be a God, if this machine only goes and gives you his phone number in the morning?
I've been trying to sort through haproxy files and so on to figure this out and BAM, in one shot I get an answer that does what I want and more. Or I think it does.
Let me ask one question about it - since I could spend a while verifying this and trying to go down several different paths in searching for info on it. Will it work with multiple printers and webcams set up through Thomas Messmer's tutorial on setting up multiple instances?
1 Like
In theory yes, although that guide seems quite old and I'm not sure that it will work for the latest OctoPi 0.18 image. OctoFarm itself works regardless of how you setup your OctoPrint instances, as long as it can connect to them once running.
Another nice solution (which is what we generally recommend these days because it works well) is octoprint_deploy
by @paukstelis:
It will walk you through automatically setting up multiple instances.
Yeah, there are .... uh, issues. The guide is solid and any time someone does the work to put something like that out there for us all, I respect it. But there are translation issues (I get that it's auto-translated) and there are times where he does not specify what file to edit. I spent more than a day getting the webcams to work properly on it! It definitely needs updating! (And I'm not thrilled about how it handles editing /root/bin/webcmd. I have my own methods I prefer for something like that and I don't like that each instance of webcmd would need separate editing. But I also ran into some frustrations with that script in the first place - like it not accepting something like /dev/videoPRUSA01 as a device name I created in the udev rules.)
Again, feeling like in that previous comment I made. I spend all this time to set it up because Pis are so expensive now and I find this stuff so easy to do! (And I could swear I didn't see mention of anything like OctoFarm in the multi-printer thread, but I could have missed it.)
I'm looking over docs on this now. Am I right that I basically need one generic install that doesn't have a camera, but then I can add, beyond that, different instances where I can add a printer and camera for each instance?
And this sets things up so I can easily use OctoFarm after I'm done with the installs?
Well, not so good news. In the FAQ it says not to use it on OctoPi. Since I'm doing this on a Raspberry Pi, it doesn't look good for my setup.
well you could run it on plain raspbian on a pi
I was just checking messages on everything before going to bed. I did not realize that OctoFarm and my OctoPrint instances could be on different systems - saw that on Discord just before coming here. This helps me, since it lets me use bookmarks for now and set up OctoFarm on another system when I have time (and also not having it interfere with current use of the printers).
The only problem is Pis are now about 4-5 times the cost they normally are - when a new supply comes out, I'll be getting several.
I would buy a cheap second hand mini pc or nuc instead
something like that
Put Debian on it, deploy some instances with this script
and you're good to go
If you start from a non-OctoPi linux system, the script does everything for you. It installs OctoPrint. It makes a template/generic instance that is then used for making as many instances as you want. Printers are added as you make the instances, cameras can be added as you make them or later. Keep in mind, the number of cameras will be limited based on USB bandwidth.