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:
$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:
$rovio->getdata()
Enables streaming video. Incomplete at this time.
$rovio->getddns()
Gets the Dynamic DNS settings within the Rovio. Returns
GetDDNS Returns:
$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 -
$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:
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:
$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:
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 1192:
You forgot a '=back' before '=head2'
- Around line 1729:
=over without closing =back