Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi v2 Camera #92

Open
OneScuzzie2k opened this issue Jun 12, 2023 · 17 comments
Open

Raspberry Pi v2 Camera #92

OneScuzzie2k opened this issue Jun 12, 2023 · 17 comments

Comments

@OneScuzzie2k
Copy link

Any instruction to get the Raspberry Pi v2 Camera working, i have added camera="raspi" into the octopi.txt but still not working.

@paukstelis
Copy link
Owner

Once you use octoprint_deploy, a whole different camera setup is used. octopi.txt no longer has any influence.
You need to run the script using the picam argument. https://github.com/paukstelis/octoprint_deploy/wiki/Command-line-arguments#picam
Keep in mind, as the instructions say, this may not work with the most recent version of OctoPi. I have not been able to verify how Pi cameras are described in the latest version.

@OneScuzzie2k
Copy link
Author

Thanks will give it a go.

@OneScuzzie2k
Copy link
Author

Didnt work for me :(

@paukstelis
Copy link
Owner

try this: sudo sed -i s/camera0/video0/ /etc/udev/rules.d/99-octoprint.rules
then sudo udevadm control --reload-rules; sudo udevadm trigger

@OneScuzzie2k
Copy link
Author

try this: sudo sed -i s/camera0/video0/ /etc/udev/rules.d/99-octoprint.rules then sudo udevadm control --reload-rules; sudo udevadm trigger

I am afraid no Joy with this either

@paukstelis
Copy link
Owner

what do you have with cat /etc/udev/rules.d/99-octoprint.rules?
and
ls -la /dev/cam*

@OneScuzzie2k
Copy link
Author

cat /etc/udev/rules.d/99-octoprint.rules
KERNELS=="1-1.4:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_Creality"
KERNELS=="1-1.3:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_Spark3D"

ls -la /dev/cam*
ls: cannot access '/dev/cam*': No such file or directory

@paukstelis
Copy link
Owner

No cameras have been setup yet. There is no way that it can work without going through those steps.

@OneScuzzie2k
Copy link
Author

pi@octopi:~ $ cat /etc/udev/rules.d/99-octoprint.rules
KERNELS=="1-1.4:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_Creality"
KERNELS=="1-1.3:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_Spark3D"
SUBSYSTEM=="video4linux", ATTRS{name}=="camera0", SYMLINK+="cam_Spark3D"
pi@octopi:~ $ ls -la /dev/cam*
lrwxrwxrwx 1 root root 6 Jun 12 18:41 /dev/cam_Spark3D -> video0

Still not working I am afriad

@paukstelis
Copy link
Owner

sudo systemctl status cam_Spark3D

@OneScuzzie2k
Copy link
Author

sudo systemctl status cam_Spark3D
-bash: pi@octopi:: command not found
-bash: ATTRS{name}==camera0,: command not found
-bash: pi@octopi:
: command not found
-bash: lrwxrwxrwx: command not found
-bash: pi@octopi:~: command not found
● cam_Spark3D.service - the OctoPi(buntu) webcam daemon with the user specified>
Loaded: loaded (/etc/systemd/system/cam_Spark3D.service; enabled; vendor p>
Active: failed (Result: exit-code) since Mon 2023-06-12 18:41:47 BST; 7min>
Main PID: 2509 (code=exited, status=1/FAILURE)
CPU: 11ms

Jun 12 18:41:47 octopi mjpg_streamer[2509]: i: TV-Norm...........: DEFAULT
Jun 12 18:41:47 octopi mjpg_streamer[2509]: i: init_VideoIn failed
Jun 12 18:41:47 octopi mjpg_streamer[2509]: MJPG-streamer [2509]: Using V4L2 de>
Jun 12 18:41:47 octopi mjpg_streamer[2509]: MJPG-streamer [2509]: Desired Resol>
Jun 12 18:41:47 octopi mjpg_streamer[2509]: MJPG-streamer [2509]: Frames Per Se>
Jun 12 18:41:47 octopi systemd[1]: cam_Spark3D.service: Main process exited, co>
Jun 12 18:41:47 octopi mjpg_streamer[2509]: MJPG-streamer [2509]: Format.......>
Jun 12 18:41:47 octopi systemd[1]: cam_Spark3D.service: Failed with result 'exi>
Jun 12 18:41:47 octopi mjpg_streamer[2509]: MJPG-streamer [2509]: TV-Norm......>
Jun 12 18:41:47 octopi mjpg_streamer[2509]: MJPG-streamer [2509]: init_VideoIn >

@paukstelis
Copy link
Owner

It is obviously not starting, but not clear why. Try this and paste output:
sudo systemctl restart cam_Spark3D; sudo systemctl status cam_Spark3D -l --no-pager

@OneScuzzie2k
Copy link
Author

Ahh ha thats done it thanks :) any reason why it wouldnt auto start?

@paukstelis
Copy link
Owner

Probably only because mjpg-streamer is terrible.

@OneScuzzie2k
Copy link
Author

OK thanks can I change that?

@OneScuzzie2k
Copy link
Author

Did a fresh install used ustreamer, now I cannot get a image at all I should just leave things.

pi@octopi:~ $ cat /etc/udev/rules.d/99-octoprint.rules
KERNELS=="1-1.4:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_Creality"
SUBSYSTEM=="video4linux", ATTRS{name}=="video0", SYMLINK+="cam_Creality"

I have created the camera in
sudo octoprint_deploy/octoprint_deploy.sh picam

But when I run the below I get cannot access the device.
ls -la /dev/cam*
ls: cannot access '/dev/cam*': No such file or directory

@OneScuzzie2k
Copy link
Author

I have sorted it had to manually create a symbolic link
sudo ln -s /dev/video0 /dev/cam_Creality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants