2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-25 22:09:21 +00:00

10_MAX.pm: integrate patch from marcinn (Forum #104357)

git-svn-id: https://svn.fhem.de/fhem/trunk@20431 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-10-31 15:19:51 +00:00
parent 4e4d7d6866
commit aae4691778

View File

@ -659,7 +659,7 @@ MAX_Parse($$)
my $dstsetting = vec($bits2, 3, 1); #is automatically switching to DST activated
my $langateway = vec($bits2, 4, 1); #??
my $panel = vec($bits2, 5, 1); #1 if the heating thermostat is locked for manually setting the temperature at the device
my $rferror = vec($bits2, 6, 1); #communication with link partner (what does that mean?)
my $rferror = vec($bits2, 6, 1); #communication with link partner - if device is not accessible over the air from the cube
my $batterylow = vec($bits2, 7, 1); #1 if battery is low
my $untilStr = defined($until3) ? MAX_ParseDateTime($until1,$until2,$until3)->{str} : "";
@ -687,6 +687,7 @@ MAX_Parse($$)
readingsBulkUpdate($shash, "battery", $batterylow ? "low" : "ok");
readingsBulkUpdate($shash, "batteryState", $batterylow ? "low" : "ok"); # Forum #87575
readingsBulkUpdate($shash, "panel", $panel ? "locked" : "unlocked");
readingsBulkUpdate($shash, "rferror", $rferror ? "1" : "0");
#The formatting of desiredTemperature must match with in MAX_Set:$templist
#Sometime we get an MAX_Parse MAX,1,ThermostatState,01090d,180000000000, where desiredTemperature is 0 - ignore it
readingsBulkUpdate($shash, "desiredTemperature", MAX_SerializeTemperature($desiredTemperature)) if($desiredTemperature != 0);
@ -716,7 +717,7 @@ MAX_Parse($$)
my $dstsetting = vec($bits2, 3, 1); #is automatically switching to DST activated
my $langateway = vec($bits2, 4, 1); #??
my $panel = vec($bits2, 5, 1); #1 if the heating thermostat is locked for manually setting the temperature at the device
my $rferror = vec($bits2, 6, 1); #communication with link partner (what does that mean?)
my $rferror = vec($bits2, 6, 1); #communication with link partner - if device is not accessible over the air from the cube
my $batterylow = vec($bits2, 7, 1); #1 if battery is low
my $untilStr = "";
@ -735,6 +736,7 @@ MAX_Parse($$)
readingsBulkUpdate($shash, "battery", $batterylow ? "low" : "ok");
readingsBulkUpdate($shash, "batteryState", $batterylow ? "low" : "ok"); # Forum #87575
readingsBulkUpdate($shash, "panel", $panel ? "locked" : "unlocked");
readingsBulkUpdate($shash, "rferror", $rferror ? "1" : "0");
readingsBulkUpdate($shash, "displayActualTemperature", ($displayActualTemperature) ? 1 : 0);
} else {
Log3 $hash, 2, "Invalid $msgtype packet"
@ -764,6 +766,7 @@ MAX_Parse($$)
readingsBulkUpdate($shash, "battery", $batterylow ? "low" : "ok");
readingsBulkUpdate($shash, "batteryState", $batterylow ? "low" : "ok"); # Forum #87575
readingsBulkUpdate($shash, "rferror", $rferror ? "1" : "0");
readingsBulkUpdate($shash,"onoff",$isopen);
}elsif($msgtype eq "PushButtonState") {
@ -777,6 +780,7 @@ MAX_Parse($$)
readingsBulkUpdate($shash, "batteryState", $batterylow ? "low" : "ok"); # Forum #87575
readingsBulkUpdate($shash, "onoff", $onoff);
readingsBulkUpdate($shash, "connection", $gateway);
readingsBulkUpdate($shash, "rferror", $rferror ? "1" : "0");
} elsif(grep /^$msgtype$/, ("HeatingThermostatConfig", "WallThermostatConfig")) {
readingsBulkUpdate($shash, "ecoTemperature", MAX_SerializeTemperature($args[0]));