pageauc / pi-timolo

Raspberry PI-TIMOLO ( PI-TImelapse, MOtion, LOwLight ) uses RPI picamera and OpenCV for Remote Headless Security Monitoring using Motion Tracking, Rclone Auto Sync files with remote storage services. Auto Twilight Transitions and Low Light Camera Settings. Panoramic images using PanTiltHat and More. This project is featured on GitHub Awesome software.
MIT License
549 stars 101 forks source link

Not saving pictures, test image gives error #1

Closed DraX89 closed 9 years ago

DraX89 commented 9 years ago

Hi Sir. I am getting trouble when running the pi-timolo.py script. While test image is set to true it gives me the following error: IOError: [Errno 2] No such file or directory: '/home/pi/pi-timolo/takeTestImage.jpg' and when its set to false it never saves an image or notifies that its picking up motion... Did I maybe do something wrong?

pageauc commented 9 years ago

Sorry for the bug. The line in takeTestImage() function writeTextToImage(testfilepath, imagetext)

needs to be moved just above msgStr line per below. I will look at this logic and make it faster since there is probably no need to do day/night checks if taking a quick test image for aligning the camera. Normally config.py setting for imageTestPrint = False and I missed testing this. Again my appologies.

Claude ...

see corrected logic below def takeTestImage():

Check if any parameter was passed to this script from the command

line.

This is useful for taking a single image for aligning camera without

editing script settings. if imageTestPrint: mytime=showTime() testfilename = "takeTestImage.jpg" testfilepath = baseDir + testfilename imagetext = "%s %s" % (mytime, testfilename) if daymode: takeDayImage(testfilepath) else: takeNightImage(testfilepath, nightMaxShut, nightMaxISO) writeTextToImage(testfilepath, imagetext) msgStr = "imageTestPrint=%s Captured Test Image to %s " % (imageTestPrint, testfilepath) showMessage ("takeTestImage", msgStr) sys.exit(2) return

On Fri, Dec 26, 2014 at 10:58 AM, An-Dre notifications@github.com wrote:

Hi Sir. I am getting trouble when running the pi-timolo.py script. While test image is set to true it gives me the following error: IOError: [Errno 2] No such file or directory: '/home/pi/pi-timolo/takeTestImage.jpg' and when its set to false it never saves an image or notifies that its picking up motion... Did I maybe do something wrong?

— Reply to this email directly or view it on GitHub https://github.com/pageauc/pi-timolo/issues/1.

See my YouTube Channel at http://www.youtube.com/user/pageaucp

DraX89 commented 9 years ago

Thank you for the reply. This solved the test image issue. Now when I run it with test image as false it says that its an incorrect buffer length for the resolution 100x75. I saw that the testWidth and Hight are these resolutions, why does this interfere with the main program when test image is set to false? ahould I maybe change them to 1920 x 1080? Thank you for the help sir, this program is really helping me with my project :)

pageauc commented 9 years ago

I have not had buffer error messages. If you do not have a recent build or firmware I recommend you follow the first section of the Readme.txt file to update Raspbian and RP firmware. Let me know if you still have problems after that.

BTW are you interested in the timelapse, motion or both features. I have a pi-motion-lite on my repository suited for starting a motion related project It is bare bones but good for a basic motion detect project.

Claude ..

On Fri, Dec 26, 2014 at 12:31 PM, An-Dre notifications@github.com wrote:

Thank you for the reply. This solved the test image issue. Now when I run it with test image as false it says that its an incorrect buffer length for the resolution 100x75. I saw that the testWidth and Hight are these resolutions, why does this interfere with the main program when test image is set to false? ahould I maybe change them to 1920 x 1080? Thank you for the help sir, this program is really helping me with my project :)

— Reply to this email directly or view it on GitHub https://github.com/pageauc/pi-timolo/issues/1#issuecomment-68152358.

See my YouTube Channel at http://www.youtube.com/user/pageaucp

pageauc commented 9 years ago

testimages are streamed to memory and used for detecting motion. They should not be changed normally. The imageHeight and width settings in config.py can be changed to suit the size of image you want to save to disk. Also make sure you run the setup.sh to make sure you have the most recent libraries.

Regards

On Fri, Dec 26, 2014 at 1:40 PM, Claude Pageau pageauc@gmail.com wrote:

I have not had buffer error messages. If you do not have a recent build or firmware I recommend you follow the first section of the Readme.txt file to update Raspbian and RP firmware. Let me know if you still have problems after that.

BTW are you interested in the timelapse, motion or both features. I have a pi-motion-lite on my repository suited for starting a motion related project It is bare bones but good for a basic motion detect project.

Claude ..

On Fri, Dec 26, 2014 at 12:31 PM, An-Dre notifications@github.com wrote:

Thank you for the reply. This solved the test image issue. Now when I run it with test image as false it says that its an incorrect buffer length for the resolution 100x75. I saw that the testWidth and Hight are these resolutions, why does this interfere with the main program when test image is set to false? ahould I maybe change them to 1920 x 1080? Thank you for the help sir, this program is really helping me with my project :)

— Reply to this email directly or view it on GitHub https://github.com/pageauc/pi-timolo/issues/1#issuecomment-68152358.

See my YouTube Channel at http://www.youtube.com/user/pageaucp

See my YouTube Channel at http://www.youtube.com/user/pageaucp

DraX89 commented 9 years ago

Thank you so much sir, the motion-lite sounds exactly like what I need. I changed the height and width setting and it seemed to solve the buffer problem. Thanks again for this awesome program! Before I forget, is there an easy way of uninstalling this program to free up space on my pi for the motion lite? Sorry for troubling you with this, I'm fairly new to linux and this sort of toys.. :)

pageauc commented 9 years ago

Easiest is to delete or uninstall libraries. You can try

sudo apt-get clean

to free some space.

If you are using noobs then it can take quite a bit of room. I suggest you just use a second SD card at least eight (8) GB and install just Raspbian. This should give you lots of room and a spare if you need it. To Check the space on the SD card type

df -h

This will show how much space is free on different mount points.

Claude ..

On Sun, Dec 28, 2014 at 10:05 AM, An-Dre notifications@github.com wrote:

Thank you so much sir, the motion-lite sounds exactly like what I need. I changed the height and width setting and it seemed to solve the buffer problem. Thanks again for this awesome program! Before I forget, is there an easy way of uninstalling this program to free up space on my pi for the motion lite? Sorry for troubling you with this, I'm fairly new to linux and this sort of toys.. :)

— Reply to this email directly or view it on GitHub https://github.com/pageauc/pi-timolo/issues/1#issuecomment-68211000.

See my YouTube Channel at http://www.youtube.com/user/pageaucp