Multiple printers per server megathread

So it just might be that my cam won't flip. Okay, that's a good start for research. I can check on that and switch to another option to test.

Am I right that my changes on /boot/octopi.txt will apply to my 1st webcam and /boot/octopi.conf.d/webcam2.txt will apply to the 2nd webcam? (I'm paraphrasing what you're saying to be sure I understand it.)

Yeah, that's correct.

Another way you can adjust these parameters, in a more user-friendly way is with the 'Camera Settings' plugin.

I know that'll adjust it in OctoPrint, but it won't adjust the actual stream itself, right?

(Well, if I can't invert it, it looks like I'll have to drop using the raw stream anyway.)

The Camera settings plugin applies to the stream itself, not just in OctoPrint's UI.

1 Like

I did get in touch with tech support and they say the camera does support flipping the image and specifically suggested using '-fv' for mjpg_streamer. They also sent screenshots showing the video stream flipped. Granted, that could be a load of crap, but they did know which switch to use, so I'm inclined to believe it supports it.

Do you mean the camera settings I change in the config files or the ones I change in the OctoPrint UI, under the settings? I changed to flip the video in OctoPrint's settings and it does flip the stream in OctoPrint, but when I go straight to the streaming URL directly (http://octopi/camprusa/?action=stream in my case), it's still upside down.

Neither.

1 Like

Thanks!

That looks like it'll handle everything that can be done. If I weren't in the middle of a long print, I'd already be installing it.

Is there a relatively easy way to use a different theme for each instance of OctoPrint?

I started using the UI Customizer plugin and changed from the default theme for the web UI. I notice that whatever theme I use works for both instances. Is there a directory where I can put a theme for my 2nd instance?

It's not a "must do" kind of thing, but if it's easy, it does help me tell, at a glance, which printer I'm looking at.

That shouldn't happen. How did you setup the multiple instances? Each instance should have its own config.yaml file that contains the plugin information.

The actual plugin info, like the layout patterns, is per-instance. The theme is for both. My guess is that the theme is html and css files stored wherever OctoPrint keeps its normal HTML theme data.

It looks like it's saving to a base folder, which probably is getting interpreted to the octoprint files directly rather than in the individual instance's base folder.

I would probably recommend maybe changing the temperature graph image with my Custom Background plugin. Chris Riley mentioned that one in his multi-instance guide and I thought it was a good idea. There's also the Name in Appearance settings that you can use to change what shows on the title of the browser.

1 Like

@Laze not sure if you might want to consider changing that base path to be self.get_plugin_data_folder() or if it's a technical reason you can't reference the css files that way?

https://docs.octoprint.org/en/master/modules/plugin.html#octoprint.plugin.types.OctoPrintPlugin.get_plugin_data_folder

Never got around to it.. Will check ASAP

This worked for me. I have both of mine configured so the GCode Viewer comes up as the first tab, since that's what I find most useful, so changing the temp graph wasn't the one for me.

Also worth noting (for others reading this), if you're like me and have 5 windows and 15 tabs in each window open in a browser, so you don't see much of the title, this also changes the title in the upper left hand corner of the page, so instead of having it say, "OctoPrint," I now have that title set to each printer.

I use my consolidated tabs plugin and have everything condensed down to a single page.

I had not seen that - but there are SO many cool plugins! I'm going to consider that. I guess it's whether I want to scroll down to see more or click a tab to see more.

Separate USB cam for each printer question:

I'm using this guide (which seems to be the "master" guide for setting up multiple printers) for setting up my two printers and cameras on my Pi with OctoPi. I've had some questions I've had to ask here, but, overall, it's all working well now. But there's a change I'd like to make.

Currently I'm using a PiCam for one printer and a USB camera for the other printer. I've printed camera mounts and articulated arms so I can position the cameras wherever I want. However, I'm still dealing with a limited field of view and miss parts of what I'm printing. I found a good USB webcam that has a wider field of vision, but claims to not be anamorphic. (The images don't look anamorphic.) It's great for being able to see everything I want.

I've tried an anamorphic lens on a PiCam and it's almost a full 180Β° field - but it's anamorphic and the field is rather distorted. I find the USB cam I'm using on the other printer is perfect for my needs. The issue is that when I use udevadm and do an attribute walk on the wide view camera and on another USB camera I use, the output is identical. So both cams use the same chip and all their ID info, including serial numbers, are identical.

Is there any way, in that situation, to tell to USB cams apart with udevadm or other software tools? Or is there any kind of firmware in USB cams that can be updated or that can take an individualized ID strong or even an ID byte? I'm thinking the answer is probably no, but I'm asking just in case there is some way to tell them apart.

yes, udev rules can be setup for each individual camera. I would have recommended to you to do the octoprint_deploy script as it will handle the multiple instances and cameras.

I've been using udev rules for the cameras I have - and they're both different. But even if the output for 2 cameras are identical when using udevadm, can it still distinguish between the two?

I believe it can based on the USB port it's plugged into, instead of the serial number.