mirror of
https://github.com/motioneye-project/motioneye.git
synced 2026-03-02 22:57:06 -05:00
Can't connect to composite camera #2387
Labels
No labels
Android app
Arch Linux
CI/CD
CSS
FreeBSD
HTML/HTTP
Home Assistant addon
JavaScript
Python
Raspberry Pi
Stale No Activity 60 Days
bug
code format
dependencies
dev branch
docker
documentation
duplicate
enhancement
feature
help wanted
i18n/l10n
invalid
legacy motionEye
meta
motion
motionEyeOS
notourproblem
python update
question
question
security
troubleshooting
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/motioneye#2387
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ceejayemm on GitHub (May 1, 2023).
I have a quite old camera which only has a composite output. Up until recently I have been using this with the original MotionEye (upto v0.42.1) on a RPi ZeroW running 32 bit RaspberryOS and a no-brand composite to USB converter. This seems to work well for my purposes and I had no problems as far as I am aware. I recently came across this revised MotionEye project and decided to give the new DEV branch a try (to bring me into the current world). I installed the Dev version (as at the end of April) on a new SD card following the instructions on the GitHub pages. The new installation seems to have worked OK with no noted errors and when started reports:
motionEye Version: 0.43.0
Motion Version: 4.5.1
OS Version: Rasbian 11
Unfortunately after configuring the camera as before the camera setup seems to be not recognised with this version of the software and reports 'Unable to open video device since...'
In both versions of MotionEye the camera is mounted as:
Camera Type: Local V42L Camera
Camera: AV to USB 2.0
There have been no changes to the hardware, only the software version has been updated to the newer DEV version. Within the MotionEye configuration screen (both original version and new version) the Camera Device is noted as being:
/dev/v4l/by-id/usb-MACROSILICON_AV_TO_USB2.0_20150130-video-index0
Am I bound to revert to the old version of this software to continue using my existing camera or is there something I can tweak to make the camera usable in the new version of the software ?
Many thanks for any help anybody can supply.
Chris
@MichaIng commented on GitHub (May 1, 2023):
Did you try it on the old SD card? E.g. there are significant changes on the RPi kernel between Buster and Bullseye which may be responsible instead of the motionEye update.
A motionEye v0.42.1 can be seamlessly upgraded to 0.43.0, following the instructions: https://github.com/motioneye-project/motioneye/tree/dev#installation
@ceejayemm commented on GitHub (May 1, 2023):
Until recently I had all the same hardware and the 'old' version of MotionEye running under Raspian / Debian Buster. I updated that installation (still using the 'old' version of MotionEye) to Bullseye with no issues. That's why I was a bit surprised to get the problems I now have with the new MotionEye version running on Bullseye.
I didn't realise that I could upgrade the 'old' version to the 'new' version so I will restore the 'old' version and try the instructions listed above.
Chris
@MichaIng commented on GitHub (May 1, 2023):
Upgrading an existing Buster to Bullseye does not imply changed
/boot/config.txtdefaults, like KMS graphics driver and modern camera stack. SoThat would be great.
@ceejayemm commented on GitHub (May 2, 2023):
I carried out the upgrade of the 'old' version following the instructions noted above:
There are no obvious errors in any of the above however I can no longer access the system via http://cmcam3:8765/ so it would appear the upgrade has failed in some way but how ?
Any further suggestions ?
Chris
@MichaIng commented on GitHub (May 2, 2023):
Please do not follow the "upgrade" instruction, but the install instructions. The latter is only right for dev to dev upgrades when the version string did not change.
@ceejayemm commented on GitHub (May 9, 2023):
Sorry for the delay in getting back to you, I have had other things on my plate.
I flashed 2 new SD cards with the latest Raspberry PI OS Lite (3 May 2023 - Bullseye) 32 bit version and applied all outstanding updates (apt update/full-upgrade).
On Card 1, I installed the original MotionEye software (v4.2.1) from the Python2 branch of the Github repository and followed the instructions at: https://github.com/motioneye-project/motioneye/wiki/Install-on-Debian-11-%28Bullseye%29. Once the installation was complete I then configured the camera (Local camera / AV to USB 2.0) which seems to work as I would expect.
On Card 2, I installed the original MotionEye software (again using the Python2 branch and configuration as for Card 1). This again seemed to be working OK. Without changing anything else I then installed the (new) Python 3 version from the Dev branch following the instructions in the readme.md file on that branch. This seems to work OK at first, I could access the camera and see a video image UNTIL I rebooted the PI. At this point the PI was not accessible via the web page at all but the system is accessible via SSH.
I cannot find any obvious log files for this installation but journalctl -xe shows:
It seems that /dev/video0 does not exist (ls -lrt /dev/video0 confirms this too)
So it seems that the 'new' version is lacking something that the original version has !
I hope this helps.
Chris
@MichaIng commented on GitHub (May 10, 2023):
Did you change something about the camera support settings in
raspi-configor in/boot/config.txtdirectly? Such changes are only effective after reboot, so that would explain your behaviour pretty well.@ceejayemm commented on GitHub (May 11, 2023):
No changes at all. The reason for the final reboot was that that even after upgrading to the DEV branch and restarting the MotionEye service the web page was that the Admin information page still showed the version as v4.2.1. So I figured a reboot was necessary, after which the web access to the system was not possible.
I have since come across this article:
https://www.linuxquestions.org/questions/linux-newbie-8/missing-dev-video0-261133/
which, towards the end, shows how to recreate /dev/video and it seems to work. However the MotionEye service will still not start due to (taken from journalctl -xe immediately after restarting the MotionEye service):
So is the MotionEye service not running as the correct user ?
Chris
@MichaIng commented on GitHub (May 11, 2023):
For the RPi camera module there shouldn't be any additional driver necessary. Can you show me what exactly you did? It might even broke it.
motionEye support is one thing, but getting up the RPi camera as regular V4L2 device with the embedded drivers and
raspi-configresp.config.txtdefinitely works without any additional modification.@ceejayemm commented on GitHub (May 12, 2023):
I am not using an RPI camera module but an (elderly) external camera with a composite output that then feeds into a nobrand composite to USB adapter. This is the same setup that works with the Python2 version but doesn't appear to work with the DEV branch.
The commands I ran from the article noted above are:
As noted above I am getting a lot of permission errors but the only logging output I can get is via journalctl. I have attached the full output from a recent 'journalctl -xe' command for you to see. None of the normal logs (in /var/log) are available due to these permission errors.
Chris
journalctl.zip
@ceejayemm commented on GitHub (May 12, 2023):
As a test I created a new folder '/motioneye' and within that a 'log' subfolder, the ownership of both folders was set to motion:motion. I modified the /etc/motioneye/motioneye.conf to read:
log_path /motioneye/log
and restarted the motioneye service. Lo and behold the service started and remained running, creating a motion.log file in the new location. The web page is available and, after configuring the camera as:
Camera Type: Local V4L2 Cameral
Camera: AV to USB 2.0
I can now see output from the camera. The system is reporting:
motionEye Version: 0.43.0
Motion Version: 4.5.1
OS Version: Raspbian 11
So it would seem is if the reported access problems to the /var/log location can be rectified then this version will work for me.
Chris
@MichaIng commented on GitHub (May 18, 2023):
The steps you did look pretty wrong, I mean you manually remove and create device nodes which is reverted on every reboot and every time a device is detected/attached/removed etc. When you attach a camera, and the kernel does have a matching driver for it, it should be loaded automatically and a device node should be created automatically. If
/dev/video0exists already, it should be named/dev/video1etc. At least this is how is is/should commonly happen. Also the permissions you apply look strange. You make it world read-writable but then still assign a group, which then has no effect anymore. Also this is something the system should automatically do as of default udev rules, i.e. create a660or664mode device withvideogroup. And themotionuser is member of this group, at least when it is installed a regular way like via APT (which is what the motionEye installer also tries).The default log directory
/var/log/motioneyeis automatically created by the systemd unit on service start (if missing) with correct permissions as of this line:github.com/motioneye-project/motioneye@ebf0d58/motioneye/extra/motioneye.systemd (L8)If you modify that default path, of course you need to manually apply permissions as well.
However, so it does work now without manually hacking the device nodes?
@ceejayemm commented on GitHub (May 18, 2023):
I have given up with the python2 / dev mashup and have gone back to basics ( I have however saved this SD card for reference should it be necessary.
I have reflashed a new SD card to Raspberry PI OS Lite 32 bit (May 3rd 2023) and installed the current DEV branch only (as per https://github.com/motioneye-project/motioneye/tree/dev#readme). All hardware is the same as previous attempts. I have NOT made any other changes to the installation but I still cannot access the composite camera on this installation despite choosing:
Camera Type: Local V4L2 Camera
and there being three 'AV to USB2.0' options to choose from under 'Camera'
None of the other 'Camera' options - bcm-2835-codec-decode (6 options) or bcm-2835-isp (10 options) work either.
I now have a log file (/var/log/motioneye/motion.log) and I have uploaded this for you to see. It still seems like this version cannot access the composite to usb adapter that the python2 version can. However using v4l2-ctl gives:
The last post to this forum topic may, or may not, be of relevance:
https://superuser.com/questions/1523804/linux-usb-video-capture-issues
Chris
motion.log
@MichaIng commented on GitHub (May 21, 2023):
Please assure that RPi camera module support is disabled in
raspi-config. And what is the output of:@ceejayemm commented on GitHub (May 21, 2023):
I have made sure that RPi Camera support is turned off in raspi-config via:
3 Interface Options / I1 Legacy Camera
MotioneEye now shows NO cameras available at all now. (when Camera Type is Local v4L2 Camera)
v4l2-ctl --list-devices then gives the following info:
@MichaIng commented on GitHub (May 21, 2023):
No that is wrong, it needs to be turned off completely. Legacy camera support enables the old CSI camera driver with legacy graphics driver stack etc. I hope with it disabled completely, the first two device batches disappear and only the "AV TO USB2.0" remains.
@ceejayemm commented on GitHub (May 21, 2023):
Using the latest raspi-config, that was the only option I could find to disable cameras. What should I be using to do as you ask ?
Chris
@ceejayemm commented on GitHub (May 21, 2023):
BTW the following seems to suggest the PI Camera module IS disabled:
pi@cmcam3:~ $ raspistill -o image.jpg
mmal: Cannot read camera info, keeping the defaults for OV5647
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not enabled in this build. Try running "sudo raspi-config" and ensure that "camera" has been enabled
but
pi@cmcam3:~ $ v4l2-ctl --list-devices
bcm2835-codec-decode (platform:bcm2835-codec):
/dev/video10
/dev/video11
/dev/video12
/dev/video18
/dev/video31
/dev/media2
bcm2835-isp (platform:bcm2835-isp):
/dev/video13
/dev/video14
/dev/video15
/dev/video16
/dev/video20
/dev/video21
/dev/video22
/dev/video23
/dev/media0
/dev/media1
AV TO USB2.0 (usb-20980000.usb-1):
/dev/video0
/dev/video1
/dev/media3
Chris
@ceejayemm commented on GitHub (Jun 29, 2023):
Any further thoughts ?
Chris