[ AMAD2 - obsolete] 74_AMAD.pm zur Steuerung eines Androidgerätes

Begonnen von CoolTux, 02 März 2016, 11:14:41

Vorheriges Thema - Nächstes Thema

RoBra81

Zitat von: CoolTux am 03 Juni 2016, 10:39:46
Ich kann Dich beruhigen. Du musst natürlich keine zweite AMADCommBridge mit anderem Port einstellen. Alle AMAD Devices (Handy,Tablets) kommunizieren über ein und die selbe Bridge.

Bist du sicher? Wenn ich Deudi richtig verstanden habe, hat er zwei FHEM-Instanzen (eine pro Tablet) auf dem selben Cubietruck?!

Ronny

CoolTux

Ok das ist jetzt die Frage, hat er wirklich FHEM Instanzen oder Device Instanzen. Wenn er wirklich 2 mal FHEM auf dem Teil am rennen hat dann muß er den Port für die Bridge in der Tat ändern.
Frage, wieso macht man zwei FHEM Proßesse auf ein und dem selben Rechner nur für 2 Tablets?

Ich denke mal eher er meint

Zitat von: Deudi am 03 Juni 2016, 10:27:26
Für jedes Tablet habe ich eine eigene FHEM Instanz auf dem gleichen Cubietruck laufen.

Diese Aussage macht, sofern sie wirklich so gemeint ist wie es hier steht, nicht wirklich Sinn.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Deudi

#557
Zitat von: CoolTux am 03 Juni 2016, 10:57:21
Diese Aussage macht, sofern sie wirklich so gemeint ist wie es hier steht, nicht wirklich Sinn.

Ronny hat mich schon richtig verstanden. Ich habe auf dem Cubietruck-plus vier FHEM Installationen laufen. Und das macht durchaus Sinn.
Somit ist auch eine Frage beantwortet: Für das zweite Tablet wird eine eigene Bridge angelegt und ich muss die Portnummer anpassen.
Funktioniert nun das Attribut "port" oder muss ich das Modul ändern?

Gruß Deudi

P.S.: Sorry für die Verwirrung, es war nicht eindeutig formuliert.

Gigabyte Brix, Ubuntu 16.04.3 LTS, Homematic, Z-Wave, EnOcean, Shelly@MQTT, SIGNALduino, JeeLink DAVIS-Sketch

CoolTux

Das Attribut Port für die AMADCommBridge funktioniert. Aber nur für die Bridge. Will man den Port in der Tablet Instanz ändern so muß im Automagic Flow einiges angepasst werden. Aber das ist ja dann nicht nötig. Also einfach in der Bridge von der zweiten Instanz den Port ändern.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Deudi

Zitat von: CoolTux am 03 Juni 2016, 11:25:36
...so muß im Automagic Flow einiges angepasst werden. Aber das ist ja dann nicht nötig.
Echt? Ich hätte jetzt vermutet, dass ich die ganzen 8090 in den Flows für das zweite Tablet ändern muß?
Gigabyte Brix, Ubuntu 16.04.3 LTS, Homematic, Z-Wave, EnOcean, Shelly@MQTT, SIGNALduino, JeeLink DAVIS-Sketch

CoolTux

Zitat von: Deudi am 03 Juni 2016, 11:32:08
Echt? Ich hätte jetzt vermutet, dass ich die ganzen 8090 in den Flows für das zweite Tablet ändern muß?

Nein. Wieso. Der Port für die Tablets beschreibt doch nur den Port auf dem der HTTP Server von Automagic auf dem Tablet läuft. Und da Du ja zwei Tablets hast und auf jedem immer nur ein Automagic läuft kann das so bleiben.
Nur der Port für die Bridge muß geändert werden, da Du ja mehrere Bridges auf einem Server betreiben möchtest.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Deudi

Gigabyte Brix, Ubuntu 16.04.3 LTS, Homematic, Z-Wave, EnOcean, Shelly@MQTT, SIGNALduino, JeeLink DAVIS-Sketch

RoBra81

Guten Abend,

Ich habe jetzt auch mal upgedatet, aber leider funktionieren bei meinem Wandtablet die Readings nicht mehr richtig: zum Beispiel wird das Reading screen erst nach einem

set xxx statusRequest

aktualisiert - und da ich das Tablet nur einschalte, wenn es aus ist und umgekehrt funktioniert meine Logik nicht mehr...

