Since Thursday, Jason and I have been working on a project to bring a little nature over to the St. Peter’s website.
I got the call on Thursday asking me if I could source a camera to take in to the school. Apparently a nest had been found outside one of the classrooms, and the school wanted a live feed.
Time was of the essence!
After having a scour around the internet, I found a cool budget camera that would fit the the bill.
The bonus of this camera is that it has infra-red for night vision, as well as sound if required.
I went along on Friday, and we hooked up the camera near the nest and armed with a sledgehammer, drill and an uneasy desire to cause carnage connected the camera to the school network and the mains.
Configuration was interesting. The IP camera allows a live feed that you can configure it with – but requires the installation of an unsigned ActiveX control (which is a pain to install because it is unsigned). Also, the FTP settings will allow you to connect to an FTP site, but not set a filename or folder. ARGH!
So some jiggery pokery came into play. I set up an FTP service in IIS 6.0 on the main server, and created a new folder for the uploaded images. After a little bit of waving in front of the camera, I found that the images were being uploaded in a sequence from when the camera is turned on. eg. cam0001.jpg, cam0002.jpg and so on.
I created a page on my own website, as the school doesn’t have direct FTP access:
<code> <h1>St. Peter's Nestcam</h1> <img id="camImg" src="./cam.jpg" alt="" /> The picture you are seeing is a motion-sensitive feed, which is updated every 10 seconds. If there is little or no movement, the picture stays the same. Don't worry, it does change! Just take a look at another time.</p> Thanks to the bods at <a href="http://www.centaur.it/">Centaur Systems</a> for setting this up so quickly Back to the <a href="http://www.st-peters-canterbury.kent.sch.uk/">school website</a> </code>
Finally, two scripts were created to upload to FTP. I don’t have them to hand, but I’ll upload them later. I promise!