Thanks @all,
I was not aware until now that I would meet with such a large and optimistic response with this topic.
In the meantime I installed motioneye with buster under DietPi, that works right away. I think all of you out there will be able to do the same with bullseye.
Hey guys, I made some testing of the Python 3 MotionEye branch: https://github.com/MichaIng/DietPi/pull/4671
Indeed major features are broken, but they are actually quite easy to fix, step by step. Many PRs are open, but the MotionEye maintainer is not very active in testing and merging them. So anyone who is interested to get MotionEye with proper supported Python 3 running, please help testing, if able fixing things, sending PRs and push the developer to merge those.
If things are not going forward, the alternative would be to fork the project, test and merge all PRs from the original one, to have a Python 3 fork. I would hate going that way, as long as the owner has not officially abandoned it and having his agreement, but when things are not going forward, sometimes its the only way, and totally legit thanks to open source licenses.
The following will migrate your DietPi to the related branch to test it. I just updated it so that it is the current stable DietPi v7.5 with only the MotionEye install code changed.
MichaIng Perfect thank you, i will update now, test and give feedback.
Joulinar Maybe first testing and then poke the developer? But yes, i am sure with the release of bullseye there are a lot of people out there who like to see motioneye with phyton3. It is a very cool piece of software.
well our Python3 implementation will not work at the end I guess. Because we use original MotionEye Python3 branch. There is nothing adjusted on MotionEye software from our side. We just enable the installation.
And just to repeat: If anyone finds time to create a fork and bundle + merge the Python 3 fixes/PRs which do already exist at the upstream repository, that would really help. Most things do work pretty fine when combining all those. I just do not find the time currently.
Briefly looking through the pull requests, it does indeed seem like they have ported Motioneye over to support Python3. Would this re-enable DietPi’s support for Motioneye?
For me, I want to switch from a RPI over to an old PC, but I see the PC image is only Bullseye, which currently doesn’t have Motioneye yet (totally understand due to Motioneye on Python2-only until just a few days ago).
…by installing Python 2 explicitly. Not an option we’ll consider as responsible solution for DietPi-Software. But the instructions will work on DietPi.
I’ll create a Python 3 fork the next days and try to merge all related open pull requests from the upstream repository.
Ah my bad. I glanced too fast and didn’t even see the part regarding python2 installation. I was looking at the pull requests and saw porting to Python3 is being worked on so I just assumed. Thanks for pointing that out.
This are VERY cool news!
I played with the idea to do this, but i have absolutely no skills in python, neither in git or some other benefits. So i think i can not manage such a project
What i can do is testing if needed.
THX @schnitzelbrain for the hint!
I have tested it and installation went smooth. Config does not match from my old setup because of version mismatch, no problem, i started from scratch…
But the problem is that it does not detect my USB V4L2 cameras.
What cameras do you have?
Edit:
In the log i see this errors:
/usr/lib/python3.9/subprocess.py:941: RuntimeWarning: line buffering (buffering=1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
Sounds like some patches for py3 are missing in this version of motioneye (ioctl as i remember).
Looks like not all patches/fixes from the python3 are inside. But maybe MichaIng can compare it and make a pull request for the missing thins?
When i find time i will also have a look on it.
Edit:
First of all “v4l2-ctl --list-devices” shows the cameras.
I tried to “patch” the v4l2ctrl.py but it looks like i did something wrong or there is more to patch than just only this file.
FYI: I tried to compile “motion” on ARMv8. It does not work for MMAL cameras! Some librarys are missing on the 64bit version, so building is not possible.
So in the end: What a damn mess with python2/python3, buster/bullseye and 32/64bit!