[AMADNG] AMAD 4.2 The Next Generation of AMAD with Tasker Support

Begonnen von CoolTux, 25 Mai 2017, 18:24:49

Vorheriges Thema - Nächstes Thema

CoolTux

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

TomLee

nach Update und mehreren restarts heute Nacht, geht mein Wandtablet nicht mehr auf active, stelle ich gerade fest. Keine Ahnung ob es da einen Zusammenhang gibt. automagicState zeigt seit einem restart (04:37:37) einen Fehler:


defmod WandtabletFlurKueche AMADDevice 192.168.188.29 1541955794158 Automagic
attr WandtabletFlurKueche IODev AMADBridge
attr WandtabletFlurKueche remoteServer Automagic
attr WandtabletFlurKueche room AMAD
attr WandtabletFlurKueche setAPSSID FBF

setstate WandtabletFlurKueche initialized
setstate WandtabletFlurKueche 2018-12-22 08:17:45 .deviceState online
setstate WandtabletFlurKueche 2018-10-05 08:45:38 airplanemode off
setstate WandtabletFlurKueche 2018-10-05 08:45:38 androidVersion 7.1 Nougat
setstate WandtabletFlurKueche 2018-12-22 04:37:46 automagicState Flow Send Data to AMADCommBridge mit Fehler beendet Fehler: connect timed out  Last executed: Action HTTP Request: send READINGS data to AMADCommBridge JSON
setstate WandtabletFlurKueche 2018-10-05 08:45:38 batteryHealth 2
setstate WandtabletFlurKueche 2018-12-22 07:57:50 batteryPercent 77
setstate WandtabletFlurKueche 2018-10-05 08:45:38 batteryTemperature 3.0
setstate WandtabletFlurKueche 2018-10-05 08:45:38 bluetooth off
setstate WandtabletFlurKueche 2018-10-05 08:46:14 checkActiveTask 0
setstate WandtabletFlurKueche 2018-10-05 08:45:38 connectedBTdevices none
setstate WandtabletFlurKueche 2018-10-05 08:45:38 connectedBTdevicesMAC none
setstate WandtabletFlurKueche 2018-10-16 18:52:09 currentMusicAlbum no player active
setstate WandtabletFlurKueche 2018-10-16 18:52:09 currentMusicApp no player active
setstate WandtabletFlurKueche 2018-10-16 18:52:09 currentMusicArtist no player active
setstate WandtabletFlurKueche 2018-10-16 18:52:09 currentMusicIcon no player active
setstate WandtabletFlurKueche 2018-10-16 18:52:09 currentMusicState
setstate WandtabletFlurKueche 2018-10-16 18:52:09 currentMusicTrack no player active
setstate WandtabletFlurKueche 2018-12-22 14:44:54 deviceState offline
setstate WandtabletFlurKueche 2018-11-12 13:01:55 doNotDisturb always
setstate WandtabletFlurKueche 2018-10-05 08:45:38 dockingState undocked
setstate WandtabletFlurKueche 2018-10-19 07:16:03 flow_SetCommands aktiv
setstate WandtabletFlurKueche 2018-12-09 02:20:21 flow_informations aktiv
setstate WandtabletFlurKueche 2018-11-11 18:07:57 flowsetVersionAtDevice 4.2.4
setstate WandtabletFlurKueche 2018-10-05 08:45:40 keyguardSet 0
setstate WandtabletFlurKueche 2018-12-22 17:15:31 lastSetCommandState setCmd_done
setstate WandtabletFlurKueche 2018-12-22 14:41:37 lastStatusRequestState statusRequest_done
setstate WandtabletFlurKueche 2018-10-05 08:45:38 mute off
setstate WandtabletFlurKueche 2018-10-05 08:45:38 nextAlarmDay off
setstate WandtabletFlurKueche 2018-10-05 08:45:38 nextAlarmTime off
setstate WandtabletFlurKueche 2018-12-22 01:17:34 powerPlugged 0
setstate WandtabletFlurKueche 2018-12-22 01:27:39 screen off unlocked
setstate WandtabletFlurKueche 2018-12-01 17:59:05 screenBrightness 31
setstate WandtabletFlurKueche 2018-12-16 20:08:41 screenOrientation landscape
setstate WandtabletFlurKueche 2018-10-05 08:45:40 screenOrientationMode auto
setstate WandtabletFlurKueche 2018-12-22 14:16:03 state initialized
setstate WandtabletFlurKueche 2018-11-11 18:07:57 volume 8
setstate WandtabletFlurKueche 2018-12-17 11:32:50 volumeNotification 2
setstate WandtabletFlurKueche 2018-10-05 08:45:38 wiredHeadsetPlugged 0




