mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 01:06:04 +00:00
00_ElsnerWS: minor function and commandref changes
git-svn-id: https://svn.fhem.de/fhem/trunk@23307 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
48c6a0bef6
commit
b69b222588
@ -417,37 +417,37 @@ sub ElsnerWS_Read($) {
|
|||||||
$data = $rest;
|
$data = $rest;
|
||||||
|
|
||||||
# custom command exec
|
# custom command exec
|
||||||
%specials = ("%NAME" => $name,
|
%specials = ("%NAME" => $name,
|
||||||
"%TYPE" => $hash->{TYPE},
|
"%TYPE" => $hash->{TYPE},
|
||||||
"%BRIGHTNESS" => $brightness,
|
"%BRIGHTNESS" => $brightness,
|
||||||
"%DATE" => $date,
|
"%DATE" => $date,
|
||||||
"%DAYNIGHT" => $twilightFlag,
|
"%DAYNIGHT" => $twilightFlag,
|
||||||
"%HEMISPHERE" => $hemisphere,
|
"%HEMISPHERE" => $hemisphere,
|
||||||
"%ISRAINING" => $isRaining,
|
"%ISRAINING" => $isRaining,
|
||||||
"%ISSTORMY" => $isStormy,
|
"%ISSTORMY" => $isStormy,
|
||||||
"%ISSUNNY" => $isSunny,
|
"%ISSUNNY" => $isSunny,
|
||||||
"%ISSUNNYEAST" => $isSunnyEast,
|
"%ISSUNNYEAST" => $isSunnyEast,
|
||||||
"%ISSUNNYSOUTH" => $isSunnySouth,
|
"%ISSUNNYSOUTH" => $isSunnySouth,
|
||||||
"%ISSUNNYWEST" => $isSunnyWest,
|
"%ISSUNNYWEST" => $isSunnyWest,
|
||||||
"%ISWINDY" => $isWindy,
|
"%ISWINDY" => $isWindy,
|
||||||
"%LATITUDE" => $latitude,
|
"%LATITUDE" => $latitude,
|
||||||
"%LONGITUDE" => $longitude,
|
"%LONGITUDE" => $longitude,
|
||||||
"%SUNAZIMUTH" => $sunAzimuth,
|
"%SUNAZIMUTH" => $sunAzimuth,
|
||||||
"%SUNEAST" => $sunEast,
|
"%SUNEAST" => $sunEast,
|
||||||
"%SUNELAVATION" => $sunElevation,
|
"%SUNELAVATION" => $sunElevation,
|
||||||
"%SUNSOUTH" => $sunSouth,
|
"%SUNSOUTH" => $sunSouth,
|
||||||
"%SUNWEST" => $sunWest,
|
"%SUNWEST" => $sunWest,
|
||||||
"%TEMPERATURE" => $temperature,
|
"%TEMPERATURE" => $temperature,
|
||||||
"%TIME" => $time,
|
"%TIME" => $time,
|
||||||
"%TIMEZONE" => $timeZone,
|
"%TIMEZONE" => $timeZone,
|
||||||
"%TWILIGHT" => $twilight,
|
"%TWILIGHT" => $twilight,
|
||||||
"%WEEKDAY" => $weekday,
|
"%WEEKDAY" => $weekday,
|
||||||
"%WINDAVG2MIN" => $windAvg2min,
|
"%WINDAVG2MIN" => $windAvg2min,
|
||||||
"%WINDGUST10MIN" => $windGust10min,
|
"%WINDGUST10MIN" => $windGust10min,
|
||||||
"%WINDGUSTCURRNT" => $windGustCurrent,
|
"%WINDGUSTCURRNT" => $windGustCurrent,
|
||||||
"%WINDPEAK10MIN" => $windPeak10min,
|
"%WINDPEAK10MIN" => $windPeak10min,
|
||||||
"%WINDSPEED" => $windSpeed,
|
"%WINDSPEED" => $windSpeed,
|
||||||
"%WINDSTENGTH" => $windStrength);
|
"%WINDSTENGTH" => $windStrength);
|
||||||
|
|
||||||
my $customCmdDown = AttrVal($name, "customCmdDown", undef);
|
my $customCmdDown = AttrVal($name, "customCmdDown", undef);
|
||||||
my $customCmdDownPeriod = AttrVal($name, "customCmdDownPeriod", 'once');
|
my $customCmdDownPeriod = AttrVal($name, "customCmdDownPeriod", 'once');
|
||||||
@ -876,6 +876,13 @@ sub ElsnerWS_Attr(@) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} elsif ($attrName eq "customCmdPriority") {
|
||||||
|
if (!defined $attrVal) {
|
||||||
|
|
||||||
|
} elsif ($attrVal !~ m/^down|up$/) {
|
||||||
|
$err = "attribute-value [$attrName] = $attrVal wrong";
|
||||||
|
CommandDeleteAttr(undef, "$name $attrName");
|
||||||
|
}
|
||||||
} elsif ($attrName eq "signOfLife") {
|
} elsif ($attrName eq "signOfLife") {
|
||||||
if (!defined $attrVal) {
|
if (!defined $attrVal) {
|
||||||
|
|
||||||
@ -1019,10 +1026,10 @@ sub ElsnerWS_Shutdown($) {
|
|||||||
<li>Day/night signal</li>
|
<li>Day/night signal</li>
|
||||||
<li>Display of date, time, sun azimuth, sun elevation, longitude and latitude</li>
|
<li>Display of date, time, sun azimuth, sun elevation, longitude and latitude</li>
|
||||||
<li>Execution of custom alarm commands, see <a href="#ElsnerWS_customCmdAlarmOff">customCmdAlarmOff</a> and
|
<li>Execution of custom alarm commands, see <a href="#ElsnerWS_customCmdAlarmOff">customCmdAlarmOff</a> and
|
||||||
<a href="#ElsnerWS_customCmdAlarmOn">customCmdAlarmOn</a></li>
|
<a href="#ElsnerWS_customCmdAlarmOn">customCmdAlarmOn</a>.</li>
|
||||||
<li>Execution of custom up and down commands that can be triggered by the readings dayNight, isRaining, isStormy,
|
<li>Execution of custom up and down commands that can be triggered by the readings dayNight, isRaining, isStormy,
|
||||||
isSunny, isSunnyEast, isSunnySouth, isSunnyWest and isWindy, see <a href="#ElsnerWS_customCmdDown">customCmdDown</a> and
|
isSunny, isSunnyEast, isSunnySouth, isSunnyWest and isWindy, see <a href="#ElsnerWS_customCmdDown">customCmdDown</a> and
|
||||||
<a href="#ElsnerWS_customCmdUp">customCmdUp</a></li>
|
<a href="#ElsnerWS_customCmdUp">customCmdUp</a>.</li>
|
||||||
</ul><br>
|
</ul><br>
|
||||||
|
|
||||||
<b>Prerequisites</b>
|
<b>Prerequisites</b>
|
||||||
@ -1123,8 +1130,8 @@ sub ElsnerWS_Shutdown($) {
|
|||||||
else it is a "plain" fhem.pl command (chain). In the <command> you can access the name of the device by using $NAME, $TYPE
|
else it is a "plain" fhem.pl command (chain). In the <command> you can access the name of the device by using $NAME, $TYPE
|
||||||
and the current readings<br>
|
and the current readings<br>
|
||||||
$BRIGHTNESS, $DATE, $DAYNIGHT, $HEMISPHERE, $ISRAINING, $ISSTORMY, $ISSUNNY, $ISSUNNYEAST, $ISSUNNYSOUTH",
|
$BRIGHTNESS, $DATE, $DAYNIGHT, $HEMISPHERE, $ISRAINING, $ISSTORMY, $ISSUNNY, $ISSUNNYEAST, $ISSUNNYSOUTH",
|
||||||
$ISSUNNYWEST, $ISWINDY, $LATITUDE, $LONGITUDE, $SUNAZIMUTH, $SUNEAST, $SUNELAVATION, $SUNSOUTH, $SUNWEST, $TEMPERATURE, $TIME,
|
$ISSUNNYWEST, $ISWINDY, $LATITUDE, $LONGITUDE, $NAME, $SUNAZIMUTH, $SUNEAST, $SUNELAVATION, $SUNSOUTH, $SUNWEST, $TEMPERATURE, $TIME,
|
||||||
$TIMEZONE, $TWILIGHT, $WEEKDAY, $WINDAVG2MIN, $WINDGUST10MIN, $WINDGUSTCURRNT, $WINDPEAK10MIN, $WINDSPEED, $WINDSTENGTH.<br>
|
$TIMEZONE, $TWILIGHT, $TYPE, $WEEKDAY, $WINDAVG2MIN, $WINDGUST10MIN, $WINDGUSTCURRNT, $WINDPEAK10MIN, $WINDSPEED, $WINDSTENGTH.<br>
|
||||||
The <a href="#eventMap">eventMap</a> replacements are taken into account. This data
|
The <a href="#eventMap">eventMap</a> replacements are taken into account. This data
|
||||||
is available as a local variable in perl, as environment variable for shell
|
is available as a local variable in perl, as environment variable for shell
|
||||||
scripts, and will be textually replaced for Fhem commands.<br>
|
scripts, and will be textually replaced for Fhem commands.<br>
|
||||||
@ -1138,8 +1145,8 @@ sub ElsnerWS_Shutdown($) {
|
|||||||
else it is a "plain" fhem.pl command (chain). In the <command> you can access the name of the device by using $NAME, $TYPE
|
else it is a "plain" fhem.pl command (chain). In the <command> you can access the name of the device by using $NAME, $TYPE
|
||||||
and the current readings<br>
|
and the current readings<br>
|
||||||
$BRIGHTNESS, $DATE, $DAYNIGHT, $HEMISPHERE, $ISRAINING, $ISSTORMY, $ISSUNNY, $ISSUNNYEAST, $ISSUNNYSOUTH",
|
$BRIGHTNESS, $DATE, $DAYNIGHT, $HEMISPHERE, $ISRAINING, $ISSTORMY, $ISSUNNY, $ISSUNNYEAST, $ISSUNNYSOUTH",
|
||||||
$ISSUNNYWEST, $ISWINDY, $LATITUDE, $LONGITUDE, $SUNAZIMUTH, $SUNEAST, $SUNELAVATION, $SUNSOUTH, $SUNWEST, $TEMPERATURE, $TIME,
|
$ISSUNNYWEST, $ISWINDY, $LATITUDE, $LONGITUDE, $NAME, $SUNAZIMUTH, $SUNEAST, $SUNELAVATION, $SUNSOUTH, $SUNWEST, $TEMPERATURE, $TIME,
|
||||||
$TIMEZONE, $TWILIGHT, $WEEKDAY, $WINDAVG2MIN, $WINDGUST10MIN, $WINDGUSTCURRNT, $WINDPEAK10MIN, $WINDSPEED, $WINDSTENGTH.<br>
|
$TIMEZONE, $TWILIGHT, $TYPE, $WEEKDAY, $WINDAVG2MIN, $WINDGUST10MIN, $WINDGUSTCURRNT, $WINDPEAK10MIN, $WINDSPEED, $WINDSTENGTH.<br>
|
||||||
The <a href="#eventMap">eventMap</a> replacements are taken into account. This data
|
The <a href="#eventMap">eventMap</a> replacements are taken into account. This data
|
||||||
is available as a local variable in perl, as environment variable for shell
|
is available as a local variable in perl, as environment variable for shell
|
||||||
scripts, and will be textually replaced for Fhem commands.<br>
|
scripts, and will be textually replaced for Fhem commands.<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user