diff --git a/fhem/CHANGED b/fhem/CHANGED
index bb6c9d7af..9c1812374 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,11 +1,15 @@
# 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 0.8.1
+ - bugfix: 74_AMAD: fix call statusRequest then screen off is set
+ fix change room then device modify
+ - feature: 74_AMAD: insert first code parts of voice input
- change: 55_GDS.pm new version released, see forum „Announcements“
- change: fhem_codemirror.js: Enabled indentWithTabs by default
Enabled autoCloseBrackets by default
Disabled smartIndent by default
- bugfix: 74_AMAD: wrong flowset xml file on lib/
- - updated: 74_AMAD: New Mirror Version
+ - updated: 74_AMAD: New Major Release 0.8.0
!!! IMPORTANT: please forget to update the Flowset !!!
- feature: 74_AMAD: AMADCommBridge (AMADCommunication Device)
toggle between to BT Devices, clear Notificationbar
diff --git a/fhem/FHEM/74_AMAD.pm b/fhem/FHEM/74_AMAD.pm
index 9125dc12b..110ef109c 100644
--- a/fhem/FHEM/74_AMAD.pm
+++ b/fhem/FHEM/74_AMAD.pm
@@ -35,7 +35,7 @@ use Time::HiRes qw(gettimeofday);
use HttpUtils;
use TcpServerUtils;
-my $version = "0.8.0";
+my $version = "0.8.1";
@@ -92,7 +92,7 @@ sub AMAD_Define($$) {
$hash->{BRIDGE} = 1;
$modules{AMAD}{defptr}{BRIDGE} = $hash;
- $attr{$name}{room} = "AMAD";
+ $attr{$name}{room} = "AMAD" if( !defined( $attr{$name}{room} ) );
Log3 $name, 3, "AMAD ($name) - defined Bridge with Socketport $hash->{PORT}";
AMAD_CommBridge_Open( $hash );
@@ -103,7 +103,7 @@ sub AMAD_Define($$) {
Log3 $name, 3, "AMAD ($name) - defined with host $hash->{HOST} on port $hash->{PORT} and interval $hash->{INTERVAL} (sec)";
- $attr{$name}{room} = "AMAD";
+ $attr{$name}{room} = "AMAD" if( !defined( $attr{$name}{room} ) );
readingsSingleUpdate ( $hash, "state", "initialized", 1 ) if( $hash->{HOST} );
readingsSingleUpdate ( $hash, "deviceState", "online", 1 ) if( $hash->{HOST} );
@@ -459,6 +459,7 @@ sub AMAD_Set($$@) {
$list .= "notifySndFile ";
$list .= "clearNotificationBar:All,Automagic ";
$list .= "changetoBTDevice:$btdev " if( AttrVal( $name, "setBluetoothDevice", "none" ) ne "none" );
+ #$list .= "activateVoiceInput:noArg "; # erste Codeteile für Spracheingabe
if( lc $cmd eq 'screenmsg'
|| lc $cmd eq 'ttsmsg'
@@ -477,6 +478,7 @@ sub AMAD_Set($$@) {
|| lc $cmd eq 'notifysndfile'
|| lc $cmd eq 'changetobtdevice'
|| lc $cmd eq 'clearnotificationbar'
+ || lc $cmd eq 'activatevoiceinput'
|| lc $cmd eq 'statusrequest' ) {
Log3 $name, 5, "AMAD ($name) - set $name $cmd ".join(" ", @val);
@@ -487,7 +489,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' );
+ return AMAD_SelectSetCmd( $hash, $cmd, @val ) if( @val ) || ( lc $cmd eq 'statusrequest' ) || ( lc $cmd eq 'activatevoiceinput' );
}
return "Unknown argument $cmd, bearword as argument or wrong parameter(s), choose one of $list";
@@ -593,6 +595,14 @@ sub AMAD_SelectSetCmd($$@) {
return AMAD_HTTP_POST( $hash,$url );
}
+ elsif( lc $cmd eq 'activatevoiceinput' ) {
+ #my $cmd = join( " ", @data );
+
+ my $url = "http://" . $host . ":" . $port . "/fhem-amad/setCommands/setvoicecmd";
+
+ return AMAD_HTTP_POST( $hash,$url );
+ }
+
elsif( lc $cmd eq 'screenfullscreen' ) {
my $mod = join( " ", @data );
@@ -875,9 +885,8 @@ sub AMAD_CommBridge_Read($) {
$response;
- ## hier den close Client einbauen auf hash vom Accept $chash siehe oben
- ## close($hash->{CD})
-
+
+ #### Verarbeitung der Daten welche über die AMADCommBridge kommen ####
###
@@ -927,6 +936,14 @@ sub AMAD_CommBridge_Read($) {
return;
}
+ elsif ( $data[0] =~ /FHEMCMD: voicecmd\b/ ) {
+ my $fhemCmd = $data[1];
+
+ readingsSingleUpdate( $brihash, "receiveVoiceCommand", $fhemCmd, 1 );
+
+ return;
+ }
+
elsif ( $data[0] =~ /FHEMCMD: statusrequest\b/ ) {
@data = split( '\R', $data[0] );
diff --git a/fhem/FHEM/lib/74_AMADautomagicFlows0.8.0.xml b/fhem/FHEM/lib/74_AMADautomagicFlows0.8.1.xml
similarity index 74%
rename from fhem/FHEM/lib/74_AMADautomagicFlows0.8.0.xml
rename to fhem/FHEM/lib/74_AMADautomagicFlows0.8.1.xml
index 4ef477810..b8385f517 100644
--- a/fhem/FHEM/lib/74_AMADautomagicFlows0.8.0.xml
+++ b/fhem/FHEM/lib/74_AMADautomagicFlows0.8.1.xml
@@ -20,7 +20,7 @@ global_album = getString("album");
true
Display Status: Aus
- false
+ true
false
@@ -77,6 +77,11 @@ global_album = getString("album");
17
0
+
+ true
+ Sprachbefehl angefordert
+ true
+
true
Akku Ladestand: grösser als 0%
@@ -198,6 +203,11 @@ global_album = getString("album");
Expression: gplay
param_app == "gplay"
+
+ true
+ Expression: header_activetask != "none"
+ header_activetask != "none"
+
false
Expression: mediaPlayer"
@@ -328,6 +338,11 @@ global_album = getString("album");
Expression: setScreenOrientation"
request_path == "/fhem-amad/setCommands/setScreenOrientation"
+
+ false
+ Expression: setVoiceCommand"
+ request_path == "/fhem-amad/setCommands/setvoicecmd"
+
false
Expression: setVolume"
@@ -353,6 +368,11 @@ global_album = getString("album");
Expression: trigger == "HTTP Request: /fhem-amad/setCommands/*"
trigger == "HTTP Request: /fhem-amad/setCommands/*"
+
+ true
+ Expression: trigger == "Sprachbefehl angefordert"
+ trigger == "Sprachbefehl angefordert"
+
false
Expression: ttsMsg"
@@ -827,6 +847,11 @@ global_fhemdevice = {header_fhemdevice}
Script: runTask = "1"
+
+ true
+ Script: runTask = "null"
+
+
true
Script: screen_orientation = "auto"
@@ -949,6 +974,15 @@ global_fhemdevice = {header_fhemdevice}
true
TRANSIENT
+
+ true
+ Spracheingabe: ohne Benutzeroberfläche
+ false
+
+ true
+ de-DE
+ false
+
false
StatusRequest
@@ -980,10 +1014,10 @@ FHEMCMD: statusrequest
Informations
- FHEM Info / Steuerung über AMAD Modul v0.8.0
+ FHEM Info / Steuerung über AMAD Modul v0.8.1
true
QUEUE
- 120
+ 240
HTTP Request: /fhem-amad/deviceInfo/
com.android.music.metachanged
@@ -1017,74 +1051,79 @@ FHEMCMD: statusrequest
WLAN Verbunden: Alle SSIDs
WLAN Verbunden: Alle SSIDs
Script: bluetooth_state = "on"
- Akku Ladestand: grösser als 0%
- Script: setCommandFlow_state = "inaktiv"
- Script: global_fhemip = {header_fhemip} global_fhemdevice = {header_fhemdevice}
- App Task läuft: {header_activetask} (neuster)
- Script: runTask = "0"
- Script: runTask = "1"
- Benachrichtigung in Statusbar angezeigt: Automagic
- Reading Music Metachanged
- Own Reading
- HTTP Response Information
- Bluetooth Gerät verbunden: Beliebiges Geräte
+ Script: setCommandFlow_state = "inaktiv"
+ Benachrichtigung in Statusbar angezeigt: Automagic
+ Reading Music Metachanged
+ Own Reading
+ HTTP Response Information
+ Bluetooth Gerät verbunden: Beliebiges Geräte
+ Script: global_fhemip = {header_fhemip} global_fhemdevice = {header_fhemdevice}
+ Akku Ladestand: grösser als 0%
+ Script: runTask = "null"
+ Script: runTask = "0"
+ App Task läuft: {header_activetask} (neuster)
+ Expression: header_activetask != "none"
+ Script: runTask = "1"
-
-
+
+
-
+
-
+
-
-
-
-
+
+
+
+
-
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Meldung Display An
@@ -1147,210 +1186,219 @@ FHEMCMD: statusrequest
SetCommands
- FHEM Info / Steuerung über AMAD Modul v0.8.0
+ FHEM Info / Steuerung über AMAD Modul v0.8.1
true
QUEUE
- 120
-
+ 240
+ 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"
+ Expression: param_orientation == "portrait"
+ Setze Vollbild Modus: Navigation nicht anzeigen
+ Setze Vollbild Modus: Auf Default zurücksetzen
+ Audio Player steuern: Medienknopf Zurück (Google Play Musik)
+ Expression: param_button == "back"
+ Expression: param_button == "next"
+ Setze Display Orientierung: Auf Default zurücksetzen
+ Expression: param_button == "play"
+ Expression: mediaPlayer"
+ Audio Player steuern: Medienknopf Weiter (Google Play Musik)
+ 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
+ Expression: System Command"
+ Neustart
+ Flow Aktiv: Informations
+ Expression: ttsMsg"
+ Lautstärken setzen
+ 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}
+ Audio Player steuern: Medienknopf Stopp (Google Play Musik)
+ Expression: setScreenOrientation"
+ Expression: param_fullscreen == "off"
+ Expression: param_fullscreen == "on"
+ Expression: setBluetooth"
+ Expression: openURL"
+ Expression: setVolume"
+ Sprachausgabe: {param_message}
+ Sound: /storage/emulated/0/Notifications/{param_notifyfile} als Benachrichtigung
+ Expression: param_bluetooth == "off"
+ Bluetooth ein-/ausschalten: Aus
+ Expression: param_bluetooth == "on"
+ Bluetooth ein-/ausschalten: Ein
+ Expression: notifysnd"
+ Audio Player steuern: Medienknopf Play (Google Play Musik)
+ Expression: openApp"
+ Expression: Reboot
+ Benachrichtigung aus Statusbar entfernen: Alle
+ Expression: All
+ Benachrichtigung aus Statusbar entfernen: Alle (Automagic)
+ Expression: Automagic
+ Setze Flow Status: Aktivieren Informations
+ Script: informationFlow_state = "inaktiv"
+ HTTP Response SetCommand
+ 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)
+ StatusRequest
+ Gerät sperren
+ Expression: Clear Automagic Meldungen"
+ Script: informationFlow_state = "aktiv"
+ Expression: setBTDevice"
+ Spracheingabe: ohne Benutzeroberfläche
+ Expression: trigger == "HTTP Request: /fhem-amad/setCommands/*"
+ Expression: setVoiceCommand"
+
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"
- Expression: param_orientation == "portrait"
- Setze Vollbild Modus: Navigation nicht anzeigen
- Setze Vollbild Modus: Auf Default zurücksetzen
- Audio Player steuern: Medienknopf Zurück (Google Play Musik)
- Expression: param_button == "back"
- Expression: param_button == "next"
- Setze Display Orientierung: Auf Default zurücksetzen
- Expression: param_button == "play"
- Expression: mediaPlayer"
- Audio Player steuern: Medienknopf Weiter (Google Play Musik)
- Expression: param_button == "stop"
- Expression: param_screen=="off"
- Gerät sperren
- 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
- Expression: System Command"
- Neustart
- Flow Aktiv: Informations
- Expression: ttsMsg"
- Lautstärken setzen
- 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}
- Audio Player steuern: Medienknopf Stopp (Google Play Musik)
- Expression: setScreenOrientation"
- Expression: param_fullscreen == "off"
- Expression: param_fullscreen == "on"
- Expression: setBluetooth"
- Expression: openURL"
- Expression: setVolume"
- Sprachausgabe: {param_message}
- Sound: /storage/emulated/0/Notifications/{param_notifyfile} als Benachrichtigung
- Expression: param_bluetooth == "off"
- Bluetooth ein-/ausschalten: Aus
- Expression: param_bluetooth == "on"
- Bluetooth ein-/ausschalten: Ein
- Expression: notifysnd"
- Audio Player steuern: Medienknopf Play (Google Play Musik)
- Expression: openApp"
- Expression: trigger == "HTTP Request: /fhem-amad/setCommands/*"
- Expression: Reboot
- Benachrichtigung aus Statusbar entfernen: Alle
- Expression: All
- Benachrichtigung aus Statusbar entfernen: Alle (Automagic)
- Expression: Automagic
- Expression: Clear Automagic Meldungen"
- Setze Flow Status: Aktivieren Informations
- Script: informationFlow_state = "inaktiv"
- Script: informationFlow_state = "aktiv"
- HTTP Response SetCommand
- 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}
- Expression: setBTDevice"
- Pause: 3s (Gerät wach halten)
- Bluetooth Gerät verbinden/trennen: Verbinden Advanced Audio Distribution {param_swtobtdevicemac}
- Pause: 2s (Gerät wach halten)
- StatusRequest
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Expression: trigger == "Sprachbefehl angefordert"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file