Hier mal ein list:

Internals:
   APSSID     Wilhelm
   CFGFN
   CHANGED
   DEF        192.168.18.50 Wilhelm
   HOST       192.168.18.50
   NAME       OG.ez.BP.Whg_Tuer
   NR         561
   PORT       8090
   STATE      active
   TYPE       AMAD
   VERSIONFLOWSET 2.2.0
   VERSIONMODUL 2.2.0
   Readings:
     2016-06-03 19:21:23   airplanemode    off
     2016-06-03 19:21:21   androidVersion  4.2 - 4.2.2 Jelly Bean MR1
     2016-06-03 20:16:54   autoUebersicht  off
     2016-06-03 19:21:22   automagicState  not supported from your device
     2016-06-03 19:21:22   bluetooth       off
     2016-06-03 20:50:12   checkActiveTask not supported android version
     2016-06-03 20:50:12   connectedBTdevices
     2016-06-03 20:50:12   connectedBTdevicesMAC
     2016-06-03 19:21:22   currentMusicAlbum no player active
     2016-06-03 19:21:22   currentMusicApp no player active
     2016-06-03 19:21:22   currentMusicArtist no player active
     2016-06-03 19:21:22   currentMusicTrack no player active
     2016-06-03 20:50:12   deviceState     online
     2016-04-24 13:27:23   display         0
     2016-06-03 19:21:22   dockingState    undocked
     2016-06-03 20:50:12   flow_SetCommands aktiv
     2016-06-03 20:49:19   flow_informations aktiv
     2016-06-03 20:50:12   flowsetVersionAtDevice 2.2.0
     2016-06-03 19:21:22   keyguardSet     0
     2016-06-03 20:49:20   lastSetCommandState setCmd_done
     2016-06-03 20:50:12   lastStatusRequestState statusRequest_done
     2016-06-03 19:21:22   nextAlarmDay    off
     2016-06-03 19:21:22   nextAlarmTime   off
     2016-06-03 20:38:29   powerLevel      100
     2016-06-03 20:38:29   powerPlugged    1
     2016-06-03 19:21:23   screen          on unlocked
     2016-06-03 19:21:21   screenBrightness 255
     2016-06-03 19:21:23   screenOrientation landscape
     2016-06-03 19:21:23   screenOrientationMode auto
     2016-06-03 20:50:12   state           active
     2016-06-03 20:16:18   touch           nein
     2016-06-03 19:21:23   volume          15
     2016-06-03 19:21:21   volumeNotification
   Helper:
     deviceStateErrorCounter 0
     infoErrorCounter 0
     setCmdErrorCounter 0
Attributes:
   event-on-change-reading .*
   group      Panel
   room       Esszimmer


Ronny

CoolTux

Hallo Ronny,

Das Reading screen sollte sich auf jeden Fall ändern sobald das Tablet tatsächlich an oder aus geschalten wird. Ist das nicht der Fall?


Grüße
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

hyper2910

#564
Hi,

Habe das ganze schon eine Weile laufen,tolle Arbeit.seit dem update auf 2.2.1 habe ich auf einem Sony Tab Z3compact massive Probleme.

Der Information Flow steigt immer aus. Im Flow blinkt alles mögliche mit BT rot.

condition 'Expression: trigger == "Flugmodus: Aus"'
03.06.2016 22:18:28.848 [Informations] End executing condition 'Expression: getAndroidSDKVersion() >= "19"' with return value true
03.06.2016 22:18:28.852 [Informations] End executing condition 'Expression: global_fhemip != null or header_fhemip != null' with return value true
03.06.2016 22:18:28.855 [Informations] End executing condition 'Expression: trigger == "Flugmodus: Aus"' with return value false
03.06.2016 22:18:28.855 [Informations] Flow continues executing with the next step.
03.06.2016 22:18:28.856 [Informations] Start executing condition 'Expression: global_apssid != "usb-ethernet"'
03.06.2016 22:18:28.857 [Informations] Start executing condition 'Expression: trigger == "HTTP Request: /fhem-amad/deviceInfo/"'
03.06.2016 22:18:28.860 [Informations] End executing condition 'Expression: global_apssid != "usb-ethernet"' with return value true
03.06.2016 22:18:28.861 [Informations] End executing condition 'Expression: trigger == "HTTP Request: /fhem-amad/deviceInfo/"' with return value false
03.06.2016 22:18:28.862 [Informations] Flow continues executing with the next step.
03.06.2016 22:18:28.862 [Informations] Start executing condition 'WLAN Verbunden: {global_apssid}'
03.06.2016 22:18:28.900 [Informations] Action 'Flowsetversion' URL data fetched successfully.
03.06.2016 22:18:28.902 [Informations] End executing action 'Flowsetversion'
03.06.2016 22:18:28.943 [Informations] Action 'Bluetooth Device Status' URL data fetched successfully.
03.06.2016 22:18:28.945 [Informations] End executing action 'Bluetooth Device Status'
03.06.2016 22:18:28.946 [Informations] Emergency stop count reached, disabling flow and current flow execution
03.06.2016 22:18:29.261 [Informations] Emergency stop reached, stopping flow execution
03.06.2016 22:18:29.874 [Informations] End executing condition 'WLAN Verbunden: {global_apssid}' with return value true
03.06.2016 22:18:29.884 [Informations] Emergency stop reached, stopping flow execution


