mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 00:26:03 +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;
|
||||
|
||||
# custom command exec
|
||||
%specials = ("%NAME" => $name,
|
||||
"%TYPE" => $hash->{TYPE},
|
||||
"%BRIGHTNESS" => $brightness,
|
||||
"%DATE" => $date,
|
||||
"%DAYNIGHT" => $twilightFlag,
|
||||
"%HEMISPHERE" => $hemisphere,
|
||||
"%ISRAINING" => $isRaining,
|
||||
"%ISSTORMY" => $isStormy,
|
||||
"%ISSUNNY" => $isSunny,
|
||||
"%ISSUNNYEAST" => $isSunnyEast,
|
||||
"%ISSUNNYSOUTH" => $isSunnySouth,
|
||||
"%ISSUNNYWEST" => $isSunnyWest,
|
||||
"%ISWINDY" => $isWindy,
|
||||
"%LATITUDE" => $latitude,
|
||||
"%LONGITUDE" => $longitude,
|
||||
"%SUNAZIMUTH" => $sunAzimuth,
|
||||
"%SUNEAST" => $sunEast,
|
||||
"%SUNELAVATION" => $sunElevation,
|
||||
"%SUNSOUTH" => $sunSouth,
|
||||
"%SUNWEST" => $sunWest,
|
||||
"%TEMPERATURE" => $temperature,
|
||||
"%TIME" => $time,
|
||||
"%TIMEZONE" => $timeZone,
|
||||
"%TWILIGHT" => $twilight,
|
||||
"%WEEKDAY" => $weekday,
|
||||
"%WINDAVG2MIN" => $windAvg2min,
|
||||
"%WINDGUST10MIN" => $windGust10min,
|
||||
"%WINDGUSTCURRNT" => $windGustCurrent,
|
||||
"%WINDPEAK10MIN" => $windPeak10min,
|
||||
"%WINDSPEED" => $windSpeed,
|
||||
"%WINDSTENGTH" => $windStrength);
|
||||
%specials = ("%NAME" => $name,
|
||||
"%TYPE" => $hash->{TYPE},
|
||||
"%BRIGHTNESS" => $brightness,
|
||||
"%DATE" => $date,
|
||||
"%DAYNIGHT" => $twilightFlag,
|
||||
"%HEMISPHERE" => $hemisphere,
|
||||
"%ISRAINING" => $isRaining,
|
||||
"%ISSTORMY" => $isStormy,
|
||||
"%ISSUNNY" => $isSunny,
|
||||
"%ISSUNNYEAST" => $isSunnyEast,
|
||||
"%ISSUNNYSOUTH" => $isSunnySouth,
|
||||
"%ISSUNNYWEST" => $isSunnyWest,
|
||||
"%ISWINDY" => $isWindy,
|
||||
"%LATITUDE" => $latitude,
|
||||
"%LONGITUDE" => $longitude,
|
||||
"%SUNAZIMUTH" => $sunAzimuth,
|
||||
"%SUNEAST" => $sunEast,
|
||||
"%SUNELAVATION" => $sunElevation,
|
||||
"%SUNSOUTH" => $sunSouth,
|
||||
"%SUNWEST" => $sunWest,
|
||||
"%TEMPERATURE" => $temperature,
|
||||
"%TIME" => $time,
|
||||
"%TIMEZONE" => $timeZone,
|
||||
"%TWILIGHT" => $twilight,
|
||||
"%WEEKDAY" => $weekday,
|
||||
"%WINDAVG2MIN" => $windAvg2min,
|
||||
"%WINDGUST10MIN" => $windGust10min,
|
||||
"%WINDGUSTCURRNT" => $windGustCurrent,
|
||||
"%WINDPEAK10MIN" => $windPeak10min,
|
||||
"%WINDSPEED" => $windSpeed,
|
||||
"%WINDSTENGTH" => $windStrength);
|
||||
|
||||
my $customCmdDown = AttrVal($name, "customCmdDown", undef);
|
||||
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") {
|
||||
if (!defined $attrVal) {
|
||||
|
||||
@ -1019,10 +1026,10 @@ sub ElsnerWS_Shutdown($) {
|
||||
<li>Day/night signal</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
|
||||
<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,
|
||||
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>
|
||||
|
||||
<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
|
||||
and the current readings<br>
|
||||
$BRIGHTNESS, $DATE, $DAYNIGHT, $HEMISPHERE, $ISRAINING, $ISSTORMY, $ISSUNNY, $ISSUNNYEAST, $ISSUNNYSOUTH",
|
||||
$ISSUNNYWEST, $ISWINDY, $LATITUDE, $LONGITUDE, $SUNAZIMUTH, $SUNEAST, $SUNELAVATION, $SUNSOUTH, $SUNWEST, $TEMPERATURE, $TIME,
|
||||
$TIMEZONE, $TWILIGHT, $WEEKDAY, $WINDAVG2MIN, $WINDGUST10MIN, $WINDGUSTCURRNT, $WINDPEAK10MIN, $WINDSPEED, $WINDSTENGTH.<br>
|
||||
$ISSUNNYWEST, $ISWINDY, $LATITUDE, $LONGITUDE, $NAME, $SUNAZIMUTH, $SUNEAST, $SUNELAVATION, $SUNSOUTH, $SUNWEST, $TEMPERATURE, $TIME,
|
||||
$TIMEZONE, $TWILIGHT, $TYPE, $WEEKDAY, $WINDAVG2MIN, $WINDGUST10MIN, $WINDGUSTCURRNT, $WINDPEAK10MIN, $WINDSPEED, $WINDSTENGTH.<br>
|
||||
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
|
||||
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
|
||||
and the current readings<br>
|
||||
$BRIGHTNESS, $DATE, $DAYNIGHT, $HEMISPHERE, $ISRAINING, $ISSTORMY, $ISSUNNY, $ISSUNNYEAST, $ISSUNNYSOUTH",
|
||||
$ISSUNNYWEST, $ISWINDY, $LATITUDE, $LONGITUDE, $SUNAZIMUTH, $SUNEAST, $SUNELAVATION, $SUNSOUTH, $SUNWEST, $TEMPERATURE, $TIME,
|
||||
$TIMEZONE, $TWILIGHT, $WEEKDAY, $WINDAVG2MIN, $WINDGUST10MIN, $WINDGUSTCURRNT, $WINDPEAK10MIN, $WINDSPEED, $WINDSTENGTH.<br>
|
||||
$ISSUNNYWEST, $ISWINDY, $LATITUDE, $LONGITUDE, $NAME, $SUNAZIMUTH, $SUNEAST, $SUNELAVATION, $SUNSOUTH, $SUNWEST, $TEMPERATURE, $TIME,
|
||||
$TIMEZONE, $TWILIGHT, $TYPE, $WEEKDAY, $WINDAVG2MIN, $WINDGUST10MIN, $WINDGUSTCURRNT, $WINDPEAK10MIN, $WINDSPEED, $WINDSTENGTH.<br>
|
||||
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
|
||||
scripts, and will be textually replaced for Fhem commands.<br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user