Hallo zusammen,
benötige ein wenig Hilfe bei der Umstellung eines Notify zu eiem DOIF.
notify
HM_26001B_Btn_01:.*Long.1_.* { if (Value("HM_26001B_Btn_01") ne "on") { fhem("set Mp3 on") }}
DOIF
([HM_26001B_Btn_01:Long.*] eq "on") (set Mp3 on)
leider funktioniert es so nicht. Wo ist hier mein Denkfehler?
Als State wird folgendes ausgegeben. "Long 8_200 (to broadcast) " Die Zahlen sind aber abhängig von der Dauer des Drückens.
Danke Gruß
DJ-Mix
Zitat von: DJ-Mix am 16 September 2016, 09:21:47
Hallo zusammen,
benötige ein wenig Hilfe bei der Umstellung eines Notify zu eiem DOIF.
notify
HM_26001B_Btn_01:.*Long.1_.* { if (Value("HM_26001B_Btn_01") ne "on") { fhem("set Mp3 on") }}
DOIF
([HM_26001B_Btn_01:Long.*] eq "on") (set Mp3 on)
leider funktioniert es so nicht. Wo ist hier mein Denkfehler?
Als State wird folgendes ausgegeben. "Long 8_200 (to broadcast) " Die Zahlen sind aber abhängig von der Dauer des Drückens.
Danke Gruß
DJ-Mix
di DOIF ([HM_26001B_Btn_01:Long]) (set Mp3 on)
attr di do always
Gruß
Damian
Hallo Damian,
leider fuktioniert das so nicht. Erhalte einen Error
reading does not exist: [HM_26001B_Btn_01:Long]
Internals:
DEF ([HM_26001B_Btn_01:Long]) (set Mp3 on)
NAME klingel_long
NR 322
NTFY_ORDER 50-klingel_long
STATE initialized
TYPE DOIF
Readings:
2016-09-19 16:42:33 cmd 0
2016-09-19 16:42:33 state initialized
Condition:
0 ReadingValDoIf($hash,'HM_26001B_Btn_01','Long','','',AttrVal($hash->{NAME},'notexist',undef))
Devices:
0 HM_26001B_Btn_01
all HM_26001B_Btn_01
Do:
0:
0 set Mp3 on
Helper:
globalinit 1
last_timer 0
sleeptimer -1
Itimer:
Readings:
0 HM_26001B_Btn_01:Long
all HM_26001B_Btn_01:Long
Regexp:
All:
State:
Attributes:
do always
room Haustüre
Danke Gruß
DJ-Mix
Ich denke so:
[HM_26001B_Btn_01:"Long"]
Quelle (http://fhem.de/commandref_DE.html#DOIF_Ereignissteuerung_ueber_Auswertung_von_Events)
Gruß Otto
Danke Otto123,
es hat funktioniert. ;)
Gruß
DJ-Mix
8)