Der Automagic-Log gibt auch einen Fehler aus:

22.12.2018 17:11:17.769 [Send Data to AMADCommBridge] Starting to execute flow 'Send Data to AMADCommBridge' with Context{global{},local{checkActiveTask="checkActiveTask": "null",flow_name=Send Data to AMADCommBridge,runTask=null,trigger=App Task Gestartet,triggertime=1545495077507,app_name=System-UI,fhemcmd=setreading,package_name=com.android.systemui,flow_count=1}}
22.12.2018 17:11:17.769 [Send Data to AMADCommBridge] Start executing condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}'
22.12.2018 17:11:17.770 [Send Data to AMADCommBridge] Condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}' Executing socket check to host 'null' and port 'null'
22.12.2018 17:11:17.870 [Send Data to AMADCommBridge] Condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}' Could not execute ping command
ch.gridvision.ppam.androidautomagic.simplelang.a.d: can not convert value 'null' to number
at ch.gridvision.ppam.androidautomagic.simplelang.a.j.h(SourceFile:214)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.a(SourceFile:196)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.c(SourceFile:182)
at ch.gridvision.ppam.androidautomagiclib.util.ci$1.run(SourceFile:40)
at java.lang.Thread.run(Thread.java:761)

22.12.2018 17:11:17.871 [Send Data to AMADCommBridge] End executing condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}' with return value false and exception can not convert value 'null' to number
22.12.2018 17:11:17.892 [Send Data to AMADCommBridge] Flow ends execution due to errors
22.12.2018 17:11:17.892 [Send Data to AMADCommBridge] Error:
ch.gridvision.ppam.androidautomagic.simplelang.a.d: can not convert value 'null' to number
at ch.gridvision.ppam.androidautomagic.simplelang.a.j.h(SourceFile:214)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.a(SourceFile:196)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.c(SourceFile:182)
at ch.gridvision.ppam.androidautomagiclib.util.ci$1.run(SourceFile:40)
at java.lang.Thread.run(Thread.java:761)

22.12.2018 17:11:17.899 [Send Data to AMADCommBridge] Flow ended.
22.12.2018 17:11:21.563 [Send Data to AMADCommBridge] Starting to execute flow 'Send Data to AMADCommBridge' with Context{global{},local{checkActiveTask="checkActiveTask": "null",flow_name=Send Data to AMADCommBridge,runTask=null,trigger=App Task Gestartet,triggertime=1545495080968,app_name=Automagic Premium,fhemcmd=setreading,package_name=ch.gridvision.ppam.androidautomagic,flow_count=1}}
22.12.2018 17:11:21.564 [Send Data to AMADCommBridge] Start executing condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}'
22.12.2018 17:11:21.565 [Send Data to AMADCommBridge] Condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}' Executing socket check to host 'null' and port 'null'
22.12.2018 17:11:21.669 [Send Data to AMADCommBridge] Condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}' Could not execute ping command
ch.gridvision.ppam.androidautomagic.simplelang.a.d: can not convert value 'null' to number
at ch.gridvision.ppam.androidautomagic.simplelang.a.j.h(SourceFile:214)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.a(SourceFile:196)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.c(SourceFile:182)
at ch.gridvision.ppam.androidautomagiclib.util.ci$1.run(SourceFile:40)
at java.lang.Thread.run(Thread.java:761)

