mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-29 17:37:09 +00:00
10_OWServer: get /uncached/alarm, update docs
git-svn-id: https://svn.fhem.de/fhem/trunk@15589 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2d3d1b38a1
commit
bdeb59f3d0
@ -75,6 +75,7 @@ use vars qw(%gets %sets);
|
||||
"/settings/timeout/w1" => "",
|
||||
"/settings/units/pressure_scale" => "",
|
||||
"/settings/units/temperature_scale" => "",
|
||||
"/uncached/alarm" => "",
|
||||
);
|
||||
|
||||
%sets = (
|
||||
@ -486,6 +487,21 @@ OWServer_Get($@)
|
||||
$ret .= sprintf("%-*s %d\n",$wide,$str,($stat) ? $stat : 0);
|
||||
}
|
||||
return $ret;
|
||||
} elsif($cmd eq "/uncached/alarm") {
|
||||
# Oliver Vallant, 2017-04-17
|
||||
my $path= $cmd;
|
||||
my @devices= split(",", $owserver->dir($path));
|
||||
my $ret;
|
||||
for my $device (@devices) {
|
||||
my $name= "";
|
||||
my $address= substr($device, rindex($device, "/")+1);
|
||||
my $type= $owserver->read($device . "/type");
|
||||
foreach my $p (keys %defs) {
|
||||
$name= concatc(", ", $name, $p) if($defs{$p}{TYPE} eq "OWDevice" and $defs{$p}{fhem}{address} eq $address);
|
||||
}
|
||||
$ret .= sprintf("%s %10s %s\n", $address, $type, $name);
|
||||
}
|
||||
return $ret;
|
||||
} elsif(defined($gets{$cmd})) {
|
||||
my $ret;
|
||||
my $value= $owserver->read($cmd);
|
||||
@ -560,6 +576,8 @@ OWServer_Set($@)
|
||||
<a href="http://forum.fhem.de/index.php?action=dlattach;topic=12219.0;attach=2463">owfs_2.8p17-1_all.zip</a> and install
|
||||
owserver, dependencies and what else you require with <code>dpkg -i <package>.deb</code> or use the latest OWNet.pm from Sourceforge.
|
||||
<p>
|
||||
The ow* version 3.1 packages provided with Debian Stretch are fine.
|
||||
<p>
|
||||
A typical working configuration file <code>/etc/owfs.conf</code> looks as follows:<p>
|
||||
<code>
|
||||
# server uses device /dev/onewire<br>
|
||||
@ -654,6 +672,7 @@ OWServer_Set($@)
|
||||
<li><code>/settings/timeout/w1</code></li>
|
||||
<li><code>/settings/units/pressure_scale</code></li>
|
||||
<li><code>/settings/units/temperature_scale</code></li>
|
||||
<li><code>/uncached/alarm</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
For further informations have look on <a href="http://owfs.org/uploads/owserver.1.html#sect41">owserver manual</a>).
|
||||
@ -705,6 +724,8 @@ OWServer_Set($@)
|
||||
<a href="http://forum.fhem.de/index.php?action=dlattach;topic=12219.0;attach=2463">owfs_2.8p17-1_all.zip</a> und installiere
|
||||
owserver, Abhängigkeiten und was Du sonst noch brauchst mit <code>dpkg -i <package>.deb</code>, oder benutze die neueste Version von OWNet.pm von Sourceforge.
|
||||
<p>
|
||||
Die ow*-Pakete in der Version 3.1 von Debian Stretch sind in Ordnung.
|
||||
<p>
|
||||
Eine typische funktionierende Konfigurationsdatei <code>/etc/owfs.conf</code> sieht so aus:<p>
|
||||
<code>
|
||||
# server uses device /dev/onewire<br>
|
||||
@ -798,6 +819,7 @@ OWServer_Set($@)
|
||||
<li><code>/settings/timeout/w1</code></li>
|
||||
<li><code>/settings/units/pressure_scale</code></li>
|
||||
<li><code>/settings/units/temperature_scale</code></li>
|
||||
<li><code>/uncached/alarm</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
Nähere Informationen zu diesen Einstellungen gibt es im <a href="http://owfs.org/uploads/owserver.1.html#sect41">owserver- Manual</a>.
|
||||
|
Loading…
x
Reference in New Issue
Block a user