Fehler: Accessibility service not running

Last executed: C...,notification_local_only=false,notification_large_icon=null,wearable_actions=[],content_title=Flow Informations mit Fehler beendet,notification_ticker_text=Flow Informations mit Fehler beendet,notification_text_big=Flow Informations mit Fehler beendet

Fehler: Accessibility service not running

Last executed: C...,triggertime=1464985682907,notification_visibility=0,app_name=Automagic Premium,notification_ongoing=false,package_name=ch.gridvision.ppam.androidautomagic,notification_foreground_service=false,notification_vibrate_default=false,buttons=[],flow_name=Informations,notification_when=1464985682766,title=Flow Informations mit Fehler beendet,notification_sound_default=false,id=-1,content_title_big=,trigger=Benachrichtigung in Statusbar angezeigt: ch.gridvision.ppam.androidautomagic}}
03.06.2016 22:28:02.920 [Informations] Start executing condition 'Expression: trigger == "App Task Beendet"'
03.06.2016 22:28:02.922 [Informations] Flow ends execution due to errors
03.06.2016 22:28:02.922 [Informations] Error:
ch.gridvision.ppam.androidautomagiclib.util.p: Accessibility service not running
at ch.gridvision.ppam.androidautomagic.c.b.h.c(SourceFile:219)
at ch.gridvision.ppam.androidautomagic.c.b.h.a(SourceFile:118)
at ch.gridvision.ppam.androidautomagic.c.c.e.a(SourceFile:661)
at ch.gridvision.ppam.androidautomagic.c.c.e.b(SourceFile:975)
at ch.gridvision.ppam.androidautomagic.c.c.e.a(SourceFile:62)
at ch.gridvision.ppam.androidautomagic.c.c.e$1.run(SourceFile:784)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:5526)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

03.06.2016 22:28:02.930 [Informations] Flow ended.
03.06.2016 22:28:02.950 [Informations] End executing condition 'Expression: global_fhemip != null or header_fhemip != null' with return value true
03.06.2016 22:28:02.953 [Informations] End executing condition 'Expression: trigger == "Flugmodus: Aus"' with return value false
03.06.2016 22:28:02.954 [Informations] Emergency stop count reached, disabling flow and current flow execution
03.06.2016 22:28:03.204 [Informations] Emergency stop reached, stopping flow execution
03.06.2016 22:28:03.204 [Informations] End executing condition 'Expression: trigger == "App Task Beendet"' with return value false
03.06.2016 22:28:03.208 [Informations] Emergency stop reached, stopping flow execution
Cubietruck mit FHEM, CUL V3 443MHz, 2 x CULV3 868MHz, Milights, Max Heizungssteuerung, Homematic, IT,

RoBra81

Zitat von: CoolTux am 03 Juni 2016, 22:18:44
Hallo Ronny,

Das Reading screen sollte sich auf jeden Fall ändern sobald das Tablet tatsächlich an oder aus geschalten wird. Ist das nicht der Fall?


Grüße
Nein, leider erst nach einem statusRequest...

CoolTux

Zitat von: hyper2910 am 03 Juni 2016, 22:24:19
Hi,

Habe das ganze schon eine Weile laufen,tolle Arbeit.seit dem update auf 2.2.1 habe ich auf einem Sony Tab Z3compact massive Probleme.

Der Information Flow steigt immer aus. Im Flow blinkt alles mögliche mit BT rot.

