Open Schnitzer50 opened 1 year ago
Libcamera support is still "under construction", and that applies to the yet unreleased ME 0.43 with Python3 support. The topic has been discussed here: #2425 (and here: #2683).
As far as I've understood things correctly, there are some workarounds mentioned in #2683, but no complete solution yet. There is a PR (https://github.com/motioneye-project/motioneye/pull/2765) linked to the other issue and it is waiting for testing, with some instructions on how that could be done (but I admit they might not be good instructions in case one is not that tech-savvy).
Hello Bello :dog:,
working with Debian Bookworm with current patchlevel:
apt update
apt upgrade -y
python3 -m pip install 'https://github.com/motioneye-project/motioneye/archive/dev.tar.gz'
apt install -y libcamera-v4l2
sed -i 's/\/usr\/local\/bin\/meyectl/\/usr\/bin\/libcamerify \/usr\/local\/bin\/meyectl/' /etc/systemd/system/motioneye.service
systemctl daemon-reload
systemctl enable motioneye --now
In motionEye add the first camera.
Example: Local V4L2 Camera /base/soc/.../.../ov5647...
Please update the wiki, I can't do a pull-request on it 🙈 🙉 🙊:
Install on Debian 12 (Bookworm)
Greetings from Trier (Germany)
7 Edits 😀
Have a nice day!
pingufreak
@pingufreak im gonna try your solution for bookworm in a pi4 8gb with a rpi cam ov5647 hope it works cause im losing my mind with motioneye haha
@pingufreak, Thank you for your suggestions... I (and others) have been struggling with this issue. I tried your suggestion on a fresh install of 64bit raspian bookworm on a RPi 4b 4Gb model. after trying to execute the third line I get: ... **error: externally-managed-environment
This environment is externally managed** ... I assume that this is a new "feature" of Debian Bookworm, that I haven't figured out yet. Is there a way to get motioneye to install directly, or a simple way to set up a venv?
Thank you for any suggestions...
@pingufreak I tried entering the third line: python3 -m pip install 'https://github.com/motioneye-project/motioneye/archive/dev.tar.gz' --break-system-packages in hopes of getting around the venv issue. It seemed to be working, but then got the following error. I'm not sure what next to try...
... Collecting pycurl Downloading pycurl-7.45.2.tar.gz (234 kB) ------------------------------------- 234.2/234.2 kB 491.7 kB/s eta 0:00:00 Preparing metadata (setup.py) ... error error: subprocess-exited-with-error
python setup.py egg_info did not run successfully. exit code: 1
[26 lines of output] Traceback (most recent call last): File "/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py", line 229, in configure_unix p = subprocess.Popen((self.curl_config(), '--version'), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/subprocess.py", line 1024, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'curl-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details. root@raspberrypi:/home/pi#
@Juanderer98 you seem to be missing curl-config
, which should be available in libcurl4-openssl-dev
package which you need to install. And given that there are a couple of other additional packages for 64-bit RPis in the dev branch installation instructions (see step 1 here) you might need to install those, too.
Please read the logs / rtfm:
apt install -y curl-config
The other errors: bookworm doesn't come with python2, you really need to install the dev version of motioneye with pip3.
On Tue, Nov 28, 2023, 4:37 AM Juanderer98 @.***> wrote:
@pingufreak https://github.com/pingufreak I tried entering the third line: python3 -m pip install ' https://github.com/motioneye-project/motioneye/archive/dev.tar.gz' --break-system-packages in hopes of getting around the venv issue. It seemed to be working, but then got the following error. I'm not sure what next to try...
... Collecting pycurl Downloading pycurl-7.45.2.tar.gz (234 kB) ------------------------------------- 234.2/234.2 kB 491.7 kB/s eta 0:00:00 Preparing metadata (setup.py) ... error error: subprocess-exited-with-error
python setup.py egg_info did not run successfully. exit code: 1
[26 lines of output] Traceback (most recent call last): File "/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py", line 229, in configure_unix p = subprocess.Popen((self.curl_config(), '--version'), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/subprocess.py", line 1024, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'curl-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py", line 970, in ext = get_extension(sys.argv, split_extension_source=split_extension_source) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py", line 634, in get_extension ext_config = ExtensionConfiguration(argv) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py", line 93, in init self.configure() File "/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py", line 234, in configure_unix raise ConfigurationError(msg) ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config' [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details. @.***:/home/pi#
— Reply to this email directly, view it on GitHub https://github.com/motioneye-project/motioneye/issues/2812#issuecomment-1829019362, or unsubscribe https://github.com/notifications/unsubscribe-auth/APZW37NT6U6NHLOV5SNKJ2DYGVMA3AVCNFSM6AAAAAA3ZWWI7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRZGAYTSMZWGI . You are receiving this because you were mentioned.Message ID: @.***>
99,999999% of the time for fixing issues is reading logs / docs and understanding in detail what's going on. If you just follow this advise, you can get really good quite fast.
On Tue, Nov 28, 2023, 7:42 AM Ix Yps @.***> wrote:
Please read the logs / rtfm:
apt install -y curl-config
The other errors: bookworm doesn't come with python2, you really need to install the dev version of motioneye with pip3.
On Tue, Nov 28, 2023, 4:37 AM Juanderer98 @.***> wrote:
@pingufreak https://github.com/pingufreak I tried entering the third line: python3 -m pip install ' https://github.com/motioneye-project/motioneye/archive/dev.tar.gz' --break-system-packages in hopes of getting around the venv issue. It seemed to be working, but then got the following error. I'm not sure what next to try...
... Collecting pycurl Downloading pycurl-7.45.2.tar.gz (234 kB) ------------------------------------- 234.2/234.2 kB 491.7 kB/s eta 0:00:00 Preparing metadata (setup.py) ... error error: subprocess-exited-with-error
python setup.py egg_info did not run successfully. exit code: 1
[26 lines of output] Traceback (most recent call last): File "/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py", line 229, in configure_unix p = subprocess.Popen((self.curl_config(), '--version'), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/subprocess.py", line 1024, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'curl-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py", line 970, in ext = get_extension(sys.argv, split_extension_source=split_extension_source) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py", line 634, in get_extension ext_config = ExtensionConfiguration(argv) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py", line 93, in init self.configure() File "/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py", line 234, in configure_unix raise ConfigurationError(msg) ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config' [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details. @.***:/home/pi#
— Reply to this email directly, view it on GitHub https://github.com/motioneye-project/motioneye/issues/2812#issuecomment-1829019362, or unsubscribe https://github.com/notifications/unsubscribe-auth/APZW37NT6U6NHLOV5SNKJ2DYGVMA3AVCNFSM6AAAAAA3ZWWI7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRZGAYTSMZWGI . You are receiving this because you were mentioned.Message ID: @.***>
Hello everyone, first of all thank you for the detailed information on how to improve MotionEye.For me as a simple user, the instructions are very confusing and I cannot estimate the consequences. Are there no easy update options for Motioneye? I still understand updates via the user interface or terminal instructions for Debian11, and I can also load them from GitHub. Best regards✉️ vom 🖥Am 28.11.2023 um 07:44 schrieb pingufreak @.***>: 99,999999% of the time for fixing issues is reading logs / docs and
understanding in detail what's going on. If you just follow this advise,
you can get really good quite fast.
On Tue, Nov 28, 2023, 7:42 AM Ix Yps @.***> wrote:
Please read the logs / rtfm:
apt install -y curl-config
The other errors: bookworm doesn't come with python2, you really need to
install the dev version of motioneye with pip3.
On Tue, Nov 28, 2023, 4:37 AM Juanderer98 @.***>
wrote:
@pingufreak https://github.com/pingufreak
I tried entering the third line:
python3 -m pip install '
https://github.com/motioneye-project/motioneye/archive/dev.tar.gz'
--break-system-packages
in hopes of getting around the venv issue. It seemed to be working, but
then got the following error. I'm not sure what next to try...
...
Collecting pycurl
Downloading pycurl-7.45.2.tar.gz (234 kB)
------------------------------------- 234.2/234.2 kB 491.7 kB/s eta
0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[26 lines of output]
Traceback (most recent call last):
File
"/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py",
line 229, in configure_unix
p = subprocess.Popen((self.curl_config(), '--version'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 1024, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File
"/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py",
line 970, in
ext = get_extension(sys.argv,
split_extension_source=split_extension_source)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py",
line 634, in get_extension
ext_config = ExtensionConfiguration(argv)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py",
line 93, in init
self.configure()
File
"/tmp/pip-install-gp3rsl8m/pycurl_3fffa710a6074f8d9ede04a2314e9dfb/setup.py",
line 234, in configure_unix
raise ConfigurationError(msg)
ConfigurationError: Could not run curl-config: [Errno 2] No such file or
directory: 'curl-config'
[end of output]
note: This error originates from a subprocess, and is likely not a
problem with pip.
error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
@.***:/home/pi#
—
Reply to this email directly, view it on GitHub
https://github.com/motioneye-project/motioneye/issues/2812#issuecomment-1829019362,
or unsubscribe
.
You are receiving this because you were mentioned.Message ID:
@.***>
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Any suggestions are most welcome.
@pingufreak, Thank you again for your guidance (and patience). Maybe I'm getting a little closer to understanding your suggestion to read logs / docs, but probably not. Anyway, I'm looking through the manual for the sed command. I'm guessing it is to modify the file motioneye.service in place, by replacing paths but I'm still stuck trying to find the original motioneye.service file. I tried to do 'find files' with the file manager, but no luck...
Thanks. This worked!
Please explain me how to easily update motioneye with libcamera. Thanks for your help.
My installed Motioneye version is 22.4.1. Is there already a newer version? If so, what is the easiest way to install it?
@pingufreak did you manage to write an article in the end? I'm trying to use Motioneye with an RPi 5 (Bookworm) with a Pi v2 NOIR camera but having tried all of the various advice and guides I cannot get this to work. What I could really do with is a step-by-step from a fresh install. It used to be so easy!
@pingufreak did you manage to write an article in the end? I'm trying to use Motioneye with an RPi 5 (Bookworm) with a Pi v2 NOIR camera but having tried all of the various advice and guides I cannot get this to work. What I could really do with is a step-by-step from a fresh install. It used to be so easy!
I would also appreciate some kind of basic guide for this same setup.
Thank you very much.
I have used the following instructions on my RPi 3b 32 bit bookworm and they worked fine.
I did have to download a tar.gz file directly from GitHub as there was no dev.tar.gz at the link below.
Thanks for the updates!
Hello Bello 🐶,
working with Debian Bookworm with current patchlevel:
apt update apt upgrade -y python3 -m pip install 'https://github.com/motioneye-project/motioneye/archive/dev.tar.gz' apt install -y libcamera-v4l2 sed -i 's/\/usr\/local\/bin\/meyectl/\/usr\/bin\/libcamerify \/usr\/local\/bin\/meyectl/' /etc/systemd/system/motioneye.service systemctl daemon-reload systemctl enable motioneye --now
In motionEye add the first camera.
Example: Local V4L2 Camera /base/soc/.../.../ov5647...
Please update the wiki, I can't do a pull-request on it 🙈 🙉 🙊:
Install on Debian 12 (Bookworm)
Greetings from Trier (Germany)
7 Edits 😀
Have a nice day!
pingufreak
I have the original v1 camera module connected to a Pi Zero 2 W and the above instructions work in so far as that the module is detected. The picture I see, however, only consists of green stripes. I see some changes when I move the camera. Therefore, I conclude that data is transferred but there seems to be a problem with the pixel format. Everything looks fine directly with libcamera. I tried experimenting with the resolution and motion "palette" setting, but that was unsuccessful.
Hello Bello 🐶,
working with Debian Bookworm with current patchlevel:
apt update apt upgrade -y python3 -m pip install 'https://github.com/motioneye-project/motioneye/archive/dev.tar.gz' apt install -y libcamera-v4l2 sed -i 's/\/usr\/local\/bin\/meyectl/\/usr\/bin\/libcamerify \/usr\/local\/bin\/meyectl/' /etc/systemd/system/motioneye.service systemctl daemon-reload systemctl enable motioneye --now
In motionEye add the first camera.
Example: Local V4L2 Camera /base/soc/.../.../ov5647...
Please update the wiki, I can't do a pull-request on it 🙈 🙉 🙊:
Install on Debian 12 (Bookworm)
Greetings from Trier (Germany)
7 Edits 😀
Have a nice day!
pingufreak
to confirm these instructions worked for me too.
pi zero 2 w + noir 2 + debian bookworm following main motioneye installation instructions did not render a working camera. following https://lookslikematrix.de/raspberry-pi/2023/10/14/motion-bookworm.html rendered working motion but not motioneye. after applying instruction from above, motioneye started working.
Same
Noir v1 IR torch
Bookworm clean install
Pi4 4gb
Working fine
Thanks @pingufreak
EDIT: also working with noir v3 cam
Hi there! Reviving this thread as I'm also trying to install motioneye using @pingufreak's solution.
I stumbled upon sed: can't read /etc/systemd/system/motioneye.service: No such file or directory
like @Juanderer98 did. I carefully followed the steps above, although I should mention that I did NOT installed motioneye using the official installation guide.
Could any of you guys help me solve this? Thanks!
Create manually that file with
sudo nano /etc/systemd/system/motioneye.service
the content is something like
[Unit] Description=motionEye Server After=network.target
[Service] ExecStartPre=/bin/mkdir -p /run/motioneye ExecStartPre=/bin/chown root:root /run/motioneye ExecStart=/usr/bin/libcamerify /homeYOURUSER/motioneye-env/bin/meyectl startserver -c /etc/motioneye/motioneye.conf User=root Group=root Type=simple Restart=on-failure
[Install] WantedBy=multi-user.target
The reason you had to create the /etc/systemd/system/motioneye.service file manually is that this file defines how the motionEye service will be managed by systemd, which is the init system used in modern Linux distributions to manage services (including starting, stopping, restarting, and ensuring they run at boot).
Normally, when you install software through package managers (like apt), a service file is automatically created. However, in this case, since you are installing motionEye manually or from a custom method (such as a Python virtual environment), the service file isn't provided by default.
I think.
Hey @Martypose thank you very much for taking the time to reply. I ended up not needing to manually set motion.service
after all, here is what I did:
sudo apt update && apt upgrade -y
. I've used Raspberry Pi Imager to flash the SD cardpip
installation instructions in point 2 since it was already installedlibcamera-v4l2
with apt install -y libcamera-v4l2
To anyone who might need help with, don't hesitate to write!
Edit: added details following @pookguy88's reply.
finally got it to work, I Have Raspberry Pi Zero 2 and the Arducam IMX708 - Raspberry Pi Imager and installed the latest Bookworm 64bit lite
followed @pingufreak's instructions
so I used Raspberry Pi Imager and installed the latest Bookworm 64bit lite. Went through everything and booted up Motioneye, couldn't detect my camera.
After reading @jinky77 's comment him saying pip was already installed, I realized I don't think libcamerify was installed on my Bookworm build
So in the apt install -y libcamera-v4l2
step of the instructions, you need to also have libcamera-tools, so add in:
sudo apt-get install libcamera-tools
Because the next step with the sed command is basically a find and replace and it just assumes you have libcamerify installed
So after doing all that and booting up Motioneye, I finally get it to work.
followed @pingufreak's instructions but for the life of me couldn't it get it work.
Great thread, I've been trying to get an Arducam IMX708 Camera Module 3 to work with motioneye for a while on a Pi Zero 2 W. Thanks to @pingufreak, @jinky77, and @pookguy88! Just to add to this in case it helps anyone, I had to pretty much do a combo of everyone's steps to some degree and did have to end up installing pip
. Additionally, my camera would not work or get detected until doing the following from Arducam's Wiki:
sudo nano /boot/firmware/config.txt
#Find the line: camera_auto_detect=1, update it to:
camera_auto_detect=0
#Find the line: [all], add the following item under it:
dtoverlay=imx708
#Save and reboot.
After the reboot I was able to add the camera in motioneye.
If it helps anyone, here were the steps I followed to get mine working:
sudo apt update
sudo apt upgrade -y
sudo reboot
pip
installed from the link @jinky77 provided, following the steps based on my architecture. 64-Bit Bookworm in my case:
sudo apt update
sudo apt --no-install-recommends install ca-certificates curl python3 python3-dev libcurl4-openssl-dev gcc libssl-dev
grep -q '\[global\]' /etc/pip.conf 2> /dev/null || printf '%b' '[global]\n' | sudo tee -a /etc/pip.conf > /dev/null
sudo sed -i '/^\[global\]/a\break-system-packages=true' /etc/pip.conf
curl -sSfO 'https://bootstrap.pypa.io/get-pip.py'
sudo python3 get-pip.py
rm get-pip.py
sudo python3 -m pip install 'https://github.com/motioneye-project/motioneye/archive/dev.tar.gz'
libcamera-v412
and libcamera-tools
sudo apt install -y libcamera-v4l2
sudo apt install -y libcamera-tools
sudo motioneye_init
sudo sed -i 's/\/usr\/local\/bin\/meyectl/\/usr\/bin\/libcamerify \/usr\/local\/bin\/meyectl/' /etc/systemd/system/motioneye.service
sudo systemctl daemon-reload
sudo systemctl enable motioneye --now
/boot/firmware/config.txt
as I mentioned above and then rebooted.After the last reboot I was able to add my camera like normal. Of course libcamera-v412
, and libcamera-tools
packages can be installed before installing motionEye but this was just the order I did it in.
Thanks all!
Edit: Updated "motionEyeOS" to say "motioneye" as @zagrim pointed out. :)
Thanks for all so far for sharing your solutions! :+1: :+1: :+1: One small clarification @mark4mike though to avoid confusion in others reading this: MotionEyeOS is a stripped-down Linux distro by itself, and what you were installing is the standalone MotionEye application :smiley:
Thanks for all so far for sharing your solutions! 👍 👍 👍 One small clarification @mark4mike though to avoid confusion in others reading this: MotionEyeOS is a stripped-down Linux distro by itself, and what you were installing is the standalone MotionEye application 😃
That's right, my mistake. The previous times I had played around with it I had always just flashed SD cards directly with motioneyeOS rather than installing it on Raspberry Pi OS. Thanks for clarifying!
Hello Motioneyeteam! How long will it be before Motioneye also supports the new camera drivers for RPi? Sonnige Grüße aus Ulm, Germany