22.12.2018 17:11:21.670 [Send Data to AMADCommBridge] End executing condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}' with return value false and exception can not convert value 'null' to number
22.12.2018 17:11:21.678 [Send Data to AMADCommBridge] Flow ends execution due to errors
22.12.2018 17:11:21.678 [Send Data to AMADCommBridge] Error:
ch.gridvision.ppam.androidautomagic.simplelang.a.d: can not convert value 'null' to number
at ch.gridvision.ppam.androidautomagic.simplelang.a.j.h(SourceFile:214)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.a(SourceFile:196)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.c(SourceFile:182)
at ch.gridvision.ppam.androidautomagiclib.util.ci$1.run(SourceFile:40)
at java.lang.Thread.run(Thread.java:761)

22.12.2018 17:11:21.690 [Send Data to AMADCommBridge] Flow ended.
22.12.2018 17:11:30.491 [Send Data to AMADCommBridge] Starting to execute flow 'Send Data to AMADCommBridge' with Context{global{},local{checkActiveTask="checkActiveTask": "null",flow_name=Send Data to AMADCommBridge,runTask=null,trigger=App Task Gestartet,triggertime=1545495090234,app_name=System-UI,fhemcmd=setreading,package_name=com.android.systemui,flow_count=1}}
22.12.2018 17:11:30.492 [Send Data to AMADCommBridge] Start executing condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}'
22.12.2018 17:11:30.493 [Send Data to AMADCommBridge] Condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}' Executing socket check to host 'null' and port 'null'
22.12.2018 17:11:30.585 [Send Data to AMADCommBridge] Condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}' Could not execute ping command
ch.gridvision.ppam.androidautomagic.simplelang.a.d: can not convert value 'null' to number
at ch.gridvision.ppam.androidautomagic.simplelang.a.j.h(SourceFile:214)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.a(SourceFile:196)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.c(SourceFile:182)
at ch.gridvision.ppam.androidautomagiclib.util.ci$1.run(SourceFile:40)
at java.lang.Thread.run(Thread.java:761)

22.12.2018 17:11:30.586 [Send Data to AMADCommBridge] End executing condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}' with return value false and exception can not convert value 'null' to number
22.12.2018 17:11:30.593 [Send Data to AMADCommBridge] Flow ends execution due to errors
22.12.2018 17:11:30.594 [Send Data to AMADCommBridge] Error:
ch.gridvision.ppam.androidautomagic.simplelang.a.d: can not convert value 'null' to number
at ch.gridvision.ppam.androidautomagic.simplelang.a.j.h(SourceFile:214)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.a(SourceFile:196)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.c(SourceFile:182)
at ch.gridvision.ppam.androidautomagiclib.util.ci$1.run(SourceFile:40)
at java.lang.Thread.run(Thread.java:761)

22.12.2018 17:11:30.597 [Send Data to AMADCommBridge] Flow ended.
22.12.2018 17:11:48.614 [Send Data to AMADCommBridge] Starting to execute flow 'Send Data to AMADCommBridge' with Context{global{},local{checkActiveTask="checkActiveTask": "null",flow_name=Send Data to AMADCommBridge,runTask=null,trigger=App Task Gestartet,triggertime=1545495107976,app_name=Automagic Premium,fhemcmd=setreading,package_name=ch.gridvision.ppam.androidautomagic,flow_count=1}}
22.12.2018 17:11:48.615 [Send Data to AMADCommBridge] Start executing condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}'
22.12.2018 17:11:48.616 [Send Data to AMADCommBridge] Condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}' Executing socket check to host 'null' and port 'null'
22.12.2018 17:11:48.726 [Send Data to AMADCommBridge] Condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}' Could not execute ping command
ch.gridvision.ppam.androidautomagic.simplelang.a.d: can not convert value 'null' to number
at ch.gridvision.ppam.androidautomagic.simplelang.a.j.h(SourceFile:214)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.a(SourceFile:196)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.c(SourceFile:182)
at ch.gridvision.ppam.androidautomagiclib.util.ci$1.run(SourceFile:40)
at java.lang.Thread.run(Thread.java:761)

