NAME

Net::Rovio - A Perl module for Rovio manipulation

SYNOPSIS

use Net::Rovio;
my $rovio = Net::Rovio->new('my-rovio.ath.cx', 'admin', 'password');
$rovio->light('on');
$rovio->send_photo();
sleep 1;
$rovio->camera_head('mid');
$rovio->send_photo();
sleep 1;
$rovio->camera_head('up');
$rovio->send_photo();
sleep 1;
$rovio->camera_head('mid');
sleep 1;
$rovio->camera_head('down');
sleep 1;
$rovio->light('off');

# Any functions that need parameters can have them sent in this fashion:
@params = {   "Forward" => 8,
            "DriveTurn" => 6,
           "HomingTurn" => 8
           };
$rovio->settuningparameters(@params);

# Any functions that return parameters can be accessed in this fashion:

$tuning = $rovio->gettuningparameters();
print "Forward Value: $tuning->{Forward}";

# Send the Rovio home to the charging cradle.

$rovio->dock();

DESCRIPTION

Use Net::Rovio to control your Rovio robot from Perl. Uses basic Rovio API commands.

The Rovio http://www.wowwee.com/en/products/tech/telepresence/rovio/rovio is a Wi-Fi enabled mobile webcam that lets you view and interact with its environment through streaming video and audio.

FUNCTIONS

Functions usually return "OK" upon success, unless otherwise noted per function.

$rovio = Net::Rovio-new('hostname'[, 'username', 'password'])>

Opens the Rovio for communication.

$rovio->abortrecording()

Cancels the recording of a path and discards the path.

$rovio->camera_head('up'|'down'|'mid')

Moves the camera head to the up, down, or middle position.

$rovio->camimg()

Returns a picture from the camera in JPEG format. You can then save the data down as a binary file.

$rovio->changebrightness(0..6)

Sets the brightness level of the camera. Accepts values from 0 to 6, with 6 being the brightest.

$rovio->changecompressratio(0..2)

Change the quality setting of camera's images (only available with MPEG4). Accepts values from 0 to 2, representing low, medium and high quality, with 2 being the high quality setting.

$rovio->changeframerate(2..32)

Change the frame rate setting of camera's images. Accepts values from 2 - 32 frames per second.

$rovio->changemicvolume(0..31)

Changes the Mic volume on the Rovio. Accepts values from 0 - 31, with 31 being the highest.

$rovio->changeresolution(0..3)

Changes the resolution of the camera. Accepts values from 0 - 3 as defined below:

0 - {176, 144} =item 1 - {352, 288} =item 2 - {320, 240} (Default) =item 3 - {640, 480}

$rovio->changespeakervolume(0..31)

Changes the Speaker volume on the Rovio. Accepts values from 0 - 31, with 31 being the highest.

$rovio->clearallpaths()

Delete all saved paths within the Rovio.

$rovio->deletepath("PathName")

Delete a specific saved path within the Rovio. Accepts the name of the path to delete.

$rovio->dock() or $rovio->gohomeanddock()

Sends the Rovio to the charging base to dock. This only works when Rovio has navigation signal available. To match up with the Rovio API, this command is synonymous with the gohomeanddock() command.

$rovio->getcamera()

Returns the camera sensor setting:

    50 - 50Hz 60 - 60Hz 0 - Auto detect

$rovio->getdata()

Enables streaming video. Incomplete at this time.

$rovio->getddns()

Gets the Dynamic DNS settings within the Rovio. Returns

GetDDNS Returns:

    'User' => '', 'Pass' => '', 'Service' => '', 'ProxyPass' => '', 'Proxy' => '', 'ProxyPort' => '0', 'Info' => 'Not Update', 'ProxyUser' => '', 'Enable' => '0', 'IP' => '0.0.0.0', 'DomainName' => ''

    Info above can return:

    Updated Updating Failed Updating IP Checked Not Update

$rovio->gethttp()

Returns the http server port settings within the Rovio for both possible ports.

GetHTTP Returns:

    Note that the Port0 setting should only be changed if you know what you are doing. This can complicate communication to the Rovio. See sethttp() to change the settings using the same parameters.

$rovio->getip()

Returns the settings for IP within the Rovio.

GetIP Returns:

$rovio->getlog()

Returns the log data from the Rovio. Currently an incomplete function, though still functional.

GetLog Returns:

    The Time represents time since power on in seconds. LogLines are individual log events.

    Log Lines -

    byte 0, 1 - reason for recording this log, refer to table below. eg: 27 is shown that new client connect to the IP Camera. byte 2 ~ 5 - reserved. byte 6 ~ 13 - operator's IP. eg: 0A820B57 is 10.130.11.87. byte 14 ~ 25 - operator's MAC. eg: 0000E8E26A88 is 00:00:E8:E2:6A:88. byte 26 ~ 35 - time of this log.

    For byte 0, 1 - Log reason 0 Information 1 Error 11 Set user 12 Del user 13 Set user check 14 Open camera 15 Close camera 16 Change resolution 17 Change quality 18 Change brightness 19 Change contrast 20 Change saturation 21 Change hue 22 Change Sharpness 23 Set email 24 Set ftp server 25 Dial (pppoe) 26 Dial (modem) 27 New client 28 Set Motion Detect 29 Set Monitor Area 30 Set Server Time 31 Set Server IP 32 Set Http Port

$rovio->getlogo()

Gets the 2 possible strings of text currently overlayed on the image, and thier position.

GetLogo Returns:

$rovio->getmail()

Gets the current email settings within the Rovio.

GetMail Returns:

$rovio->getmcureport()

Incomplete function.

GetMCUReport Currently Returns:

$rovio->getmediaformat()

Gets the current media format setting in the Rovio.

GetMediaFormat Returns:

    The possible return values are:

    For Audio: 0 - AMR 1 - PCM 2 - IMAADPCM 3 - ULAW 4 - ALAW

    For Video: 1 - H263 2 - MPEG4

    The same values can be used with the setmediaformat() command. Note that some Video settings will not work with the built-in Rovio webpage controls.

$rovio->getname()

This returns the currently defined camera name for the Rovio.

$rovio->getpathlist()

This returns an array of the current saved paths. You may then reference these paths to tell the Rovio to navigate to them.

$rovio->getreport()

This returns a large amount of status data from the Rovio.

GetReport Returns:

$rovio->getstatus()

Returns detailed status of the Rovio.

GetStatus Returns:

$rovio->gettime()

Returns time information from the Rovio.

GetTime Returns: =over 4 'TimeZone' => '240', 'NtpServer' => '', 'UseNtp' => '0', 'Sec1970' => '99663' =back

$rovio->gettuningparameters()

Returns the tuning parameters from the Rovio.

GetTuningParameters Returns:

$rovio->getver()

Returns Version information.

GetVer Returns:

$rovio->getwlan()

Returns Wireless LAN information from the Rovio.

GetWlan Returns:

$rovio->halt()

Cancel current processing within the Rovio.

$rovio->light

Controls the integrated light within the Rovio.

Sample: =over 4 $rovio->light('on'); $rovio->light('off'); =back

$rovio->manualdrive(<drive value>,<speed value>)

Allows manual control of the Rovio movement.

Sample: =over 4 $rovio->manualdrive("1","2"); =back

Drive Values: 0 (Stop) 1 (Forward) 2 (Backward) 3 (Straight left) 4 (Straight right) 5 (Rotate left by speed) 6 (Rotate right by speed) 7 (Diagonal forward left) 8 (Diagonal forward right) 9 (Diagonal backward left) 10 (Diagonal backward right) 11 (Head up) 12 (Head down) 13 (Head middle) 14 (Reserved) 15 (Reserved) 16 (Reserved) 17 (Rotate left by 20 degree angle increments) 18 (Rotate right by 20 degree angle increments)

Speed Values: 1 (fastest) - 10 (slowest)

$rovio->pauseplaying()

Pause the currently playing path.

$rovio->playpathbackward(<pathname>)

Replay a stored path from the closest point to the beginning.

$rovio->playpathforward(<pathname>)

Replay a stored path from the closest point to the end.

$rovio->reboot()

Reboot the Rovio.

$rovio->renamepath(<old pathname>,<new pathname>)

Rename an existing path to a new name.

$rovio->resetnavstatemachine()

Stops the Rovio, and resets back to idle.

$rovio->send_photo() also as $rovio->sendmail()

Send a snapshot of the current camera image to the email address specified in the Rovio settings.

$rovio->sethttp()

Sets the webserver ports within the Rovio. See gethttp() for acceptable parameters.

$rovio->setmail(@params)

See getmail() for the acceptable parameters to send.

$rovio->setmediaformat(@params)

See getmediaformat() for acceptable parameters to send.

$rovio->setname(<newname>)

Sets the Camera name within the Rovio.

$rovio->settuningparameters(%params)

Sets the speed and other parameters in the Rovio. See the acceptable values in gettuningparameters().

Sample:

$rovio->startrecording()

Begins recording.

$rovio->state()

Reports the current state of the Rovio.

State Returns:

$rovio->stopplaying()

Stops playing the current path.

$rovio->stoprecording(<save pathname>)

Stops recording the current path, and saves it in the Rovio with the name given.

$rovio->updatehomeposition()

Updates the saved home position within the Rovio to the current location of the Rovio.

DEPENDENCIES

LWP::Simple

TODO

Finish all functions available for the Rovio. Clean up the documentation (alot)

AUTHOR

Ivan Greene (ivantis@ivantis.net) Ty Roden (tyroden@cpan.org)

SEE ALSO

LWP::Simple WWW::Mechanize

29 POD Errors

The following errors were encountered while parsing the POD:

Around line 1192:

You forgot a '=back' before '=head2'

Around line 1308:

=over should be: '=over' or '=over positive_number'

Around line 1316:

You forgot a '=back' before '=head2'

Around line 1322:

=over should be: '=over' or '=over positive_number'

Around line 1341:

You forgot a '=back' before '=head2'

Around line 1347:

=over should be: '=over' or '=over positive_number'

Around line 1390:

You forgot a '=back' before '=head2'

Around line 1396:

=over should be: '=over' or '=over positive_number'

Around line 1403:

You forgot a '=back' before '=head2'

Around line 1409:

=over should be: '=over' or '=over positive_number'

Around line 1422:

You forgot a '=back' before '=head2'

Around line 1428:

=over should be: '=over' or '=over positive_number'

Around line 1440:

You forgot a '=back' before '=head2'

Around line 1446:

=over should be: '=over' or '=over positive_number'

Around line 1468:

You forgot a '=back' before '=head2'

Around line 1482:

=over should be: '=over' or '=over positive_number'

Around line 1519:

You forgot a '=back' before '=head2'

Around line 1525:

=over should be: '=over' or '=over positive_number'

Around line 1562:

You forgot a '=back' before '=head2'

Around line 1580:

Unknown directive: =over4

Around line 1599:

=over should be: '=over' or '=over positive_number'

Around line 1603:

You forgot a '=back' before '=head2'

Around line 1609:

=over should be: '=over' or '=over positive_number'

Around line 1622:

You forgot a '=back' before '=head2'

Around line 1719:

=over should be: '=over' or '=over positive_number'

Around line 1727:

You forgot a '=back' before '=head2'

Around line 1737:

=over should be: '=over' or '=over positive_number'

Around line 1745:

You forgot a '=back' before '=head2'

Around line 1758:

=back without =over