mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
RFR fixes
example path fixes Prompt changed git-svn-id: https://svn.fhem.de/fhem/trunk@493 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c1d4e406ae
commit
7bc76f6f46
@ -548,3 +548,5 @@
|
||||
|
||||
- ==DATE== (4.9)
|
||||
- bugfix: changed the fhem prompt from FHZ> to fhem>
|
||||
- bugfix: CUL_RFR fixes (chaining RFR's should work)
|
||||
- bugfix: Path in the examples fixed (got corrupted)
|
||||
|
@ -488,7 +488,10 @@ CUL_ReadAnswer($$$)
|
||||
my ($hash, $arg, $anydata) = @_;
|
||||
my $type = $hash->{TYPE};
|
||||
|
||||
$hash = $hash->{IODev} if($type eq "CUL_RFR");
|
||||
while($hash->{TYPE} eq "CUL_RFR") { # Look for the first "real" CUL
|
||||
$hash = $hash->{IODev};
|
||||
}
|
||||
|
||||
|
||||
return ("No FD", undef)
|
||||
if(!$hash || ($^O !~ /Win/ && !defined($hash->{FD})));
|
||||
@ -816,8 +819,8 @@ CUL_SimpleWrite(@)
|
||||
return if(!$hash);
|
||||
|
||||
if($hash->{TYPE} eq "CUL_RFR") {
|
||||
$msg = CUL_RFR_AddPrefix($hash, $msg);
|
||||
$hash = $hash->{IODev};
|
||||
# Prefix $msg with RRBBU and return the corresponding CUL hash.
|
||||
($hash, $msg) = CUL_RFR_AddPrefix($hash, $msg);
|
||||
}
|
||||
$msg .= "\n" unless($nonl);
|
||||
|
||||
|
@ -102,7 +102,10 @@ CUL_RFR_Parse($$)
|
||||
sub
|
||||
CUL_RFR_DelPrefix($)
|
||||
{
|
||||
my ($prefix, $msg) = split("U", shift, 2);
|
||||
my ($msg) = @_;
|
||||
while($msg =~ m/^\d{4}U/) {
|
||||
(undef, $msg) = split("U", $msg, 2);
|
||||
}
|
||||
return $msg;
|
||||
}
|
||||
|
||||
@ -110,7 +113,12 @@ sub
|
||||
CUL_RFR_AddPrefix($$)
|
||||
{
|
||||
my ($hash, $msg) = @_;
|
||||
return "u" . $hash->{ID} . $hash->{ROUTERID} . $msg;
|
||||
while($hash->{TYPE} eq "CUL_RFR") {
|
||||
# Prefix $msg with RRBBU and return the corresponding CUL hash
|
||||
$msg = "u" . $hash->{ID} . $hash->{ROUTERID} . $msg;
|
||||
$hash = $hash->{IODev};
|
||||
}
|
||||
return ($hash, $msg);
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -2,8 +2,8 @@ BINDIR=/usr/local/bin
|
||||
MODDIR=/usr/local/lib
|
||||
VARDIR=/var/log/fhem
|
||||
|
||||
VERS=4.7
|
||||
DATE=2009-10-23
|
||||
VERS=4.8
|
||||
DATE=2009-11-28
|
||||
|
||||
all:
|
||||
@echo Nothing to do for all.
|
||||
|
@ -31,7 +31,7 @@ Usage:
|
||||
displayed, e.g.:
|
||||
|
||||
Example:
|
||||
FHZ> jsonlist
|
||||
fhem> jsonlist
|
||||
{
|
||||
"ResultSet": {
|
||||
"Results": [
|
||||
@ -49,7 +49,7 @@ Usage:
|
||||
}
|
||||
|
||||
Example for <devspec>:
|
||||
FHZ> jsonlist lamp1
|
||||
fhem> jsonlist lamp1
|
||||
{
|
||||
"ResultSet": {
|
||||
"Results": {
|
||||
@ -75,7 +75,7 @@ Usage:
|
||||
}
|
||||
|
||||
Example for <typespec>:
|
||||
FHZ> jsonlist HMS
|
||||
fhem> jsonlist HMS
|
||||
{
|
||||
"ResultSet": {
|
||||
"Results": [
|
||||
@ -89,7 +89,7 @@ Usage:
|
||||
}
|
||||
|
||||
Example for ROOMS:
|
||||
FHZ> jsonlist ROOMS
|
||||
fhem> jsonlist ROOMS
|
||||
{
|
||||
"ResultSet": {
|
||||
"Results": [
|
||||
|
@ -21,7 +21,7 @@
|
||||
+ entries if no parameter is given.
|
||||
+ <br><br>
|
||||
+ Example:
|
||||
+ <pre><code> FHZ> jsonlist
|
||||
+ <pre><code> fhem> jsonlist
|
||||
+ {
|
||||
+ "ResultSet": {
|
||||
+ "Results": [
|
||||
@ -40,7 +40,7 @@
|
||||
+ </code></pre>
|
||||
+ If specifying <code><devspec></code>, then a detailed status for
|
||||
+ <code><devspec></code> will be displayed, e.g.:
|
||||
+ <pre><code> FHZ> jsonlist lamp1
|
||||
+ <pre><code> fhem> jsonlist lamp1
|
||||
+ {
|
||||
+ "ResultSet": {
|
||||
+ "Results": {
|
||||
@ -67,7 +67,7 @@
|
||||
+ </code></pre>
|
||||
+ If specifying <code><typespec></code>, then a list with the status for
|
||||
+ the defined <code><typespec></code> devices will be displayed, e.g.:
|
||||
+ <pre><code> FHZ> jsonlist HMS
|
||||
+ <pre><code> fhem> jsonlist HMS
|
||||
+ {
|
||||
+ "ResultSet": {
|
||||
+ "Results": [
|
||||
@ -82,7 +82,7 @@
|
||||
+ </code></pre>
|
||||
+ If specifying <code>ROOMS</code>, then a list with the defined rooms
|
||||
+ will be displayed, e.g.:
|
||||
+ <pre><code> FHZ> jsonlist ROOMS
|
||||
+ <pre><code> fhem> jsonlist ROOMS
|
||||
+ {
|
||||
+ "ResultSet": {
|
||||
+ "Results": [
|
||||
|
@ -19,19 +19,19 @@ EXAMPLES
|
||||
Output a short string of the "READINGS" for <devspec>.
|
||||
|
||||
Example for a FS20-Device:
|
||||
FHZ> getstate EG.sz.SD.Tv
|
||||
fhem> getstate EG.sz.SD.Tv
|
||||
state:0
|
||||
|
||||
Example for a FHT-Device:
|
||||
FHZ> getstate EG.wz.HZ
|
||||
fhem> getstate EG.wz.HZ
|
||||
actuator:0 day-temp:21.5 desired-temp:21.5 lowtemp-offset:4.0 [...]
|
||||
|
||||
Example for a KS300/555-Device:
|
||||
FHZ> getstate GH.ga.WE.01
|
||||
fhem> getstate GH.ga.WE.01
|
||||
humidity:93 israining:0 rain:207.8 rain_raw:815 temperature:5.1 [...]
|
||||
|
||||
Example for a HMS-Device:
|
||||
FHZ> getstate NN.xx.RM.01
|
||||
fhem> getstate NN.xx.RM.01
|
||||
smoke_detect:0
|
||||
|
||||
CONTRIB
|
||||
|
@ -491,7 +491,7 @@ A line ending with \ will be concatenated with the next one, so long lines
|
||||
reading (actuator, measured-temp) for all devices from the devspec.
|
||||
<br><br>
|
||||
Example:
|
||||
<pre><code> FHZ> list
|
||||
<pre><code> fhem> list
|
||||
|
||||
Type list <name> for detailed info.
|
||||
|
||||
@ -524,7 +524,7 @@ A line ending with \ will be concatenated with the next one, so long lines
|
||||
</code></pre>
|
||||
If specifying <code>name</code>, then a detailed status for <code>name</code>
|
||||
will be displayed, e.g.:
|
||||
<pre><code> FHZ> list fl
|
||||
<pre><code> fhem> list fl
|
||||
|
||||
Internals:
|
||||
CODE 5102
|
||||
@ -728,7 +728,7 @@ A line ending with \ will be concatenated with the next one, so long lines
|
||||
entries. It is not intended for human consumption.
|
||||
<br><br>
|
||||
Example:
|
||||
<pre> FHZ> xmllist
|
||||
<pre> fhem> xmllist
|
||||
<FHZINFO>
|
||||
<internal_LIST>
|
||||
<internal name="global" state="internal" sets="" attrs="room configfile logfile modpath pidfilename port statefile userattr verbose version">
|
||||
|
@ -272,21 +272,21 @@ by fhem.pl?</b>
|
||||
|
||||
<pre>
|
||||
# Check simply the value. It is the same as seen in "list"
|
||||
FHZ> {$value{myfht}}
|
||||
fhem> {$value{myfht}}
|
||||
measured-temp: 23.8 (Celsius)
|
||||
|
||||
# Get the second word, so we can compare it.
|
||||
FHZ> { my @a = split(" ", $value{myfht});; $a[1] }
|
||||
fhem> { my @a = split(" ", $value{myfht});; $a[1] }
|
||||
23.8
|
||||
|
||||
# Set the ventilator on now, if its too hot.
|
||||
FHZ> { my @a = split(" ", $value{myfht});; fhem("set ventilator on") if($a[1] > 25.0) }
|
||||
fhem> { my @a = split(" ", $value{myfht});; fhem("set ventilator on") if($a[1] > 25.0) }
|
||||
|
||||
# Now do this regularly
|
||||
FHZ> define chilldown at +*00:30:00 { my @a = split(" ", $value{myfht});; fhem("set ventilator on") if($a[1] > 25.0) }
|
||||
fhem> define chilldown at +*00:30:00 { my @a = split(" ", $value{myfht});; fhem("set ventilator on") if($a[1] > 25.0) }
|
||||
|
||||
# An alternative:
|
||||
FHZ> define chilldown at +*00:30:00 { fhem("set ventilator on") if($value{myfht} gt "measured-temp: 25.0") }
|
||||
fhem> define chilldown at +*00:30:00 { fhem("set ventilator on") if($value{myfht} gt "measured-temp: 25.0") }
|
||||
</pre>
|
||||
|
||||
</ul>
|
||||
|
@ -7,8 +7,8 @@
|
||||
#
|
||||
|
||||
# Common part
|
||||
attr global logfile .-%Y-%m.log
|
||||
attr global statefile ..save # where to save the state of the devices
|
||||
attr global logfile /tmp/fhem-%Y-%m.log
|
||||
attr global statefile /tmp/fhem.save # where to save the state of the devices
|
||||
attr global verbose 3 # "normal" verbosity (min 1, max 5)
|
||||
attr global port 7072 # our TCP/IP port (localhost only)
|
||||
attr global modpath . # where our FHEM directory is
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
|
||||
# Common part
|
||||
attr global logfile .-%Y-%m.log
|
||||
attr global statefile ..save # where to save the state of the devices
|
||||
attr global logfile /tmp/fhem-%Y-%m.log
|
||||
attr global statefile /tmp/fhem.save # where to save the state of the devices
|
||||
attr global verbose 3 # "normal" verbosity
|
||||
attr global port 7072 # our TCP/IP port (localhost only)
|
||||
attr global modpath . # where our FHEM directory is
|
||||
|
@ -8,8 +8,8 @@
|
||||
# After about 5-10 minutes, check if "list wz" returns something meaningful
|
||||
#
|
||||
|
||||
attr global logfile .-%Y-%m.log
|
||||
attr global statefile ..save # where to save the state of the devices
|
||||
attr global logfile /tmp/fhem-%Y-%m.log
|
||||
attr global statefile /tmp/fhem.save # where to save the state of the devices
|
||||
attr global verbose 3 # "normal" verbosity
|
||||
attr global port 7072 # our TCP/IP port (localhost only)
|
||||
attr global modpath . # where our FHEM directory is
|
||||
|
@ -4,8 +4,8 @@
|
||||
# contrib/91_DbLog.pm
|
||||
#
|
||||
|
||||
attr global logfile .-%Y-%m.log
|
||||
attr global statefile ..save # where to save the state of the devices
|
||||
attr global logfile /tmp/fhem-%Y-%m.log
|
||||
attr global statefile /tmp/fhem.save # where to save the state of the devices
|
||||
attr global verbose 3 # "normal" verbosity
|
||||
attr global port 7072 # our TCP/IP port (localhost only)
|
||||
attr global modpath . # where our FHEM directory is
|
||||
|
@ -8,8 +8,8 @@
|
||||
# if there is no definition for it. Check the commandref.html define, Type HMS
|
||||
# section for details
|
||||
|
||||
attr global logfile .-%Y-%m.log
|
||||
attr global statefile ..save # where to save the state of the devices
|
||||
attr global logfile /tmp/fhem-%Y-%m.log
|
||||
attr global statefile /tmp/fhem.save # where to save the state of the devices
|
||||
attr global verbose 3 # "normal" verbosity (min 1, max 5)
|
||||
attr global port 7072 # our TCP/IP port (localhost only)
|
||||
attr global modpath . # where our FHEM directory is
|
||||
|
@ -65,8 +65,8 @@
|
||||
# Globale Einstellungen
|
||||
# global settings
|
||||
|
||||
attr global logfile /var/log/fhem/fhem.log
|
||||
attr global statefile /var/cache/fhem/fhem.save
|
||||
attr global logfile /tmp/fhem.log
|
||||
attr global statefile /tmp/fhem.save
|
||||
attr global pidfilename /var/run/fhem.pid
|
||||
attr global verbose 3
|
||||
attr global port 7072
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Minimalistic fhem.pl configfile. Take a look at the other examples for more.
|
||||
#
|
||||
attr global logfile .-%Y-%m.log
|
||||
attr global statefile ..save # where to save the state of the devices
|
||||
attr global logfile /tmp/fhem-%Y-%m.log
|
||||
attr global statefile /tmp/fhem.save # where to save the state of the devices
|
||||
attr global verbose 3 # "normal" verbosity (min 1, max 5)
|
||||
attr global port 7072 # our TCP/IP port (localhost only)
|
||||
attr global modpath . # where our FHEM directory is
|
||||
|
@ -2,8 +2,8 @@
|
||||
# Minimalistic fhem.pl & pgm2 configfile. Take a look at the other examples for
|
||||
# more.
|
||||
#
|
||||
attr global logfile .-%Y-%m.log
|
||||
attr global statefile ..save # where to save the state of the devices
|
||||
attr global logfile /tmp/fhem-%Y-%m.log
|
||||
attr global statefile /tmp/fhem.save # where to save the state of the devices
|
||||
attr global verbose 3 # "normal" verbosity (min 1, max 5)
|
||||
attr global port 7072 # our TCP/IP port (localhost only)
|
||||
attr global modpath . # where our FHEM directory is
|
||||
@ -12,4 +12,4 @@ define WEB FHEMWEB 8083 global
|
||||
attr WEB plotmode SVG
|
||||
|
||||
# Fake logfile, to access the global log
|
||||
define Logfile FileLog .-%Y-%m.log fakelog
|
||||
define Logfile FileLog /tmp/fhem-%Y-%m.log fakelog
|
||||
|
Loading…
Reference in New Issue
Block a user