diff --git a/74_AMAD.pm b/74_AMAD.pm index 1b30d4f..162fb7d 100644 --- a/74_AMAD.pm +++ b/74_AMAD.pm @@ -37,7 +37,7 @@ use TcpServerUtils; use Encode qw(encode); -my $version = "1.9.11"; +my $version = "1.9.17"; @@ -77,10 +77,11 @@ sub AMAD_Define($$) { my @a = split( "[ \t][ \t]*", $def ); - return "too few parameters: define AMAD " if( ( @a < 3 || @a > 4 ) && $a[0] ne "AMADCommBridge"); + return "too few parameters: define AMAD has the ACCESPOINT-SSID a space you must space replace @@" if( ( @a < 3 || @a > 4 ) && @a != 2 ); my $name = $a[0]; my $host = $a[2]; + $a[3] =~ s/@@/ /g; my $apssid = $a[3]; my $port = 8090; @@ -229,9 +230,10 @@ my ( $hash ) = @_; } else { - InternalTimer( gettimeofday()+15, "AMAD_GetUpdate", $hash, 0 ); Log3 $name, 3, "AMAD ($name) - GetUpdate, FHEM or Device not ready yet"; - Log3 $name, 3, "AMAD ($name) - GetUpdate, Please set \"$bname fhemServerIP \" NOW!" if( ReadingsVal( $bname, "fhemServerIP", "none" ) ne "none" ); + Log3 $name, 3, "AMAD ($name) - GetUpdate, Please set $bname fhemServerIP NOW!" if( ReadingsVal( $bname, "fhemServerIP", "none" ) eq "none" ); + + InternalTimer( gettimeofday()+15, "AMAD_GetUpdate", $hash, 0 ); } } @@ -920,11 +922,6 @@ sub AMAD_CommBridge_Open($) { my ( $bhash ) = @_; my $bname = $bhash->{NAME}; - if( $bname ne "AMADCommBridge" ) { - - Log3 $bname, 3, "The name of the CommBridge may be called only AMADCommBridge"; - return "The name of the CommBridge may be called only AMADCommBridge"; - } # Oeffnen des TCP Sockets my $bret = TcpServer_Open( $bhash, "8090", "global" ); diff --git a/74_AMADautomagicFlows_1.9.11.xml b/74_AMADautomagicFlows_1.9.17.xml similarity index 89% rename from 74_AMADautomagicFlows_1.9.11.xml rename to 74_AMADautomagicFlows_1.9.17.xml index 58226f0..410f2ca 100644 --- a/74_AMADautomagicFlows_1.9.11.xml +++ b/74_AMADautomagicFlows_1.9.17.xml @@ -1980,63 +1980,11 @@ FHEMCMD: setreading Informations - FHEM Info / Steuerung über AMAD Modul v1.9.11 + FHEM Info / Steuerung über AMAD Modul v1.9 true PARALLEL 500 - Nächster Alarm - Stromversorgung und Akkustand - Get Android Version - Script: androidVersion = "not supported funktion" - Android Version - Initialisiere Variable Systemeinstellung: volumeNotification - Stromversorgung: Angeschlossen - Setze Globale Variablen - Expression: trigger == "Daydream Status: Gestartet" - Daydream State - Script: setCommandFlow_state = "aktiv" - Flow Status SetCommands - Setze Flow Status: Aktivieren SetCommands - Script: setCommandFlow_state = "inaktiv" - Notification Volume - Bluetooth Status - Script: bluetooth_state = "off" - Script: bluetooth_state = "on" - Bluetooth eingeschaltet - Expression: trigger == "Bluetooth Status: Schaltet aus, Aus" or trigger == "Bluetooth Status: Schaltet ein, Ein" - Expression: trigger == "Bluetooth Gerät getrennt" or trigger == "Bluetooth Gerät verbunden" - Bluetooth Device Status - Flow Aktiv: SetCommands - Lautstärke / Volume - Initialisiere Variable Systemeinstellung: screenBrightness - Script: volume = {volumeBT} - Script: volume = {volumeSP} - Bluetooth Gerät verbunden: Beliebiges Geräte (Advanced Audio Distribution) - Initialisiere Variable Systemeinstellung: volumeMusikSpeaker.2 - Initialisiere Variable Systemeinstellung: volumeMusikBluetooth.2 - Script: daydream_state = "on" - Script: daydream_state = "off" - Bluetooth Gerät verbunden: Beliebiges Geräte - Script: next_alarmday = "{next_alarm,dateformat,c}" - Script: next_alarmtime = "{next_alarm,dateformat,HH:mm}" - Initialisiere Variable Nächster Alarm: next_alarm - Screen Brightness - App Task läuft: {global_activetask} (neuster) - Expression: getAndroidSDKVersion() >= "19" - Script: runTask = "1" - Script: runTask = "0" - Script: runTask = "not supported android version" - Script: runTask = "null" - Check run Task - Expression: global_activetask != "none" - Expression: trigger == "Akku Ladestand: grösser als 0%" - Expression: trigger == "Daydream Status: Gestartet" or trigger == "Daydream Status: Gestoppt" - WLAN Verbunden: {global_apssid} - Expression: trigger == "Systemeinstellung verändert: System volume_ring_speaker" - Expression: trigger == "Systemeinstellung verändert: System volume_music_bt_a2dp" or trigger == "Systemeinstellung verändert: System volume_music_speaker" - Expression: trigger == "Systemeinstellung verändert: System next_alarm" - Expression: trigger == "Systemeinstellung verändert: System screen_brightness" - + Stromversorgung: Angeschlossen App Task Gestartet: {global_activetask} Bluetooth Status: Schaltet ein, Ein @@ -2064,29 +2012,81 @@ FHEMCMD: setreading Flugmodus: Aus Systemeinstellung verändert: System volume_ring_speaker - Pause: 1s (Gerät wach halten) - Musik Aktiv - Script: global_artist = "no soundplayer activ"; global_track = "no soundplayer activ"; global_album = "no soundplayer activ"; - Reading Music Metachanged.2 - Expression: trigger == "com.android.music.playstatechanged" or trigger == "com.android.music.metachanged" - WLAN Verbunden: {global_apssid} - Script: airplanemode = "off" - Airplainemode - Expression: trigger == "Flugmodus: Aus" - Script: airpcount = 0 + Nächster Alarm + Stromversorgung und Akkustand + Get Android Version + Script: androidVersion = "not supported funktion" + Android Version + Initialisiere Variable Systemeinstellung: volumeNotification + Stromversorgung: Angeschlossen + Setze Globale Variablen + Expression: trigger == "Daydream Status: Gestartet" + Daydream State + Script: setCommandFlow_state = "aktiv" + Flow Status SetCommands + Setze Flow Status: Aktivieren SetCommands + Script: setCommandFlow_state = "inaktiv" + Notification Volume + Bluetooth Status + Script: bluetooth_state = "off" + Script: bluetooth_state = "on" + Bluetooth eingeschaltet + Expression: trigger == "Bluetooth Status: Schaltet aus, Aus" or trigger == "Bluetooth Status: Schaltet ein, Ein" + Expression: trigger == "Bluetooth Gerät getrennt" or trigger == "Bluetooth Gerät verbunden" + Bluetooth Device Status + Flow Aktiv: SetCommands + Lautstärke / Volume + Initialisiere Variable Systemeinstellung: screenBrightness + Script: volume = {volumeBT} + Script: volume = {volumeSP} + Bluetooth Gerät verbunden: Beliebiges Geräte (Advanced Audio Distribution) + Initialisiere Variable Systemeinstellung: volumeMusikSpeaker.2 + Initialisiere Variable Systemeinstellung: volumeMusikBluetooth.2 + Script: daydream_state = "on" + Script: daydream_state = "off" + Bluetooth Gerät verbunden: Beliebiges Geräte + Script: next_alarmday = "{next_alarm,dateformat,c}" + Script: next_alarmtime = "{next_alarm,dateformat,HH:mm}" + Initialisiere Variable Nächster Alarm: next_alarm + Screen Brightness + App Task läuft: {global_activetask} (neuster) + Expression: getAndroidSDKVersion() >= "19" + Script: runTask = "1" + Script: runTask = "0" + Script: runTask = "not supported android version" + Script: runTask = "null" + Check run Task + Expression: global_activetask != "none" + Expression: trigger == "Akku Ladestand: grösser als 0%" + Expression: trigger == "Daydream Status: Gestartet" or trigger == "Daydream Status: Gestoppt" + WLAN Verbunden: {global_apssid} + Expression: trigger == "Systemeinstellung verändert: System volume_ring_speaker" + Expression: trigger == "Systemeinstellung verändert: System volume_music_bt_a2dp" or trigger == "Systemeinstellung verändert: System volume_music_speaker" + Expression: trigger == "Systemeinstellung verändert: System next_alarm" + Expression: trigger == "Systemeinstellung verändert: System screen_brightness" + Pause: 1s (Gerät wach halten) + Musik Aktiv + Script: global_artist = "no soundplayer activ"; global_track = "no soundplayer activ"; global_album = "no soundplayer activ"; + Reading Music Metachanged.2 + Expression: trigger == "com.android.music.playstatechanged" or trigger == "com.android.music.metachanged" + WLAN Verbunden: {global_apssid} + Script: airplanemode = "off" + Airplainemode + Expression: trigger == "Flugmodus: Aus" + Script: airpcount = 0 Expression: trigger == "HTTP Request: /fhem-amad/deviceInfo/" - Expression: airpcount < 11 + Expression: airpcount < 11 Script: airpcount = airpcount + 1 - Pause: 2s (Gerät wach halten) - Expression: trigger == "Display Status: Aus" or trigger == "Display Status: Ein" or udef_trigger == "setLockPin" - Script: scrcount = 0 - Keyguard gesperrt - Script: keyguard = "locked" - Script: keyguard = "unlocked" - Display eingeschaltet - Script: screen_state = "on {keyguard}" - Script: screen_state = "off {keyguard}" - Screen State + Pause: 2s (Gerät wach halten) + Expression: trigger == "Display Status: Aus" or trigger == "Display Status: Ein" or udef_trigger == "setLockPin" + Script: scrcount = 0 + Keyguard gesperrt + Script: keyguard = "locked" + Script: keyguard = "unlocked" + Display eingeschaltet + Script: screen_state = "on {keyguard}" + Script: screen_state = "off {keyguard}" + Screen State Expression: trigger == "Benachrichtigung in Statusbar angezeigt: ch.gridvision.ppam.androidautomagic" or trigger == "Benachrichtigung in Statusbar entfernt: ch.gridvision.ppam.androidautomagic" Expression: global_activetask != "none" Expression: udef_trigger == "setLockPin" @@ -2096,95 +2096,95 @@ FHEMCMD: setreading Display Orientierung: Portrait Script: screen_orientation = "portrait" Script: screen_orientation = "landscape" - Display automatisch drehen eingeschaltet + Display automatisch drehen eingeschaltet Script: notification_text = "Aktiviere Automagic unter Einstellungen -> Benachrichtigungen -> Benachrichtigungszugriff" Benachrichtigung in Statusbar angezeigt: Automagic Script: notification_text = "not supported from your device" Script: dock_state = "docked" - Script: dock_state = "undocked" - Script: keyguardSet = "1" - Script: keyguardSet = "0" + Script: dock_state = "undocked" + Script: keyguardSet = "1" + Script: keyguardSet = "0" KeyGuard Set Dock State Automagic State Screen Orientation - Script: screen_orientation_mode = "auto" - Script: screen_orientation_mode = "manual" + Script: screen_orientation_mode = "auto" + Script: screen_orientation_mode = "manual" Expression: trigger == "Display Orientierung: Landscape" or trigger == "Display Orientierung: Portrait" or trigger == "Display Status: Ein" or trigger == "Display Status: Aus" Pause: 2s (Gerät wach halten) - Script: airpcount = airpcount + 1 - Expression: keyguard == "locked" + Script: airpcount = airpcount + 1 + Expression: keyguard == "locked" Expression: airpcount < 6 - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + @@ -2195,19 +2195,19 @@ FHEMCMD: setreading - - - - - - + + + + + - + + - - - + + + @@ -2260,7 +2260,7 @@ FHEMCMD: setreading SetCommands - FHEM Info / Steuerung über AMAD Modul v1.9.11 + FHEM Info / Steuerung über AMAD Modul v1.9 true QUEUE 500 @@ -2387,7 +2387,6 @@ FHEMCMD: setreading Script: udef_trigger = "setLockPin" Flows ausführen: udef_trigger setLockPin Lautstärken setzen param_volume - Pause: 1s (Gerät wach halten) @@ -2512,11 +2511,10 @@ FHEMCMD: setreading - VoiceControl - FHEM Info / Steuerung über AMAD Modul v1.9.11 + FHEM Info / Steuerung über AMAD Modul v1.9 true QUEUE 60