Page 6 of 12

Re: DIY Timelapse project

PostPosted: Wed Nov 27, 2013 10:12 pm
by LEDDWCRigger
Instead of a finished product.....

Kit it. That relaxes a ton of regulations!

I'd say more but I'm WAAAAAAAY too stoned right now and can barely type this!

Re: DIY Timelapse project

PostPosted: Wed Nov 27, 2013 11:25 pm
by godzilla
yes totally with you there, break it down into some kits easy enough to put together and use, then there are less barriers to selling it!!
not too much smoke, not enough :) :grin:::::

Re: DIY Timelapse project

PostPosted: Wed Nov 27, 2013 11:31 pm
by godzilla
bumped into a little issue earlier today btw, so it will slow things a day or so. Rebooting the Pi earlier it ran into a bootup issue and would not restart. After some digging I ended up picking up another SD card (Pi's OS runs from there, its the "hard drive" ) and setting up raspbian wheezy on it now. My scripts are all backed up on the RAID server a few days ago anyway (phew!) so not much lost apart from setup time.
Whats nice is now im running through my own posts to get the setup the same again :lol:

The old SD card was a Kingston with preinstalled OS, surprised its having problems already. I picked up an 8GB Samsung card instead and re-setting up on there now.

Re: DIY Timelapse project

PostPosted: Thu Nov 28, 2013 1:48 am
by godzilla
good stuff. managed to follow my own guide and use my backup files to get everything back up and running :grin:
actually I edited a few of the earlier posts and added a bit more info which I thought useful, bit more on the NAS setup and also getting the GPIO config auto setting after boot.

Re: DIY Timelapse project

PostPosted: Wed Dec 11, 2013 1:00 pm
by godzilla
sorry peeps been a few days, had a little time out and recharge also before starting on the next task, preparing somewhere to grow!
it wouldn't work in a cupboard so I had to free up a bit more space, this is about 1.2x1.2m and as high as the ceiling. Had to partition it out, seal it around and get the walls covered with diamond mylar. Also installed some flooring in silver to match so it looks quite tidy now and the robot has a nice surface to crawl back on.
Getting the electrics sorted out in the chamber, and tweaking the Robot a little more still, plan is to strap it into place in the next few days and make some initial tests to see the system works according to plan :)

32.JPG

Re: DIY Timelapse project

PostPosted: Thu Dec 12, 2013 12:52 am
by ledbud
:cool: :grin:::: :grin:::::
waiting for your grow mate,

Re: DIY Timelapse project

PostPosted: Thu Dec 12, 2013 7:54 pm
by teetee
good to see some nice space being made. What are you thinking of growing?
:grin:::::

Re: DIY Timelapse project

PostPosted: Sun Dec 15, 2013 1:34 am
by godzilla
thinking of white widow seeds I have already, dutch passion. should give it something interesting to timelapse!

the failed SD card issue started to re-emerge yesterday and the new Samsung SD card got screwed as well and the pi wont boot :( Bit of a pain but again all the latest changes were backed up already so not too much grief.
led me to wonder why its having these issues, one suspect I had was power supply, if it doesn't hold up under the load and you get a low supply voltage during write operations, then the SD card can end with failed sectors. enough of those and the OS wont boot eventually. Googling around a bit I found some others have seen such issues with supply issues.
I rethought the power a little bit, taking off the capacitance I'dd added to the 5V rail (power supply turning off too slowly can also cause SD card issues), and removing the 5V feed from the control box. I also clipped the 5V red cable on the hub, so the Pi is on its own now, with a 3.5A 5V adaptor and high current mini-USB cable supplying it directly.

with this setup I've done some tests again on the old SANDisk card. Seems its too far gone, it keeps corrupting even after low level format and fresh install. develops issues quickly.
the Samsung on the other hand , showed only few errors on the original filesystem. After a low level format it seems to be operating well (im keeping an eye on it with fsck regularly)

so, hopefully cracked it this time.
just did something else to re-organise things for the better also ; got the OS running from the hard drive rather than SD. Now the SD is just there as it needs to be to redirect to the HD at bootup. this should help things also.
heres a very good instruction : http://raspberrypihobbyist.blogspot.co. ... drive.html

Also took an image of the SD card, so hopefully recovery in future will be quicker to do :)
Its a fresh install again, so gonna take another day to get everything back where it should be.

Other than that things were looking good, about to start some tests. still , better it came up now than in a few weeks hey !!

Re: DIY Timelapse project

PostPosted: Wed Dec 18, 2013 3:02 pm
by godzilla
good progress since the last update, got the new system all working as far as it was before the SD crashed, and continued the debugging on from there.
Lots of little tweaks to the scripts since they are now running on timer as CRON jobs;

plmon.sh : checks every minute what time of "day" it is and sets the lights in the correct state. also checks the pause button, enables/disables the webcam servers (pause mode only) etc. It picks up its settings from a pilapse.cfg configuration file where all the settings are, storage folders, which cameras to enable, whether to capture day & night or just day etc etc. The "day" is the day as far as the plant is concerned, I mean the period between the grow lighting on and off can happen anywhere in the 24hr clock.

tlsnap.sh : the timelapse capture script. this handles all the logic of taking the right shots whether day or night and storing them in various directories. It creates a directory structure on the fly ordered by the grow day number.

both scripts use a locking mechanism to avoid clashing. plmon just skips if the lock is established by tlsnap. tlsnap has three retries after 10s each, and will try to finish its job. If all the retries are exhausted there are now some safety mechanisms to try and clear down the setup and lock files and gain control again. this routine hasn't been used though I was cautious in implementing it. I added lots of debug output also so I have a few log files that are generated so I can see later what happened or figure the cause of an issue.

One such issue popped up yesterday, second USB webcam seems to have locked up for some reason. debug logs came in useful and so some more safety code has gone in to try and at least detect and report an issue by email. I couldnt find a way to clear the error by software, nor usb reset nor uvcvideo restart would resolve it... only replugging the USB worked :(
It wouldn't break the system anyway, the other cams carry on ahead with their jobs.

Did some reading and some others have had issues with the uvcvideo module and different webcams so, im soak testing again now (12hrs+ right now) to see if I can make it happen again or not. and test if a Pi reboot would help resolve it.

last few niggles to resolve but nearly there now :)

Re: DIY Timelapse project

PostPosted: Fri Dec 20, 2013 1:53 am
by godzilla
The USB camera seems to be holding up OK now, hasn't crashed in the last 24hrs so maybe things not as bad as I worried. In any case its good that Ive implemented some debug output and email capability, so if any of the cameras is not playing ball I will know about it soon. also it attaches the relevant log file so if Im out I can see what happened :)
I'll also use that facility to send out a daily report and notification when the timelapse vids are ready, maybe with a link. going to string together that code next.