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
553 stars 102 forks source link

Using python logging and os.path functions #25

Closed MartinStolle closed 7 years ago

MartinStolle commented 7 years ago

Hi,

first of all. Thanks for this great application. Works really well and is exactly what I needed.

I added the python logging and used os.path methods to make the script more pythonic.

pageauc commented 7 years ago

Thanks for the update. Your support is appreciated. Lately I have been updating the webserver and sync utilities. Take a look at them and let me know any comments. The wiki has been updated. I will look at the new code and update the wiki where appropriate.

Have a good Holiday Season

pageauc commented 7 years ago

Thanks for the push. Your changes have been merged. I appreciate making things more pythonic. I am just a retired guy and not a developer, so sometimes my coding is just my way and not necessarily a pythonic way. I reviewed the code changes and some are just spacing and typographic edits but still improves code. I have seen the python logging in other code so appreciate your implementation I have not tested the changes yet but will update one of my camera's. I would still like to thread the camera image capture and make maybe add sync to DropBox feature that should be pretty straight forward since there is already existing code for doing this. Would also like an easier/automated way to mount and redirect files to an external HD or USB dongle. I have instructions for doing this but it might be easier to add automation of the steps. Also I have been thinking of adding a create date stampled sub folders after so many images (useful for timelapse) This could be done by number of files or by a time interval setting (daily, weekly, monthly). I have a camera that runs unattended for six months and generates tens of thousands of images. I usually manually move of 10k files at a time into sub folders using file image name number stamp for processing. Filezilla is a real friend for copying to my NAS once it is booted when I get back home from being south for the winter. The RPI camera is on a UPS and has an old USB external HD formated Ext4

Wishing you the best for the holiday season. Claude and Renee

On Tue, Dec 20, 2016 at 3:12 PM, Martin notifications@github.com wrote:

Hi,

first of all. Thanks for this great application. Works really well and is exactly what I needed.

I added the python logging and used os.path methods to make the script more pythonic.

You can view, comment on, or merge this pull request online at:

https://github.com/pageauc/pi-timolo/pull/25 Commit Summary

  • Join paths
  • added python logging
  • Fixed syntax error
  • Replaced log file with python logging logfile

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pageauc/pi-timolo/pull/25, or mute the thread https://github.com/notifications/unsubscribe-auth/AFr1ZKO7aP1cyoM89JpA-GLhjOMkbSzXks5rKESygaJpZM4LSTi1 .

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

MartinStolle commented 7 years ago

I created issues (#29 #28 #27 #30) for the features you mentioned. That increases the chances that somebody else may starts working on those.

I wish you a happy holiday season

pageauc commented 7 years ago

Martin.
Found a fatal with logger when Verbose=False in config.py. I removed if verbose in the init and this seems to resolve the fatal error. Can you review my change ver 2.96 and let me know if you see any issue. Thanks Claude .

Also I recently updated sync.sh to include remote config.py management feature and improved overall operation. Still testing.

MartinStolle commented 7 years ago

Do you still have the error message for me? I can't check it right now, gifted the raspberry pi 😄 , but ordered another one. Should arrive tomorrow.

pageauc commented 7 years ago

Martin

Did a quick fix. Removed the if verbose in init_logging() because of fatal error due to logger variable not declared if verbose set to False in config.py. Could put "if verbose:" in front of logger.info call messages but maybe there is a better way to handle not showing messages when verbose=False It is working now without fatal error.

Also I have updated the wiki with instructions on running pi-timolo.sh and webserver.sh at start from /etc/rc.local as pi user rather than default root. This is working well for me as well and avoids motion files being owned by root when running in background. https://github.com/pageauc/pi-timolo/wiki/How-to-Run-pi-timolo-on-Boot

Looked at dropbox_downloader.sh and set it up but did not integrate since it does not seem to have a sync capability(auto detect only changed files), just a remote copy/move etc. Security is a bit complex since you need to create a dropbox project but otherwise impressive what you can do with bash scripting.

Hope Santa was good to you. Claude ...

On Wed, Dec 28, 2016 at 2:08 PM, Martin notifications@github.com wrote:

Do you still have the error message for me? I can't check it right now, gifted the raspberry pi 😄 , but ordered another one. Should arrive tomorrow.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/pageauc/pi-timolo/pull/25#issuecomment-269533287, or mute the thread https://github.com/notifications/unsubscribe-auth/AFr1ZPRnMJbF1NKUuGfv8ss7xJ0PiYhwks5rMsHJgaJpZM4LSTi1 .

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