FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: Felix_66 am 30 April 2014, 21:36:14

Titel: Problem mit notify
Beitrag von: Felix_66 am 30 April 2014, 21:36:14
ich möchte dass eine notify loop bei Bewegung und Dämmerung ausgelöst wird:
dazu habe ich folgendes eingegeben:

define n.BewBalkon_1 notify BewBalkon_1:M.on IF ([BewBalkon_1:brightness] < 100) (set lampe1 on-for-timer 180, set lampe2 on-for-timer 180).

die loop wird aber nicht ausgeführt obwohl die events kommen.....

2014.04.30 21:26:53 5: Notify loop for BewBalkon_1 M: on E: 0
2014.04.30 21:26:53 4: eventTypes: EnOcean BewBalkon_1 M: on E: 0 -> M: on E: .*
2014.04.30 21:26:53 4: eventTypes: EnOcean BewBalkon_1 brightness: 0 -> brightness: .*
2014.04.30 21:26:53 4: eventTypes: EnOcean BewBalkon_1 motion: on -> motion: on
2014.04.30 21:26:53 4: eventTypes: EnOcean BewBalkon_1 state: M: on E: 0 -> state: M: on E: .*

wenn ich statt auf M.on auf M.* triggere geht es, allerdings löst es dann mehrmals aus (bei on und off)

ich bin echt ratlos woran das liegt...
Gruß Felix
Titel: Antw:Problem mit notify
Beitrag von: der-Lolo am 30 April 2014, 21:47:38
lass das m.on vor dem IF weg und setze es dafür in kombination mit brightness...

define n.BewBalkon_1 notify BewBalkon_1 IF (([BewBalkon_1:brightness] < 100) and ([BewBalkon_1:M.] eq "on")) (set lampe1 on-for-timer 180, set lampe2 on-for-timer 180).

aus der hüfte geschossen...
Titel: Antw:Problem mit notify
Beitrag von: UliM am 30 April 2014, 23:21:03
Oder probier m..on bzw m:.on (sieht aus als wäre zwischen m und on erst ein Doppelpunkt und dann ne Leerstelle)
=8-)
Titel: Antw:Problem mit notify
Beitrag von: Felix_66 am 01 Mai 2014, 08:45:28
Hallo Uli,

ja da ist ein Leerzeichen dazwischen, aber die Lösung mit M:. bzw M.. geht auch nicht.
auch die Lösung mit eq "on" nicht...

Gruß Felix
Titel: Antw:Problem mit notify
Beitrag von: Felix_66 am 01 Mai 2014, 08:59:10
so jetzt geht es
define n.BewBalkon_1 notify BewBalkon_1 IF (([BewBalkon_1:brightness] < 100) and ([BewBalkon_1:motion] eq "on"))....

seltsamerweise geht es mit "brightness" aber nicht mit "M"


Notify loop for BewBalkon_1 M: off E: 20
2014.05.01 08:52:55 4: eventTypes: EnOcean BewBalkon_1 M: off E: 20 -> M: off E: .*
2014.05.01 08:52:55 4: eventTypes: EnOcean BewBalkon_1 brightness: 20 -> brightness: .*
2014.05.01 08:52:55 4: eventTypes: EnOcean BewBalkon_1 motion: off -> motion: off
2014.05.01 08:52:55 4: eventTypes: EnOcean BewBalkon_1 state: M: off E: 20 -> state: M: off E: .*
Titel: Antw:Problem mit notify
Beitrag von: der-Lolo am 01 Mai 2014, 09:04:14
M ist ja so wie es ausschaut ein eigenes Reading - nach dem on kommt dann eben noch etwas mit.
eq "on.*" würde wahrscheinlich gehen.
Titel: Antw:Problem mit notify
Beitrag von: Damian am 01 Mai 2014, 09:08:30
Zitat von: der-Lolo am 01 Mai 2014, 09:04:14
M ist ja so wie es ausschaut ein eigenes Reading - nach dem on kommt dann eben noch etwas mit.
eq "on.*" würde wahrscheinlich gehen.

dann eher so:

define n.BewBalkon_1 notify BewBalkon_1:M..on.* IF ([BewBalkon_1:brightness] < 100) (set lampe1 on-for-timer 180, set lampe2 on-for-timer 180)

;)

Gruß

Damian
Titel: Antw:Problem mit notify
Beitrag von: Felix_66 am 01 Mai 2014, 14:49:20
Hallo,

Danke das war die Lösung!
Gruß Felix

Zitat von: Damian am 01 Mai 2014, 09:08:30
dann eher so:

define n.BewBalkon_1 notify BewBalkon_1:M..on.* IF ([BewBalkon_1:brightness] < 100) (set lampe1 on-for-timer 180, set lampe2 on-for-timer 180)