Friday, March 27, 2009

Trendnet IP Camera + FTP Upload = Good Times

I purchased the Trendnet TV-IP212W IP camera recently. Nice thing about IP cameras is you can plug them in anywhere, they don't have to be tethered to a PC. I have some web space with ftp access so I wanted to have the camera upload images to the web, triggered by motion.

Setup is easy enough, pop your ftp credentials in the admin screens and you're good to go.

The 1st problem I ran into is the camera will create subdirectories on the ftp server based on the current date, today would be: 20090327, tomorrow: 20090328 etc... This is a pain for anyone wanting to throw a little web page together to show the image files uploaded as you're now getting into trying to figure out dynamically what folder to look in.

The 2nd problem is there is no image count or space threshold that can be setup. You turn this on and it will continue to upload files until there is no space left on the ftp server.

So I put a little index.php PHP script together. You drop it in the root directory where the subdirectories are being created and where you'll be viewing the images from. The script does the following:

  1. Delete old directories. Any image directory that isn't today's is deleted. The is_numeric() check makes sure we're only looking at the image directories that are numerically named. This allows you to have other directories in here as needed outside the scope of the image directories.
  2. Iterate through today's image directory, popping the jpg filenames in an array.
  3. Sort the array in reverse order. The filenames are numeric based on the time the image was taken, making sorting easy...
  4. Pump html out to the screen, loop through the image array. I have it set to only show the last 12 images, any older ones are deleted.
Here is the code for anyone that might be trying to setup the same thing as I did. Edit it to tailor the html to your liking, upload it to your webserver and fire up your browser and head to the page.

Hopefully a future firmware update will add some FTP options to control these parameters for people with less scripting knowledge.

Labels: , , , ,

Monday, May 05, 2008

Nine Inch Nails - The Slip

You really can't go wrong with FREE. Reznor continues to cater to his fans by releasing NIN's next album for free online:

http://theslip.nin.com/

Tuesday, March 18, 2008

Player 1 Press Start

A good buddy of mine started a gaming blog. Go show him some love:

http://player1pressstart.blogspot.com

Labels:

Wednesday, September 26, 2007

Halo 3 killed my 360

Ok, maybe the title is a little misleading but it still sucks no matter how you look at it.

Halo 3 came out earlier this week. I had a pre-order from dell.ca but was out late Monday night and decided to get in line at my local BestBuy to grab a copy of Halo 3. I got home around 1am, tried the game out for a good 20 minutes and hit the sack.

The next day I boot up Halo 3 to give it a good run and it freezes. Reboot and try again. Another freeze. Third time, the famous 3 Red Rings Of Death. Could the timing have been any worse? "20 minutes into Halo 3? You have got to be shitting me" is all I could think. Well, no joke the xbox died.

It's my 2nd Xbox death, last one was only 5 months ago. Called to order the coffin from Xbox Support. They say turn-around time is expected to be 3-4 weeks!

So here's where I feel dirty and disgusted, but I had to do it. I called around town and managed to find a store still selling Core machines, so I bought one. I contemplated keeping it until my main one was fixed and then returning it but you know, my Xbox WILL die again so this one will become my backup console.

In all my gaming days I never thought I'd be buying a BACKUP console.

ok, I guess I have to go "Finish The Fight"

Bucketo

Labels:

Thursday, August 02, 2007

Neglect

Oh personal blog, how I neglect thee.

Tuesday, November 28, 2006

bobnoxious fall tour - dec 2nd in Ottawa



YEAH!!! Raise the horns in the air. Bobnoxious are bringing their rock and roll show to Ottawa this weekend. I'll be there, you should come down for a few pints. Radiodazed and Soulbomb are opening...

cya

Bucket

Thursday, October 26, 2006

Frank Taylor - Jane's Song

Hey kids,

It's finally done! This spring I had decided to work with a good friend of mine, Frank Taylor, to put together a music video and DVD for one of his songs.

We shot footage around the Ottawa area in March '06 while he was in town on his tour. Over the summer I did the editing and finished up the final loose ends this month.

So, without further delay, here is the video for Jane's Song, a great song composed by Frank Taylor, The Flying Scotsman:



More info on Frank:
website: http://theflyingscotsman.ca
feature on CRS: episode 33

thanks for stopping by,

Bucket
host, Capital Rock Show