mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +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:
parent
6dc2f5f6c6
commit
1c6a463f3a
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# 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 MA10120PRO
|
||||||
- feature: 51_MOBILEALERTS: Added TFA30.3060.01.IT
|
- feature: 51_MOBILEALERTS: Added TFA30.3060.01.IT
|
||||||
- change: 89_FULLY: Set start URL and bug fixes
|
- change: 89_FULLY: Set start URL and bug fixes
|
||||||
|
@ -579,9 +579,9 @@ sub XiaomiDevice_Set($$@) {
|
|||||||
|
|
||||||
if(!defined($hash->{model}) || $hash->{model} ne "roborock.vacuum.c1") {
|
if(!defined($hash->{model}) || $hash->{model} ne "roborock.vacuum.c1") {
|
||||||
if(defined($hash->{helper}{zone_names})) {
|
if(defined($hash->{helper}{zone_names})) {
|
||||||
$list .= ' zone:'.$hash->{helper}{zone_names};
|
$list .= ' zone:'.$hash->{helper}{zone_names}.' resume:noArg';
|
||||||
} else {
|
} else {
|
||||||
$list .= ' zone';
|
$list .= ' zone resume:noArg';
|
||||||
}
|
}
|
||||||
if(defined($hash->{helper}{point_names})) {
|
if(defined($hash->{helper}{point_names})) {
|
||||||
$list .= ' goto:'.$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]}));
|
$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.']}' );
|
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')
|
elsif ($cmd eq 'goto')
|
||||||
{
|
{
|
||||||
$arg[0] = $hash->{helper}{points}{$arg[0]} if(defined($hash->{helper}{points}) && defined($hash->{helper}{points}{$arg[0]}));
|
$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")
|
if(defined($attr{$name}) && defined($attr{$name}{subType}) && $attr{$name}{subType} eq "VacuumCleaner")
|
||||||
{
|
{
|
||||||
my $currentstate = ReadingsVal($name,"state","-");
|
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);
|
$timerinterval = 90 if($timerinterval > 90);
|
||||||
}
|
}
|
||||||
@ -2902,8 +2909,8 @@ sub XiaomiDevice_Attr($$$) {
|
|||||||
return undef if(!defined($defs{$name}));
|
return undef if(!defined($defs{$name}));
|
||||||
my $orig = $attrVal;
|
my $orig = $attrVal;
|
||||||
$attrVal = int($attrVal) if($attrName eq "intervalData" || $attrName eq "intervalSettings");
|
$attrVal = int($attrVal) if($attrName eq "intervalData" || $attrName eq "intervalSettings");
|
||||||
$attrVal = 60 if($attrName eq "intervalData" && $attrVal < 60 );
|
$attrVal = 10 if($attrName eq "intervalData" && $attrVal < 10 );
|
||||||
$attrVal = 300 if($attrName eq "intervalSettings" && $attrVal < 300 );
|
$attrVal = 60 if($attrName eq "intervalSettings" && $attrVal < 60 );
|
||||||
|
|
||||||
if( $attrName eq "disable" ) {
|
if( $attrName eq "disable" ) {
|
||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
@ -3032,6 +3039,10 @@ sub XiaomiDevice_DbLog_splitFn($) {
|
|||||||
<br>
|
<br>
|
||||||
Pause cleaning
|
Pause cleaning
|
||||||
</li><br>
|
</li><br>
|
||||||
|
<li><code>resume</code> <i>(VacuumCleaner)</i>
|
||||||
|
<br>
|
||||||
|
Resume zoned cleaning when paused
|
||||||
|
</li><br>
|
||||||
<li><code>stop</code> <i>(VacuumCleaner)</i>
|
<li><code>stop</code> <i>(VacuumCleaner)</i>
|
||||||
<br>
|
<br>
|
||||||
Stop cleaning
|
Stop cleaning
|
||||||
@ -3221,11 +3232,11 @@ sub XiaomiDevice_DbLog_splitFn($) {
|
|||||||
</li><br>
|
</li><br>
|
||||||
<li><code>intervalData</code>
|
<li><code>intervalData</code>
|
||||||
<br>
|
<br>
|
||||||
Interval for data update (min 60 sec)
|
Interval for data update (min 10 sec)
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><code>intervalSettings</code>
|
<li><code>intervalSettings</code>
|
||||||
<br>
|
<br>
|
||||||
Interval for settings update (min 300 sec)
|
Interval for settings update (min 60 sec)
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><code>preset</code> <i>(AirPurifier)</i>
|
<li><code>preset</code> <i>(AirPurifier)</i>
|
||||||
<br>
|
<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user