« Mozilla Firefox 1.5: Adblock vs. Java and Flash Plugins | Main | Reading List: Prayers for the Assassin »
Saturday, March 4, 2006
Fourmilab: FloodCam on the Web
Ever since the recent flood, even though the groundwater evacuation blockage which was believed (but never proved) to have caused it has been corrected, I've made it a point during periods of heavy rain and/or melting snow to inspect the basement which flooded regularly, both to respond to flooding as soon as possible after it occurs, and in the hope of observing the water entering and fingering the cause. This, of course, means venturing out in the most horrific storms at all hours, with a high probability (not that I'm complaining!) of observing nothing out of the ordinary. Until riding out the worst the storm season can wreak builds confidence that the problem is indeed fixed, I'm loath to leave town without the ability to monitor what's going on in the basement. Well, it's refreshing every now and then to have a problem with which this global data network can actually help out! From now on, even when I'm hunkered down while the wind and water test the defences, or on the road with Fourmilab unattended, a round-the-clock surveillance camera will be watching the furnace room where the water entered the last time. Images are captured every ten minutes and archived so that if the flood does recur, its progress can be documented after the fact. The most recent image is posted on a public Web page; there's nothing secret about the Fourmilab furnace room (all the isotope enrichment stuff is in the other end of the basement), and if somebody else wants to keep an eye peeled and give me a holler if the tide starts to rise, more power to 'em! The image above is “live”—it is a scaled down thumbnail of the most recent image from the camera; clicking on it will display the surveillance page with the full resolution (640×480: oh wow) image. The images are acquired with a Sony SNC-P5 network camera, which has an embedded Web server and is connected directly to the Fourmilab local network. Images are captured every ten minutes and transferred via FTP to the server farm administration machine, which archives them and distributes the most recent image every half hour to each machine in the server farm. The Sony camera is a rather odd amalgamation of elegant design and slapdash crapola. It has a very nice feature set, including remote pan, tilt, and 3× optical zoom, 3.5 lux sensitivity, and both MPEG-4 and JPEG compression, with a frame rate of 30 frames per second in 320×240 resolution and 15 fps at full 640×480 resolution. There is a built-in microphone, and one can even uplink compressed audio to a line-out jack to, for example, remotely command the waters to recede. For applications in which one is on the lookout for bipedal miscreants as opposed to wayward water, there is a built-in motion detector which can trigger image capture and a contact closure to activate an alarm circuit. Images can be delivered in real-time to a Web browser running a Java or (brrrrr) ActiveX client program, which can pan and zoom the camera and listen to the audio feed in real time. Captured images can be archived locally, fetched from a built-in FTP server, delivered to a remote machine via FTP, or sent via E-mail through an SMTP mail host. All of this sounds quite nice, and indeed it is. The physical packaging is also rather elegant, with the camera equipped with a tripod socket which also permits it to be mounted in two different orientations on a supplied shelf/wall/ceiling bracket. The camera lens and positioning mechanism are protected against dust by a bubble housing which can be easily cleaned, and outdoor mounting enclosures are available. Where things get ugly, and I mean u-g-l-y, is when you look closely at the Web access—the configuration pages don't work with any browser other than Microsoft Internet Explorer! This isn't even due to their being deliberately designed to be Explorer-specific: it's thanks entirely to incompetently-implemented JavaScript, HTML, and CSS which just happens to work with Exploder and, rightly so, not with browsers such as Mozilla Firefox and Opera which actually conform to and enforce the relevant standards for these languages. The problems are not minor issues of formatting: almost all of the text in the configuration pages is invisible when viewed in proper browsers, leaving only buttons and input fields with no indication of their function. The Java client program does work in non-Explorer browsers, but only if you first configure the camera appropriately from Explorer. The remote functionality available from the browser or Web client is, to my way of thinking, quite odd. While you can connect to the camera remotely and see real-time motion video and live audio and capture images from the feed, there's no way to connect to the camera and tell it to capture a still image; you can capture images periodically based on a timer, or when triggered by motion sensing or the alarm input, but not by remote control. I would also expect the pan, tilt, and zoom facilities to be accessible via documented HTTP commands—your surveillance program should be able to look around without having somebody at the controls slewing the camera. Now, obviously, since Sony's own client program does these things, and it communicates via TCP/IP to the camera's internal Web server, a modicum of snooping with tcpdump and reverse engineering will probably get the job done, but one wonders why, in a professional product which sells for almost US$1000, the customer should be forced to go to such lengths to accomplish such obvious things. The camera supports firmware updates, so perhaps Sony will remedy these lacunæ in a subsequent release (I verified that my camera has the most recent firmware installed). While the immediate motivation for installing this camera was keeping an eye on the floodplain without slogging through storms, I'd intended, if it worked out well, to add additional cameras in other interesting locations, perhaps even with remote pan and zoom accessible to visitors. Given my discoveries about the Sony camera, unless the shortcomings are remedied by Sony in a firmware update or I'm motivated to and manage to find work-arounds for the limitations of the current design, I will be looking for better solutions before deploying additional cameras.Posted at March 4, 2006 22:04