condition 'Expression: trigger == "Flugmodus: Aus"'
03.06.2016 22:18:28.848 [Informations] End executing condition 'Expression: getAndroidSDKVersion() >= "19"' with return value true
03.06.2016 22:18:28.852 [Informations] End executing condition 'Expression: global_fhemip != null or header_fhemip != null' with return value true
03.06.2016 22:18:28.855 [Informations] End executing condition 'Expression: trigger == "Flugmodus: Aus"' with return value false
03.06.2016 22:18:28.855 [Informations] Flow continues executing with the next step.
03.06.2016 22:18:28.856 [Informations] Start executing condition 'Expression: global_apssid != "usb-ethernet"'
03.06.2016 22:18:28.857 [Informations] Start executing condition 'Expression: trigger == "HTTP Request: /fhem-amad/deviceInfo/"'
03.06.2016 22:18:28.860 [Informations] End executing condition 'Expression: global_apssid != "usb-ethernet"' with return value true
03.06.2016 22:18:28.861 [Informations] End executing condition 'Expression: trigger == "HTTP Request: /fhem-amad/deviceInfo/"' with return value false
03.06.2016 22:18:28.862 [Informations] Flow continues executing with the next step.
03.06.2016 22:18:28.862 [Informations] Start executing condition 'WLAN Verbunden: {global_apssid}'
03.06.2016 22:18:28.900 [Informations] Action 'Flowsetversion' URL data fetched successfully.
03.06.2016 22:18:28.902 [Informations] End executing action 'Flowsetversion'
03.06.2016 22:18:28.943 [Informations] Action 'Bluetooth Device Status' URL data fetched successfully.
03.06.2016 22:18:28.945 [Informations] End executing action 'Bluetooth Device Status'
03.06.2016 22:18:28.946 [Informations] Emergency stop count reached, disabling flow and current flow execution
03.06.2016 22:18:29.261 [Informations] Emergency stop reached, stopping flow execution
03.06.2016 22:18:29.874 [Informations] End executing condition 'WLAN Verbunden: {global_apssid}' with return value true
03.06.2016 22:18:29.884 [Informations] Emergency stop reached, stopping flow execution


Fehler: Accessibility service not running

Last executed: C...,notification_local_only=false,notification_large_icon=null,wearable_actions=[],content_title=Flow Informations mit Fehler beendet,notification_ticker_text=Flow Informations mit Fehler beendet,notification_text_big=Flow Informations mit Fehler beendet

Fehler: Accessibility service not running

Last executed: C...,triggertime=1464985682907,notification_visibility=0,app_name=Automagic Premium,notification_ongoing=false,package_name=ch.gridvision.ppam.androidautomagic,notification_foreground_service=false,notification_vibrate_default=false,buttons=[],flow_name=Informations,notification_when=1464985682766,title=Flow Informations mit Fehler beendet,notification_sound_default=false,id=-1,content_title_big=,trigger=Benachrichtigung in Statusbar angezeigt: ch.gridvision.ppam.androidautomagic}}
03.06.2016 22:28:02.920 [Informations] Start executing condition 'Expression: trigger == "App Task Beendet"'
03.06.2016 22:28:02.922 [Informations] Flow ends execution due to errors
03.06.2016 22:28:02.922 [Informations] Error:
ch.gridvision.ppam.androidautomagiclib.util.p: Accessibility service not running
at ch.gridvision.ppam.androidautomagic.c.b.h.c(SourceFile:219)
at ch.gridvision.ppam.androidautomagic.c.b.h.a(SourceFile:118)
at ch.gridvision.ppam.androidautomagic.c.c.e.a(SourceFile:661)
at ch.gridvision.ppam.androidautomagic.c.c.e.b(SourceFile:975)
at ch.gridvision.ppam.androidautomagic.c.c.e.a(SourceFile:62)
at ch.gridvision.ppam.androidautomagic.c.c.e$1.run(SourceFile:784)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:5526)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

03.06.2016 22:28:02.930 [Informations] Flow ended.
03.06.2016 22:28:02.950 [Informations] End executing condition 'Expression: global_fhemip != null or header_fhemip != null' with return value true
03.06.2016 22:28:02.953 [Informations] End executing condition 'Expression: trigger == "Flugmodus: Aus"' with return value false
03.06.2016 22:28:02.954 [Informations] Emergency stop count reached, disabling flow and current flow execution
03.06.2016 22:28:03.204 [Informations] Emergency stop reached, stopping flow execution
03.06.2016 22:28:03.204 [Informations] End executing condition 'Expression: trigger == "App Task Beendet"' with return value false
03.06.2016 22:28:03.208 [Informations] Emergency stop reached, stopping flow execution


