diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm index 99f7ef73b..3b3ebc3f2 100755 --- a/fhem/FHEM/73_PRESENCE.pm +++ b/fhem/FHEM/73_PRESENCE.pm @@ -64,12 +64,12 @@ PRESENCE_Define($$) if($a[2] ne "lan-bluetooth" and not (@a == 4 or @a == 5)) { - my $msg = "wrong syntax: define PRESENCE [ ]"; + my $msg = "wrong syntax: define PRESENCE [ ]"; Log 2, $msg; return $msg; } elsif($a[2] eq "lan-bluetooth" and not (@a == 5 or @a == 6)) { - my $msg = "wrong syntax: define PRESENCE lan-bluetooth [:port] [ ]"; + my $msg = "wrong syntax: define PRESENCE lan-bluetooth [:port] [ ]"; Log 2, $msg; return $msg; } @@ -533,17 +533,17 @@ PRESENCE_ProcessLocalScan($) Define

    Mode: lan-ping

    - define <name> PRESENCE lan-ping <ip-address> [ <timeout> ]
    + define <name> PRESENCE lan-ping <ip-address> [ <check-interval> ]

    Checks for a network device via PING requests and reports its presence state.

    Mode: fritzbox

    - define <name> PRESENCE fritzbox <device-name> [ <timeout> ]
    + define <name> PRESENCE fritzbox <device-name> [ <check-interval> ]

    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

    Mode: local-bluetooth

    - define <name> PRESENCE local-bluetooth <bluetooth-address> [ <timeout> ]
    + define <name> PRESENCE local-bluetooth <bluetooth-address> [ <check-interval> ]

    Checks for a bluetooth device and reports its presence state. For this mode the shell command "hcitool" is required (provided with a bluez installation under Debian via APT), as well as a functional bluetooth device directly attached to your machine.

    @@ -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. The given device will be checked for presence status.

    - define <name> PRESENCE <ip-address>[:port] <bluetooth-address> [ <timeout> ]
    + define <name> PRESENCE <ip-address>[:port] <bluetooth-address> [ <check-interval> ]

    The default port is 5111 (presenced). Alternatly you can use port 5222 (collectord)

    @@ -697,4 +697,190 @@ Options: =end html +=begin html_DE + + +

    PRESENCE

    +
      + + Das PRESENCE Module bietet mehrere Möglichkteiten um die Anwesenheit von Handys/Smartphones oder anderen mobilen Geräten (z.B. Tablets) zu erkennen. +

      + Dieses Modul bietet dazu mehrere Modis an um Anwesenheit zu erkennen. Diese sind:

      +
        +
      • lan-ping - Eine Erkennung auf Basis von Ping-Tests im lokalen LAN/WLAN
      • +
      • fritzbox - Eine Erkennung aufgrund der internen Abfrage des Status auf der FritzBox (nur möglich, wenn FHEM auf einer FritzBox läuft)
      • +
      • local-bluetooth - Eine Erkennung auf Basis von Bluetooth-Abfragen durch den FHEM Server. Das Gerät muss dabei in Empfangsreichweite sein, aber nicht sichtbar sein
      • +
      • lan-bluetooth - Eine Erkennung durch Bluetooth-Abfragen via Netzwerk (LAN/WLAN) in ein oder mehreren Räumen
      • +
      +

      + + Define

      +
        Modus: lan-ping

        + define <name> PRESENCE lan-ping <IP-Addresse oder Hostname> [ <Interval> ]
        +
        + Prüft ob ein Gerät über Netzwerk (üblicherweise WLAN) auf Ping-Anfragen reagiert und setzt entsprechend den Anwesenheitsstatus.
        +
        + Modus: fritzbox

        + define <name> PRESENCE fritzbox <device-name> [ <Interval> ]
        +
        + 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.
        +
        + Modus: local-bluetooth

        + define <name> PRESENCE local-bluetooth <Bluetooth-Adresse> [ <Interval> ]
        +
        + 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 bluez bereitgestellt), sowie ein funktionierender Bluetooth-Empfänger (intern oder als USB-Stick)

        + Modus: lan-bluetooth

        + 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. +
        +
        + define <name> PRESENCE <IP-Adresse>[:Port] <Bluetooth-Adresse> [ <Interval> ]
        +
        + Der Standardport ist 5111 (presenced). Alternativ kann man den Port 5222 (collectord) nutzen. Generell ist der Port aber frei wählbar.
        +
        + presenced

        +
          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.
          +
          +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
          +
          + + Zur Bluetooth-Abfrage wird der Shell-Befehl "hcitool" verwendet (Paket: bluez) + 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. +

          + + Wenn ein Gerät anwesend ist, wird dies an FHEM übermittelt zusammen mit dem Gerätenamen als Reading.

          + + Der presenced ist zum Download verfügbar als:

          + +


        + collectord

        +
          + 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.

          + + Er lauscht auf TCP port 5222 nach eingehenden Verbindungen von einem PRESENCE Modul. +
          +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
          +
          + 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: +

          +
          +       	# 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    
          +
          +
          + 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.

          + + Der collectord ist zum Download verfügbar als:

          + + +
        + +
      +
      + + Set +
        + N/A +
      +
      + + + Get +
        + N/A +
      +
      + + + Attributes

      +
        +
      • loglevel
      • +
      • do_not_notify
      • +
      • readingFnAttributes

      • +
      • disable
      • + Wenn dieses Attribut aktiviert ist, wird die Anwesenheitserkennung nicht mehr durchgeführt.

        + Mögliche Werte: 0 => Erkennung durchführen , 1 => Keine Erkennungen durchführen
        + Standardwert ist 0 (Erkennung durchführen)

        +
      +
      + + + Generierte Events:

      +
        + Generelle Events:

        +
          +
        • state: $state (absent|present|disabled) - Der Anwesenheitsstatus eine Gerätes (absent = abwesend; present = anwesend) oder "disabled" wenn das disable-Attribut aktiviert ist
        • +


        + Bluetooth-spezifische Events:

        +
          +
        • device_name: $name - Der Name des Bluetooth-Gerätes, wenn es anwesend (Status: present) ist
        • +


        + presenced-/collectord-spezifische Events:

        +
          +
        • command_accepted: $command_accepted (yes|no) - Wurde das letzte Kommando an den presenced/collectord akzeptiert (yes = ja, no = nein)?
        • +
        • room: $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)
        • +
        +
      +
    + + +=end html_DE + =cut \ No newline at end of file diff --git a/fhem/docs/commandref_frame_DE.html b/fhem/docs/commandref_frame_DE.html index 2b955fc9d..f5986fef1 100644 --- a/fhem/docs/commandref_frame_DE.html +++ b/fhem/docs/commandref_frame_DE.html @@ -81,6 +81,7 @@ FLOORPLAN   PachLog   PID   + PRESENCE   SUNRISE_EL   at   autocreate