diff --git a/fhem/CHANGED b/fhem/CHANGED
index fcd405333..83af8f381 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,5 +1,13 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
+ - updated: 74_AMAD: New Mijor Release 1.2.0
+ !!! ATTENTION !!! Do not forget to to update the new
+ Automagic Flowset !!!
+ - feature: 74_AMAD: shutown the Device, activate Airplanemode, control
+ Notivicationvolume, vibrates the Device, Locked Device
+ by PIN
+ - bugfix: 74_AMAD: modified Error handling, best practice for identify offline
+ Mode
- feature: New module 74_HOMBOT to control LG Hombot vacuum cleaner
- bugfix: 49_SSCAM: credentials won't be deleted if "rereadcfg" is used
- bugfix: 76_MSGMail: Make use of attribute mailtype again (enabling html)
diff --git a/fhem/FHEM/74_AMAD.pm b/fhem/FHEM/74_AMAD.pm
index ca02cf336..0ecbeba8a 100644
--- a/fhem/FHEM/74_AMAD.pm
+++ b/fhem/FHEM/74_AMAD.pm
@@ -2,7 +2,7 @@
#
# Developed with Kate
#
-# (c) 2015 Copyright: Marko Oldenburg (leongaultier at gmail dot com)
+# (c) 2015-2016 Copyright: Marko Oldenburg (leongaultier at gmail dot com)
# All rights reserved
#
# This script is free software; you can redistribute it and/or modify
@@ -34,8 +34,11 @@ use Time::HiRes qw(gettimeofday);
use HttpUtils;
use TcpServerUtils;
+use Encode qw(encode);
+
+
+my $version = "1.2.0";
-my $version = "1.0.0";
@@ -55,6 +58,7 @@ sub AMAD_Initialize($) {
"setScreenOrientation:0,1 ".
"setScreenBrightness:0,1 ".
"setBluetoothDevice ".
+ "setScreenlockPIN ".
"root:0,1 ".
"interval ".
"port ".
@@ -142,6 +146,8 @@ sub AMAD_Attr(@) {
my ( $cmd, $name, $attrName, $attrVal ) = @_;
my $hash = $defs{$name};
+
+ my $orig = $attrVal;
if( $attrName eq "disable" ) {
if( $cmd eq "set" ) {
@@ -154,25 +160,17 @@ my ( $cmd, $name, $attrName, $attrVal ) = @_;
readingsSingleUpdate ( $hash, "state", "disabled", 1 );
RemoveInternalTimer( $hash );
Log3 $name, 3, "AMAD ($name) - disabled";
- }
- }
- elsif( $cmd eq "del" ) {
+ }
+
+ } else {
RemoveInternalTimer( $hash );
InternalTimer( gettimeofday()+2, "AMAD_GetUpdateTimer", $hash, 0 ) if( ReadingsVal( $hash->{NAME}, "state", 0 ) eq "disabled" );
readingsSingleUpdate ( $hash, "state", "active", 1 );
Log3 $name, 3, "AMAD ($name) - enabled";
-
- } else {
- if($cmd eq "set") {
- $attr{$name}{$attrName} = $attrVal;
- Log3 $name, 3, "AMAD ($name) - $attrName : $attrVal";
- }
- elsif( $cmd eq "del" ) {
- }
- }
+ }
}
- if( $attrName eq "interval" ) {
+ elsif( $attrName eq "interval" ) {
if( $cmd eq "set" ) {
if( $attrVal < 60 ) {
Log3 $name, 3, "AMAD ($name) - interval too small, please use something > 60 (sec), default is 180 (sec)";
@@ -181,41 +179,40 @@ my ( $cmd, $name, $attrName, $attrVal ) = @_;
$hash->{INTERVAL} = $attrVal;
Log3 $name, 3, "AMAD ($name) - set interval to $attrVal";
}
- }
- elsif( $cmd eq "del" ) {
+
+ } else {
$hash->{INTERVAL} = 180;
Log3 $name, 3, "AMAD ($name) - set interval to default";
-
- } else {
- if( $cmd eq "set" ) {
- $attr{$name}{$attrName} = $attrVal;
- Log3 $name, 3, "AMAD ($name) - $attrName : $attrVal";
- }
- elsif( $cmd eq "del" ) {
- }
}
}
- if( $attrName eq "port" ) {
+ elsif( $attrName eq "port" ) {
if( $cmd eq "set" ) {
$hash->{PORT} = $attrVal;
Log3 $name, 3, "AMAD ($name) - set port to $attrVal";
- }
- elsif( $cmd eq "del" ) {
+
+ } else {
$hash->{PORT} = 8090;
Log3 $name, 3, "AMAD ($name) - set port to default";
-
- } else {
- if( $cmd eq "set" ) {
- $attr{$name}{$attrName} = $attrVal;
- Log3 $name, 3, "AMAD ($name) - $attrName : $attrVal";
- }
- elsif( $cmd eq "del" ) {
- }
- }
+ }
+ }
+
+ elsif( $attrName eq "setScreenlockPIN" ) {
+ if( $cmd eq "set" && $attrVal ) {
+ $attrVal = AMAD_encrypt($attrVal);
+ } else {
+ CommandDeleteReading( undef, "$name screenLock" );
+ }
+ }
+
+ if( $cmd eq "set" ) {
+ if( $attrVal && $orig ne $attrVal ) {
+ $attr{$name}{$attrName} = $attrVal;
+ return $attrName ." set to ". $attrVal if( $init_done );
+ }
}
- return undef;
+ return;
}
sub AMAD_GetUpdateLocal($) {
@@ -313,11 +310,6 @@ sub AMAD_RetrieveAutomagicInfoFinished($$$) {
Log3 $name, 4, "AMAD ($name) - Informations Flow on your Device is inactive, will try to reactivate";
}
- elsif($hash->{helper}{infoErrorCounter} > 4 && ReadingsVal( $name, "flow_Informations", "active" ) eq "active" ){
- readingsBulkUpdate( $hash, "lastStatusRequestError", "check automagicApp on your device" );
-
- Log3 $name, 4, "AMAD ($name) - Please check the AutomagicAPP on your Device";
- }
elsif( $hash->{helper}{infoErrorCounter} > 9 ) {
readingsBulkUpdate( $hash, "lastStatusRequestError", "to many errors, check your network or device configuration" );
@@ -327,6 +319,12 @@ sub AMAD_RetrieveAutomagicInfoFinished($$$) {
readingsBulkUpdate ( $hash, "state", "To many Errors, device set offline");
$hash->{helper}{infoErrorCounter} = 0;
}
+ elsif($hash->{helper}{infoErrorCounter} > 4 && ReadingsVal( $name, "flow_Informations", "active" ) eq "active" ){
+ readingsBulkUpdate( $hash, "lastStatusRequestError", "check automagicApp on your device" );
+
+ Log3 $name, 4, "AMAD ($name) - Please check the AutomagicAPP on your Device";
+ }
+
readingsEndUpdate( $hash, 1 );
}
@@ -459,12 +457,15 @@ sub AMAD_Set($$@) {
$list .= "openApp:$apps " if( AttrVal( $name, "setOpenApp", "none" ) ne "none" );
$list .= "nextAlarmTime:time ";
$list .= "statusRequest:noArg ";
- $list .= "system:reboot " if( AttrVal( $name, "root", "1" ) eq "1" );
+ $list .= "system:reboot,shutdown,airplanemodeON " if( AttrVal( $name, "root", "1" ) eq "1" );
$list .= "bluetooth:on,off ";
$list .= "notifySndFile ";
$list .= "clearNotificationBar:All,Automagic ";
$list .= "changetoBTDevice:$btdev " if( AttrVal( $name, "setBluetoothDevice", "none" ) ne "none" );
$list .= "activateVoiceInput:noArg ";
+ $list .= "screenLock:on,off " if( AttrVal( $name, "setScreenlockPIN", "none" ) ne "none" );
+ $list .= "volumeNotification:slider,0,1,7 ";
+ $list .= "vibrate:noArg";
if( lc $cmd eq 'screenmsg'
|| lc $cmd eq 'ttsmsg'
@@ -484,7 +485,10 @@ sub AMAD_Set($$@) {
|| lc $cmd eq 'changetobtdevice'
|| lc $cmd eq 'clearnotificationbar'
|| lc $cmd eq 'activatevoiceinput'
- || lc $cmd eq 'statusrequest' ) {
+ || lc $cmd eq 'volumenotification'
+ || lc $cmd eq 'screenlock'
+ || lc $cmd eq 'statusrequest'
+ || lc $cmd eq 'vibrate') {
Log3 $name, 5, "AMAD ($name) - set $name $cmd ".join(" ", @val);
@@ -494,7 +498,7 @@ sub AMAD_Set($$@) {
return AMAD_SelectSetCmd( $hash, $cmd, @val ) if( @val ) && ( ReadingsVal( $name, "deviceState", "online" ) eq "offline" ) && ( lc $cmd eq 'devicestate' );
return "Cannot set command, FHEM Device is offline" if( ReadingsVal( $name, "deviceState", "online" ) eq "offline" );
- return AMAD_SelectSetCmd( $hash, $cmd, @val ) if( @val ) || ( lc $cmd eq 'statusrequest' ) || ( lc $cmd eq 'activatevoiceinput' );
+ return AMAD_SelectSetCmd( $hash, $cmd, @val ) if( @val ) || ( lc $cmd eq 'statusrequest' ) || ( lc $cmd eq 'activatevoiceinput' ) || ( lc $cmd eq 'vibrate' );
}
return "Unknown argument $cmd, bearword as argument or wrong parameter(s), choose one of $list";
@@ -561,6 +565,16 @@ sub AMAD_SelectSetCmd($$@) {
return AMAD_HTTP_POST( $hash, $url );
}
+ elsif( lc $cmd eq 'volumenotification' ) {
+ my $vol = join( " ", @data );
+
+ my $url = "http://" . $host . ":" . $port . "/fhem-amad/setCommands/setNotifiVolume?notifivolume=$vol";
+
+ readingsSingleUpdate( $hash, $cmd, $vol, 1 );
+
+ return AMAD_HTTP_POST( $hash, $url );
+ }
+
elsif( lc $cmd eq 'mediaplayer' ) {
my $btn = join( " ", @data );
@@ -602,7 +616,6 @@ sub AMAD_SelectSetCmd($$@) {
}
elsif( lc $cmd eq 'activatevoiceinput' ) {
- #my $cmd = join( " ", @data );
my $url = "http://" . $host . ":" . $port . "/fhem-amad/setCommands/setvoicecmd";
@@ -653,6 +666,9 @@ sub AMAD_SelectSetCmd($$@) {
my $systemcmd = join( " ", @data );
my $url = "http://" . $host . ":" . $port . "/fhem-amad/setCommands/systemcommand?syscmd=$systemcmd";
+
+ readingsSingleUpdate( $hash, $systemcmd, "on", 1 ) if( $systemcmd eq "airplanemodeON" );
+ readingsSingleUpdate( $hash, "deviceState", "offline", 1 ) if( $systemcmd eq "airplanemodeON" || $systemcmd eq "shutdown" );
return AMAD_HTTP_POST( $hash,$url );
}
@@ -693,6 +709,24 @@ sub AMAD_SelectSetCmd($$@) {
return AMAD_HTTP_POST( $hash,$url );
}
+
+ elsif( lc $cmd eq 'screenlock' ) {
+ my $lockmod = join( " ", @data );
+ my $PIN = AttrVal( $name, "setScreenlockPIN", undef );
+ $PIN = AMAD_decrypt($PIN);
+
+ my $url = "http://" . $host . ":" . $port . "/fhem-amad/setCommands/screenlock?lockmod=".$lockmod."&lockPIN=".$PIN;
+
+ readingsSingleUpdate( $hash, $cmd, $lockmod, 1 );
+ return AMAD_HTTP_POST( $hash,$url );
+ }
+
+ elsif( lc $cmd eq 'vibrate' ) {
+
+ my $url = "http://" . $host . ":" . $port . "/fhem-amad/setCommands/setvibrate";
+
+ return AMAD_HTTP_POST( $hash,$url );
+ }
return undef;
}
@@ -759,11 +793,6 @@ sub AMAD_HTTP_POSTerrorHandling($$$) {
Log3 $name, 4, "AMAD ($name) - Flow SetCommands on your Device is inactive, will try to reactivate";
}
- elsif( $hash->{helper}{setCmdErrorCounter} > 4 && ReadingsVal( $name, "flow_SetCommands", "active" ) eq "active" ){
- readingsBulkUpdate( $hash, "lastSetCommandError", "check automagicApp on your device" );
-
- Log3 $name, 4, "AMAD ($name) - Please check the AutomagicAPP on your Device";
- }
elsif( $hash->{helper}{setCmdErrorCounter} > 9 ) {
readingsBulkUpdate( $hash, "lastSetCommandError", "to many errors, check your network or device configuration" );
@@ -773,6 +802,12 @@ sub AMAD_HTTP_POSTerrorHandling($$$) {
readingsBulkUpdate( $hash, "state", "To many Errors, device set offline" );
$hash->{helper}{setCmdErrorCounter} = 0;
}
+ elsif( $hash->{helper}{setCmdErrorCounter} > 4 && ReadingsVal( $name, "flow_SetCommands", "active" ) eq "active" ){
+ readingsBulkUpdate( $hash, "lastSetCommandError", "check automagicApp on your device" );
+
+ Log3 $name, 4, "AMAD ($name) - Please check the AutomagicAPP on your Device";
+ }
+
readingsEndUpdate( $hash, 1 );
}
@@ -1037,7 +1072,8 @@ sub AMAD_CommBridge_Read($) {
$response;
}
-sub AMAD_Header2Hash($) {
+sub AMAD_Header2Hash($) {
+
my ( $string ) = @_;
my %hash = ();
@@ -1052,6 +1088,40 @@ sub AMAD_Header2Hash($) {
return \%hash;
}
+sub AMAD_encrypt($) {
+
+ my ($decodedPIN) = @_;
+ my $key = getUniqueId();
+ my $encodedPIN;
+
+ return $decodedPIN if( $decodedPIN =~ /^crypt:(.*)/ );
+
+ for my $char (split //, $decodedPIN) {
+ my $encode = chop($key);
+ $encodedPIN .= sprintf("%.2x",ord($char)^ord($encode));
+ $key = $encode.$key;
+ }
+
+ return 'crypt:'. $encodedPIN;
+}
+
+sub AMAD_decrypt($) {
+
+ my ($encodedPIN) = @_;
+ my $key = getUniqueId();
+ my $decodedPIN;
+
+ $encodedPIN = $1 if( $encodedPIN =~ /^crypt:(.*)/ );
+
+ for my $char (map { pack('C', hex($_)) } ($encodedPIN =~ /(..)/g)) {
+ my $decode = chop($key);
+ $decodedPIN .= chr(ord($char)^ord($decode));
+ $key = $decode.$key;
+ }
+
+ return $decodedPIN;
+}
+
@@ -1088,6 +1158,7 @@ sub AMAD_Header2Hash($) {
Default volume
Media volume device speaker
Media volume Bluetooth speaker
+ ...
With some experience lots of information from the Android device can be shown in FHEM. This requires only small adjustments of the "Informations" flow
@@ -1112,6 +1183,7 @@ sub AMAD_Header2Hash($) {
Set system commands (reboot)
Send a message which will be announced (TTS)
Default media volume
+ ...
To trigger actions and to obtain information you need the Android App Automagic and a matching Flow. The App you need to get from the app store (google play),
@@ -1157,6 +1229,7 @@ sub AMAD_Header2Hash($) {
Readings
+ airplanemode - state of Airplane
androidVersion - installed Android Version
automagic state - status messages from the AutomagicApp
bluetooth on / off - is Bluetooth switched on or off on the device
@@ -1175,15 +1248,18 @@ sub AMAD_Header2Hash($) {
lastStatusRequestState statusRequest_done / statusRequest_error - state of last statusRequest command
nextAlarmDay - active alarm day
next alarmTime - active alarm time
- powerlevel - status of the battery in %
+ powerlevel - state of the battery in %
powerPlugged - connected power supply? 0=NO, 1|2=YES
screen - screen on/off
- Screen Brightness - Screen Brightness from 0-255
- Screen fullscreen - fullscreen mode (On, Off)
+ screenBrightness - Screen Brightness from 0-255
+ screenFullscreen - fullscreen mode (On, Off)
+ screenLock - Pin-Lock (On,Off)
screenOrientation - screen orientation (Auto, Landscape, Portrait)
+ state - state off Devices
volume - volume value which was set on "Set volume".
- volume Music Bluetooth - Media volume of the Bluetooth speakers
- volume music speaker - Media volume of the internal speakers
+ volumeMusicBluetooth - Media volume of the Bluetooth speakers
+ volumeMusicSpeaker - Media volume of the internal speakers
+ volumeNotification - Notification volume of Device
The Readings volume Music Bluetooth and music speaker volume reflect the respective media volume of the closed border is Bluetooth speakers or the internal speaker again.
Unless one the respective volumes relies exclusively on the Set command, one of the two will always agree with the "volume" Reading a.
@@ -1229,8 +1305,10 @@ sub AMAD_Header2Hash($) {
Set
activateVoiceInput - activat Voice Input on Android Device
+ bluetooth - set bluetooth on/off
+ clearNotificationBar - clear the notification on bar. All or Automagic Notofication only
Device State - sets the Device Status Online / Offline. See Readings
- Media Player - controls the default media player. Play, Stop, Back Route title, ahead of title.
+ mediaPlayer - controls the default media player. Play, Stop, Back Route title, ahead of title.
NextAlarm time - sets the alarm time. only within the next 24hrs.
notifySndFile - plays the specified media file on the Android device. The file to be played must be in the folder /storage/emulated/0/Notifications/.
openURL - opens a URL in your default browser
@@ -1238,19 +1316,21 @@ sub AMAD_Header2Hash($) {
screenMsg - sends a message screen
Status Request - calls for a new Status Report in Device to
ttsMsg - sends a message which is output as a voice message
+ vibrate - vibrates the device
volume - sets the media volume. Either the internal speakers or when connected the Bluetooth speaker
+ volumeNotification - sets the notification volume.
Set depending on set attributes
changetoBtDevice - changes to another Bluetooth device. The attribute setBluetoothDevice must be set. See hint below!
- mediaPlayer - controls the default media player. Play, Stop, Back Route title, ahead of title. Attribute fhemServerIP
openapp - opens a selected app. Attribute setOpenApp
screen Brightness - sets the screen brightness, 0-255 Attribute setScreenBrightness
If you want to use the "set screen brightness", a small adjustment in the flow SetCommands must be made. Opens the action (one of the squares very bottom) Set System Settings: System and makes a check "I have checked the settings, I know what I'm doing".
screen fullscreen - Switches to full screen mode on / off. Attribute SetFullscreen
+ screenLock - locked Screen by set Pinlock. Attribute setScreenlockPIN - There are only allowed numbers and it must be more than 4 and less as 16 character
screenOrientation - Switches the screen orientation Auto / Landscape / Portrait. Attribute setScreenOrientation
- system - set system commands from (only rooted devices). Reboot Attribut root , in the Auto Magic Settings "root function" must be set
+ system - set system commands from (only rooted devices). reboot,shutdown,airplanemodeON (activate only) Attribut root , in the Auto Magic Settings "root function" must be set
In order to use openApp you need an attribute where separated by a comma, several app names are set in order to use openapp. The app name is arbitrary and only required for recognition. The same app name must be used in the flow in SetCommands on the left below the hash expression: "openapp" be in one of the 5 paths (one app per path) entered in both diamonds. Thereafter, in the quadrangle selected the app which app through the attribute names should be started.
To switch between different Bluetooth devices, you need set the attribute setBluetoothDevice accordingly.
attr BTdeviceName1|MAC,BTDeviceName2|MAC
@@ -1268,8 +1348,7 @@ sub AMAD_Header2Hash($) {
Application examples:
- I have the chargers for my Android devices on wireless switch sockets. a DOIF switches the charger on if the battery is below 30% and switches it off than the battery is charged 90% again. In the morning I'll wake up with music from my tablet in the bedroom. This involves the use of the wakeuptimer the RESIDENTS Modules. I stop the music manually. After that the weather forecast will be told (through TTS).
- My 10 "Tablet in the living room is media player for the living room with Bluetooth speakers. The volume is automatically set down when the Fritzbox signals a incoming call on the living room handset.
+ Do you find in the Wiki entry for AMAD (german only)
@@ -1306,6 +1385,7 @@ sub AMAD_Header2Hash($) {
Standardlautstärke
Media Lautstärke des Lautsprechers am Gerät
Media Lautstärke des Bluetooth Lautsprechers
+ ...
Mit etwas Einarbeitung können jegliche Informationen welche Automagic bereit stellt in FHEM angezeigt werden. Hierzu bedarf es lediglich
@@ -1330,11 +1410,11 @@ sub AMAD_Header2Hash($) {
neuen Statusreport des Gerätes anfordern
Systembefehle setzen (Reboot)
eine Nachricht senden welche angesagt wird (TTS)
- Medienlautstärke regeln
+ Medienlautstärke regeln
+ ...
- Für all diese Aktionen und Informationen wird auf dem Androidgerät Automagic und ein so genannter Flow benötigt. Die App müßt
- Ihr Euch besorgen, die Flows bekommt Ihr von mir zusammen mit dem AMAD Modul.
+ Für all diese Aktionen und Informationen wird auf dem Androidgerät Automagic und ein so genannter Flow benötigt. Die App ist über den Google PlayStore zu beziehen. Das benötigte Flowset bekommt Ihr aus dem FHEM Update.
Wie genau verwendet man nun AMAD?
@@ -1377,6 +1457,7 @@ sub AMAD_Header2Hash($) {
Readings
+ airplanemode - Status des Flugmodus
androidVersion - aktuell installierte Androidversion
automagicState - Statusmeldungen von der AutomagicApp (Voraussetzung Android >4.3). Wer ein Android >4.3 hat und im Reading steht "wird nicht unterstützt", muß in den Androideinstellungen unter Ton und Benachrichtigungen -> Benachrichtigungszugriff ein Haken setzen für Automagic
bluetooth on/off - ist auf dem Gerät Bluetooth an oder aus
@@ -1401,10 +1482,13 @@ sub AMAD_Header2Hash($) {
screen - Bildschirm An oderAus
screenBrightness - Bildschirmhelligkeit von 0-255
screenFullscreen - Vollbildmodus (On,Off)
+ screenLock - Pin-Sperre (On,Off)
screenOrientation - Bildschirmausrichtung (Auto,Landscape,Portrait)
+ state - aktueller Status des Devices
volume - Lautstärkewert welcher über "set volume" gesetzt wurde.
volumeMusikBluetooth - Media Lautstärke von angeschlossenden Bluetooth Lautsprechern
volumeMusikSpeaker - Media Lautstärke der internen Lautsprecher
+ volumeNotification - Benachrichtigungs Lautstärke
Die Readings volumeMusikBluetooth und volumeMusikSpeaker spiegeln die jeweilige Medialautstärke der angeschlossenden Bluetoothlautsprecher oder der internen Lautsprecher wieder.
Sofern man die jeweiligen Lautstärken ausschließlich über den Set Befehl setzt, wird eine der beiden immer mit dem "volume" Reading über ein stimmen.
@@ -1460,20 +1544,22 @@ sub AMAD_Header2Hash($) {
screenMsg - versendet eine Bildschirmnachricht
statusRequest - Fordert einen neuen Statusreport beim Device an
ttsMsg - versendet eine Nachricht welche als Sprachnachricht ausgegeben wird
+ vibrate - lässt das Androidgerät vibrieren
volume - setzt die Medialautstärke. Entweder die internen Lautsprecher oder sofern angeschlossen die Bluetoothlautsprecher
+ volumeNotification - setzt die Benachrichtigungslautstärke.
Set abhängig von gesetzten Attributen
changetoBtDevice - wechselt zu einem anderen Bluetooth Gerät. Attribut setBluetoothDevice muß gesetzt sein. Siehe Hinweis unten!
- mediaPlayer - steuert den Standard Mediaplayer. play, stop, Titel zürück, Titel vor. Attribut fhemServerIP
openApp - öffnet eine ausgewählte App. Attribut setOpenApp
screenBrightness - setzt die Bildschirmhelligkeit, von 0-255 Attribut setScreenBrightness
Wenn Ihr das "set screenBrightness" verwenden wollt, muss eine kleine Anpassung im Flow SetCommands vorgenommen werden. Öffnet die Aktion (eines der Vierecke ganz ganz unten)
SetzeSystemeinstellung:System und macht einen Haken bei "Ich habe die Einstellungen überprüft, ich weiss was ich tue".
screenFullscreen - Schaltet den Vollbildmodus on/off. Attribut setFullscreen
+ screenLock - Sperrt den Bildschirm mit Pinabfrage. Attribut setScreenlockPIN - hier die Pin dafür eingeben. Erlaubt sind nur Zahlen. Es müßen mindestens 4 bis max 16 Zeichen sein.
screenOrientation - Schaltet die Bildschirmausrichtung Auto/Landscape/Portait. Attribut setScreenOrientation
- system - setzt Systembefehle ab (nur bei gerootetet Geräen). Reboot Attribut root , in den Automagic Einstellungen muss "Root Funktion" gesetzt werden
+ system - setzt Systembefehle ab (nur bei gerootetet Geräen). reboot,shutdown,airplanemodeON (kann nur aktiviert werden) Attribut root , in den Automagic Einstellungen muss "Root Funktion" gesetzt werden
Um openApp verwenden zu können, muss als Attribut ein, oder durch Komma getrennt, mehrere App Namen gesetzt werden. Der App Name ist frei wählbar und nur zur Wiedererkennung notwendig.
Der selbe App Name muß im Flow SetCommands auf der linken Seite unterhalb der Raute Expression:"openApp" in einen der 5 Stränge (eine App pro Strang) in beide Rauten eingetragen werden. Danach wird
@@ -1494,11 +1580,7 @@ sub AMAD_Header2Hash($) {
Anwendungsbeispiele:
- Ich habe die Ladegeräte für meine Androidgeräte an Funkschaltsteckdosen. ein DOIF schaltet bei unter 30% die Steckdose ein und bei über 90% wieder aus. Morgens lasse ich mich
- über mein Tablet im Schlafzimmer mit Musik wecken. Verwendet wird hierzu der wakeuptimer des RESIDENTS Modules. Das abspielen stoppe ich dann von Hand. Danach erfolgt noch eine
- Ansage wie das Wetter gerade ist und wird.
- Mein 10" Tablet im Wohnzimmer ist Mediaplayer für das Wohnzimmer mit Bluetoothlautsprechern. Die Lautstärke wird automatisch runter gesetzt wenn die Fritzbox einen Anruf auf das
- Wohnzimmer Handgerät signalisiert.
+ Hier verweise ich auf den gut gepflegten Wikieintrag
diff --git a/fhem/FHEM/lib/74_AMADautomagicFlows_1.2.0.xml b/fhem/FHEM/lib/74_AMADautomagicFlows_1.2.0.xml
new file mode 100644
index 000000000..969333bbd
--- /dev/null
+++ b/fhem/FHEM/lib/74_AMADautomagicFlows_1.2.0.xml
@@ -0,0 +1,1796 @@
+
+
+
+ false
+ com.android.music.metachanged
+ true
+ com.android.music.metachanged
+
+
+
+
+
+
+
+ global_artist = getString("artist");
+global_track = getString("track");
+global_album = getString("album");
+ false
+
+
+ true
+ Display Status: Aus
+ false
+ false
+
+
+ true
+ Display Status: Ein
+ false
+ true
+
+
+ true
+ Globale Variable: global_own_reading
+ true
+ global_own_reading
+
+
+ true
+ Globale Variable: global_touched
+ false
+ global_touched
+
+
+ false
+ HTTP Request: /fhem-amad/deviceInfo/
+ true
+ /fhem-amad/deviceInfo/
+ 8090
+ true
+
+
+ false
+ HTTP Request: /fhem-amad/setCommands/*
+ true
+ /fhem-amad/setCommands/*
+ 8090
+ true
+
+
+ true
+ Periodischer Timer: alle 4m
+ false
+ 240000
+ true
+ false
+ false
+ Mon
+ Tue
+ Wed
+ Thu
+ Fri
+ Sat
+ Sun
+ 8
+ 0
+ 17
+ 0
+ false
+
+
+ true
+ Sprachbefehl angefordert
+ true
+
+
+ false
+ App Task läuft: App3 (neuster)
+
+ true
+
+
+ false
+ App Task läuft: App4 (neuster)
+
+ true
+
+
+ false
+ App Task läuft: App5 (neuster)
+
+ true
+
+
+ false
+ App Task läuft: gplay (neuster)
+ com.google.android.music
+ true
+
+
+ false
+ App Task läuft: tuneinradio (neuster)
+ tunein.player
+ true
+
+
+ true
+ App Task läuft: {header_activetask} (neuster)
+ {header_activetask}
+ true
+
+
+ false
+ Benachrichtigung in Statusbar angezeigt: Automagic
+ ch.gridvision.ppam.androidautomagic
+ true
+ 1
+ TEXT
+ CONTAINS_TEXT
+
+ false
+ false
+
+
+ true
+ Bluetooth eingeschaltet
+
+
+ true
+ Bluetooth Gerät verbunden: Beliebiges Geräte
+ true
+
+
+ ANY
+
+
+ true
+ Display automatisch drehen eingeschaltet
+
+
+ true
+ Display eingeschaltet
+
+
+ true
+ Display Orientierung: Portrait
+ true
+
+
+ false
+ Expression: Airplanemode
+ param_syscmd == "airplanemodeON"
+
+
+ false
+ Expression: All
+ param_app == "All"
+
+
+ false
+ Expression: App3
+ param_app == ""
+
+
+ false
+ Expression: App4
+ param_app == ""
+
+
+ false
+ Expression: App5
+ param_app == ""
+
+
+ false
+ Expression: Automagic
+ param_app == "Automagic"
+
+
+ false
+ Expression: Clear Automagic Meldungen"
+ request_path == "/fhem-amad/setCommands/clearnotificationbar"
+
+
+ true
+ Expression: getAndroidSDKVersion() >= "19"
+ getAndroidSDKVersion() >= "19"
+
+
+ true
+ Expression: global_touched=="ja"
+ global_touched=="ja"
+
+
+ true
+ Expression: global_touched=="wait"
+ global_touched=="wait"
+
+
+ false
+ Expression: gplay
+ param_app == "gplay"
+
+
+ true
+ Expression: header_activetask != "none"
+ header_activetask != "none"
+
+
+ false
+ Expression: mediaPlayer"
+ request_path == "/fhem-amad/setCommands/mediaPlayer"
+
+
+ false
+ Expression: notifysnd"
+ request_path == "/fhem-amad/setCommands/playnotifysnd"
+
+
+ false
+ Expression: openApp"
+ request_path == "/fhem-amad/setCommands/openApp"
+
+
+ false
+ Expression: openURL"
+ request_path == "/fhem-amad/setCommands/openURL"
+
+
+ true
+ Expression: param_bluetooth == "off"
+ param_bluetooth == "off"
+
+
+ true
+ Expression: param_bluetooth == "on"
+ param_bluetooth == "on"
+
+
+ true
+ Expression: param_button == "back"
+ param_button == "back"
+
+
+ true
+ Expression: param_button == "next"
+ param_button == "next"
+
+
+ true
+ Expression: param_button == "play"
+ param_button == "play"
+
+
+ true
+ Expression: param_button == "stop"
+ param_button == "stop"
+
+
+ true
+ Expression: param_fullscreen == "off"
+ param_fullscreen == "off"
+
+
+ true
+ Expression: param_fullscreen == "on"
+ param_fullscreen == "on"
+
+
+ true
+ Expression: param_lockmod == "on"
+ param_lockmod == "on"
+
+
+ true
+ Expression: param_notifyfile == "RedAlert.mp3"
+ param_notifyfile == "RedAlert.mp3"
+
+
+ true
+ Expression: param_orientation == "auto"
+ param_orientation == "auto"
+
+
+ true
+ Expression: param_orientation == "landscape"
+ param_orientation == "landscape"
+
+
+ true
+ Expression: param_orientation == "portrait"
+ param_orientation == "portrait"
+
+
+ true
+ Expression: param_screen=="off"
+ param_screen=="off"
+
+
+ true
+ Expression: param_screen=="on"
+ param_screen=="on"
+
+
+ false
+ Expression: Reboot
+ param_syscmd == "reboot"
+
+
+ false
+ Expression: screenMsg"
+ request_path == "/fhem-amad/setCommands/screenMsg"
+
+
+ false
+ Expression: setAlarm"
+ request_path == "/fhem-amad/setCommands/setAlarm"
+
+
+ false
+ Expression: setBluetooth"
+ request_path == "/fhem-amad/setCommands/setbluetooth"
+
+
+ false
+ Expression: setBrightness"
+ request_path == "/fhem-amad/setCommands/setBrightness"
+
+
+ false
+ Expression: setBTDevice"
+ request_path == "/fhem-amad/setCommands/setbtdevice"
+
+
+ false
+ Expression: setNotifiVolume"
+ request_path == "/fhem-amad/setCommands/setNotifiVolume"
+
+
+ false
+ Expression: setScreenFullscreen"
+ request_path == "/fhem-amad/setCommands/setScreenFullscreen"
+
+
+ false
+ Expression: setScreenlock"
+ request_path == "/fhem-amad/setCommands/screenlock"
+
+
+ false
+ Expression: setScreenOnOff"
+ request_path == "/fhem-amad/setCommands/setScreenOnOff"
+
+
+ false
+ Expression: setScreenOrientation"
+ request_path == "/fhem-amad/setCommands/setScreenOrientation"
+
+
+ false
+ Expression: setVibrate"
+ request_path == "/fhem-amad/setCommands/setvibrate"
+
+
+ false
+ Expression: setVoiceCommand"
+ request_path == "/fhem-amad/setCommands/setvoicecmd"
+
+
+ false
+ Expression: setVolume"
+ request_path == "/fhem-amad/setCommands/setVolume"
+
+
+ false
+ Expression: Shutdown
+ param_syscmd == "shutdown"
+
+
+ false
+ Expression: System Command"
+ request_path == "/fhem-amad/setCommands/systemcommand"
+
+
+ true
+ Expression: trigger == "com.android.music.metachanged"
+ trigger == "com.android.music.metachanged"
+
+
+ true
+ Expression: trigger == "Globale Variable: global_own_reading"
+ trigger == "Globale Variable: global_own_reading"
+
+
+ true
+ Expression: trigger == "HTTP Request: /fhem-amad/setCommands/*"
+ trigger == "HTTP Request: /fhem-amad/setCommands/*"
+
+
+ true
+ Expression: trigger == "Sprachbefehl angefordert"
+ trigger == "Sprachbefehl angefordert"
+
+
+ false
+ Expression: ttsMsg"
+ request_path == "/fhem-amad/setCommands/ttsMsg"
+
+
+ false
+ Expression: tuneinradio
+ param_app == "tuneinradio"
+
+
+ true
+ Expression: value != ""
+ value != ""
+
+
+ true
+ Flow Aktiv: Informations
+ Informations
+
+
+ true
+ Flow Aktiv: SetCommands
+ SetCommands
+
+
+ true
+ Flugmodus eingeschaltet
+
+
+ true
+ Musik Aktiv
+
+
+ true
+ Stromversorgung: Angeschlossen
+ true
+ true
+ true
+ true
+
+
+ true
+ WLAN Verbunden: Alle SSIDs
+ true
+
+
+
+ false
+ AMAD Voice Control
+ true
+
+ true
+ de-DE
+ false
+
+
+ false
+ App Starten: App3
+
+
+
+
+ false
+ App Starten: App4
+
+
+
+
+ false
+ App Starten: App5
+
+
+
+
+ false
+ App Starten: PlayMusic
+ com.google.android.music
+
+
+
+ false
+ App Starten: tuneinradio
+ tunein.player
+
+
+
+ true
+ Audio Player steuern: Medienknopf Play (Google Play Musik)
+ true
+ TOGGLE_PAUSE
+ KEYCODE_MEDIA_PLAY
+ true
+ com.google.android.music
+ com.google.android.music.playback.MediaButtonIntentReceiver
+ Google Play Musik
+
+
+ true
+ Audio Player steuern: Medienknopf Stopp (Google Play Musik)
+ true
+ STOP
+ KEYCODE_MEDIA_STOP
+ true
+ com.google.android.music
+ com.google.android.music.playback.MediaButtonIntentReceiver
+ Google Play Musik
+
+
+ true
+ Audio Player steuern: Medienknopf Weiter (Google Play Musik)
+ true
+ LAUNCH
+ KEYCODE_MEDIA_NEXT
+ true
+ com.google.android.music
+ com.google.android.music.playback.MediaButtonIntentReceiver
+ Google Play Musik
+
+
+ true
+ Audio Player steuern: Medienknopf Zurück (Google Play Musik)
+ true
+ LAUNCH
+ KEYCODE_MEDIA_PREVIOUS
+ true
+ com.google.android.music
+ com.google.android.music.playback.MediaButtonIntentReceiver
+ Google Play Musik
+
+
+ true
+ Benachrichtigung auf Bildschirm: {param_message} (lange)
+ true
+ {param_message}
+
+ 200
+ 250
+ false
+ 1.0
+ true
+ false
+ TOP_LEFT
+ 0
+ 0
+
+
+ true
+ Benachrichtigung auf Bildschirm: {value} (lange)
+ true
+ {value}
+
+ 200
+ 250
+ false
+ 1.0
+ true
+ false
+ TOP_LEFT
+ 0
+ 0
+
+
+ true
+ Benachrichtigung aus Statusbar entfernen: Alle
+ false
+ true
+ 1
+ true
+
+ true
+ {id}
+ TEXT
+ CONTAINS_TEXT
+
+
+
+ true
+ Benachrichtigung aus Statusbar entfernen: Alle (Automagic)
+ true
+ true
+ 1
+ false
+
+ true
+ {id}
+ TEXT
+ CONTAINS_TEXT
+
+
+
+ true
+ Bluetooth ein-/ausschalten: Aus
+ false
+
+
+ true
+ Bluetooth ein-/ausschalten: Ein
+ true
+
+
+ true
+ Bluetooth Gerät verbinden/trennen: Trennen Advanced Audio Distribution {param_btdeviceone}
+ A2DP
+ {param_btdeviceone}
+
+ false
+
+
+ true
+ Bluetooth Gerät verbinden/trennen: Trennen Advanced Audio Distribution {param_btdevicetwo}
+ A2DP
+ {param_btdevicetwo}
+
+ false
+
+
+ true
+ Bluetooth Gerät verbinden/trennen: Trennen Eingabegerät {param_btdeviceone}
+ INPUT_DEVICE
+ {param_btdeviceone}
+
+ false
+
+
+ true
+ Bluetooth Gerät verbinden/trennen: Trennen Eingabegerät {param_btdevicetwo}
+ INPUT_DEVICE
+ {param_btdevicetwo}
+
+ false
+
+
+ true
+ Bluetooth Gerät verbinden/trennen: Trennen Headset {param_btdeviceone}
+ HEADSET
+ {param_btdeviceone}
+
+ false
+
+
+ true
+ Bluetooth Gerät verbinden/trennen: Trennen Headset {param_btdevicetwo}
+ HEADSET
+ {param_btdevicetwo}
+
+ false
+
+
+ true
+ Bluetooth Gerät verbinden/trennen: Trennen Personal Area Network {param_btdeviceone}
+ PAN
+ {param_btdeviceone}
+
+ false
+
+
+ true
+ Bluetooth Gerät verbinden/trennen: Trennen Personal Area Network {param_btdevicetwo}
+ PAN
+ {param_btdevicetwo}
+
+ false
+
+
+ true
+ Bluetooth Gerät verbinden/trennen: Verbinden Advanced Audio Distribution {param_swtobtdevicemac}
+ A2DP
+ {param_swtobtdevicemac}
+
+ true
+
+
+ true
+ Display automatisch drehen ein-/ausschalten: Aus
+ false
+
+
+ true
+ Display automatisch drehen ein-/ausschalten: Ein
+ true
+
+
+ true
+ Flows ausführen: VoiceControl
+ VoiceControl
+
+ true
+ false
+ false
+
+
+ true
+ Flugmodus ein-/ausschalten: Ein
+ SYSTEM_SETTING
+ true
+
+
+ true
+ Gerät sperren
+
+
+ false
+ Get Android Version
+
+
+
+ true
+ Herunterfahren
+
+
+ false
+ HTTP Response Information
+ powerLevel@@{battery_percentage}@@@@powerPlugged@@{battery_plugged}@@@@volumeMusikBluetooth@@{volumeMusikBluetooth}@@@@volumeMusikSpeaker@@{volumeMusikSpeaker}@@@@screenBrightness@@{screenBrightness}@@@@nextAlarmTime@@{next_alarmtime}@@@@nextAlarmDay@@{next_alarmday}@@@@screen@@{screen_state}@@@@automagicState@@{notification_text}@@@@screenOrientation@@{screen_orientation}@@@@currentMusicTrack@@{global_track}@@@@currentMusicAlbum@@{global_album}@@@@currentMusicArtist@@{global_artist}@@@@bluetooth@@{bluetooth_state}@@@@connectedBTdevices@@{connected_devices_names}@@@@connectedBTdevicesMAC@@{connected_devices_addresses}@@@@flow_SetCommands@@{setCommandFlow_state}@@@@checkActiveTask@@{runTask}@@@@androidVersion@@{androidVersion}@@@@volumeNotification@@{volumeNotification}@@@@airplanemode@@{airplanemode}
+ true
+ text/plain
+
+
+ false
+ HTTP Response SetCommand
+ flow_informations@@{informationFlow_state}@@@@
+ true
+ text/plain
+
+
+ false
+ Initialisiere Variable Nächster Alarm: next_alarm
+ next_alarm
+
+
+ false
+ Initialisiere Variable Systemeinstellung: screenBrightness
+ SYSTEM
+ screen_brightness
+ screenBrightness
+
+
+ false
+ Initialisiere Variable Systemeinstellung: volumeMusikBluetooth
+ SYSTEM
+ volume_music_bt_a2dp
+ volumeMusikBluetooth
+
+
+ false
+ Initialisiere Variable Systemeinstellung: volumeMusikSpeaker
+ SYSTEM
+ volume_music_speaker
+ volumeMusikSpeaker
+
+
+ false
+ Initialisiere Variable Systemeinstellung: volumeNotification
+ SYSTEM
+ volume_ring_speaker
+ volumeNotification
+
+
+ true
+ Kommandozeilenbefehl als Root ausführen: getevent -c 1 in
+ getevent -c 1
+
+
+ stdout
+ stderr
+ exit_code
+
+
+ false
+ Lautstärken setzen param_notifivolume
+ false
+ global_volume_alarm
+ false
+ global_volume_dtmf
+ false
+ param_volume
+ true
+ param_notifivolume
+ false
+ global_volume_ring
+ false
+ global_volume_system
+ false
+ global_volume_voice_call
+ false
+ global_ringer_mode
+ false
+ global_interruptions_mode
+
+
+ false
+ Lautstärken setzen param_volume
+ false
+ global_volume_alarm
+ false
+ global_volume_dtmf
+ true
+ param_volume
+ false
+ global_volume_notification
+ false
+ global_volume_ring
+ false
+ global_volume_system
+ false
+ global_volume_voice_call
+ false
+ global_ringer_mode
+ false
+ global_interruptions_mode
+
+
+ true
+ Neustart
+
+
+
+ false
+ Notification Lautstärke Speichern
+ false
+ global_volume_alarm
+ false
+ global_volume_dtmf
+ false
+ global_volume_music
+ true
+ global_volume_notification
+ false
+ global_volume_ring
+ false
+ global_volume_system
+ false
+ global_volume_voice_call
+ false
+ global_ringer_mode
+ false
+ global_interruptions_mode
+
+
+ false
+ Notification Lautstärke Wiederherstellen
+ false
+ global_volume_alarm
+ false
+ global_volume_dtmf
+ false
+ param_volume
+ true
+ global_volume_notification
+ false
+ global_volume_ring
+ false
+ global_volume_system
+ false
+ global_volume_voice_call
+ false
+ global_ringer_mode
+ false
+ global_interruptions_mode
+
+
+ false
+ NotificationLautstärke auf Level 7
+ NOTIFICATION
+ 7
+ false
+ false
+
+
+ false
+ Own Reading
+ http://{global_fhemip}:8090
+ false
+ false
+
+ POST
+ GENERAL_TEXT
+ text/plain
+ {substring(getValue("global_own_reading",""),14)}@@{getValue("global_{substring(getValue('global_own_reading',''),14)}","nicht gefunden")}@@@@
+ @@@@readingsNameXYZ@@readingsValueABC
+ 60000
+ true
+ FHEMDEVICE: {global_fhemdevice}
+FHEMCMD: setreading
+ true
+ response
+ /storage/emulated/0/Download/file.bin
+ true
+
+
+ true
+ Pause: 10s (Schlafmodus zulassen)
+ 10s
+ false
+ false
+
+
+ true
+ Pause: 15s (Gerät wach halten)
+ 15s
+ true
+ false
+
+
+ true
+ Pause: 2s (Gerät wach halten)
+ 2s
+ true
+ false
+
+
+ true
+ Pause: 3s (Gerät wach halten)
+ 3s
+ true
+ false
+
+
+ false
+ Reading Music Metachanged
+ http://{global_fhemip}:8090
+ false
+ false
+
+ POST
+ GENERAL_TEXT
+ text/plain
+ currentMusicTrack@@{global_track}@@@@currentMusicAlbum@@{global_album}@@@@currentMusicArtist@@{global_artist}@@@@
+ @@@@readingsNameXYZ@@readingsValueABC
+ 60000
+ true
+ FHEMDEVICE: {global_fhemdevice}
+FHEMCMD: setreading
+ true
+ response
+ /storage/emulated/0/Download/file.bin
+ true
+
+
+ true
+ Schalte Display ein: Hell für 120s
+ true
+ 120s
+ true
+
+
+ true
+ Script: airplanemode = "off"
+
+
+
+ true
+ Script: bluetooth_state = "off"
+
+
+
+ true
+ Script: bluetooth_state = "on"
+
+
+
+ true
+ Script: global_artist = "no soundplayer activ"; global_track = "no soundplayer activ"; global_album = "no soundplayer activ";
+
+
+
+ true
+ Script: global_display="an";global_own_reading="{getDate()}_display"
+
+
+
+ true
+ Script: global_display="aus";global_own_reading="{getDate()}_display"
+
+
+
+ true
+ Script: global_fhemip = {header_fhemip} global_fhemdevice = {header_fhemdevice}
+
+
+
+ true
+ Script: global_touch="ja";global_own_reading="{getDate()}_touch";global_touched="ja"
+
+
+
+ true
+ Script: global_touch="nein";global_own_reading="{getDate()}_touch"
+
+
+
+ true
+ Script: global_touched="ja"
+
+
+
+ true
+ Script: global_touched="wait"
+
+
+
+ true
+ Script: informationFlow_state = "aktiv"
+
+
+
+ true
+ Script: informationFlow_state = "inaktiv"
+
+
+
+ true
+ Script: next_alarmday = "{next_alarm,dateformat,c}"
+
+
+
+ true
+ Script: next_alarmtime = "{next_alarm,dateformat,HH:mm}"
+
+
+
+ true
+ Script: notification_text = "Aktiviere Automagic unter Einstellungen -> Benachrichtigungen -> Benachrichtigungszugriff"
+
+
+
+ true
+ Script: notification_text = "not supported from your device"
+
+
+
+ true
+ Script: runTask = "0"
+
+
+
+ true
+ Script: runTask = "1"
+
+
+
+ true
+ Script: runTask = "not supported android version"
+
+
+
+ true
+ Script: runTask = "null"
+
+
+
+ true
+ Script: screen_orientation = "auto"
+
+
+
+ true
+ Script: screen_orientation = "landscape"
+
+
+
+ true
+ Script: screen_orientation = "portrait"
+
+
+
+ true
+ Script: screen_state = "off"
+
+
+
+ true
+ Script: screen_state = "on"
+
+
+
+ true
+ Script: setCommandFlow_state = "aktiv"
+
+
+
+ true
+ Script: setCommandFlow_state = "inaktiv"
+
+
+
+ false
+ Send Voice Input Value to AMADCommBridge
+ http://{global_fhemip}:8090
+ false
+ false
+
+ POST
+ GENERAL_TEXT
+ text/plain
+ {value}
+ @@@@readingsNameXYZ@@readingsValueABC
+ 60000
+ true
+ FHEMDEVICE: {global_fhemdevice}
+FHEMCMD: voiceinputvalue
+ true
+ response
+ /storage/emulated/0/Download/file.bin
+ true
+
+
+ true
+ Setze Alarm: um {param_hour}:{param_minute}
+
+ {param_hour}
+ {param_minute}
+
+
+ true
+ Setze Display Orientierung: Auf Default zurücksetzen
+ UNSPECIFIED
+ false
+
+
+ true
+ Setze Display Orientierung: Landscape
+ LANDSCAPE
+ false
+
+
+ true
+ Setze Display Orientierung: Portrait
+ PORTRAIT
+ false
+
+
+ true
+ Setze Flow Status: Aktivieren Informations
+ true
+ Informations
+
+
+
+ true
+ Setze Flow Status: Aktivieren SetCommands
+ true
+ SetCommands
+
+
+
+ true
+ Setze Lock PIN/Passwort: PIN/Passwort zurücksetzen
+ true
+ PIN
+ false
+ param_lockPIN
+
+
+ true
+ Setze Lock PIN/Passwort: Setze PIN von Variable param_lockpin
+ false
+ PIN
+ false
+ param_lockpin
+
+
+ true
+ Setze Systemeinstellung: System screen_brightness auf {param_brightness}
+ SYSTEM
+ screen_brightness
+ {param_brightness}
+ true
+
+
+ true
+ Setze Vollbild Modus: Auf Default zurücksetzen
+ UNSPECIFIED
+ false
+
+
+ true
+ Setze Vollbild Modus: Navigation nicht anzeigen
+ HIDE_NAVIGATION
+ false
+
+
+ true
+ Sound: /storage/emulated/0/Notifications/{param_notifyfile} als Benachrichtigung
+ FILE
+ Lautlos
+ /storage/emulated/0/Notifications/{param_notifyfile}
+ NOTIFICATION
+ false
+ true
+ true
+ TRANSIENT
+
+
+ true
+ Sprachausgabe: {param_message}
+ MUSIC
+ {param_message}
+ de_DE
+ true
+ 1.0
+ true
+ 1.0
+ true
+ false
+ false
+ true
+ TRANSIENT
+
+
+ false
+ Spracheingabe wurde nicht erkannt
+ NOTIFICATION
+ Ihre Eingabe wurde nicht verstanden
+ de_DE
+ true
+ 1.0
+ true
+ 1.0
+ true
+ false
+ false
+ true
+ TRANSIENT
+
+
+ false
+ StatusRequest
+ http://{global_fhemip}:8090
+ false
+ false
+
+ POST
+ GENERAL_TEXT
+ text/plain
+
+ @@@@readingsNameXYZ@@readingsValueABC
+ 60000
+ true
+ FHEMDEVICE: {global_fhemdevice}
+FHEMCMD: statusrequest
+ true
+ response
+ /storage/emulated/0/Download/file.bin
+ true
+
+
+ true
+ URL in Browser öffnen: {param_url} (mit Chrome)
+ {param_url}
+ true
+ com.android.chrome
+ com.google.android.apps.chrome.Main
+ Chrome
+
+
+ true
+ Vibrieren: Pattern 2 (-- --)
+ false
+ vibrate_pattern_2
+ 0,500
+
+
+ Informations
+ FHEM Info / Steuerung über AMAD Modul v1.2.0
+ true
+ QUEUE
+ 240
+
+ HTTP Request: /fhem-amad/deviceInfo/
+ com.android.music.metachanged
+ Globale Variable: global_own_reading
+
+ Initialisiere Variable Nächster Alarm: next_alarm
+ Initialisiere Variable Systemeinstellung: screenBrightness
+ Initialisiere Variable Systemeinstellung: volumeMusikSpeaker
+ Initialisiere Variable Systemeinstellung: volumeMusikBluetooth
+ Flow Aktiv: SetCommands
+ Musik Aktiv
+ Pause: 2s (Gerät wach halten)
+ Expression: trigger == "com.android.music.metachanged"
+ WLAN Verbunden: Alle SSIDs
+ WLAN Verbunden: Alle SSIDs
+ Reading Music Metachanged
+ Display automatisch drehen eingeschaltet
+ Script: runTask = "1"
+ Setze Flow Status: Aktivieren SetCommands
+ Script: setCommandFlow_state = "inaktiv"
+ Script: setCommandFlow_state = "aktiv"
+ Script: global_artist = "no soundplayer activ"; global_track = "no soundplayer activ"; global_album = "no soundplayer activ";
+ Script: next_alarmtime = "{next_alarm,dateformat,HH:mm}"
+ Script: next_alarmday = "{next_alarm,dateformat,c}"
+ Script: screen_orientation = "auto"
+ Script: screen_orientation = "portrait"
+ Script: screen_orientation = "landscape"
+ Display Orientierung: Portrait
+ Script: runTask = "0"
+ App Task läuft: {header_activetask} (neuster)
+ Expression: getAndroidSDKVersion() >= "19"
+ Expression: header_activetask != "none"
+ Script: runTask = "null"
+ Script: runTask = "not supported android version"
+ Script: notification_text = "not supported from your device"
+ Benachrichtigung in Statusbar angezeigt: Automagic
+ Script: notification_text = "Aktiviere Automagic unter Einstellungen -> Benachrichtigungen -> Benachrichtigungszugriff"
+ Script: screen_state = "off"
+ Script: screen_state = "on"
+ Display eingeschaltet
+ Expression: getAndroidSDKVersion() >= "19"
+ Bluetooth Gerät verbunden: Beliebiges Geräte
+ Script: bluetooth_state = "on"
+ Bluetooth eingeschaltet
+ Script: bluetooth_state = "off"
+ Own Reading
+ Expression: trigger == "Globale Variable: global_own_reading"
+ Script: global_fhemip = {header_fhemip} global_fhemdevice = {header_fhemdevice}
+ Initialisiere Variable Systemeinstellung: volumeNotification
+ Flugmodus eingeschaltet
+ Stromversorgung: Angeschlossen
+ Script: airplanemode = "off"
+ HTTP Response Information
+ Get Android Version
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Meldung Display An
+ AMAD FHEM / OwnReadings Examples
+ false
+ PARALLEL
+
+ Display Status: Ein
+
+ Script: global_display="an";global_own_reading="{getDate()}_display"
+
+
+
+ Meldung Display Aus
+ AMAD FHEM / OwnReadings Examples
+ false
+ PARALLEL
+
+ Display Status: Aus
+
+ Script: global_display="aus";global_own_reading="{getDate()}_display"
+
+
+
+ Meldung kein Touch
+ AMAD FHEM / OwnReadings Examples
+ false
+ STOP
+
+ Globale Variable: global_touched
+
+ Pause: 15s (Gerät wach halten)
+ Script: global_touched="wait"
+ Expression: global_touched=="ja"
+ Expression: global_touched=="wait"
+ Script: global_touch="nein";global_own_reading="{getDate()}_touch"
+
+
+
+
+
+
+
+ Meldung Touch
+ AMAD FHEM / OwnReadings Examples
+ false
+ STOP
+
+ Periodischer Timer: alle 4m
+
+ Kommandozeilenbefehl als Root ausführen: getevent -c 1 in
+ Script: global_touched="ja"
+ Pause: 10s (Schlafmodus zulassen)
+ Script: global_touch="ja";global_own_reading="{getDate()}_touch";global_touched="ja"
+
+
+
+
+
+
+
+ SetCommands
+ FHEM Info / Steuerung über AMAD Modul v1.2.0
+ true
+ QUEUE
+ 240
+
+ HTTP Request: /fhem-amad/deviceInfo/
+ HTTP Request: /fhem-amad/setCommands/*
+ Sprachbefehl angefordert
+
+ Expression: param_screen=="on"
+ Expression: setBrightness"
+ Expression: setAlarm"
+ Expression: screenMsg"
+ URL in Browser öffnen: {param_url} (mit Chrome)
+ Benachrichtigung auf Bildschirm: {param_message} (lange)
+ Expression: setScreenFullscreen"
+ Expression: param_orientation == "auto"
+ Setze Display Orientierung: Portrait
+ Setze Display Orientierung: Landscape
+ Expression: param_orientation == "landscape"
+ Setze Vollbild Modus: Navigation nicht anzeigen
+ Setze Vollbild Modus: Auf Default zurücksetzen
+ Expression: param_button == "back"
+ Expression: param_button == "next"
+ Setze Display Orientierung: Auf Default zurücksetzen
+ Expression: param_button == "play"
+ Expression: mediaPlayer"
+ Expression: param_button == "stop"
+ Expression: param_screen=="off"
+ Expression: setScreenOnOff"
+ App Task läuft: App5 (neuster)
+ Expression: App5
+ Expression: App4
+ App Task läuft: App3 (neuster)
+ Expression: App3
+ App Starten: App3
+ App Starten: App4
+ App Task läuft: App4 (neuster)
+ Expression: tuneinradio
+ App Task läuft: tuneinradio (neuster)
+ App Starten: tuneinradio
+ App Starten: App5
+ App Task läuft: gplay (neuster)
+ Expression: gplay
+ App Starten: PlayMusic
+ Flow Aktiv: Informations
+ Expression: ttsMsg"
+ Setze Systemeinstellung: System screen_brightness auf {param_brightness}
+ Schalte Display ein: Hell für 120s
+ Display automatisch drehen ein-/ausschalten: Aus
+ Display automatisch drehen ein-/ausschalten: Ein
+ Setze Alarm: um {param_hour}:{param_minute}
+ Expression: setScreenOrientation"
+ Expression: param_fullscreen == "off"
+ Expression: param_fullscreen == "on"
+ Expression: setBluetooth"
+ Sprachausgabe: {param_message}
+ Expression: param_bluetooth == "off"
+ Expression: param_bluetooth == "on"
+ Bluetooth ein-/ausschalten: Ein
+ Expression: openApp"
+ Setze Flow Status: Aktivieren Informations
+ Script: informationFlow_state = "inaktiv"
+ Bluetooth eingeschaltet
+ Bluetooth Gerät verbinden/trennen: Trennen Advanced Audio Distribution {param_btdeviceone}
+ Bluetooth Gerät verbinden/trennen: Trennen Eingabegerät {param_btdeviceone}
+ Bluetooth Gerät verbinden/trennen: Trennen Personal Area Network {param_btdeviceone}
+ Bluetooth Gerät verbinden/trennen: Trennen Advanced Audio Distribution {param_btdevicetwo}
+ Bluetooth Gerät verbinden/trennen: Trennen Eingabegerät {param_btdevicetwo}
+ Bluetooth Gerät verbinden/trennen: Trennen Headset {param_btdeviceone}
+ Bluetooth Gerät verbinden/trennen: Trennen Headset {param_btdevicetwo}
+ Bluetooth Gerät verbinden/trennen: Trennen Personal Area Network {param_btdevicetwo}
+ Pause: 3s (Gerät wach halten)
+ Bluetooth Gerät verbinden/trennen: Verbinden Advanced Audio Distribution {param_swtobtdevicemac}
+ Pause: 2s (Gerät wach halten)
+ Gerät sperren
+ Script: informationFlow_state = "aktiv"
+ Expression: setBTDevice"
+ Expression: openURL"
+ Audio Player steuern: Medienknopf Play (Google Play Musik)
+ Audio Player steuern: Medienknopf Weiter (Google Play Musik)
+ Audio Player steuern: Medienknopf Zurück (Google Play Musik)
+ StatusRequest
+ Bluetooth ein-/ausschalten: Aus
+ Audio Player steuern: Medienknopf Stopp (Google Play Musik)
+ HTTP Response SetCommand
+ Expression: setVolume"
+ Lautstärken setzen param_volume
+ Expression: trigger == "Sprachbefehl angefordert"
+ Expression: param_orientation == "portrait"
+ Setze Lock PIN/Passwort: PIN/Passwort zurücksetzen
+ Expression: param_lockmod == "on"
+ Expression: setScreenlock"
+ Setze Lock PIN/Passwort: Setze PIN von Variable param_lockpin
+ Expression: Reboot
+ Expression: System Command"
+ Neustart
+ Expression: Shutdown
+ Herunterfahren
+ Sound: /storage/emulated/0/Notifications/{param_notifyfile} als Benachrichtigung
+ Benachrichtigung aus Statusbar entfernen: Alle
+ Benachrichtigung aus Statusbar entfernen: Alle (Automagic)
+ Expression: Automagic
+ Expression: All
+ Lautstärken setzen param_notifivolume
+ Expression: setNotifiVolume"
+ Expression: notifysnd"
+ NotificationLautstärke auf Level 7
+ Notification Lautstärke Speichern
+ Expression: param_notifyfile == "RedAlert.mp3"
+ Notification Lautstärke Wiederherstellen
+ Expression: setVoiceCommand"
+ Flows ausführen: VoiceControl
+ Expression: setVibrate"
+ Vibrieren: Pattern 2 (-- --)
+ Expression: trigger == "HTTP Request: /fhem-amad/setCommands/*"
+ Expression: Clear Automagic Meldungen"
+ Flugmodus ein-/ausschalten: Ein
+ Expression: Airplanemode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VoiceControl
+ FHEM Info / Steuerung über AMAD Modul v1.2.0
+ true
+ QUEUE
+
+ Expression: value != ""
+ Spracheingabe wurde nicht erkannt
+ Benachrichtigung auf Bildschirm: {value} (lange)
+ Send Voice Input Value to AMADCommBridge
+ AMAD Voice Control
+
+
+
+
+
+
+
\ No newline at end of file