2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

73_AutoShuttersControl: change from %k to %H for better compability with Strawberry Perl on Windows

git-svn-id: https://svn.fhem.de/fhem/trunk@22581 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2020-08-12 09:08:56 +00:00
parent 49b80862a8
commit 0631b7bee3
6 changed files with 35 additions and 15 deletions

View File

@ -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

View File

@ -1258,7 +1258,7 @@ sub Initialize {
],
"release_status": "testing",
"license": "GPL_2",
"version": "v0.10.6",
"version": "v0.10.7",
"author": [
"Marko Oldenburg <leongaultier@gmail.com>"
],

View File

@ -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 .= "<td>$shuttersDev</td>";
$ret .= "<td> </td>";
$ret .= "<td>"
. strftime( "%e.%m.%Y - %H:%M:%S",
. strftime( "%d.%m.%Y - %H:%M:%S",
localtime( $shutters->getSunriseUnixTime ) )
. "</td>";
$ret .= "<td> </td>";
$ret .= "<td>"
. strftime( "%e.%m.%Y - %H:%M:%S",
. strftime( "%d.%m.%Y - %H:%M:%S",
localtime( $shutters->getSunsetUnixTime ) )
. "</td>";
$ret .= "<td> </td>";
@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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;