From bc449700ce01dfeb68dc20375910b58e884220af Mon Sep 17 00:00:00 2001 From: mgehre <> Date: Tue, 12 Feb 2013 04:21:44 +0000 Subject: [PATCH] MAX: actually send week profile over the air git-svn-id: https://svn.fhem.de/fhem/trunk@2700 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_MAX.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fhem/FHEM/10_MAX.pm b/fhem/FHEM/10_MAX.pm index 63273495b..a0e111b30 100755 --- a/fhem/FHEM/10_MAX.pm +++ b/fhem/FHEM/10_MAX.pm @@ -425,6 +425,11 @@ MAX_Set($@) #Each day has 2 bytes * 13 controlpoints = 26 bytes = 52 hex characters #we don't have to update the rest, because the active part is terminated by the time 0:00 substr($curWeekProfile, $day*52, length($newWeekprofilePart)) = $newWeekprofilePart; + #First 7 controlpoints (2*7=14 bytes => 2*2*7=28 hex characters ) + ($hash->{IODev}{Send})->($hash->{IODev},"ConfigWeekProfile",$hash->{addr},sprintf("0%1d%s", $day, substr($curWeekProfile,$day*52,2*2*7))); + #And then the remaining 6 + ($hash->{IODev}{Send})->($hash->{IODev},"ConfigWeekProfile",$hash->{addr},sprintf("1%1d%s", $day, substr($curWeekProfile,$day*52+2*2*7,2*2*6))) + if(@controlpoints > 2*7); } readingsSingleUpdate($hash, ".weekProfile", $curWeekProfile, 0); MAX_ParseWeekProfile($hash);