mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-26 17:04:59 +00:00
full german documentation, minor docu fixes
git-svn-id: https://svn.fhem.de/fhem/trunk@2642 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6ad75d8075
commit
c031dfcab8
@ -64,12 +64,12 @@ PRESENCE_Define($$)
|
|||||||
|
|
||||||
if($a[2] ne "lan-bluetooth" and not (@a == 4 or @a == 5))
|
if($a[2] ne "lan-bluetooth" and not (@a == 4 or @a == 5))
|
||||||
{
|
{
|
||||||
my $msg = "wrong syntax: define <name> PRESENCE <mode> <device-address> [ <timeout> ]";
|
my $msg = "wrong syntax: define <name> PRESENCE <mode> <device-address> [ <check-interval> ]";
|
||||||
Log 2, $msg;
|
Log 2, $msg;
|
||||||
return $msg;
|
return $msg;
|
||||||
}
|
}
|
||||||
elsif($a[2] eq "lan-bluetooth" and not (@a == 5 or @a == 6)) {
|
elsif($a[2] eq "lan-bluetooth" and not (@a == 5 or @a == 6)) {
|
||||||
my $msg = "wrong syntax: define <name> PRESENCE lan-bluetooth <bluetooth-device-address> <ip-address>[:port] [ <timeout> ]";
|
my $msg = "wrong syntax: define <name> PRESENCE lan-bluetooth <bluetooth-device-address> <ip-address>[:port] [ <check-interval> ]";
|
||||||
Log 2, $msg;
|
Log 2, $msg;
|
||||||
return $msg;
|
return $msg;
|
||||||
}
|
}
|
||||||
@ -533,17 +533,17 @@ PRESENCE_ProcessLocalScan($)
|
|||||||
<a name="PRESENCEdefine"></a>
|
<a name="PRESENCEdefine"></a>
|
||||||
<b>Define</b><br><br>
|
<b>Define</b><br><br>
|
||||||
<ul><b>Mode: lan-ping</b><br><br>
|
<ul><b>Mode: lan-ping</b><br><br>
|
||||||
<code>define <name> PRESENCE lan-ping <ip-address> [ <timeout> ]</code><br>
|
<code>define <name> PRESENCE lan-ping <ip-address> [ <check-interval> ]</code><br>
|
||||||
<br>
|
<br>
|
||||||
Checks for a network device via PING requests and reports its presence state.<br>
|
Checks for a network device via PING requests and reports its presence state.<br>
|
||||||
<br>
|
<br>
|
||||||
<b>Mode: fritzbox</b><br><br>
|
<b>Mode: fritzbox</b><br><br>
|
||||||
<code>define <name> PRESENCE fritzbox <device-name> [ <timeout> ]</code><br>
|
<code>define <name> PRESENCE fritzbox <device-name> [ <check-interval> ]</code><br>
|
||||||
<br>
|
<br>
|
||||||
Checks for a network device by requesting the internal state on a FritzBox via ctlmgr_ctl. The device-name must be the same as shown in the network overview of the FritzBox<br>
|
Checks for a network device by requesting the internal state on a FritzBox via ctlmgr_ctl. The device-name must be the same as shown in the network overview of the FritzBox<br>
|
||||||
<br>
|
<br>
|
||||||
<b>Mode: local-bluetooth</b><br><br>
|
<b>Mode: local-bluetooth</b><br><br>
|
||||||
<code>define <name> PRESENCE local-bluetooth <bluetooth-address> [ <timeout> ]</code><br>
|
<code>define <name> PRESENCE local-bluetooth <bluetooth-address> [ <check-interval> ]</code><br>
|
||||||
<br>
|
<br>
|
||||||
Checks for a bluetooth device and reports its presence state. For this mode the shell command "hcitool" is required (provided with a <a href="http://www.bluez.org" target="_new">bluez</a> installation under Debian via APT), as well
|
Checks for a bluetooth device and reports its presence state. For this mode the shell command "hcitool" is required (provided with a <a href="http://www.bluez.org" target="_new">bluez</a> installation under Debian via APT), as well
|
||||||
as a functional bluetooth device directly attached to your machine.<br><br>
|
as a functional bluetooth device directly attached to your machine.<br><br>
|
||||||
@ -551,7 +551,7 @@ PRESENCE_ProcessLocalScan($)
|
|||||||
Checks for a bluetooth device with the help of presenced or collectord. They can be installed where-ever you like, just must be accessible via network.
|
Checks for a bluetooth device with the help of presenced or collectord. They can be installed where-ever you like, just must be accessible via network.
|
||||||
The given device will be checked for presence status.<br>
|
The given device will be checked for presence status.<br>
|
||||||
<br>
|
<br>
|
||||||
<code>define <name> PRESENCE <ip-address>[:port] <bluetooth-address> [ <timeout> ]</code><br>
|
<code>define <name> PRESENCE <ip-address>[:port] <bluetooth-address> [ <check-interval> ]</code><br>
|
||||||
<br>
|
<br>
|
||||||
The default port is 5111 (presenced). Alternatly you can use port 5222 (collectord)<br>
|
The default port is 5111 (presenced). Alternatly you can use port 5222 (collectord)<br>
|
||||||
<br>
|
<br>
|
||||||
@ -697,4 +697,190 @@ Options:
|
|||||||
|
|
||||||
=end html
|
=end html
|
||||||
|
|
||||||
|
=begin html_DE
|
||||||
|
|
||||||
|
<a name="PRESENCE"></a>
|
||||||
|
<h3>PRESENCE</h3>
|
||||||
|
<ul>
|
||||||
|
<tr><td>
|
||||||
|
Das PRESENCE Module bietet mehrere Möglichkteiten um die Anwesenheit von Handys/Smartphones oder anderen mobilen Geräten (z.B. Tablets) zu erkennen.
|
||||||
|
<br><br>
|
||||||
|
Dieses Modul bietet dazu mehrere Modis an um Anwesenheit zu erkennen. Diese sind:<br><br>
|
||||||
|
<ul>
|
||||||
|
<li><b>lan-ping</b> - Eine Erkennung auf Basis von Ping-Tests im lokalen LAN/WLAN</li>
|
||||||
|
<li><b>fritzbox</b> - Eine Erkennung aufgrund der internen Abfrage des Status auf der FritzBox (nur möglich, wenn FHEM auf einer FritzBox läuft)</li>
|
||||||
|
<li><b>local-bluetooth</b> - Eine Erkennung auf Basis von Bluetooth-Abfragen durch den FHEM Server. Das Gerät muss dabei in Empfangsreichweite sein, aber nicht sichtbar sein</li>
|
||||||
|
<li><b>lan-bluetooth</b> - Eine Erkennung durch Bluetooth-Abfragen via Netzwerk (LAN/WLAN) in ein oder mehreren Räumen</li>
|
||||||
|
</ul>
|
||||||
|
<br><br>
|
||||||
|
<a name="PRESENCEdefine"></a>
|
||||||
|
<b>Define</b><br><br>
|
||||||
|
<ul><b>Modus: lan-ping</b><br><br>
|
||||||
|
<code>define <name> PRESENCE lan-ping <IP-Addresse oder Hostname> [ <Interval> ]</code><br>
|
||||||
|
<br>
|
||||||
|
Prüft ob ein Gerät über Netzwerk (üblicherweise WLAN) auf Ping-Anfragen reagiert und setzt entsprechend den Anwesenheitsstatus.<br>
|
||||||
|
<br>
|
||||||
|
<b>Modus: fritzbox</b><br><br>
|
||||||
|
<code>define <name> PRESENCE fritzbox <device-name> [ <Interval> ]</code><br>
|
||||||
|
<br>
|
||||||
|
Prüft ob ein Gerät welches per WLAN mit der FritzBox verbunden ist, erreichbar durch Abfrage des Status mit dem Befehl ctlmgr_ctl.
|
||||||
|
Der Gerätename (Parameter: <device-name>) muss dem Namen entsprechen, welcher im Menüpunkt "Heimnetz" auf der FritzBox-Oberfläche angezeigt wird.<br>
|
||||||
|
<br>
|
||||||
|
<b>Modus: local-bluetooth</b><br><br>
|
||||||
|
<code>define <name> PRESENCE local-bluetooth <Bluetooth-Adresse> [ <Interval> ]</code><br>
|
||||||
|
<br>
|
||||||
|
Prüft ob ein Bluetooth-Gerät abgefragt werden kann und meldet dies als Anwesenheit. Für diesen Modus wird der Shell-Befehl "hcitool" benötigt
|
||||||
|
(wird durch das Paket <a href="http://www.bluez.org" target="_new">bluez</a> bereitgestellt), sowie ein funktionierender Bluetooth-Empfänger (intern oder als USB-Stick)<br><br>
|
||||||
|
<b>Modus: lan-bluetooth</b><br><br>
|
||||||
|
Prüft ein Bluetooth-Gerät auf Anwesenheit über Netzwerk mit Hilfe von presenced oder collectord. Diese können auf jeder Maschine installiert werden,
|
||||||
|
welche eine Standard-Perl-Umgebung bereitstellt und über Netzwerk erreichbar ist.
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<code>define <name> PRESENCE <IP-Adresse>[:Port] <Bluetooth-Adresse> [ <Interval> ]</code><br>
|
||||||
|
<br>
|
||||||
|
Der Standardport ist 5111 (presenced). Alternativ kann man den Port 5222 (collectord) nutzen. Generell ist der Port aber frei wählbar.<br>
|
||||||
|
<br>
|
||||||
|
<u>presenced</u><br><br>
|
||||||
|
<ul>Der presenced ist ein Perl Netzwerk Dienst, welcher eine Bluetooth-Anwesenheitserkennung von ein oder mehreren Geräten über Netzwerk bereitstellt.
|
||||||
|
Dieser lauscht standardmäßig auf TCP Port 5111 nach eingehenden Verbindungen von dem PRESENCE Modul oder einem collectord.<br>
|
||||||
|
<PRE>
|
||||||
|
Usage:
|
||||||
|
presenced -d [-p <port>] [-P <filename>]
|
||||||
|
presenced [-h | --help]
|
||||||
|
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-p, --port
|
||||||
|
TCP Port which should be used (Default: 5111)
|
||||||
|
-P, --pid-file
|
||||||
|
PID file for storing the local process id (Default: /var/run/presenced.pid)
|
||||||
|
-d, --daemon
|
||||||
|
detach from terminal and run as background daemon
|
||||||
|
-v, --verbose
|
||||||
|
Print detailed log output
|
||||||
|
-h, --help
|
||||||
|
Print detailed help screen
|
||||||
|
</PRE>
|
||||||
|
|
||||||
|
Zur Bluetooth-Abfrage wird der Shell-Befehl "hcitool" verwendet (Paket: <a href="http://www.bluez.org" target="_new">bluez</a>)
|
||||||
|
um sogenannte "Paging-Request" an die gewünschte Bluetooth Adresse (z.B. 01:B4:5E:AD:F6:D3) durchzuführen. Das Gerät muss dabei nicht sichtbar sein, allerdings ständig aktiviert sein
|
||||||
|
um Bluetooth-Anfragen zu beantworten.
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
Wenn ein Gerät anwesend ist, wird dies an FHEM übermittelt zusammen mit dem Gerätenamen als Reading.<br><br>
|
||||||
|
|
||||||
|
Der presenced ist zum Download verfügbar als:<br><br>
|
||||||
|
<ul>
|
||||||
|
<li>Perl Skript: <a href="http://fhem.svn.sourceforge.net/viewvc/fhem/trunk/fhem/contrib/PRESENCE/presenced" target="_new">presenced</a></li>
|
||||||
|
<li>.deb Paket für Debian (architekturunabhängig): <a href="http://fhem.svn.sourceforge.net/viewvc/fhem/trunk/fhem/contrib/PRESENCE/deb/presenced-1.0.deb" target="_new">presenced-1.0.deb</a></li>
|
||||||
|
<li>.deb Paket für Raspberry Pi (raspbian): <a href="http://fhem.svn.sourceforge.net/viewvc/fhem/trunk/fhem/contrib/PRESENCE/deb/presenced-rpi-1.0.deb" target="_new">presenced-rpi-1.0.deb</a></li>
|
||||||
|
</ul>
|
||||||
|
</ul><br><br>
|
||||||
|
<u>collectord</u><br><br>
|
||||||
|
<ul>
|
||||||
|
Der collectord ist ein Perl Netzwerk Dienst, welcher Verbindungen zu mehreren presenced-Instanzen verwaltet um eine koordinierte Suche nach ein oder mehreren Bluetooth-Geräten über Netzwerk durchzuführen.<br><br>
|
||||||
|
|
||||||
|
Er lauscht auf TCP port 5222 nach eingehenden Verbindungen von einem PRESENCE Modul.
|
||||||
|
<PRE>
|
||||||
|
Usage:
|
||||||
|
collectord -c <configfile> [-d] [-p <port>] [-P <pidfile>]
|
||||||
|
collectord [-h | --help]
|
||||||
|
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-c, --configfile <configfile>
|
||||||
|
The config file which contains the room and timeout definitions
|
||||||
|
-p, --port
|
||||||
|
TCP Port which should be used (Default: 5222)
|
||||||
|
-P, --pid-file
|
||||||
|
PID file for storing the local process id (Default: /var/run/collectord.pid)
|
||||||
|
-d, --daemon
|
||||||
|
detach from terminal and run as background daemon
|
||||||
|
-v, --verbose
|
||||||
|
Print detailed log output
|
||||||
|
-l, --logfile <logfile>
|
||||||
|
log to the given logfile
|
||||||
|
-h, --help
|
||||||
|
Print detailed help screen
|
||||||
|
</PRE>
|
||||||
|
Bevor der collectord verwendet werden kann, benötigt er eine Konfigurationsdatei in welcher alle Räume mit einem presenced-Agenten eingetragen sind. Diese Datei sieht wie folgt aus:
|
||||||
|
<br><br>
|
||||||
|
<PRE>
|
||||||
|
# Raum Definitionen
|
||||||
|
# =================
|
||||||
|
#
|
||||||
|
[Raum-Name] # Name des Raumes
|
||||||
|
address=192.168.0.10 # IP-Adresse oder Hostname
|
||||||
|
port=5111 # TCP Port welcher benutzt werden soll (standardmäßig 5111)
|
||||||
|
presence_timeout=120 # Prüfinterval in Sekunden für jede Abfrage eines Gerätes, welches anwesend ist
|
||||||
|
absence_timeout=20 # Prüfinterval in Sekunden für jede Abfrage eines Gerätes, welches abwesend ist
|
||||||
|
|
||||||
|
[Wohnzimmer]
|
||||||
|
address=192.168.0.11
|
||||||
|
port=5111
|
||||||
|
presence_timeout=180
|
||||||
|
absence_timeout=20
|
||||||
|
</PRE>
|
||||||
|
<br>
|
||||||
|
Wenn ein Gerät in irgend einem Raum anwesend ist, wird dies an FHEM übermittelt, zusammen mit dem Gerätenamen und dem Raum, in welchem das Gerät erkannt wurde.<br><br>
|
||||||
|
|
||||||
|
Der collectord ist zum Download verfügbar als:<br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Perl Skript: <a href="http://fhem.svn.sourceforge.net/viewvc/fhem/trunk/fhem/contrib/PRESENCE/collectord" target="_new">collectord</a></li>
|
||||||
|
<li>.deb Paket für Debian (architekturunabhängig): <a href="http://fhem.svn.sourceforge.net/viewvc/fhem/trunk/fhem/contrib/PRESENCE/deb/collectord-1.0.deb" target="_new">collectord-1.0.deb</a></li>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
<a name="PRESENCEset"></a>
|
||||||
|
<b>Set</b>
|
||||||
|
<ul>
|
||||||
|
N/A
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="PRESENCEget"></a>
|
||||||
|
<b>Get</b>
|
||||||
|
<ul>
|
||||||
|
N/A
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="PRESENCEattr"></a>
|
||||||
|
<b>Attributes</b><br><br>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#loglevel">loglevel</a></li>
|
||||||
|
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||||||
|
<li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
|
||||||
|
<li><a>disable</a></li>
|
||||||
|
Wenn dieses Attribut aktiviert ist, wird die Anwesenheitserkennung nicht mehr durchgeführt.<br><br>
|
||||||
|
Mögliche Werte: 0 => Erkennung durchführen , 1 => Keine Erkennungen durchführen<br>
|
||||||
|
Standardwert ist 0 (Erkennung durchführen)<br><br>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="PRESENCEevents"></a>
|
||||||
|
<b>Generierte Events:</b><br><br>
|
||||||
|
<ul>
|
||||||
|
<u>Generelle Events:</u><br><br>
|
||||||
|
<ul>
|
||||||
|
<li><b>state</b>: $state (absent|present|disabled) - Der Anwesenheitsstatus eine Gerätes (absent = abwesend; present = anwesend) oder "disabled" wenn das disable-Attribut aktiviert ist</li>
|
||||||
|
</ul><br><br>
|
||||||
|
<u>Bluetooth-spezifische Events:</u><br><br>
|
||||||
|
<ul>
|
||||||
|
<li><b>device_name</b>: $name - Der Name des Bluetooth-Gerätes, wenn es anwesend (Status: present) ist</li>
|
||||||
|
</ul><br><br>
|
||||||
|
<u>presenced-/collectord-spezifische Events:</u><br><br>
|
||||||
|
<ul>
|
||||||
|
<li><b>command_accepted</b>: $command_accepted (yes|no) - Wurde das letzte Kommando an den presenced/collectord akzeptiert (yes = ja, no = nein)?</li>
|
||||||
|
<li><b>room</b>: $room - Wenn das Modul mit einem collectord verbunden ist, zeigt dieses Event den Raum an, in welchem dieses Gerät erkannt wurde (Raumname entsprechend der Konfigurationsdatei des collectord)</li>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
=end html_DE
|
||||||
|
|
||||||
=cut
|
=cut
|
@ -81,6 +81,7 @@
|
|||||||
<a href="#FLOORPLAN">FLOORPLAN</a>
|
<a href="#FLOORPLAN">FLOORPLAN</a>
|
||||||
<a href="#PachLog">PachLog</a>
|
<a href="#PachLog">PachLog</a>
|
||||||
<a href="#PID">PID</a>
|
<a href="#PID">PID</a>
|
||||||
|
<a href="#PRESENCE">PRESENCE</a>
|
||||||
<a href="#SUNRISE_EL">SUNRISE_EL</a>
|
<a href="#SUNRISE_EL">SUNRISE_EL</a>
|
||||||
<a href="#at">at</a>
|
<a href="#at">at</a>
|
||||||
<a href="#autocreate">autocreate</a>
|
<a href="#autocreate">autocreate</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user