Good point.I cannot give any idea why this is happening but if "File2" attempts to process and delete a file currently being recorded by "File1", that would cause problems. I would suggest that whenever "File1" has completed a recording, that recording is moved to a different directory/folder which is checked by "File2" to prevent both scripts working on the same file.
So I named as .H264A the output file and when it stops, renamed as .H264
I leaved the sensor active all the night and all was good, nothing happened

The issue comes when File1 has job to do, when it finds at least 1 .H264 file to process so the sensor starts detecting motion and recording video.
I've just commented out the line of File2 uploading file to pCloud.
All things were good running File1 along with File2: real motion sensor activity and video recording while converting, renaming and deleting old .H264 file
That was the "motion" detected.
When the uploads to pCloud finish the false motion detections (and the 4-5 seconds .H264 recordings) stop until cron triggers File2 again...
I don't realize why is that happening.
Here's File3.py used to upload files to pCloud and invoked by File2:
Code:
#!/home/pi/venv/bin/pythonimport sysfrom pcloud import PyCloudnombre1 = sys.argv[1]pc = PyCloud('my email addr','my psw')pc.uploadfile(files=[nombre1], path='/path-to-files')pc.logout()
Statistics: Posted by marciano — Wed Apr 24, 2024 8:19 pm