22.12.2018 17:11:48.727 [Send Data to AMADCommBridge] End executing condition 'Host erreichbar: {global_fhemip}:{global_bridgeport}' with return value false and exception can not convert value 'null' to number
22.12.2018 17:11:48.735 [Send Data to AMADCommBridge] Flow ends execution due to errors
22.12.2018 17:11:48.735 [Send Data to AMADCommBridge] Error:
ch.gridvision.ppam.androidautomagic.simplelang.a.d: can not convert value 'null' to number
at ch.gridvision.ppam.androidautomagic.simplelang.a.j.h(SourceFile:214)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.a(SourceFile:196)
at ch.gridvision.ppam.androidautomagic.model.b.ar$2.c(SourceFile:182)
at ch.gridvision.ppam.androidautomagiclib.util.ci$1.run(SourceFile:40)
at java.lang.Thread.run(Thread.java:761)

22.12.2018 17:11:48.742 [Send Data to AMADCommBridge] Flow ended.


Welcher Null-Wert kann nicht zu einer Zahl konvertiert werden und warum überhaupt Null ?

CoolTux

Schau mal in Deine globalen Variablen. Sieht so aus als wenn da die Eintrage für port und server fehlen.
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

TomLee

Upps, in Globale Variablen steht  gar kein Eintrag mehr. Ich  war gar nicht am Tablet seit gestern , hab nichts gemacht.Wie das mit den Globalen Variablen war muss ich mich später noch mal einlesen. Danke für den Hinweis.

CoolTux

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

TomLee

Hatte ich schon versucht. Ich schaue später mal, jetzt kein Zeit.

TomLee

Einmal die global_amadid  in den Gobalen Variablen angegeben und das Tablet ist wieder active, weitere globale Variablen wurden automatisch angelegt. Merkwürdig das die einfach weg waren.

Danke und schöne Weihnachten.

NewRasPi

Hallo CoolTux und alle anderen
erstmal vielen Dank für dieses geniale Modul.
Mittlerweile funktioniert mein Vorhaben schon ganz gut. Wenn jemand in den Bereich des Bewegungsmelder vor der Haustür kommt wird das Tablet mit einem Lifebild
der Kamera gestartet.
Mit dem (set Tablet openApp com.rcreations.ipcamviewerBasic)
startet diese auf dem Tablet wie gewüncht.
Jetzt hätte ich aber die Frage, gibt es auch eine Möglichkeit "set closeApp ..." zu schalten?
Der IpCamViewer ist noch die Basisversion und blendet nach einer kurzen Zeit Werbeanzeigen ein. Bei einer wiederholten Bewegung kommt dann nur noch die Werbung als Bild. Es wäre also gut wenn man diese App "frisch" (ohne Altlasten) starten könnte.
Meine versuche die Hikvision Kamerabilder Stream mit VLC auf dem Tablet zu starten funktionieren leider nicht. Dieser IP Cam Viewer kann den rtsp Stream anzeigen.
Vielen Dank für jeden Tipp.
Allen ein schönes Fest
Grüße Elmar
Raspberry Pi 2 Mod B + Raspberry Pi 3 + Raspberry Pi4; HM Lan Adapter; 8 Kanal Relaiskarte; ca. 15x 1wire Temperatur Sensor DS18B20; 10x HC-SR501 Bewegungsmelder; 9x HM Rauchmelder HM-Sec-SD; HM Funk Fenstersensoren; HM Strommess-Zwischenstecker;

CoolTux

Hallo Elmar,