Guten Morgen,

Du musst den Accessibility service für Automagic aktivieren, sollte er schon aktiv sein einfach noch mal deaktivieren und wieder aktivieren.
Einstellungen --> Bedienungshilfen -- > Automagic Premium


Grüße
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

CoolTux

Zitat von: RoBra81 am 03 Juni 2016, 20:59:01
Guten Abend,

Ich habe jetzt auch mal upgedatet, aber leider funktionieren bei meinem Wandtablet die Readings nicht mehr richtig: zum Beispiel wird das Reading screen erst nach einem

set xxx statusRequest

aktualisiert - und da ich das Tablet nur einschalte, wenn es aus ist und umgekehrt funktioniert meine Logik nicht mehr...

Hier mal ein list:

Internals:
   APSSID     Wilhelm
   CFGFN
   CHANGED
   DEF        192.168.18.50 Wilhelm
   HOST       192.168.18.50
   NAME       OG.ez.BP.Whg_Tuer
   NR         561
   PORT       8090
   STATE      active
   TYPE       AMAD
   VERSIONFLOWSET 2.2.0
   VERSIONMODUL 2.2.0
   Readings:
     2016-06-03 19:21:23   airplanemode    off
     2016-06-03 19:21:21   androidVersion  4.2 - 4.2.2 Jelly Bean MR1
     2016-06-03 20:16:54   autoUebersicht  off
     2016-06-03 19:21:22   automagicState  not supported from your device
     2016-06-03 19:21:22   bluetooth       off
     2016-06-03 20:50:12   checkActiveTask not supported android version
     2016-06-03 20:50:12   connectedBTdevices
     2016-06-03 20:50:12   connectedBTdevicesMAC
     2016-06-03 19:21:22   currentMusicAlbum no player active
     2016-06-03 19:21:22   currentMusicApp no player active
     2016-06-03 19:21:22   currentMusicArtist no player active
     2016-06-03 19:21:22   currentMusicTrack no player active
     2016-06-03 20:50:12   deviceState     online
     2016-04-24 13:27:23   display         0
     2016-06-03 19:21:22   dockingState    undocked
     2016-06-03 20:50:12   flow_SetCommands aktiv
     2016-06-03 20:49:19   flow_informations aktiv
     2016-06-03 20:50:12   flowsetVersionAtDevice 2.2.0
     2016-06-03 19:21:22   keyguardSet     0
     2016-06-03 20:49:20   lastSetCommandState setCmd_done
     2016-06-03 20:50:12   lastStatusRequestState statusRequest_done
     2016-06-03 19:21:22   nextAlarmDay    off
     2016-06-03 19:21:22   nextAlarmTime   off
     2016-06-03 20:38:29   powerLevel      100
     2016-06-03 20:38:29   powerPlugged    1
     2016-06-03 19:21:23   screen          on unlocked
     2016-06-03 19:21:21   screenBrightness 255
     2016-06-03 19:21:23   screenOrientation landscape
     2016-06-03 19:21:23   screenOrientationMode auto
     2016-06-03 20:50:12   state           active
     2016-06-03 20:16:18   touch           nein
     2016-06-03 19:21:23   volume          15
     2016-06-03 19:21:21   volumeNotification
   Helper:
     deviceStateErrorCounter 0
     infoErrorCounter 0
     setCmdErrorCounter 0
Attributes:
   event-on-change-reading .*
   group      Panel
   room       Esszimmer


Ronny

Hast Du noch was anderes am laufen? OwnReadings oder so? Du hast ein Reading Display aber kein userReading.
Deaktiviere bitte mal alle Flows die nichts mit AMAD zu tun haben.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

RoBra81

Das Display reading ist ein Relikt, das schon lange nicht mehr genutzt wird. Trotz Deaktivierens aller anderen Flows funktioniert es nicht...

CoolTux

Dann benötige ich mal ein Log von Automagic. Ausserdem kannst Du Debuggen. Suche eine Condition Namens Trigger Display ...
und lasse davon abgehend eine neue Condition Namens Debug abgehen. Dann mal Display aus und an und schauen ob ein Zusatz Menü auf geht.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net