diff --git a/fhem/CHANGED b/fhem/CHANGED index a34ee628b..648049f11 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,10 @@ # 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. + - bugfix: 73_AutoShuttersControl: change from %k to %H for better compability + with Strawberry Perl on Windows + fix Github #82 + fix Github #79 + fix Github #77 - feature: 76_SMAPortal: new attr balanceDay, balanceMonth, balanceYear for statistics dataprovider, new set getData command, update button in header of Portal Graphics, minor diff --git a/fhem/FHEM/73_AutoShuttersControl.pm b/fhem/FHEM/73_AutoShuttersControl.pm index 1d6f2b421..5fb029b86 100644 --- a/fhem/FHEM/73_AutoShuttersControl.pm +++ b/fhem/FHEM/73_AutoShuttersControl.pm @@ -1258,7 +1258,7 @@ sub Initialize { ], "release_status": "testing", "license": "GPL_2", - "version": "v0.10.6", + "version": "v0.10.7", "author": [ "Marko Oldenburg " ], diff --git a/fhem/lib/FHEM/Automation/ShuttersControl.pm b/fhem/lib/FHEM/Automation/ShuttersControl.pm index 8ce5995e3..f7c5c183e 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl.pm @@ -515,7 +515,9 @@ m{^(ATTR|DELETEATTR)\s(.*ASC_Time_Up_WE_Holiday|.*ASC_Up|.*ASC_Down|.*ASC_AutoAs } elsif ( grep m{^($posReading):\s\d{1,3}$}xms, @{$events} ) { ASC_Debug( 'Notify: ' - . ' ASC_Pos_Reading Event vom Rollo wurde erkannt ' + . ' ASC_Pos_Reading Event vom Rollo ' + . $devname + . ' wurde erkannt ' . ' - RECEIVED EVENT: ' . Dumper $events); EventProcessingShutters( $hash, $devname, join( ' ', @{$events} ) ); @@ -1077,7 +1079,7 @@ sub CreateSunRiseSetShuttersTimer { $ascDev->getAutoShuttersControlEvening eq 'on' ? ( $shutters->getDown eq 'roommate' ? 'roommate only' : strftime( - "%e.%m.%Y - %H:%M", + "%d.%m.%Y - %H:%M", localtime($shuttersSunsetUnixtime) ) ) @@ -1091,7 +1093,7 @@ sub CreateSunRiseSetShuttersTimer { $ascDev->getAutoShuttersControlMorning eq 'on' ? ( $shutters->getUp eq 'roommate' ? 'roommate only' : strftime( - "%e.%m.%Y - %H:%M", + "%d.%m.%Y - %H:%M", localtime($shuttersSunriseUnixtime) ) ) @@ -1106,10 +1108,10 @@ sub CreateSunRiseSetShuttersTimer { $shuttersDev . '_nextAstroTimeEvent', ( $shuttersSunriseUnixtime < $shuttersSunsetUnixtime - ? strftime( "%e.%m.%Y - %H:%M", + ? strftime( "%d.%m.%Y - %H:%M", localtime($shuttersSunriseUnixtime) ) : strftime( - "%e.%m.%Y - %H:%M", localtime($shuttersSunsetUnixtime) + "%d.%m.%Y - %H:%M", localtime($shuttersSunsetUnixtime) ) ) ); @@ -1613,12 +1615,12 @@ sub ShuttersInformation { $ret .= "$shuttersDev"; $ret .= " "; $ret .= "" - . strftime( "%e.%m.%Y - %H:%M:%S", + . strftime( "%d.%m.%Y - %H:%M:%S", localtime( $shutters->getSunriseUnixTime ) ) . ""; $ret .= " "; $ret .= "" - . strftime( "%e.%m.%Y - %H:%M:%S", + . strftime( "%d.%m.%Y - %H:%M:%S", localtime( $shutters->getSunsetUnixTime ) ) . ""; $ret .= " "; @@ -1869,7 +1871,7 @@ sub ASC_Debug { if ( !AttrVal( $ascDev->getName, 'ASC_debug', 0 ) ); my $debugMsg = shift; - my $debugTimestamp = strftime( "%Y.%m.%e %T", localtime(time) ); + my $debugTimestamp = strftime( "%Y.%m.%d %T", localtime(time) ); print( encode_utf8( @@ -1897,7 +1899,7 @@ sub PrivacyUpTime { if ( $shutters->getPrivacyUpStatus == 2 ); readingsSingleUpdate( $shuttersDevHash, 'ASC_Time_PrivacyDriveUp', - strftime( "%e.%m.%Y - %H:%M", localtime($privacyUpUnixtime) ), 1 ); + strftime( "%d.%m.%Y - %H:%M", localtime($privacyUpUnixtime) ), 1 ); ## Setzt den PrivacyUp Modus für die Sichtschutzfahrt auf den Status 1 ## und gibt die Unixtime für die nächste Fahrt korrekt zurück if ( $shutters->getPrivacyUpStatus != 2 ) { @@ -1910,7 +1912,7 @@ sub PrivacyUpTime { $shuttersDevHash, 'ASC_Time_PrivacyDriveUp', strftime( - "%e.%m.%Y - %H:%M", + "%d.%m.%Y - %H:%M", localtime( ( $shuttersSunriseUnixtime - $shutters->getPrivacyUpTime ) + 86400 @@ -1940,7 +1942,7 @@ sub PrivacyDownTime { if ( $shutters->getPrivacyDownStatus == 2 ); readingsSingleUpdate( $shuttersDevHash, 'ASC_Time_PrivacyDriveDown', - strftime( "%e.%m.%Y - %H:%M", localtime($privacyDownUnixtime) ), + strftime( "%d.%m.%Y - %H:%M", localtime($privacyDownUnixtime) ), 1 ); ## Setzt den PrivacyDown Modus für die Sichtschutzfahrt auf den Status 1 ## und gibt die Unixtime für die nächste Fahrt korrekt zurück @@ -1954,7 +1956,7 @@ sub PrivacyDownTime { $shuttersDevHash, 'ASC_Time_PrivacyDriveDown', strftime( - "%e.%m.%Y - %H:%M", + "%d.%m.%Y - %H:%M", localtime( ( $shuttersSunsetUnixtime - $shutters->getPrivacyDownTime ) + 86400 diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Helper.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Helper.pm index c212c18a5..7d5cceeee 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Helper.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Helper.pm @@ -382,6 +382,19 @@ sub _IsDay { . $FHEM::Automation::ShuttersControl::shutters->getSunrise ); } + + $respIsDay == 1 + if ( + ( $FHEM::Automation::ShuttersControl::shutters->getDown eq 'roommate' + and ( $FHEM::Automation::ShuttersControl::shutters->getRoommates ne 'asleep' + or $FHEM::Automation::ShuttersControl::shutters->getRoommates ne 'gotosleep' ) + ) + or ( $FHEM::Automation::ShuttersControl::shutters->getUp eq 'roommate' + and ( $FHEM::Automation::ShuttersControl::shutters->getRoommates ne 'asleep' + or $FHEM::Automation::ShuttersControl::shutters->getRoommates ne 'gotosleep' ) + ) + ); + return $respIsDay; } diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Shading.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Shading.pm index 1b1cb536b..98af64e6a 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Shading.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Shading.pm @@ -619,7 +619,7 @@ sub ShadingProcessingDriveCommand { . $FHEM::Automation::ShuttersControl::shutters->getShadingStatus . ', Beschattungsstatus Zeitstempel: ' . strftime( - "%Y.%m.%e %T", + "%Y.%m.%d %T", localtime( $FHEM::Automation::ShuttersControl::shutters ->getShadingStatusTimestamp diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Shutters.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Shutters.pm index a270b95a5..3938a090d 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Shutters.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Shutters.pm @@ -562,7 +562,7 @@ sub getAntiFreezeStatus { $daytime = ( defined($daytime) && $daytime ? $daytime - : ( strftime( "%k", localtime() ) < 12 ? 'am' : 'pm' ) + : ( strftime( "%H", localtime() ) < 12 ? 'am' : 'pm' ) ); my $outTemp = $FHEM::Automation::ShuttersControl::ascDev->getOutTemp;