Mit Close oder Kill App hatte ich leider nie großen Erfolg. Aber du kannst es ja einfach mal testen. Erstelle einen Flow, und als Aktion macht Du closeApp oder killApp.
Als Trigger nimmst erstmal eine Zeit. Sagen wir alle 2min. Dann aktivieren und deine App in den Vordergrund holen. Es geht ohne root ausschließlich wenn die App im Vordergrund ist.
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

sinus61

Zitat von: NewRasPi am 24 Dezember 2018, 10:24:52
Der IpCamViewer ist noch die Basisversion und blendet nach einer kurzen Zeit Werbeanzeigen ein. Bei einer wiederholten Bewegung kommt dann nur noch die Werbung als Bild. Es wäre also gut wenn man diese App "frisch" (ohne Altlasten) starten könnte.
Meine versuche die Hikvision Kamerabilder Stream mit VLC auf dem Tablet zu starten funktionieren leider nicht.

Wird die Werbung nicht nur zusätzlich unten eingeblendet? War zumindest damals so, hatte inzwischen die Vollversion gekauft.

Alternative dazu wäre die App InstarVision, ist zwar eigentlich für die Instar Kameras, aber kostenlos, werbefrei und unterstützt auch Hikvision Kameras.

NewRasPi

Hallo CoolTux und sinus61
@ CoolTux - das mit dem Flow hatte ich mir kompliziert vorgestellt - ging dann soweit auf dem Tablet unter Automagic nicht so schwer. Nur wie man dann die Verbindung zu AMADNG (den neu erstellen Flow auf den FHEM Raspi bringen soll) machen kann, habe ich nirgens gefunden.
@ sinus64 Auch an Dich vielen Dank - diese App Instar Vision (de.instar.vision) fünktioniert ja super mit der Hikvision Kamera. Solche Tipps sind sehr wertvoll.
Mit Eurer Hilfe geht jetzt meine Kamera Automatik für die Haustür.
Danke Danke
schöne Grüße
Elmar
Raspberry Pi 2 Mod B + Raspberry Pi 3 + Raspberry Pi4; HM Lan Adapter; 8 Kanal Relaiskarte; ca. 15x 1wire Temperatur Sensor DS18B20; 10x HC-SR501 Bewegungsmelder; 9x HM Rauchmelder HM-Sec-SD; HM Funk Fenstersensoren; HM Strommess-Zwischenstecker;

CoolTux

Naja, ist die Frage ob es über AMADNG (FHEM) gesteuert werden soll, oder ob Du es nicht einfach in Automagic lässt.
Automagic ist nichts weiter wie ein Notify in FHEM. Kommt ein Event (eine App öffnet sich) trigger es und führe eine Aktion aus.
Also einfacher Weg, Du änderst Deinen Trigger vom Flow auf, openApp mit App name und so. Oder Du nimmst als  "Genereller Broadcast" und da eine Action eintragen (bspw my.test).
Danach ein "set $AMADDEVICE sendIntent my.test" und der flow wird ausgeführt. Das wäre dann über FHEM (AMADNG)


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

Tueftler1983

hallo zusammen,

ich bekomme seid dem 28.12.2018 von meinem Huawei p Smart keine informationen mehr über eingegangene Anrufe, nachrichten oder Welcher Player grade was spielt. auf dem Gerät Läuft android 8.0 Orio

Gibt es dazu irgendwelche infos?

Im log steht immer Accessibillity service not running und bekomme das auch immer als benachrichtigung oben

Flow Informations mit Fehler bendet
Fehler Accessibillityservice not Running

Last executed: condition Task app läuft: {global_activetask} (neuster)

CoolTux

Und wieso läuft Dein Service nicht?
Schau mal in Automagic unter Rechte ob da was fehlt.
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

Tueftler1983

hmm tatsächlich war in Atutomagic in den einstellungen der Accessibility service nicht gesetzt, was mich wundert da ich dies nach dem einrichten gemacht hatte und da auch nix geändert hatte.

Mal abwarten ob es sich wieder von allein deaktiviert.
danke dir erstmal.