10_ZWave.pm: ccsOverride from Andreas (Forum #58651)
git-svn-id: https://svn.fhem.de/fhem/trunk@12758 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -207,7 +207,8 @@ my %zwave_class = (
|
|||||||
THERMOSTAT_FAN_MODE => { id => '44' },
|
THERMOSTAT_FAN_MODE => { id => '44' },
|
||||||
THERMOSTAT_FAN_STATE => { id => '45' },
|
THERMOSTAT_FAN_STATE => { id => '45' },
|
||||||
CLIMATE_CONTROL_SCHEDULE => { id => '46',
|
CLIMATE_CONTROL_SCHEDULE => { id => '46',
|
||||||
set => { ccs => 'ZWave_ccsSet("%s")' },
|
set => { ccs => 'ZWave_ccsSet("%s")' ,
|
||||||
|
ccsOverride => 'ZWave_ccsSetOverride("%s")'},
|
||||||
get => { ccs => 'ZWave_ccsGet("%s")',
|
get => { ccs => 'ZWave_ccsGet("%s")',
|
||||||
ccsAll => 'ZWave_ccsAllGet($hash)',
|
ccsAll => 'ZWave_ccsAllGet($hash)',
|
||||||
ccsChanged => "04",
|
ccsChanged => "04",
|
||||||
@@ -2269,6 +2270,34 @@ ZWave_ccsSet($)
|
|||||||
return ("", "01$ret");
|
return ("", "01$ret");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub
|
||||||
|
ZWave_ccsSetOverride($)
|
||||||
|
{
|
||||||
|
my ($arg) = @_;
|
||||||
|
|
||||||
|
my $override_type;
|
||||||
|
my $override_state;
|
||||||
|
my $err = "wrong arguments, see commandref for details";
|
||||||
|
|
||||||
|
if ($arg =~ m/(no|temporary|permanent) (.*)/) {
|
||||||
|
$override_type = (lc($1) eq "no" ? 0 : (lc($1) eq "temporary" ? 1 : 2));
|
||||||
|
my $state = $2;
|
||||||
|
if ($state =~ m/(frost|energy)/) {
|
||||||
|
$override_state = (lc($state) eq "frost" ? 0x79 : 0x7a);
|
||||||
|
} elsif ($state =~ m/[-+]?[0-9]*\.?[0-9]+/) {
|
||||||
|
$state *= 10;
|
||||||
|
$state = 120 if ($state > 120);
|
||||||
|
$state = -128 if ($state < -128);
|
||||||
|
$state += 256 if ($state < 0);
|
||||||
|
$override_state = $state;
|
||||||
|
} else {
|
||||||
|
return($err, "");
|
||||||
|
}
|
||||||
|
return ("", sprintf("06%02x%02x", $override_type, $override_state));
|
||||||
|
}
|
||||||
|
return($err, "");
|
||||||
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
ZWave_ccsGet($)
|
ZWave_ccsGet($)
|
||||||
{
|
{
|
||||||
@@ -4845,6 +4874,15 @@ s2Hex($)
|
|||||||
If only a weekday is specified without any time and tempDiff, then the
|
If only a weekday is specified without any time and tempDiff, then the
|
||||||
complete schedule for the specified day is removed and marked as unused.
|
complete schedule for the specified day is removed and marked as unused.
|
||||||
</li>
|
</li>
|
||||||
|
<li>cssSetOverride (no|temporary|permanent) (frost|energy|$tempOffset) <br>
|
||||||
|
set the override state<br>
|
||||||
|
no: switch the override off<br>
|
||||||
|
temporary: override the current schedule only<br>
|
||||||
|
permanent: override all schedules<br>
|
||||||
|
frost/energy: set override mode to frost protection or engergy saving<br>
|
||||||
|
$tempOffset: the temperature setback (offset to setpoint) in 1/10 degrees<br>
|
||||||
|
range from -12.8 to 12.0, values will be limited to this range.
|
||||||
|
</li>
|
||||||
|
|
||||||
<br><br><b>Class CLOCK</b>
|
<br><br><b>Class CLOCK</b>
|
||||||
<li>clock<br>
|
<li>clock<br>
|
||||||
|
|||||||
Reference in New Issue
Block a user