From e47d66132ecd221b0bd1dab53ab7f9f8a2b62855 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Sun, 5 Jun 2016 23:02:32 +0200 Subject: [PATCH] =?UTF-8?q?Setzen=20vom=20Unterbrechungsstatus=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 74_AMAD.pm | 17 +- ...0.xml => 74_AMADautomagicFlowset_2.2.1.xml | 535 ++++++++++-------- 2 files changed, 315 insertions(+), 237 deletions(-) rename 74_AMADautomagicFlowset_2.2.0.xml => 74_AMADautomagicFlowset_2.2.1.xml (88%) diff --git a/74_AMAD.pm b/74_AMAD.pm index 6103e8e..b27d027 100644 --- a/74_AMAD.pm +++ b/74_AMAD.pm @@ -37,8 +37,8 @@ use TcpServerUtils; use Encode qw(encode); -my $modulversion = "2.2.1"; -my $flowsetversion = "2.2.0"; +my $modulversion = "2.2.2"; +my $flowsetversion = "2.2.1"; @@ -82,7 +82,7 @@ sub AMAD_Define($$) { my @a = split( "[ \t][ \t]*", $def ); - return "too few parameters: define AMAD has the ACCESPOINT-SSID a space you must space replace @@" if( ( @a < 3 || @a > 4 ) && @a != 2 ); + return "too few parameters: define AMAD has the ACCESPOINT-SSID a space you must space replace @@" if( $a[0] ne "AMADCommBridge" and @a != 4 ); my $name = $a[0]; my $host = $a[2] if( $a[2] ); @@ -526,6 +526,7 @@ sub AMAD_Set($$@) { $list .= "openCall "; $list .= "currentFlowsetUpdate:noArg "; $list .= "installFlowSource "; + $list .= "doNotDisturb:neverDisturb,alwaysDisturb,alarmClockOnly,onlyImportantDisturb "; if( lc $cmd eq 'screenmsg' || lc $cmd eq 'ttsmsg' @@ -555,6 +556,7 @@ sub AMAD_Set($$@) { || lc $cmd eq 'currentflowsetupdate' || lc $cmd eq 'installflowsource' || lc $cmd eq 'opencall' + || lc $cmd eq 'donotdisturb' || lc $cmd eq 'vibrate') { Log3 $name, 5, "AMAD ($name) - set $name $cmd ".join(" ", @val); @@ -784,6 +786,15 @@ sub AMAD_SelectSetCmd($$@) { return AMAD_HTTP_POST( $hash,$url ); } + elsif( lc $cmd eq 'donotdisturb' ) { + + my $disturbmod = join( " ", @data ); + + my $url = "http://" . $host . ":" . $port . "/fhem-amad/setCommands/donotdisturb?disturbmod=$disturbmod"; + + return AMAD_HTTP_POST( $hash,$url ); + } + elsif( lc $cmd eq 'bluetooth' ) { my $mod = join( " ", @data ); diff --git a/74_AMADautomagicFlowset_2.2.0.xml b/74_AMADautomagicFlowset_2.2.1.xml similarity index 88% rename from 74_AMADautomagicFlowset_2.2.0.xml rename to 74_AMADautomagicFlowset_2.2.1.xml index 3c2241d..8656023 100644 --- a/74_AMADautomagicFlowset_2.2.0.xml +++ b/74_AMADautomagicFlowset_2.2.1.xml @@ -483,6 +483,11 @@ irname=getString("name") Expression: contains(value, " und ") contains(value, " und ") + + false + Expression: do not Disturb" + request_path == "/fhem-amad/setCommands/donotdisturb" + true Expression: getAndroidSDKVersion() >= "19" @@ -594,6 +599,26 @@ or global_deviceport!= {header_dport} Expression: param_button == "stop" param_button == "stop" + + true + Expression: param_disturbmod == "alarmClockOnly" + param_disturbmod == "alarmClockOnly" + + + true + Expression: param_disturbmod == "alwaysDisturb" + param_disturbmod == "alwaysDisturb" + + + true + Expression: param_disturbmod == "neverDisturb" + param_disturbmod == "neverDisturb" + + + true + Expression: param_disturbmod == "onlyImportantDisturb" + param_disturbmod == "onlyImportantDisturb" + true Expression: param_fullscreen == "off" @@ -2233,8 +2258,8 @@ FHEMCMD: setreading true - Script: amad_flowset_version = "2.2.0" - + Script: amad_flowset_version = "2.2.1" + true @@ -2572,6 +2597,30 @@ FHEMCMD: voiceinputvalue {param_minute}m true + + true + Setze Unterbrechnungen-Modus: Alle / Immer unterbrechen + NOTIFICATION_LISTENER + OFF + + + true + Setze Unterbrechnungen-Modus: Keine / Nicht unterbrechen + NOTIFICATION_LISTENER + NO_INTERRUPTIONS + + + true + Setze Unterbrechnungen-Modus: Nur Wecker (Android 6+) + NOTIFICATION_LISTENER + ALARMS_ONLY + + + true + Setze Unterbrechnungen-Modus: Wichtig / Nur wichtige Unterbrechnungen zulassen + NOTIFICATION_LISTENER + IMPORTANT_INTERRUPTIONS + false Setze voice Variablen @@ -2672,7 +2721,7 @@ FHEMCMD: setreading Informations - AMAD2 Info/Control Flowset v2.2.0 + AMAD2 Info/Control Flowset v2.2.1 true PARALLEL 900 @@ -2837,7 +2886,7 @@ FHEMCMD: setreading Systemeinstellung verändert: System volume_ring_speaker Periodischer Timer: alle 30s - Script: amad_flowset_version = "2.2.0" + Script: amad_flowset_version = "2.2.1" @@ -3032,7 +3081,7 @@ FHEMCMD: setreading MultimediaControl - AMAD2 Info/Control Flowset v2.2.0 + AMAD2 Info/Control Flowset v2.2.1 true PARALLEL @@ -3113,7 +3162,7 @@ FHEMCMD: setreading SetCommands - AMAD2 Info/Control Flowset v2.2.0 + AMAD2 Info/Control Flowset v2.2.1 true QUEUE 900 @@ -3142,251 +3191,269 @@ FHEMCMD: setreading Display automatisch drehen ein-/ausschalten: Ein Expression: setScreenOrientation" Expression: param_fullscreen == "off" - Expression: param_fullscreen == "on" - Expression: setBluetooth" - Expression: param_bluetooth == "off" - Expression: param_bluetooth == "on" - Bluetooth ein-/ausschalten: Ein - 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) - Expression: setBTDevice" - Bluetooth ein-/ausschalten: Aus - Expression: setVolume" - Expression: param_orientation == "portrait" - Expression: Reboot - Expression: System Command" - Neustart - Expression: Shutdown - Herunterfahren - Benachrichtigung aus Statusbar entfernen: Alle - Benachrichtigung aus Statusbar entfernen: Alle (Automagic) - Expression: Automagic - Expression: All - 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: Clear Automagic Meldungen" - Flugmodus ein-/ausschalten: Ein - Setze Display Helligkeit: {param_brightness} - Expression: setScreenlock" - Expression: sendIntent" - Setze Flow Status: Aktivieren Informations - Script: informationFlow_state = "aktiv" - Expression: Airplanemode - Pause: 1s (Gerät wach halten) - Airplainemode ON - Expression: param_lockmod == "lock" - Setze Lock PIN/Passwort: PIN/Passwort zurücksetzen - Setze Lock PIN/Passwort: Setze PIN von Variable param_lockpin - Expression: trigger == "Sprachbefehl angefordert" - WLAN Verbunden: {global_apssid} - Setze Alarm: um {param_hour}:{param_minute} - Expression: setAlarm" - Setze Timer - Expression: setVibrate" - Expression: openApp" - App Starten: App - Schalte Display ein: Hell für {param_screenontime}s - Flow Status Informations - App Task läuft: App (neuster) - Expression: screenMsg" - Benachrichtigung auf Bildschirm: {param_message} (lange) - Expression: openURL" - URL in Browser öffnen: {param_url} (mit {param_browserapp}/{param_browserappclass}) - Vibrieren: Pattern 2 (-- --) - Expression: global_apssid != "usb-ethernet" - Expression: installFlow" - Download URL: http://{global_fhemip}:{global_bridgeport}/installFlow_{param_flowname} to /storage/emulated/0/Download - Flows/Widgets importieren: /storage/emulated/0/Download/installFlow_{param_flowname} - Setze Flow Status: Aktivieren {imported_flow_names,listformat,comma} - Dateien löschen: /storage/sdcard0/Download/installFlow_{param_flowname} - Setze Flow Status: Aktivieren {imported_flow_names,listformat,comma} - Flows/Widgets importieren: /storage/sdcard0/Download/installFlow_{param_flowname} - Download URL: http://{global_fhemip}:{global_bridgeport}/installFlow_{param_flowname} to /storage/sdcard0/Download - Download URL: http://{global_fhemip}:{global_bridgeport}/installFlow_{param_flowname} to /storage/sdcard0/Download - Flows/Widgets importieren: /storage/sdcard0/Download/installFlow_{param_flowname} - Setze Flow Status: Aktivieren {imported_flow_names,listformat,comma} - Dateien löschen: /storage/sdcard0/Download/installFlow_{param_flowname} - Gerätespeicherplatz: Freier Speicherplatz > 1kb (/sdcard) - Automagic State - Script: notification_text = "Flow install: path for download not exist" - Gerätespeicherplatz: Freier Speicherplatz > 1kb (/storage/emulated/0) - Gerätespeicherplatz: Freier Speicherplatz > 1kb (/storage/sdcard0) - Sound: {param_notifypath}{param_notifyfile} als Benachrichtigung - Dateien löschen: /storage/emulated/0/Download/installFlow_{param_flowname} - Gerät sperren - Script: udef_trigger = "setLockPin" - Flows ausführen: udef_trigger setLockPin - Display eingeschaltet - Gerät sperren - Schalte Display ein - Gerät sperren - Sprachausgabe: {param_message} - Lautstärken setzen param_volume - Lautstärken setzen param_notifivolume - Expression: setTimer" - Expression: trigger == "HTTP Request: /fhem-amad/setCommands/*" - Expression: openCall" - Nummer anrufen: {param_callnumber} - Expression: param_option - Pause: {param_hanguptime}s (Gerät wach halten) - Anruf beenden - Broadcast senden: {param_action} - - - - + Expression: setBluetooth" + Expression: param_bluetooth == "off" + Expression: param_bluetooth == "on" + Bluetooth ein-/ausschalten: Ein + 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) + Expression: setBTDevice" + Bluetooth ein-/ausschalten: Aus + Expression: setVolume" + Expression: param_orientation == "portrait" + Expression: Reboot + Expression: System Command" + Neustart + Expression: Shutdown + Herunterfahren + Benachrichtigung aus Statusbar entfernen: Alle + Benachrichtigung aus Statusbar entfernen: Alle (Automagic) + Expression: Automagic + Expression: All + 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: Clear Automagic Meldungen" + Flugmodus ein-/ausschalten: Ein + Setze Display Helligkeit: {param_brightness} + Expression: setScreenlock" + Expression: sendIntent" + Setze Flow Status: Aktivieren Informations + Script: informationFlow_state = "aktiv" + Expression: Airplanemode + Pause: 1s (Gerät wach halten) + Airplainemode ON + Expression: param_lockmod == "lock" + Setze Lock PIN/Passwort: PIN/Passwort zurücksetzen + Setze Lock PIN/Passwort: Setze PIN von Variable param_lockpin + Expression: trigger == "Sprachbefehl angefordert" + WLAN Verbunden: {global_apssid} + Setze Alarm: um {param_hour}:{param_minute} + Expression: setAlarm" + Setze Timer + Expression: setVibrate" + Expression: openApp" + App Starten: App + Schalte Display ein: Hell für {param_screenontime}s + Flow Status Informations + App Task läuft: App (neuster) + Expression: screenMsg" + Benachrichtigung auf Bildschirm: {param_message} (lange) + Vibrieren: Pattern 2 (-- --) + Expression: global_apssid != "usb-ethernet" + Expression: installFlow" + Download URL: http://{global_fhemip}:{global_bridgeport}/installFlow_{param_flowname} to /storage/emulated/0/Download + Flows/Widgets importieren: /storage/emulated/0/Download/installFlow_{param_flowname} + Setze Flow Status: Aktivieren {imported_flow_names,listformat,comma} + Dateien löschen: /storage/sdcard0/Download/installFlow_{param_flowname} + Setze Flow Status: Aktivieren {imported_flow_names,listformat,comma} + Flows/Widgets importieren: /storage/sdcard0/Download/installFlow_{param_flowname} + Download URL: http://{global_fhemip}:{global_bridgeport}/installFlow_{param_flowname} to /storage/sdcard0/Download + Download URL: http://{global_fhemip}:{global_bridgeport}/installFlow_{param_flowname} to /storage/sdcard0/Download + Flows/Widgets importieren: /storage/sdcard0/Download/installFlow_{param_flowname} + Setze Flow Status: Aktivieren {imported_flow_names,listformat,comma} + Dateien löschen: /storage/sdcard0/Download/installFlow_{param_flowname} + Gerätespeicherplatz: Freier Speicherplatz > 1kb (/sdcard) + Automagic State + Script: notification_text = "Flow install: path for download not exist" + Gerätespeicherplatz: Freier Speicherplatz > 1kb (/storage/emulated/0) + Gerätespeicherplatz: Freier Speicherplatz > 1kb (/storage/sdcard0) + Sound: {param_notifypath}{param_notifyfile} als Benachrichtigung + Dateien löschen: /storage/emulated/0/Download/installFlow_{param_flowname} + Gerät sperren + Script: udef_trigger = "setLockPin" + Flows ausführen: udef_trigger setLockPin + Display eingeschaltet + Gerät sperren + Schalte Display ein + Gerät sperren + Sprachausgabe: {param_message} + Lautstärken setzen param_volume + Lautstärken setzen param_notifivolume + Expression: setTimer" + Expression: openCall" + Nummer anrufen: {param_callnumber} + Expression: param_option + Pause: {param_hanguptime}s (Gerät wach halten) + Anruf beenden + Broadcast senden: {param_action} + URL in Browser öffnen: {param_url} (mit {param_browserapp}/{param_browserappclass}) + Setze Unterbrechnungen-Modus: Alle / Immer unterbrechen + Setze Unterbrechnungen-Modus: Wichtig / Nur wichtige Unterbrechnungen zulassen + Setze Unterbrechnungen-Modus: Keine / Nicht unterbrechen + Setze Unterbrechnungen-Modus: Nur Wecker (Android 6+) + Expression: openURL" + Expression: param_fullscreen == "on" + Expression: do not Disturb" + Expression: param_disturbmod == "alwaysDisturb" + Expression: param_disturbmod == "onlyImportantDisturb" + Expression: param_disturbmod == "neverDisturb" + Expression: param_disturbmod == "alarmClockOnly" + Expression: trigger == "HTTP Request: /fhem-amad/setCommands/*" + + + + - + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Update AMAD Flowset - AMAD2 Info/Control Flowset v2.2.0 + AMAD2 Info/Control Flowset v2.2.1 true PARALLEL @@ -3434,7 +3501,7 @@ FHEMCMD: setreading VoiceControl - AMAD2 Info/Control Flowset v2.2.0 + AMAD2 Info/Control Flowset v2.2.1 true QUEUE 60