Pushmeldung bei unauthorisierter Türöffnung wenn zwei iPhones BT abwesend sind

Begonnen von maraka, 20 Februar 2017, 13:16:05

Vorheriges Thema - Nächstes Thema

CoolTux

Das hat mit unserem Vorhaben nichts zu tun. Da muss doch sofort nach dem öffnen was kommen.
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

maraka

Zitat von: CoolTux am 27 Februar 2017, 18:14:46
Das hat mit unserem Vorhaben nichts zu tun. Da muss doch sofort nach dem öffnen was kommen.

Da kommt nichts im Log, Ehrenwort, auch nicht mit Firefox, ich habe mal eine Lampe geschaltet
da kam sofort ein Eintrag. Soll ich die Anwesenheit in fhem noch mal neu machen?

CoolTux

Kannst du noch mal ein list vom Notify machen. Irgendwie denke ich das triggert noch nicht.
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

maraka

Zitat von: CoolTux am 27 Februar 2017, 18:45:09
Kannst du noch mal ein list vom Notify machen. Irgendwie denke ich das triggert noch nicht.

Internals:
   DEF        define notifyTuerAlarm notify FlurTuerkontakt.open {
                                     fhem("set pushoverMsg msg 'EINBRUCHSALARM!!!' 'Einbruchsalarm - Achtung, die Haustür wurde geöffnet ohne das ein Bewohner erkannt wurde.' '' 1 ''") if( Value("Handy") eq "absent" );
}

   NAME       notifyTuerAlarm
   NR         160
   NTFY_ORDER 50-notifyTuerAlarm
   REGEXP     define
   STATE      active
   TYPE       notify
   Readings:
     2017-02-27 16:27:59   state           active
Attributes:
   room       Anwesenheit



maraka

Zitat von: maraka am 27 Februar 2017, 18:49:12
Internals:
   DEF        define notifyTuerAlarm notify FlurTuerkontakt.open {
                                     fhem("set pushoverMsg msg 'EINBRUCHSALARM!!!' 'Einbruchsalarm - Achtung, die Haustür wurde geöffnet ohne das ein Bewohner erkannt wurde.' '' 1 ''") if( Value("Handy") eq "absent" );
}

   NAME       notifyTuerAlarm
   NR         160
   NTFY_ORDER 50-notifyTuerAlarm
   REGEXP     define
   STATE      active
   TYPE       notify
   Readings:
     2017-02-27 16:27:59   state           active
Attributes:
   room       Anwesenheit


Ich darf ja nicht mehr im fhem.cfg gucken aber da steht das so:

define notifyTuerAlarm notify define notifyTuerAlarm notify FlurTuerkontakt.open { \
                                     fhem("set pushoverMsg msg 'EINBRUCHSALARM!!!' 'Einbruchsalarm - Achtung, die Haustür wurde geöffnet ohne das ein Bewohner erkannt wurde.' '' 1 ''") if( Value("Handy") eq "absent" );;\
}\

attr notifyTuerAlarm room Anwesenheit


ist das okay?

CoolTux

Ja das klappt irgendwie nicht so. Das Notify triggert nicht.

Kannst du bitte den Eventmonitor öffnen. Auch unten links im FHEM Web und dann die Tür öffnen. Und dann das passende Event hier posten bitte.
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: maraka am 27 Februar 2017, 18:53:55
Ich darf ja nicht mehr im fhem.cfg gucken aber da steht das so:

define notifyTuerAlarm notify define notifyTuerAlarm notify FlurTuerkontakt.open { \
                                     fhem("set pushoverMsg msg 'EINBRUCHSALARM!!!' 'Einbruchsalarm - Achtung, die Haustür wurde geöffnet ohne das ein Bewohner erkannt wurde.' '' 1 ''") if( Value("Handy") eq "absent" );;\
}\

attr notifyTuerAlarm room Anwesenheit


ist das okay?

Du siehst viel mehr bei einem list
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

maraka

Zitat von: CoolTux am 27 Februar 2017, 18:59:05
Du siehst viel mehr bei einem list

2017-02-27 18:56:37 CUL_HM FlurTuerkontakt battery: ok
2017-02-27 18:56:37 CUL_HM FlurTuerkontakt contact: open (to CUL1)
2017-02-27 18:56:37 CUL_HM FlurTuerkontakt open
2017-02-27 18:56:37 CUL_HM FlurTuerkontakt trigDst_F11234: noConfig
2017-02-27 18:56:37 CUL_HM FlurTuerkontakt trigger_cnt: 96


2017-02-27 18:57:04 CUL_HM FlurTuerkontakt contact: closed (to CUL1)
2017-02-27 18:57:04 CUL_HM FlurTuerkontakt closed
2017-02-27 18:57:04 CUL_HM FlurTuerkontakt trigDst_F11234: noConfig
2017-02-27 18:57:04 CUL_HM FlurTuerkontakt trigger_cnt: 97
2017-02-27 18:57:07 structure Handy absent

