mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
FHEMWEB detail screen with get dropdown
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@3602 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
370d4604cc
commit
4dd6b135f5
1
CHANGED
1
CHANGED
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII
|
# Add changes at the top of the list. Keep it in ASCII
|
||||||
- SVN
|
- SVN
|
||||||
|
- feature: FHEMWEB detail screen with get dropdown
|
||||||
- feature: displayattr command added
|
- feature: displayattr command added
|
||||||
- feature: SYSSTAT: allow (remote) monitoring system uptime
|
- feature: SYSSTAT: allow (remote) monitoring system uptime
|
||||||
- feature: new module 98_openweathermap.pm added (betateilchen)
|
- feature: new module 98_openweathermap.pm added (betateilchen)
|
||||||
|
@ -849,6 +849,8 @@ FW_doDetail($)
|
|||||||
FW_pO FW_hidden("detail", $d);
|
FW_pO FW_hidden("detail", $d);
|
||||||
|
|
||||||
FW_makeSelect($d, "set", getAllSets($d), "set");
|
FW_makeSelect($d, "set", getAllSets($d), "set");
|
||||||
|
FW_makeSelect($d, "get", getAllGets($d), "set");
|
||||||
|
|
||||||
FW_makeTable("Internals", $d, $h);
|
FW_makeTable("Internals", $d, $h);
|
||||||
FW_makeTable("Readings", $d, $h->{READINGS});
|
FW_makeTable("Readings", $d, $h->{READINGS});
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ EMWZ_Get($@)
|
|||||||
my $msg;
|
my $msg;
|
||||||
|
|
||||||
if($a[1] ne "status") {
|
if($a[1] ne "status") {
|
||||||
return "unknown get value, valid is status";
|
return "unknown argument $a[1], choose one of status";
|
||||||
}
|
}
|
||||||
$hash->{LOCAL} = 1;
|
$hash->{LOCAL} = 1;
|
||||||
my $v = EMWZ_GetStatus($hash);
|
my $v = EMWZ_GetStatus($hash);
|
||||||
|
@ -110,7 +110,7 @@ EMEM_Get($@)
|
|||||||
my $msg;
|
my $msg;
|
||||||
|
|
||||||
if($a[1] ne "status") {
|
if($a[1] ne "status") {
|
||||||
return "unknown get value, valid is status";
|
return "unknown argument $a[1], choose one of status";
|
||||||
}
|
}
|
||||||
$hash->{LOCAL} = 1;
|
$hash->{LOCAL} = 1;
|
||||||
my $v = EMEM_GetStatus($hash);
|
my $v = EMEM_GetStatus($hash);
|
||||||
|
@ -108,7 +108,7 @@ EMGZ_Get($@)
|
|||||||
my $msg;
|
my $msg;
|
||||||
|
|
||||||
if($a[1] ne "status" && int(@a) != 2) {
|
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;
|
$hash->{LOCAL} = 1;
|
||||||
my $v = EMGZ_GetStatus($hash);
|
my $v = EMGZ_GetStatus($hash);
|
||||||
|
@ -210,7 +210,8 @@ holiday_Get($@)
|
|||||||
$arg = sprintf("%02d-%02d", $a[4]+1, $a[3]);
|
$arg = sprintf("%02d-%02d", $a[4]+1, $a[3]);
|
||||||
|
|
||||||
} else {
|
} 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);
|
return holiday_refresh($hash->{NAME}, $arg);
|
||||||
|
14
fhem.pl
14
fhem.pl
@ -88,6 +88,7 @@ sub devspec2array($);
|
|||||||
sub doGlobalDef($);
|
sub doGlobalDef($);
|
||||||
sub fhem($@);
|
sub fhem($@);
|
||||||
sub fhz($);
|
sub fhz($);
|
||||||
|
sub getAllGets($);
|
||||||
sub getAllSets($);
|
sub getAllSets($);
|
||||||
sub readingsBeginUpdate($);
|
sub readingsBeginUpdate($);
|
||||||
sub readingsBulkUpdate($$$@);
|
sub readingsBulkUpdate($$$@);
|
||||||
@ -1501,6 +1502,7 @@ CommandDisplayAttr($$)
|
|||||||
my @a = split(" ", $def, 2);
|
my @a = split(" ", $def, 2);
|
||||||
return "Usage: displayattr <name> [<attrname>]\n$namedef" if(@a < 1);
|
return "Usage: displayattr <name> [<attrname>]\n$namedef" if(@a < 1);
|
||||||
|
|
||||||
|
Log 1, "DA: $cl->{NAME}";
|
||||||
my @rets;
|
my @rets;
|
||||||
my @devspec = devspec2array($a[0]);
|
my @devspec = devspec2array($a[0]);
|
||||||
|
|
||||||
@ -1769,6 +1771,18 @@ getAllAttr($)
|
|||||||
return $list;
|
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
|
sub
|
||||||
getAllSets($)
|
getAllSets($)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user