2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-07 16:59:18 +00:00

72_XiaomiDevice: resume zoned cleanup

git-svn-id: https://svn.fhem.de/fhem/trunk@17234 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
moises 2018-08-30 18:30:52 +00:00
parent 6dc2f5f6c6
commit 1c6a463f3a
2 changed files with 19 additions and 7 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- feature: 72_XiaomiDevice: resume zoned cleanup
- feature: 51_MOBILEALERTS: Added MA10120PRO
- feature: 51_MOBILEALERTS: Added TFA30.3060.01.IT
- change: 89_FULLY: Set start URL and bug fixes

View File

@ -579,9 +579,9 @@ sub XiaomiDevice_Set($$@) {
if(!defined($hash->{model}) || $hash->{model} ne "roborock.vacuum.c1") {
if(defined($hash->{helper}{zone_names})) {
$list .= ' zone:'.$hash->{helper}{zone_names};
$list .= ' zone:'.$hash->{helper}{zone_names}.' resume:noArg';
} else {
$list .= ' zone';
$list .= ' zone resume:noArg';
}
if(defined($hash->{helper}{point_names})) {
$list .= ' goto:'.$hash->{helper}{point_names};
@ -767,6 +767,13 @@ sub XiaomiDevice_Set($$@) {
$zone = $hash->{helper}{zones}{$arg[0]} if(defined($hash->{helper}{zones}) && defined($hash->{helper}{zones}{$arg[0]}));
XiaomiDevice_WriteJSON($hash, '{"id":'.$packetid.',"method":"app_zoned_clean","params":['.$zone.']}' );
}
elsif ($cmd eq 'resume')
{
my $packetid = $hash->{helper}{packetid};
$hash->{helper}{packetid} = $packetid+1;
$hash->{helper}{packet}{$packetid} = "app_zoned_clean";
XiaomiDevice_WriteJSON($hash, '{"id":'.$packetid.',"method":"resume_zoned_clean","params":[""]}' );
}
elsif ($cmd eq 'goto')
{
$arg[0] = $hash->{helper}{points}{$arg[0]} if(defined($hash->{helper}{points}) && defined($hash->{helper}{points}{$arg[0]}));
@ -1553,7 +1560,7 @@ sub XiaomiDevice_GetUpdate($)
if(defined($attr{$name}) && defined($attr{$name}{subType}) && $attr{$name}{subType} eq "VacuumCleaner")
{
my $currentstate = ReadingsVal($name,"state","-");
if($currentstate eq "Cleaning" || $currentstate eq "Spot cleaning")
if($currentstate eq "Cleaning" || $currentstate eq "Spot cleaning" || $currentstate eq "Zoned Clean" || $currentstate eq "Goto")
{
$timerinterval = 90 if($timerinterval > 90);
}
@ -2902,8 +2909,8 @@ sub XiaomiDevice_Attr($$$) {
return undef if(!defined($defs{$name}));
my $orig = $attrVal;
$attrVal = int($attrVal) if($attrName eq "intervalData" || $attrName eq "intervalSettings");
$attrVal = 60 if($attrName eq "intervalData" && $attrVal < 60 );
$attrVal = 300 if($attrName eq "intervalSettings" && $attrVal < 300 );
$attrVal = 10 if($attrName eq "intervalData" && $attrVal < 10 );
$attrVal = 60 if($attrName eq "intervalSettings" && $attrVal < 60 );
if( $attrName eq "disable" ) {
my $hash = $defs{$name};
@ -3032,6 +3039,10 @@ sub XiaomiDevice_DbLog_splitFn($) {
<br>
Pause cleaning
</li><br>
<li><code>resume</code> <i>(VacuumCleaner)</i>
<br>
Resume zoned cleaning when paused
</li><br>
<li><code>stop</code> <i>(VacuumCleaner)</i>
<br>
Stop cleaning
@ -3221,11 +3232,11 @@ sub XiaomiDevice_DbLog_splitFn($) {
</li><br>
<li><code>intervalData</code>
<br>
Interval for data update (min 60 sec)
Interval for data update (min 10 sec)
</li><br>
<li><code>intervalSettings</code>
<br>
Interval for settings update (min 300 sec)
Interval for settings update (min 60 sec)
</li><br>
<li><code>preset</code> <i>(AirPurifier)</i>
<br>