CoolTux

War doch gut das Du mal geschaut hast


define notifyTuerAlarm notify define notifyTuerAlarm notify FlurTuerkontakt.open { \


Das ist Mist.
Kannst Du das bitte ändern in
code]
define notifyTuerAlarm notify FlurTuerkontakt.open { \
[/code]

Dann FHEM neustarten.
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

maraka

Zitat von: CoolTux am 27 Februar 2017, 19:06:02
War doch gut das Du mal geschaut hast


define notifyTuerAlarm notify define notifyTuerAlarm notify FlurTuerkontakt.open { \


Das ist Mist.
Kannst Du das bitte ändern in
code]
define notifyTuerAlarm notify FlurTuerkontakt.open { \
[/code]

Dann FHEM neustarten.

Leider hat sich nichts geändert, es kommt keine Meldung aufs Handy.
Ich habe alles mal neu erstellt, auch nichts.
und wenn man dann in fhem.cfg nachschaut, steht das notify wieder so drin:
define notifyTuerAlarm notify define notifyTuerAlarm notify FlurTuerkontakt.open { \
                                     fhem("set pushoverMsg msg 'EINBRUCHSALARM!!!' 'Einbruchsalarm - Achtung, die Haustür wurde geöffnet ohne das ein Bewohner erkannt wurde.' '' 1 ''") if( Value("Handy") eq "absent" );;\
}\

attr notifyTuerAlarm room Anwesenheit


ich erstelle doch das notify indem ich in der Kommandozeile eingebe

define notifyTuerAlarm notify FlurTuerkontakt.open a b

und ersetze a b

define notifyTuerAlarm notify FlurTuerkontakt.open {
                                     fhem("set pushoverMsg msg 'EINBRUCHSALARM!!!' 'Einbruchsalarm - Achtung, die Haustür wurde geöffnet ohne das ein Bewohner erkannt wurde.' '' 1 ''") if( Value("HANDYSTRUCTURE") eq "absent" );
}


wobei ich einmal FlurTuerkontakt löschen kann, weil es sonst zweimal dort steht.









Cobra

Du darfst a b nicht durch
define notifyTuerAlarm notify FlurTuerkontakt.open {
                                     fhem("set pushoverMsg msg 'EINBRUCHSALARM!!!' 'Einbruchsalarm - Achtung, die Haustür wurde geöffnet ohne das ein Bewohner erkannt wurde.' '' 1 ''") if( Value("HANDYSTRUCTURE") eq "absent" );
}

ersetzen sondern nur duch

{
fhem("set pushoverMsg msg 'EINBRUCHSALARM!!!' 'Einbruchsalarm - Achtung, die Haustür wurde geöffnet ohne das ein Bewohner erkannt wurde.' '' 1 ''") if( Value("HANDYSTRUCTURE") eq "absent" );
}
FHEM in Docker auf Synology, CCU3,
Diverse HM-Komponenten, Netatmo, Hue, Sonos, Nuki

CoolTux

Danke Cobra,

Da habe ich mich wohl nicht ganz klar ausgedrückt. a b wird in der Tat nur ersetzt durch das was Cobra geschrieben hat.



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

maraka

Zitat von: CoolTux am 28 Februar 2017, 13:08:42
Danke Cobra,

Da habe ich mich wohl nicht ganz klar ausgedrückt. a b wird in der Tat nur ersetzt durch das was Cobra geschrieben hat.



Grüße

Stimmt. Aller Anfang ist halt schwer. Jetzt funktioniert es.
Ein super großes Dankeschön :) :)

maraka

Zitat von: Cobra am 28 Februar 2017, 12:36:18
Du darfst a b nicht durch
define notifyTuerAlarm notify FlurTuerkontakt.open {
                                     fhem("set pushoverMsg msg 'EINBRUCHSALARM!!!' 'Einbruchsalarm - Achtung, die Haustür wurde geöffnet ohne das ein Bewohner erkannt wurde.' '' 1 ''") if( Value("HANDYSTRUCTURE") eq "absent" );
}

ersetzen sondern nur duch

{
fhem("set pushoverMsg msg 'EINBRUCHSALARM!!!' 'Einbruchsalarm - Achtung, die Haustür wurde geöffnet ohne das ein Bewohner erkannt wurde.' '' 1 ''") if( Value("HANDYSTRUCTURE") eq "absent" );
}


Kann ich jetzt noch folgendes einbauen?:
Ich bin abwesend, und wenn das zweite Handy auch irgendwann abwesend wird, das ich dann darüber per Pushmessage benachricht werde. Dann weiß ich, das mein "Türalarm scharf geschaltet ist".

CoolTux

Kannst Du. Notify auf das absent der Handystructure und dann pushnachricht.
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