From 8abc99a920524551d3fe5ee091144526d320f366 Mon Sep 17 00:00:00 2001 From: painseeker <> Date: Fri, 22 Jan 2010 09:51:56 +0000 Subject: [PATCH] Bugfixes. 80_xxLG7000 now honours SetID attr. git-svn-id: https://svn.fhem.de/fhem/trunk@560 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/09_CUL_FHTTK.pm | 1 + fhem/FHEM/80_xxLG7000.pm | 220 +++++++------------------- fhem/FHEM/82_LGTV.pm | 166 +++++++++++++------- fhem/docs/commandref.html | 321 +++++++++++++++++++------------------- 4 files changed, 327 insertions(+), 381 deletions(-) diff --git a/fhem/FHEM/09_CUL_FHTTK.pm b/fhem/FHEM/09_CUL_FHTTK.pm index 0d968301e..8d603c8c0 100644 --- a/fhem/FHEM/09_CUL_FHTTK.pm +++ b/fhem/FHEM/09_CUL_FHTTK.pm @@ -57,6 +57,7 @@ # able for any alerting uses (unless a delay of said # amount of time doesn't matter, of course ;)). # +# $Id: 09_CUL_FHTTK.pm,v 1.6 2010-01-22 09:51:55 painseeker Exp $ ############################################## package main; diff --git a/fhem/FHEM/80_xxLG7000.pm b/fhem/FHEM/80_xxLG7000.pm index fe7ca3ca2..57bc801eb 100644 --- a/fhem/FHEM/80_xxLG7000.pm +++ b/fhem/FHEM/80_xxLG7000.pm @@ -3,6 +3,7 @@ # with LG's Scarlet Series of LCDs (e. g. LG 47LG7000) # # Written by Kai 'wusel' Siering around 2010-01-20 +# $Id: 80_xxLG7000.pm,v 1.2 2010-01-22 09:51:56 painseeker Exp $ # # re-using code of 80_M232.pm by Dr. Boris Neubert ############################################## @@ -18,24 +19,25 @@ sub Log($$); use vars qw {%attr %defs}; my %commands = ( - "power state" => "ka %d FF\r", - "power on" => "ka %d 01\r", - "power off" => "ka %d 00\r", - "input AV1" => "xb %d 20\r", - "input AV2" => "xb %d 21\r", - "input AV3" => "xb %d 22\r", - "input AV4" => "xb %d 23\r", - "input Component" => "xb %d 40\r", - "input RGB-PC" => "xb %d 50\r", - "input HDMI1" => "xb %d 90\r", - "input HDMI2" => "xb %d 91\r", - "input HDMI3" => "xb %d 92\r", - "input HDMI4" => "xb %d 93\r", - "input DVBT" => "xb %d 00\r", - "input PAL" => "xb %d 10\r", - "selected input" => "xb %d FF\r", - "audio mute" => "ke %d 00\r", - "audio normal" => "ke %d 01\r", + "power state" => "ka %x FF\r", + "power on" => "ka %x 01\r", + "power off" => "ka %x 00\r", + "input AV1" => "xb %x 20\r", + "input AV2" => "xb %x 21\r", + "input AV3" => "xb %x 22\r", + "input AV4" => "xb %x 23\r", + "input Component" => "xb %x 40\r", + "input RGB-PC" => "xb %x 50\r", + "input HDMI1" => "xb %x 90\r", + "input HDMI2" => "xb %x 91\r", + "input HDMI3" => "xb %x 92\r", + "input HDMI4" => "xb %x 93\r", + "input DVB-T" => "xb %x 00\r", + "input PAL" => "xb %x 10\r", + "selected input" => "xb %x FF\r", + "audio mute" => "ke %x 00\r", + "audio normal" => "ke %x 01\r", + "audio state" => "ke %x FF\r", ); my %responses = ( @@ -49,11 +51,15 @@ my %responses = ( "b OK91" => "input HDMI2", "b OK92" => "input HDMI3", "b OK93" => "input HDMI4", + "b OKa0" => "input HDMI1-no_link", # At least 47LG7000 returns 10100001 instead of 10010001 when + "b OKa1" => "input HDMI2-no_link", # there is no link/signal connected to the corresponding + "b OKa2" => "input HDMI3-no_link", # HDMI input. -wusel, 2010-01-20 + "b OKa3" => "input HDMI4-no_link", "b OK40" => "input Components", "b OK50" => "input RGB-PC", - "b OK10" => "input PAL", - "b OK00" => "input DVB-T", - "e OK00" => "audio muted", + "b OK10" => "input PAL", # Selecting analogue (dubbed PAL here) input does not work for + "b OK00" => "input DVB-T", # me; well, there's nothing to see anymore anyway, at least + "e OK00" => "audio muted", # in Germany ;) (Ack, I don't have CATV.) -wusel, 2010-01-20 "e OK01" => "audio normal", ); @@ -74,9 +80,7 @@ xxLG7000_Initialize($) # Consumer $hash->{DefFn} = "xxLG7000_Define"; $hash->{UndefFn} = "xxLG7000_Undef"; -# $hash->{GetFn} = "xxLG7000_Get"; -# $hash->{SetFn} = "xxLG7000_Set"; - $hash->{AttrList}= "SetID:01,02, loglevel:0,1,2,3,4,5"; + $hash->{AttrList}= "SetID:1,2,... loglevel:0,1,2,3,4,5"; } @@ -125,6 +129,7 @@ xxLG7000_Define($$) $po->close(); $hash->{DeviceName} = $dev; + $attr{$a[0]}{SetID}=1; return undef; } @@ -163,128 +168,6 @@ xxLG7000_Ready($$) } -##################################### -sub -xxLG7000_Set($@) -{ - my ($hash, @a) = @_; - my $u1 = "Usage: see commandref.html for details\n"; - - return $u1 if(int(@a) < 2); - my $msg; - my $reading= $a[1]; - my $value; - my @legal; - - if($reading eq "auto") { - return $u1 if(int(@a) !=3); - $value= $a[2]; - @legal= (0..5,"none"); - if(!grep($value eq $_, @legal)) { - return "Illegal value $value, possible values: @legal"; - } - if($value eq "none") { $value= 0; } else { $value+=1; } - $msg= "M" . $value; - } - - elsif($reading eq "start") { - return $u1 if(int(@a) !=2); - $msg= "Z1"; - } - - elsif($reading eq "stop") { - return $u1 if(int(@a) !=2); - $msg= "Z0"; - } - - elsif($reading eq "octet") { - return $u1 if(int(@a) !=3); - $value= $a[2]; - @legal= (0..255); - if(!grep($value eq $_, @legal)) { - return "Illegal value $value, possible values: 0..255"; - } - $msg= sprintf("W%02X", $value); - } - - elsif($reading =~ /^io[0-7]$/) { - return $u1 if(int(@a) !=3); - $value= $a[2]; - return $u1 unless($value eq "0" || $value eq "1"); - $msg= "D" . substr($reading,2,1) . $value; - } - - else { return $u1; } - - my $d = xxLG7000GetData($hash, $msg); - return "Read error" if(!defined($d)); - return $d; -} - - -##################################### -sub -xxLG7000_Get($@) -{ - - my ($hash, @a) = @_; - my $u1 = "Usage: get [an0..an5]\n" . - "get [io0..io7]\n" . - "get octet\n" . - "get counter"; - - return $u1 if(int(@a) != 2); - - my $name= $a[0]; - my $reading= $a[1]; - my $msg; - my $retval; - my ($count,$d,$state,$iscurrent,$voltage); - - - if($reading eq "counter") { - $msg= "z"; - $d = xxLG7000GetData($hash, $msg); - return "Read error" if(!defined($d)); - $count= hex $d; - $retval= $count; - } - - elsif($reading =~ /^an[0-5]$/) { - $msg= "a" . substr($reading,2,1); - $d = xxLG7000GetData($hash, $msg); - return "Read error" if(!defined($d)); - $voltage= (hex substr($d,0,3))*5.00/1024.0; - $iscurrent= substr($d,3,1); - $retval= $voltage; # . " " . $iscurrent; - } - - elsif($reading =~ /^io[0-7]$/) { - $msg= "d" . substr($reading,2,1); - $d = xxLG7000GetData($hash, $msg); - return "Read error" if(!defined($d)); - $state= hex $d; - $retval= $state; - } - - elsif($reading eq "octet") { - $msg= "w"; - $d = xxLG7000GetData($hash, $msg); - return "Read error" if(!defined($d)); - $state= hex $d; - $retval= $state; - } - - else { return $u1; } - - $hash->{READINGS}{$reading}{VAL}= $retval; - $hash->{READINGS}{$reading}{TIME}= TimeNow(); - - return "$name $reading => $retval"; - -} - - ##################################### sub xxLG7000_Write($$) @@ -293,31 +176,42 @@ xxLG7000_Write($$) my $dev = $hash->{DeviceName}; my $UnitNo=1; my $ret; - my $retmsg; + my $retmsg="error occured"; + my $myname=$hash->{NAME}; + + + if(defined($attr{$myname}{SetID})) { + $UnitNo=$attr{$myname}{SetID}; + Log $UnitNo==1?5:4, "xxLG7000_Write: Using SetID $UnitNo for $myname."; + } my $sendstring=$commands{$msg}; if(!defined($sendstring)) { - return "Unknown command $msg, choose one of " . join(" ", sort keys %commands); + return "error unknown command $msg, choose one of " . join(" ", sort keys %commands); } - $sendstring=sprintf($sendstring, $UnitNo); # FIXME! This needs to become a settable attribut! + $sendstring=sprintf($sendstring, $UnitNo); + Log 5, "xxLG7000_Write: sending $sendstring"; $ret=xxLG7000GetData($hash, $sendstring); - - Log 3, "xxLG7000_Write: wrote $msg, received $ret"; - - $retmsg=sprintf("%s %s", substr($ret, 0, 1), substr($ret, 5)); - $retmsg=$responses{$retmsg}; - if(!defined($retmsg)) { - if(substr($ret, 5, 2) eq "NG") { - $retmsg="error message"; - Log 3, "xxLG7000_Write: error message: $ret"; - } else { - $retmsg=sprintf("Unknown response %s, help me!"); - Log 3, "xxLG7000_Write: $retmsg"; - } + if(!defined($ret) || length($ret)<=6) { + Log 2, "xxLG7000_Write: error, got too short answer ($ret)."; } else { - Log 3, "xxLG7000_Write: returns $retmsg"; + Log 5, "xxLG7000_Write: wrote $msg, received $ret"; + + $retmsg=sprintf("%s %s", substr($ret, 0, 1), substr($ret, 5)); + $retmsg=$responses{$retmsg}; + if(!defined($retmsg)) { + if(substr($ret, 5, 2) eq "NG") { + $retmsg="error message"; + Log 5, "xxLG7000_Write: error message: $ret"; + } else { + Log 2, "xxLG7000_Write: Unknown response $ret, help me!"; + $retmsg=sprintf("error message_unknown:%s", $ret =~ s/ /_/); + } + } else { + Log 5, "xxLG7000_Write: returns $retmsg"; + } } return $retmsg; diff --git a/fhem/FHEM/82_LGTV.pm b/fhem/FHEM/82_LGTV.pm index 399dfd987..325564f01 100644 --- a/fhem/FHEM/82_LGTV.pm +++ b/fhem/FHEM/82_LGTV.pm @@ -5,6 +5,7 @@ # 80_xxLG7000.pm for a serial connection. # # Written by Kai 'wusel' Siering around 2010-01-20 +# $Id: 82_LGTV.pm,v 1.2 2010-01-22 09:51:56 painseeker Exp $ # # re-using code of 82_M232Voltage.pm # written by Dr. Boris Neubert 2007-12-24 @@ -35,11 +36,12 @@ my @commandlist = ( "input HDMI2", "input HDMI3", "input HDMI4", - "input DVBT", + "input DVB-T", "input PAL", "audio mute", "audio normal", - "selected input" + "selected input", + "audio state" ); @@ -49,11 +51,11 @@ LGTV_Initialize($) { my ($hash) = @_; -# $hash->{GetFn} = "LGTV_Get"; + $hash->{GetFn} = "LGTV_Get"; $hash->{SetFn} = "LGTV_Set"; $hash->{DefFn} = "LGTV_Define"; - $hash->{AttrList} = "dummy:1,0 model:LGTV loglevel:0,1,2,3,4,5"; + $hash->{AttrList} = "dummy:1,0 model:LGTV loglevel:0,1,2,3,4,5 TIMER:30"; } ################################### @@ -61,13 +63,26 @@ sub LGTV_GetStatus($) { my ($hash) = @_; - - if(!$hash->{LOCAL}) { - InternalTimer(gettimeofday()+60, "LGTV_GetStatus", $hash, 1); - } - + my $numchanged=0; my $name = $hash->{NAME}; + my @cmdlist; + my $retval; + + @cmdlist=("get", "power", "state"); + $retval=LGTV_Set($hash, @cmdlist); + + my ($value, $state)=split(" ", $retval); + if($value eq "power" && $state eq "on") { + @cmdlist=("get", "selected", "input"); + + $retval=LGTV_Set($hash, @cmdlist); + } + + InternalTimer(gettimeofday()+$attr{$name}{TIMER}, "LGTV_GetStatus", $hash, 1); + + return; + my $d = IOWrite($hash, "power state"); if(!defined($d)) { my $msg = "LGTV $name read error"; @@ -76,27 +91,35 @@ LGTV_GetStatus($) } my $tn = TimeNow(); - my ($value, $state)=split(" ", $d); - - if($value eq "power") { - $hash->{READINGS}{$value}{TIME} = $tn; - $hash->{READINGS}{$value}{VAL} = $state; - $hash->{CHANGED}[0]= "$value: $state"; - $hash->{STATE} = $state; +# my ($value, $state)=split(" ", $d); - if($state eq "on") { - $d = IOWrite($hash, "selected input"); - if(!defined($d)) { - my $msg = "LGTV $name read error"; - Log GetLogLevel($name,2), $msg; - return $msg; - } - $tn = TimeNow(); - ($value, $state)=split(" ", $d); - + if($value eq "power") { + if($hash->{READINGS}{$value}{VAL} ne $state) { $hash->{READINGS}{$value}{TIME} = $tn; $hash->{READINGS}{$value}{VAL} = $state; - $hash->{CHANGED}[1]= "$value: $state"; + $hash->{CHANGED}[$numchanged++]= "$value: $state"; + $hash->{STATE} = $hash->{READINGS}{$value}{VAL}; + } + $hash->{STATE} = $hash->{READINGS}{$value}{VAL}; + } + + if($state eq "on") { + $d = IOWrite($hash, "selected input"); + if(!defined($d)) { + my $msg = "LGTV $name read error"; + Log GetLogLevel($name,2), $msg; + return $msg; + } + + if($value eq "input") { # ... and not e. g. "error" ;) + if($hash->{READINGS}{$value}{VAL} ne $state) { + $tn = TimeNow(); + ($value, $state)=split(" ", $d); + + $hash->{READINGS}{$value}{TIME} = $tn; + $hash->{READINGS}{$value}{VAL} = $state; + $hash->{CHANGED}[$numchanged++]= "$value: $state"; + } $hash->{STATE} = $hash->{STATE} . ", " . $state; } } @@ -112,20 +135,23 @@ LGTV_GetStatus($) sub LGTV_Get($@) { - my ($hash, @a) = @_; + my ($hash, @a) = @_; + my $msg; - return "argument is missing" if(int(@a) != 2); + return "argument is missing" if(int(@a) != 2); - my $msg; - - if($a[1] ne "status") { - return "unknown get value, valid is status"; - } - $hash->{LOCAL} = 1; - my $v = LGTV_GetStatus($hash); - delete $hash->{LOCAL}; - - return "$a[0] $a[1] => $v"; + if($a[1] eq "power") { + $msg="get power state"; + } elsif($a[1] eq "input") { + $msg="get selected input"; + } elsif($a[1] eq "audio") { + $msg="get audio state"; + } else { + return "unknown get value, valid is power, input, audio"; + } + my @msgarray=split(" ", $msg); + my $v = LGTV_Set($hash, @msgarray); + return "$a[0] $v"; } @@ -140,16 +166,18 @@ LGTV_Set($@) my $i; my $known_cmd=0; my $what = ""; + my $name = $hash->{NAME}; $what=$a[1]; if($na>1) { for($i=2; $i<$na; $i++) { - $what=$what . " " . $a[$i]; + $what=$what . " " . lc($a[$i]); } } - for($i=0; $i<$ncmds; $i++ && $known_cmd==0) { - if($commandlist[$i] eq $what) { + for($i=0; $i<$ncmds; $i++) { + if(lc($commandlist[$i]) eq $what) { + $what=$commandlist[$i]; $known_cmd+=1; } } @@ -159,35 +187,57 @@ LGTV_Set($@) } $ret=IOWrite($hash, $what, ""); + if(!defined($ret)) { + my $msg = "LGTV $name read error"; + Log GetLogLevel($name,2), $msg; + } else { + my $tn = TimeNow(); + my ($value, $state)=split(" ", $ret); + # Logic of the following: if no error: + # if unset READINGS or difference: + # store READINGS + # if power-status: update STATE + # if input-status: update STATE + if($value ne "error") { + if(!defined($hash->{READINGS}{$value}{VAL}) || $state ne $hash->{READINGS}{$value}{VAL}) { + $hash->{READINGS}{$value}{TIME} = $tn; + $hash->{READINGS}{$value}{VAL} = $state; + $hash->{CHANGED}[0]= "$value: $state"; + } + if($value eq "power") { + $hash->{STATE}=$state; + } + if($value eq "input") { # implies power being on, usually ... + $hash->{STATE}=$hash->{READINGS}{"power"}{VAL} . ", " . $state; + } + } + } + + DoTrigger($name, undef); return $ret; } + ############################# sub LGTV_Define($$) { my ($hash, $def) = @_; my @a = split("[ \t][ \t]*", $def); - -# return "syntax: define LGTV an0..an5 [unit [factor]]" -# if(int(@a) < 3 && int(@a) > 5); -# -# my $reading= $a[2]; -# return "$reading is not an analog input, valid: an0..an5" -# if($reading !~ /^an[0-5]$/) ; -# -# my $unit= ((int(@a) > 3) ? $a[3] : "volts"); -# my $factor= ((int(@a) > 4) ? $a[4] : 1.0); -# -# $hash->{INPUT}= substr($reading,2); -# $hash->{UNIT}= $unit; -# $hash->{FACTOR}= $factor; + my $name = $hash->{NAME}; AssignIoPort($hash); - if(!$hash->{LOCAL}) { - InternalTimer(gettimeofday()+60, "LGTV_GetStatus", $hash, 0); + $attr{$name}{TIMER}=30; + + InternalTimer(gettimeofday()+$attr{$name}{TIMER}, "LGTV_GetStatus", $hash, 0); + + # Preset if undefined + if(!defined($hash->{READINGS}{"power"}{VAL})) { + my $tn = TimeNow(); + $hash->{READINGS}{"power"}{VAL}="unknown"; + $hash->{READINGS}{"power"}{TIME}=$tn; } return undef; } diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html index e79b5fa4c..d400e2f05 100644 --- a/fhem/docs/commandref.html +++ b/fhem/docs/commandref.html @@ -19,29 +19,29 @@ fhem commands @@ -50,62 +50,62 @@
Helper modules @@ -309,12 +309,6 @@ A line ending with \ will be concatenated with the next one, so long lines Filter/group devices. Recognized by web-pgm2 and web-pgm3. Devices in the room hidden will not appear in the web output. - -
  • alias
    - Second name (alias), whished for by Martin. Cannot be used - directly in fhem, as "set on" wont be recognized, only - "set alias= on"
  • -
  • showtime
    Used in the webfrontend pgm2 to show the time of last activity @@ -453,13 +447,15 @@ A line ending with \ will be concatenated with the next one, so long lines

    Output a short space seperated status for <devspec>. It is useful for monitoring the device in e.g. Cacti.
    - Examples:
    -  getstate lamp
    +  Examples:
    +  
      +
        getstate lamp
         state:1
       
         getstate fl
      -  ack:0 actuator:2 day-temp:21.5 desired-temp:22.5 [...]
      -  
      + ack:0 actuator:2 day-temp:21.5 desired-temp:22.5 [...] measured-temp:22.9 [...] +
    + Note: to use this command copy the file contrib/getstate/99_getstate.pm into your FHEM directory.
    @@ -762,12 +758,11 @@ A line ending with \ will be concatenated with the next one, so long lines Example:
      fhem> xmllist
       <FHZINFO>
    -    <internal_LIST>
    -      <internal name="global" state="internal"
    -                sets="" attrs="room configfile logfile ...">
    -        <INT key="DEF" value="<no definition>"/>
    -        <INT key="NR" value="0"/>
    -        <INT key="STATE" value="internal"/>
    +          <internal_LIST>
    +                  <internal name="global" state="internal" sets="" attrs="room configfile logfile modpath pidfilename port statefile userattr verbose version">
    +                          <INT key="DEF" value="<no definition>"/>
    +                          <INT key="NR" value="0"/>
    +                          <INT key="STATE" value="internal"/>
           [...]
     
       
    @@ -1341,15 +1336,8 @@ A line ending with \ will be concatenated with the next one, so long lines
    • warnings can contain following strings: none, Battery low,Temperature too low, Window open, - Fault on window sensor.
      - In addition, the current warnings are reported separately: -
        -
      • battery: ok / low
      • -
      • lowtemp: ok / low
      • -
      • window: open / closed
      • -
      • windowsensor: ok / fault
      • -
      -
    • + Fault on window sensor +
    • actuator (without a suffix) stands for all actuators.
    • actuator or actuator1..8 can take following values:
        @@ -1369,9 +1357,9 @@ A line ending with \ will be concatenated with the next one, so long lines
      • pair
        The the FHT80b sent a "you-belong-to-me" to this actuator.
      + Note:
    -
  • -
    +
  • The FHT is very economical (or lazy), it accepts one message from the FHZ1x00 every 115+x seconds, where x depends on the housecode. Don't @@ -2941,18 +2929,31 @@ A line ending with \ will be concatenated with the next one, so long lines define <name> xxLG7000 <serial-device>

    - Defines a serial link to a TV set of LG's xxLG70yy series; these LCD TVs - (as well as their Plasma cousins, xxPG70yy) feature a serial connector which - can officially be used to control the TV set (see your Onwer's Manual, there's - an Appendix labelled "External Control Device setup"). And, well, xxLG7000 is - the FHEM module to actually do this. (BTW, they run Linux internally ;))

    + Defines a serial link to a TV set of LG's xxLG70yy (e. g. 47LG7000) series + and similar TV sets from LG. As of January 2010, the following TV sets should + be compatible:

    +
      +
    • xxLG7000, e. g. 47LG7000 (tested)
    • +
    • xxPG7000, e. g. 50PG7000 (same Manual as 47LG7000 ;))
    • +
    • PS3000/6000/7000/8000 series (according to LG brochure; no liabilities assumed)
    • +
    • PQ3000/6000 series (see PS3000)
    • +
    • LU4000/5000 series (not LU7000; see PS3000)
    • +
    • LH2000/3000/4000/5000 series (see PS3000)
    • +
    • SL9500/9000/8000 series (see PS3000)
    • +

    + These TV sets feature a serial connector which can officially be used to control + the TV set (see your Onwer's Manual, there's an Appendix labelled "External Control + Device setup", referening to cabling and command set). The xxLG7000 module is + the FHEM module to actually utilize this. (BTW, those TVs run Linux internally ;))

    + To exercise control over your TV set, use the LGTV module and + bind it ("attr <LGTV-name> IODev <xxLG7000-name>") to xxLG7000.

    Examples:
      define myLG7k xxLG7000 /dev/ttyUSB1

    - + Set @@ -2965,7 +2966,7 @@ A line ending with \ will be concatenated with the next one, so long lines Attributes
    • loglevel
    • -
    • SetID (1, 2, ...; see Owner's Manual. Currently, only SetID 1 is addressed, regardless of this setting. Anyone who onws more than one of these?)
    • +
    • SetID (1, 2, ...; see your TV's Owner's Manual how to set it. Defaults to 1 if unset.)

    @@ -2989,6 +2990,13 @@ A line ending with \ will be concatenated with the next one, so long lines Defining a LGTV device will schedule an internal task, which periodically reads the status of the TV set (power state; if power is on, query the selected input) and triggers notify/filelog commands.

    + + Example: +
      + define 47LG7000 LGTV
      + attr 47LG7000 IODev myLG7k +
    +
    @@ -3000,8 +3008,7 @@ A line ending with \ will be concatenated with the next one, so long lines given TV set. An error messages should be recorded if e. g. the input in question is not usable. -
    power state
    -power on
    +
    power on
     power off
     input AV1
     input AV2
    @@ -3016,16 +3023,20 @@ input HDMI4
     input DVBT
     input PAL
     audio mute
    -audio normal
    -selected input
    +audio normal
    + Get
      - - Not yet implemented; use "set name power state" or "set name selected input" for now. + get <name> <what>

      + Currently, the following commands are defined; not all may be available on a + given TV set. An error messages should be recorded if e. g. the input in question + is not usable. +
      power
      +input
      +audio
    Attributes @@ -3888,14 +3899,7 @@ Terminating Attributes
      - -
    • fixedrange
      - Can be applied to weblink devices.
      - Contains two time specs in the form YYYY-MM-DD separated by a space. - In plotmode gnuplot-scroll or SVG the given time-range will be used, - and no scrolling for this weblinks will be possible. Needed e.g. for - looking at last-years data without scrolling. -

    +
  • fixedrange
  • plotsize
  • plotmode
  • @@ -3969,19 +3973,6 @@ Terminating i.e the default http address is http://localhost:8083/fhem
    -
    -
  • fwmodpath
    - Path to the style, png, gplot and html files. Defaults to modpath/FHEM . Used to configure different fhem - servers, e.g. one with small gnuplots for android phones and one with - SVG for the desktop browser.

  • - - -
  • fwcompress
    - Compress the output with the gzip method if the browser supports it. - Defaults to 1. Set it to 0 if you have a slow CPU with a fast - connection.

  • -
  • refresh
    If set, a http-equiv="refresh" entry will be genererated with the given @@ -4022,6 +4013,14 @@ Terminating the weblink.

  • + +
  • fixedrange
    + Can be applied to weblink devices (FHEMWEB).
    + Contains two time specs in the form YYYY-MM-DD separated by a space. + In plotmode gnuplot-scroll or SVG the given time-range will be used, + and no scrolling for this weblinks will be possible. Needed e.g. for + looking at last-years data without scrolling. +

  • @@ -4053,39 +4052,41 @@ Terminating
    - Examples:
    -# absolute ones:
    -define a1 at 17:00:00 set lamp on                          # fhem command
    -define a2 at 17:00:00 { Log 1, "Teatime" }                 # Perl command
    -define a3 at 17:00:00 "/bin/echo "Teatime" > /dev/console" # shell command
    -define a4 at *17:00:00 set lamp on                         # every day
    +    Examples:
    +    
    +    # absolute ones:
    +    define a1 at 17:00:00 set lamp on                            # fhem command
    +    define a2 at 17:00:00 { Log 1, "Teatime" }                   # Perl command
    +    define a3 at 17:00:00 "/bin/echo "Teatime" > /dev/console"   # shell command
    +    define a4 at *17:00:00 set lamp on                           # every day
     
    -# relative ones
    -define a5 at +00:00:10 set lamp on                 # lamp on in 10 sec
    -define a6 at +00:00:02 set lamp on-for-timer 1     # Blink once in 2 sec
    -define a7 at +*{3}00:00:02 set lamp on-for-timer 1 # Blink 3 times
    +    # relative ones
    +    define a5 at +00:00:10 set lamp on                  # switch the lamp on in 10 seconds
    +    define a6 at +00:00:02 set lamp on-for-timer 1      # Blink once in 2 seconds
    +    define a7 at +*{3}00:00:02 set lamp on-for-timer 1  # Blink 3 times
     
    -# Blink 3 times if the piri sends a command
    -define n1 notify piri:on.* define a8 at +*{3}00:00:02 set lamp on-for-timer 1
    +    # Blink 3 times if the piri sends a command
    +    define n1 notify piri:on.* define a8 at +*{3}00:00:02 set lamp on-for-timer 1
     
    -# Switch the lamp on from sunset to 11 PM
    -define a9 at +*{sunset_rel()} set lamp on
    -define a10 at *23:00:00 set lamp off
    +    # Switch the lamp on from sunset to 11 PM
    +    define a9 at +*{sunset_rel()} set lamp on
    +    define a10 at *23:00:00 set lamp off
     
    -# More elegant version, works for sunset > 23:00 too
    -define a11 at +*{sunset_rel()} set lamp on-till 23:00
    +    # More elegant version, works for sunset > 23:00 too
    +    define a11 at +*{sunset_rel()} set lamp on-till 23:00
     
    -# Only do this on weekend
    -define a12 at +*{sunset_rel()} { fhem("set lamp on-till 23:00") if($we) }
    +    # Only do this on weekend
    +    define a12 at +*{sunset_rel()} { fhem("set lamp on-till 23:00") if($we) }
     
    -# Switch lamp1 and lamp2 on from 7:00 till 10 minutes after sunrise
    -define a13 at *07:00 set lamp1,lamp2 on-till {sunrise(+600)}
    +    # Switch lamp1 and lamp2 on from 7:00 till 10 minutes after sunrise
    +    define a13 at *07:00 set lamp1,lamp2 on-till {sunrise(+600)}
     
    -# Switch the lamp off 2 minutes after sunrise each day
    -define a14 at +{sunrise(+120)} set lamp on
    +    # Switch the lamp off 2 minutes after sunrise each day
    +    define a14 at +{sunrise(+120)} set lamp on
    +
    +    # Switch lamp1 on at sunset, not before 18:00 and not after 21:00
    +    define a15 at *{sunset(0,"18:00","21:00")} set lamp1 on
     
    -# Switch lamp1 on at sunset, not before 18:00 and not after 21:00
    -define a15 at *{sunset(0,"18:00","21:00")} set lamp1 on
         
    Notes: