Habe heute wenig Zeit, diverse Termine.
Also erst einmal nur als Telegramm, bitte in diesem Rohzustand noch keinen Lexikoneintrag daraus machen.
Generelle Funktion: DoorPi steuert den Türöffner, FHEM steuert ein eventuelles Verschließen der Tür (z.B. mit einer Keymatic). Die "locked"/"unlocked" Kommandos und weitere Kommandos (z.B. für Licht und Videostream) werden im FHEM-Frontnend nur angezeigt, wenn sie in der doorpi.ini definiert wurden (siehe Punkt 5).
1. FHEM nach Anleitung installieren. Test: FHEM läuft, Webzugriff unter http://<IP-Adresse>8083/fhem zeigt das FHEM-Logo.
2. FHEM updaten mit dem Befehl "update" in der FHEM-Kommandozeile.
3. Auf dem FHEM-Rechner mit den Befehlen
notwendige Module nachinstallieren.
3. Auf dem FHEM-Rechner das Modul 70_DoorPi.pm manuell aus dem Ordner /opt/fhem/contrib/DoorPi in den Ordner /opt/fhem/FHEM verschieben. Sich bitte einen Device-Namen für das <DoorPi-Device> ausdenken, z.B. "DoorStation"
4. doorpi.ini muss folgende Events beinhalten. Die tatsächlichen Calls können entweder direkt in der doorpi.ini stehen, oder in einem separaten Shell-Skript
[EVENT_BeforeSipPhoneMakeCall]
10 = url_call:<URL of FHEM>/fhem?XHR=1&cmd.<DoorPi-Device>=set <DoorPi-Device> call start
20 = take_snapshot
[EVENT_OnCallStateDisconnect]
10 = url_call:<URL of FHEM>/fhem?XHR=1&cmd.<DoorPi-Device>=set <DoorPi-Device> call end
[EVENT_OnCallStateDismissed]
10 = url_call:<URL of FHEM>/fhem?XHR=1&cmd.<DoorPi-Device>=set <DoorPi-Device> call dismissed
[EVENT_OnCallStateReject]
10 = url_call:<URL of FHEM>/fhem?XHR=1&cmd.<DoorPi-Device>=set <DoorPi-Device> call rejected
5. doorpi.ini muss über ein virtuelles Keyboard verfügen. Darin können verschiedene actions definiert werden.
[keyboards]
...
<virtualkeyboardname> = filesystem
[<virtualkeyboardname>_keyboard]
base_path_input = <dome directory>
base_path_output = <some directory>
[<virtualkeyboardname>_InputPins]
dooropen = <doorpi action opening the door>
doorlocked = <doorpi action if the door is locked by FHEM>
doorunlocked = <doorpi action if the door is unlocked by FHEM>
streamon = <doorpi action to switch on video stream>
streamoff = <doorpi action to switch off video stream>
lighton = <doorpi action to switch on scene light>
lightoff = <doorpi action to switch off scene light>
dashlighton = <doorpi action to switch on dashlight>
dashlightoff = <doorpi action to switch off dashlight>
gettarget = <doorpi action to acquire call target number>
purge = <doorpi action to purge files and entries older than a day>
... (optional buttons)
button1 = <some doorpi action>
... (further button definitions)
Alles anzeigen
6. Jetzt das FHEM-Device definieren:
Wenn es keine Fehler gibt, wird danach die DoorStation-Seite angezeigt, auf der man alle weiteren Einstellungen ganz komfortabel vornehmen kann. Welche Einstellungen das sind, bekommt man angezeigt, wenn man ganz unten rechts auf "Device specific help" klickt.
ZitatAlles anzeigen
Example
define DoorStation DoorPi 192.168.0.51
Define
Define a DoorpiPi instance.
- <IP address>
Note: The default configuration for the module assumes
that opening the door is done by DoorPi
because it controls the local door opener, but locking and
unlocking are handled by FHEM. Perl modules JSON and Test:JSON are
needed.
Set
- set <DoorPi-Device> door open[|locked|unlocked] [<string>]
Instead of door, one must use the value of the doorbutton attribute.
open: Activate the door opener in DoorPi, accompanied by an optional FHEM command specified in the dooropencmd attribute.
locked/unlocked: Shown only if the if the Attributes doorlockcmd and doorunlockcmd are specified. These commands are then used by FHEM to lock and unlock the door, furthermore this is communicated to DoorPi.
If the third parameter is a nonempty string, this additional command is skipped. Can be useful, if the locked/unlocked command comes from the door itself.- set <DoorPi-Device> snapshot
Take a single snapshot. Instead of snapshot, one must use the value of the snapshotbutton attribute- set <DoorPi-Device> stream on|off
Start or stop a video stream Instead of stream, one must use the value of the streambutton attribute- set <DoorPi-Device> target 0|1|2|3
Set the call target number for DoorPi to the corresponding attribute value (see below)- set <DoorPi-Device> dashlight on|off
Set the dashlight (illuminating the door station) on or off. Instead of dashlight, one must use the value of the dashlightbutton attribute- set <DoorPi-Device> light on|on-for-timer|off
Set the scene light (illuminating the visitor) on, on for a minute or off. Instead of light, one must use the value of the lightbutton attribute- set <DoorPi-Device> buttonDD
Activate one of the virtual buttons specified in DoorPi.- set <DoorPi-Device> purge
Clear all recordings and snapshots which are older than a day
Get
- get <DoorPi-Device> config
Returns the current configuration of DoorPi- get <DoorPi-Device> history
Returns the current call history of DoorPi- get <DoorPi-Device> version
Returns the version number of the FHEM DoorPi module
Attributes
- attr <DoorPi-Device> target[0|1|2|3] <string>
Call target numbers for different redirections. If none is set, redirection will not be offered.- attr <DoorPi-Device> ringcmd <string>
FHEM command additionally executed for ringing action (no default)- attr <DoorPi-Device> doorbutton <string>
DoorPi name for door action (default: door)- attr <DoorPi-Device> dooropencmd <string>
FHEM command additionally executed for door opening action (no default)- attr <DoorPi-Device> doorlockcmd <string>
FHEM command for door locking action (no default)- attr <DoorPi-Device> doorunlockcmd <string>
FHEM command for door unlocking action (no default)- attr <DoorPi-Device> snapshotbutton <string>
DoorPi name for snapshot action (default: snapshot)- attr <DoorPi-Device> streambutton <string>
DoorPi name for video stream action (default: stream)- attr <DoorPi-Device> lightbutton <string>
DoorPi name for light action (default: light)- attr <DoorPi-Device> lightoncmd <string>
FHEM command additionally executed for "light on" action (no default)- attr <DoorPi-Device> lightoffcmd <string>
FHEM command additionally executed for "light off" action (no default)- attr <DoorPi-Device> dashlightbutton <string>
DoorPi name for dashlight action (default: dashlight)- attr <DoorPi-Device> iconpic <string>
Icon to be used in overview instead of a (slow !) miniature picture- attr <DoorPi-Device> iconaudio <string>
Icon to be used in overview instead of a verbal link to the audio recording- readingFnAttributes