Aepfel nicht vergessen!

(this is a post for my parents back in Germany)

Sieht so aus als wuerden wir ein paar Aepfel brauchen wenn wir naechste Woche kommen!

Opinions for Morons

When I first read about this (on Germany’s News Magazine Spiegel Online), I thought it was a joke, but after looking at it in more detail this turned out to be shockingly real.

Imagine for a moment that you want to support Bush/Cheney in the 2004 election. You want to spread the word that the Dynamic Duo did a fantastic job over the last few years and that another four years is the best thing that can happen to the US. Now the problem is, that you can’t come up with anything positive by yourself. That’s where the campaign’s website at www.georgewbush.com comes to the rescue. That is - it comes to the rescue if you’re not among those 35.9 Million people the American Census Bureau considers poor (see http://www.census.gov/hhes/poverty/poverty03/pov03hi.html), because that most likely means you don’t have access to a computer and/or the web.

Anyway: Going to the website above, clicking on the “Economy” tab and then selecting “Write News Editors”, will present you with an easy-to-navigate form that allows you to voice your opinion to a newspaper editor in the country (the form is available at this page). Just select your ZIP code, find newspapers close to your location, enter some personal details and use the precanned blocks of text on the right to create your own individual opinion as in:

portion of the opinion-builder

“New job figures and other recent economic data show that America’s economy is strong and getting stronger – and that the President’s jobs and growth plan is working. …”

“The President’s jobs and growth policies have put the economy on the road to recovery, but there is more work to be done. …”

Wow! Finally hit OK and your opinion is automatically making it’s way to the news editor(s) you selected and will in turn influence millions of people out there to make the right choice in November ‘04.

Thanks to Bush/Cheney even the greatest moron can have an opinion

Veo Observer Wireless Firmware upgrade

Veo silently upgraded the firmware of the Veo Observer Wireless Network Camera. On their website at http://www.veo.com/Observer-Wireless/firmware.asp there is version 416 of the firmware available (the latest public version was 300).

The release notes mention a number of fixes including: “Additional code added to make the camera more stable.”. Let’s hope that this is true - it has happened more than once that the camera locked up and that I saw it pointing to the ceiling in the morning with the motor running for hours.

I also checked the Veo.pm perl module and everything seems to work with the upgraded firmware.

Note to self about Baby Face Lotion

Note to self (and wife of self): now that baby knows how to open a screw-lid jar of face lotion, keep jars out of babies reach!

Second note to self: thank baby for opening the jar on tiles instead of carpert.

Third note to self (and wife of self, perhaps even babysitter of baby): don’t apply any more lotion on baby today; guess she had enough.

 

Veo.pm - a perl module to talk to the Veo Observer Network Cameras

Thanks to Brian G I finally found a way to talk to the Veo Observer Network Cameras from any platform that supports perl. As mentioned before I tried to stream images from the camera using a FreeBSD system, however the software supplied by Veo only supports Windows. I spent some time trying to decode the data I received from the camera, but did not have any luck.

Yesterday, Brian G emailed me and asked me a question related to the article above. In passing he mentioned that he had received a response from Veo about the file-format. One email later I had the Veo-response in my hands and guess how suprised I was when I read this: the data delivered from the camera is in JPEG format, it only misses a JPEG header!!! DUH!!!

Along with the email I also received a 400 byte binary file with the header. After a few more hours of work (tacking on the header was not enough), I received my first full frame from the camera. I was happy to see that my decoding efforts were pretty darn close to the information that Brian forwarded.

So now I (and you) can access those cameras from any platform that supports perl and the IO::Select and IO::Socket modules.

Here’s a little sample script that saves 10 frames at 640 x 480 at 1 frame/sec:

#!/usr/bin/perl -w

use strict;
use Veo;

my $veo=Veo->new(host => ‘192.168.1.1′, port => 1600);
$veo->login(user => ‘admin’, password => ‘password’);
my($images)=10;
$veo->selectStream(Veo::VEO_STREAM_640X480,1);
$veo->stream(\&cb);

sub cb {
    my($type,$frame,$data)=@_;
    print STDERR qq{image $frame with },length($data),qq{ bytes\n};
    open(OUT,”>”.sprintf(”veo-%02d.jpg”,$images));
    binmode(OUT);
    print OUT $data;
    close(OUT);
    # return value > 0 indicates “keep on streaming”
    # return value = 0 indicates “stop streaming”
    return $images–;
}

Easy - isn’t it?

And here’s another sample. This time we use the move() method to pan the camera head and take pictures after each step. This script will logon to the camera, move the head all the way to the left and then slowly move to the right while taking a single frame after each step to the right.

#!/usr/bin/perl -w

use strict;
use lib “.”;
use Veo;

my $veo=Veo->new(host => ‘192.168.1.1′, port => 1600);
$veo->login(user => ‘admin’, password => ‘password’);
$veo->selectStream(Veo::VEO_STREAM_320X240,1);
my($rc);
# move all the way to the left
while($rc=$veo->move(Veo::VEO_MOVE_FULL_LEFT)) {
    last if($rc != Veo::OK);
}
# now take one frame at a time and move right
do {
    $veo->stream(sub {
                     # args are: frametype, framenumber, framedata
                     open(OUT,”>frame-”.sprintf(”%04d”,$_[1]).”.jpg”) || return 0;
                     binmode(OUT);
                     print OUT $_[2];
                     close(OUT);
                     return 0;
                 });
    $rc=$veo->move(Veo::VEO_MOVE_RIGHT);
} while($rc == Veo::OK);

As it says in the documentation of the module, I’m going to finish this up over the next few days, but I’ve been asked soo often that I decided to release this piece half-baked. Have fun with the Veo.pm (right-click, save as …, the usual) perl module and let me know if it works or doesn’t work for you.

Update 8/16/2004:

James A. Russo quickly converted the perl-module into something Java-people can use. Hop on over to http://www.halo3.net/ to find the Java-classes and some more information. James also used the Veo.pm perl module in a quick perl CGI to retrieve images from the camera and move the camera position. Here it is (thanks James):

#!/usr/bin/perl

# webveo.pl - James A. Russo jr@halo3.net - August 14th, 2004.
#
# Quick and dirty script allowing a Veo Observer Network Camera to be used from a simple web page.
#
# It will redirect you to the $URL variable when moving. So a simple webpage like this should work:
#
# …
# <img src=”/path/to/webveo.cgi?action=getimage”>
# <a href=”/path/to/webveo.cgi?move=fullup”>Move Up</a>
# …
#
#
# This script uses Veo.pm from Tobias Hoellrich. See http://www.kahunaburger.com/blog/archives/000157.html for more info.
#

use CGI;
use Veo;
use Fcntl qw/ :flock /;

my $USER = “admin”;
my $PASSWORD = “password”;
my $HOST = “192.168.1.142″;
my $PORT = 1600;

# Other options for STREAM.
# Veo::VEO_STREAM_640X480;
# Veo::VEO_STREAM_160X120;
my $STREAM = Veo::VEO_STREAM_320X240;
my $URL= “index.html”;

## Nothing below this line needs editing..

my $CGI = new CGI;
my $ACTION = $CGI->param(’action’);
my $MOVE = $CGI->param(’move’);

# We synchronize since two admins can’t log in at once.
open FL, “>.lock” || die “Unable to open lock file.”;
flock(FL,LOCK_EX);

my $VEO = Veo->new(host => $HOST, port => $PORT);

$VEO->login(user => $USER, password => $PASSWORD);

if ($MOVE) {
    if ($MOVE eq “up”) {
        $VEO->move(Veo::VEO_MOVE_UP);
    } elsif ($MOVE eq “fullup”) {
        $VEO->move(Veo::VEO_MOVE_FULL_UP);
    } elsif ($MOVE eq “down”) {
        $VEO->move(Veo::VEO_MOVE_DOWN);
    } elsif ($MOVE eq “fulldown”) {
        $VEO->move(Veo::VEO_MOVE_FULL_DOWN);
    } elsif ($MOVE eq “left”) {
        $VEO->move(Veo::VEO_MOVE_LEFT);
    } elsif ($MOVE eq “fullleft”) {
        $VEO->move(Veo::VEO_MOVE_FULL_LEFT);
    } elsif ($MOVE eq “right”) {
        $VEO->move(Veo::VEO_MOVE_RIGHT);
    } elsif ($MOVE eq “fullright”) {
        $VEO->move(Veo::VEO_MOVE_FULL_RIGHT);
    }
    $VEO->logout;
    print “Location: $URL\n\n”;
} elsif ($ACTION eq “getimage”) {
    $VEO->selectStream($STREAM,1);
    $VEO->stream(\&image_cb);
    # callback will be called once, and then we will get here..
    $VEO->logout;
    # unflock happens on exit..
    exit(1);
} else {
    print “Content-type: text/html\n\n”;
    print “Unknown action: $ACTION\n”;
}

sub image_cb {
    my($type,$frame,$data)=@_;
    print “Content-type: image/jpeg\n\n”;
    print $data;
    # We only want the one image…
    return 0;
}

FUDding the nation

From an article that appeared on “Reuters” under the headline Osama Calling for Qaeda Attacks - Pakistan Sources:

… The newspaper, citing U.S. intelligence officials, said al Qaeda would target an American or foreign leader either within the United States or abroad. …

This is about as useful as a weather report going like: “It’s gonna rain or not.”

Good strategy: Spread FUD and keep voters on their toes - this way they don’t wanna change the ’status quo’.

Be careful …

And I always thought that you can still trust some things out there, like surfing “safe” sites and not having to be afraid that some Trojan is trying to make it onto your system. I guess that isn’t true any more.
When I was scanning through my RSS-feeds in FeedDemon (see http://www.feeddemon.com/) this morning, I stumbled across a Wired-item that seemed interesting. I clicked on the link for Lightning Takes a Holiday and saw the story render in the embedded IE control inside FeedDemon. A second later I also saw McAfee VirusScan pop up the message below:

Virusscan warning over Wired webpage

So the Wired news page had triggered the Virusscan warnings and the McAfee application was nice enough to remove the offending files from my system before the Trojan could start it’s work.
Interestingly enough, the source for the problem is not on the Wired news page itself, but it is in the ads that are served on this page. I tracked it down to the “Weight Loss Patch” ad at the top, which was included via IFRAME from adserver.com (which happens to be part of the FastClick network).

Great - now you can’t even trust old-timers any more. Time to switch off active scripting and to follow Nick’s information on how to make Mozilla your browser engine inside FeedDemon - see here.

Got worse

Since yesterday the hives have spread all over the body. Candice took her to the doctor this morning and she claims that we are looking at ‘hives’ (instead of a rash). Look at this face! Not a single smile this morning …

Poorest baby in the world

Pia had an allergic reaction to some nuts yesterday. She developed a rash on her legs and arms. The rash seems to have gotten better today, but it was replaced by a mild fever. She just doesn’t seem to be herself today and I guess it shows:

|