2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

MAX: fix wakeUp and factoryReset

git-svn-id: https://svn.fhem.de/fhem/trunk@2274 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgehre 2012-12-06 22:56:59 +00:00
parent e9b8eddc38
commit e012b41020

View File

@ -220,13 +220,17 @@ MAX_Set($@)
return ($hash->{IODev}{SendDeviceCmd})->($hash->{IODev},$payload);
} elsif($setting eq "factoryReset") {
my $payload = pack("CCCCCCH6CH6C",0x00,0x00,0x20,0x00,0x00,0x00,$hash->{addr}, 0);
my $payload = pack("CCCCCCH6C",0x00,0x00,0xF0,0x00,0x00,0x00,$hash->{addr}, 0);
return ($hash->{IODev}{SendDeviceCmd})->($hash->{IODev},$payload);
} elsif($setting eq "wakeUp") {
my $payload = pack("CCCCCCH6CC",0x00,0x00,0xF1,0x00,0x00,0x00,$hash->{addr}, 0, 0x3F);
return ($hash->{IODev}{SendDeviceCmd})->($hash->{IODev},$payload);
}else{
my $removeDevice = exists($hash->{IODev}{RemoveDevice}) ? " removeDevice" : "";
my $templist = join(",",map { sprintf("%2.1f",$_/2) } (9..61));
my $ret = "Unknown argument $setting, choose one of factoryReset groupid$removeDevice";
my $ret = "Unknown argument $setting, choose one of wakeUp factoryReset groupid$removeDevice";
my $assoclist = join(",", map { $_->{type} ~~ ["HeatingThermostat", "WallMountedThermostat"] ? $_->{NAME} : () } values %{$modules{MAX}{defptr}});
if($hash->{type} eq "HeatingThermostat") {