my Name is Stefan, i am coming from Germany/Bavaria. Sorry for my bad English.
I built an Octoprint Dual Cube with 4x CH Relais. My first Octoprint Cube works with 1x Pi4 and 2x Octoprint Server and 2x Webcam!
now I'm building a new one and have the following problem:
I would like to permanently assign the USB regardless of what a webcam or printer is connected to.
USB 3.0 1 = printer 1
USB 3.0 2 = printer 2
USB 2.0 3 = CAM 1
USB 2.0 4 = CAM 2
at the moment I have it like that and that's crap because it only works for this hardware
congrats to the case and from what I can see you've come pretty close to completing the project. Hope I can find it on thingiverse once you upload it.
For that sort of more generic rule that you wan't you may need an udev artist of sorts and I guess your chances of finding those talents are better on raspberrypi.org/forums or stackexchange
I might be completely off and the next poster has exactly what you need but still, searching those places may be worth the effort.
Good luck and make sure to post the links to github and t-verse once you've reached the stage.
If all you want is to setup udev rules so that a printer plugged into the same physical USB port is always named 'Drucker1' and a camera in the same port is always 'CAM1', and so on, you really only need the ATTRS{devpath}=="N.N" bit.
This is the opposite of what most people are going for, so it may be a bit confusing at first.
For example, based on your examples, your first printer would be: SUBSYSTEM=="tty",ATTRS{devpath}=="1.2",SYMLINK+="Drucker1"
And the first camera: SUBSYSTEM=="video4linux",ATTR{index}=="0",ATTRS{devpath}=="1.4",SYMPATH+="CAM1"