Has anyone used a touchscreen with multiple OctoPrint instances on one Pi?
I would think it'd need a way to select between the instances and, each instance, a way to back out to the main menu.
Has anyone used a touchscreen with multiple OctoPrint instances on one Pi?
I would think it'd need a way to select between the instances and, each instance, a way to back out to the main menu.
depends on what interface you are using for the touchscreen. I came up with a hacky solution for OctoDash with the OctoDash companion plugin via custom actions in OctoDash. When set it will basically change the settings in your OctoDash config.json and then restart the service to load the additional instance. The only requirement is that all your instances must have the same API key registered.
I would be quite interested in more information on how you did that. First, do you mean the same API key for OctoDash or OctoPrint? (I'm still winding my way through what I can do with OctoPrint, so, other than setting up 2 instances and 2 webcams, have not gone too deeply into OctoPrint yet. Sorry if this is way too easy a question!)
Was this hard to set up with custom actions?
Another thought I'm having about this: If I use custom ports (say, 5000 for Printer1, 5001 for Webcam1, 5010 for Printer2 and 5011 for Webcam2), is it possible, and fairly easy, to set up a simple HTML page for the "normal" page for OctoPrint that would have links to each instance?
For example, if my Pi used the hostname "menegroth" for my Pi, and, using Haproxy, http://menegroth/printer1 was an alias for http://menegroth:5000 and http://menegroth/printer2 was an alias for http://menegroth:5010, so I was using those two paths for my 2 printers, could I set it up so just plain http://menegroth or http://menegroth/index.html brings up my own HTML page? (That way I could write a simple page to easily pick which printer I am using and it would be easily updated as I add more printers. It could also direct to multiple webcams, if I start using multiple ones.)
You could customize the Haproxy configuration to serve a static HTML page & the OctoPrint servers on their individual routes. It can be a difficult configuration to understand, so I would suggest creating your own post if you wanted help in creating a config to do this. But in short, yes it would be possible.
So, instead of installing something like Apache, I can do a static page with Haproxy? That'd be nice.
I thought about that, and then I figured the first thing that'd happen is people asking, "Why do you want to do this?" and when I answer, I'd get kicked back to this thread, but I might be doing that.
The other side of the coin is if I can easily add a link or button on the OctoPrint web page to go back to that first page.
Don't worry about that - I suggested it, we would have to allow it
Thank you!
I appreciate, but was totally unaware of, your superpowers.
There's also this unlisted plugin...
Thanks!
I have a server system that became redundant a few months ago and I forgot about this. I was just thinking about how much else I have to do, so it's best to do the simplest setup for now and, in the long run, turn that server into a multi-printer manager with OctoFarm.
The bookmark manager will work for now and let me move on to the next phase of work with my printers. (It's all going toward a business I'm starting, so I do want to get things working soon.)
That'll help.
You said unlisted. Is that part of OctoPrint not supporting multi-printer systems?
Do you know if it's normal to have to configure the BookmarkManager in each existing printer setup? I would have thought, since this plugin is specifically for managing different printers, it would have an awareness of different installs.
Doubtful, plugin settings are isolated per basedir.
Okay, settings are per instance - but am I right that adding a plugin to one instance adds it to all of them?
Typically, yes, since they are run out of the same venv.
That depends on how your multi-instance setup was done. If they all use the same venv and just different service file configurations pointing to different basedir locations then yes, you would just have to restart the other instances for the plugin to be loaded. You could technically copy the config bits for the plugin from config.yaml into the other config.yaml files of the other basedir locations too once you get one setup.
Running into another issue. I have an Ender 3 Pro that I've had a lot of trouble with, so it's mostly just been sitting there for a few months until I had time to deal with it. My main printer is a Prusa i3 MK3S+. I set up both printers because my plan was to eventually be using both of them. I've been using two instances of OctoPrint on my Pi for a while now and I've had no problem with it controlling my Prusa. It's been a wonderful time saver. (For instance, my workshop is in our barn, a short walk from our house. I can now start a print from my study in the house and not have to go down and check on it until I'm ready to pick up my print.)
Looking back, I'm not sure I did anything with the Ender 3 Pro until today. I started a print and it messed up from the start. I was at the print table, so I used the control on the E3P to stop printing, but it wouldn't stop and by now it was trying to move the printhead too far in one direction. The E3P has a frustrating situation where, if you leave the USB connection plugged in, it still acts like it has power, even after you turn it off and even when you pull the AC plug, it still tries to keep going. (At least it did today.) So I pulled out the USB cable. I shut down the E3P 100%.
While troubleshooting the E3P, I started sending my print to my Prusa - but my E3P started acting like it was possessed. When I looked things over, I saw that instead of going to the Prusa, the print was going to my E3P! (I had made sure I was in the correct instance of OctoPrint before printing.) I stopped and rebooted. I set the hot end temp on my E3P to a higher temp (on the E3P control panel), then I went to the OctoPrint interface, picked Prusa, and specified /dev/ttyACM0 and went to the Temperature tab. It showed me the temp data for the E3P. So I went back in the settings and changed the Prusa instance to /dev/ttyUSB0. Same situation: It gave me the temperature data for the E3P again.
I tried the same with the 2nd instance of OctoPrint and got the same. (I didn't expect it to be different.) So whichever tty device I specified for a printer (ACM0 or USB0), OctoPrint only talked to or saw my E3P.
I ssh'ed in to the system and listed /dev, since it's been a while since I set this up. This is the related part of the listings:
I had forgotten I had set up direct links. I went back to OctoPrint and, in both instances, I added globs for listings, so I have the following (globs and devices OctoPrint lists are in the screenshot):
This gives me a list of the original devices OctoPrint lists (ACM0 and USB0) as well as the links I had created.
Once I did that, the problem changed - it's workable, but unpredictable for future situations. Now when I pick my Prusa instance, I'm getting the E3P temp data - no matter which device I select. If I pick the E3P instance, no matter what device I select, I get the Prusa temperature data displayed. (Each instance still displays the webcam for that instance, but that's an entirely different issue, so I'm just mentioning that as troubleshooting data.)
If I could count on this continuing reliably, I'd just swap the names and instances of OctoPrint, but I have no idea what's going on, or why I can pick different devices and still get data from the device I picked. This feels like the two separate OctoPrint instances are just picking the serial device they want no matter what I select.
I neglected to include that after I change from one device to another, in each profile, I do disconnect and connect, specifying the same port I specified in settings.
That can't and shouldn't happen if things are setup right.
Show us the udev rules you are using to create /dev/ttyPRUSA and /dev/ttyE3P
It took a while. It's happening - but I found that after reconnecting, I had to wait for the values to show up. I was looking at the chart and it took time for the changes to show up there. Once I got used to waiting, I experimented and found that even the immediate temp readings might take time to change.
Once I got used to the change being delayed, things worked okay.
Webcam parameters:
I want to add some configuration changes for mjpg_streamer and webcamd for my first instance of my webcam on my Pi.
When I first set up my multi-printer/multi-cam server, I used the instructions on this thread to set up both webcams. So I copied /boot/octopi.txt to /boot/octopi.conf.d/webcamd2.txt. My understanding is that gives me 2 config files, /boot/octopi.txt is the config for the first instance and /boot/octopi.conf.d/webcam2.txt is the config for the 2nd instance.
I also see, in /home/pi/webcamd, that if I want to add or edit options, to do so in /boot/octopi.txt.
I also note a webcamd and webcamd2 in /boot, but apparently I don't need to worry about those files.
I tried adding options to /boot/octopi.txt, then rebooting the Pi, but I'm not seeing any results.
Note: I'm testing with "-vf" as an option because it's a setting where I can quickly and easily see the results. I know, within OctoPi's web interface, I can check a config option to flip it vertically, but, again, this is my test option so I can be sure it works and add more later. (Also, my wife and I often use the direct link to the stream, like http://octopi/camprusa/?action=stream to see print status, so if I can flip the original stream, that'd be helpful - as well as using this one parameter as a test to know where to add other changes.
Not all parameters are supported by all cameras - especially the flip options. They might be in the config correctly, but unable to be applied.
The parameters in either octopi.txt
or webcam2.txt
will apply to those webcams individually respectively, not one set of parameters for both.