2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-28 02:44:53 +00:00

FHEMWEB detail screen with get dropdown

git-svn-id: https://svn.fhem.de/fhem/trunk@3602 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-08-07 13:06:49 +00:00
parent a96e1d1416
commit fafa2250ef
7 changed files with 22 additions and 4 deletions

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII
- SVN
- feature: FHEMWEB detail screen with get dropdown
- feature: displayattr command added
- feature: SYSSTAT: allow (remote) monitoring system uptime
- feature: new module 98_openweathermap.pm added (betateilchen)

@ -849,6 +849,8 @@ FW_doDetail($)
FW_pO FW_hidden("detail", $d);
FW_makeSelect($d, "set", getAllSets($d), "set");
FW_makeSelect($d, "get", getAllGets($d), "set");
FW_makeTable("Internals", $d, $h);
FW_makeTable("Readings", $d, $h->{READINGS});

@ -116,7 +116,7 @@ EMWZ_Get($@)
my $msg;
if($a[1] ne "status") {
return "unknown get value, valid is status";
return "unknown argument $a[1], choose one of status";
}
$hash->{LOCAL} = 1;
my $v = EMWZ_GetStatus($hash);

@ -110,7 +110,7 @@ EMEM_Get($@)
my $msg;
if($a[1] ne "status") {
return "unknown get value, valid is status";
return "unknown argument $a[1], choose one of status";
}
$hash->{LOCAL} = 1;
my $v = EMEM_GetStatus($hash);

@ -108,7 +108,7 @@ EMGZ_Get($@)
my $msg;
if($a[1] ne "status" && int(@a) != 2) {
return "unknown get value, valid is status";
return "unknown argument $a[1], choose one of status";
}
$hash->{LOCAL} = 1;
my $v = EMGZ_GetStatus($hash);

@ -210,7 +210,8 @@ holiday_Get($@)
$arg = sprintf("%02d-%02d", $a[4]+1, $a[3]);
} else {
return "wrong argument: need MM-DD/yesterday/today/tomorrow"
return "unknown argument $a[1], ".
"choose one of yesterday today tomorrow MM-DD";
}
return holiday_refresh($hash->{NAME}, $arg);

@ -88,6 +88,7 @@ sub devspec2array($);
sub doGlobalDef($);
sub fhem($@);
sub fhz($);
sub getAllGets($);
sub getAllSets($);
sub readingsBeginUpdate($);
sub readingsBulkUpdate($$$@);
@ -1501,6 +1502,7 @@ CommandDisplayAttr($$)
my @a = split(" ", $def, 2);
return "Usage: displayattr <name> [<attrname>]\n$namedef" if(@a < 1);
Log 1, "DA: $cl->{NAME}";
my @rets;
my @devspec = devspec2array($a[0]);
@ -1769,6 +1771,18 @@ getAllAttr($)
return $list;
}
#####################################
sub
getAllGets($)
{
my $d = shift;
my $a2 = CommandGet(undef, "$d ?");
return "" if($a2 !~ m/unknown.*choose one of /i);
$a2 =~ s/.*choose one of //;
return $a2;
}
#####################################
sub
getAllSets($)