The video of the compilation of over 3 months is edited and uploaded! It has been 3 months since I setup the Canon PowerShot camera and Raspberry Pi in the greenhouse to watch the plants grow. And grow they did! The greenhouse starts out empty and in 15 seconds the plants are ceiling height. It was just under 90 frames total because some of the frames were too dark to use. And unfortunately some of the current images are pretty dark. But it worked!! And now I know what to change so that the images are not as dark for next time. Let me know what you think in the comments!
Now I am looking at setting up for a year – as was my original goal…
It is all setup again – as of Saturday – and should be taking pictures. Here is a shot of what it looks like now. All of the tomato plants have been removed and the new ones will be planted soon.
Something that started to concern me was Daylight Savings time. This would be a problem if the camera changed time and then the power went out. The raspberry pi would pull the new time and it would be an hour off of what it was before. I contacted Canon about this potential issue. And they tried to sell me one of their newer cameras that has this feature. But they said that the Canon Powershot A510 does not have this feature. I could not find this option on the SX100 either. However this is a good thing as it means I am safe from having to worry about that. It will definitely be something to think about in the future however.
I changed the way the scripts were written and so I will post them and the updated crontab hopefully sometime early next week.
I now know what the problem with the time lapse setup was. For some reason Canon decided to put every like 100 pictures into a new folders and name the folders 157CANON and 158CANON and so on. So it was leaving these pictures on the camera card and not downloading them onto my card. This causes a problem because the card (in the camera) filled up and then it stopped taking pictures. That makes sense why it wont take a picture when the card is full, but it doesn’t make sense why Canon operates this way. However this is the easy part of the problem. The harder part was getting it to take a picture again. I would reformat the SD card using the cameras reformat option and then try to take a picture from gphoto2. It would give an “unspecified error” and that was not very helpful in figuring out the problem. The solution (which took me forever to figure out) was that the first picture has to be physically taken from the camera. After that first picture is taken by actually pushing the physical button on the camera, then gphoto2 will take pictures just fine.
So the solution is to make sure that I take that first picture and then make sure that the SD card does not fill up. This is possible to achieve from gphoto2 because it is possible to naviagate into the sd card that is in the camera by issueing the command
and then some* of the regular linux commands work. I say * because very few work and those that do have minor quirks. The main command “cd” works like normal, but there are some issues with tab completion. I wrote this script that uses a here document to actually execute the commands. This was the only way I could figure out how to get it to work. This script is not finalized because I think I will actually want to save the pictures that it is leaving in this folder until I can be certain that it is downloading the same picture onto the Raspberry Pi. (UPDATE) I setup and let it shoot for a day as a test and I confirmed that it is starting a new folder every 100 pictures. And it is NOT saving a copy of it to the Raspberry Pi. It takes the 100th picture and leaves it on the card. And leaves it in the terrible naming format as well.
To be updated….
Hopefully going to install the project back in the greenhouse this weekend!!
I went to check on how the time lapse setup was working. And it was not. It worked for not quite a week and then stopped taking pictures for some reason. So I brought it home and have been working to see what was wrong. And so far I cant figure it out. I cannot get the camera to take a picture using gphoto2 anymore. I tried a whole new installation of Arch (I kept the previous one separate) and it still wont take a picture. The other camera that I had bought previously (Canon Powershot SX100) will work just fine though. So that would lead me to believe that the Powershot A510 wont work. However, the camera will still take a picture just fine when it is disconnected from the Raspberry Pi and functioning like a regular camera.
So now I am not sure what to try. It seems like it is a problem with the camera, but the camera will still take a picture so it didnt completely die. Anyone have any suggestions?
This is my Vimeo video link that I shot about half of a year ago. I setup my Canon Powershot S2 IS under our orange tree shooting the clouds that were particularly awesome that day. This is the result!
The second one is one that I shot using the same camera of some ice cubes melting. This one provides what I think of as a time lapse perfect opportunity. There would be no other way to capture this!
The Canon Powershot S2 IS will not fit in the enclosure with the cables connected. So after thinking about the requirements for the camera, I decided that CHDK is not a requirement like I originally thought. I can do everything from gphoto2 using scripts. So I ordered a Canon Powershot A510 from Amazon that is much smaller and as near as I can tell will fit in the enclosure. Now just waiting for it to be delivered!