".$collstr."\n";
}
$out3 .= $line;
}
close($fhb);
}
#-- reopening collection filename
if(!open($fhb, ">>".$svgdir."/".$filename2b)){
main::Log 1,"[RoombaUtils] collection file $filename2b cannot be opened for writing, ERROR";
}
#-- create output
$collstr = sprintf("%04d-%02d-%02d %02d:%02d",$year+1900,$mon+1,$mday,$hour,$min);
$collid = "g".md5_hex($collstr);
$out2 .= "\n";
#-- reading start position in order to do translation
my $startx = main::AttrVal($name,"startx",0);
my $starty = main::AttrVal($name,"starty",0);
$out2 .= "\n";
#-- area from robot
$out2 .= "\n";
#-- minx,miny, maxx, maxy
$out2 .= "\n";
#-- convex hull
$out2 .= "\n".
"\n".
"\n".
"\n";
$out2 .= "\n\n";
#-- longer data
$out2 .= "\n".
"\n";
$out2 .= "\n";
#-- write output to svg file with additional interaction line
print $fhc "".$collstr."\n";
print $fhc $out3;
print $fhc $out2;
print $fhc "\n";
close($fhc);
#-- write output to collection file
print $fhb $out2;
close($fhb);
main::fhem("setreading $name cmMap finalized as ".$filename2c."");
listmaps($name)
}
#######################################################################################
#
# makeShort
#
# FW_summaryFn handler for creating the html output in FHEMWEB
#
#######################################################################################
sub makeShort($$$$){
my ($FW_wname, $devname, $room, $extPage) = @_;
my $hash = $main::defs{$devname};
main::Log 1,"==============> roomba:makeShort";
my $name = $hash->{NAME};
#my $wwwpath = $hash->{HELPER}->{wwwpath};
my $alias = main::AttrVal($hash->{NAME}, "alias", $hash->{NAME});
my ($state,$timestamp,$number,$result,$duration,$snapshot,$record,$nrecord);
# my $cnt = int(@{$hash->{DATA}});
my $ret = ""."Hello World from makeShort"." ";
return ($ret);
}
#######################################################################################
#
# makeTable
#
# FW_detailFn handler for creating the html output in FHEMWEB
#
#######################################################################################
sub makeTable($$$$){
my ($FW_wname, $devname, $room, $extPage) = @_;
my $hash = $main::defs{$devname};
main::Log 1,"==============> roomba:makeTable";
# my $cnt = int(@{$hash->{DATA}});
my $ret = "";
}
1;
=pod
=item helper
=item summary Control of Roomba cleaning robots
=item summary_DE Steuerung von Roomba Reinigungsrobotern
=begin html
RoombaUtils
RoombaUtils
Note: The following libraries are required for this module:
Use sudo apt-get install to install this libraries.
Use sudo apt-get install cpanminus and sudo cpanm XXX to update to the newest version.
Define
Set
set <name> <command> [<parameter>]
The following commands are defined for the robots :
start - start cleaning mission
pause - pause the robot
resume - resume the cleaning mission
dock - end the cleaning mission and dock the robot
stop - end the cleaning mission and leave the robot where it is
Get
Attributes
startx - docking station x coordinate in cm from the leftmost (western) wall
starty - docking station y coordinate in cm from the bottommost (southern) wall
startdir east|south|west|north - starting direction away from docking station
noMap true|false - if set to true, no map data will be collected
LOG_dir - directory for writing a log file (in perl format!) of each cleaning mission.
If this attribute is omitted, no such file will be written
SVG_dir - directory for reading a graphical room map in SVG format and reading/writing intermediate XML files of each cleaning mission.
If this attribute is omitted, the default /opt/fhem/www/images will be used . Note: In order to display the files via FHEMWEB frontend, they must reside in the working space of the web server.
SVG_room - filename for reading a graphical room map in SVG format.
If this attribute is missing, no such file will be written
SVG_collect - filename for reading/writing intermediate XML file of each cleaning mission.
If this attribute is missing, the default SVG_.xml will be used
SVG_final - filename for writing final SVG file of each cleaning mission.
If this attribute is missing, the default SVG_.svg will be used
SVG_color1 : - two colors separated by :. The first color will be used for drawing the convex hull of the robot path,
the second color will be used for replacement of this color in old maps. Default: green:lightgreen .
SVG_color2 : - two colors separated by :. The first color will be used for drawing the center of the convex hull of the robot path,
the second color will be used for replacement of this color in old maps. Default: green:lightgreen .
SVG_color3 : - two colors separated by :. The first color will be used for drawing the starting point of the robot path,
the second color will be used for replacement of this color in old maps. Default: green:lightgreen .
SVG_color4 : - two colors separated by :. The first color will be used for drawing the robot path,
the second color will be used for replacement of this color in old maps. Default: green:lightgreen .
=end html
=begin html_DE
RoombaUtils
=end html_DE
=cut |