Hauptmenü

DOIF Trigger Problem

Begonnen von mafakas, 11 November 2017, 18:20:26

Vorheriges Thema - Nächstes Thema

mafakas

Hallo,

seit langem dient das Forum bei all meinen Problemen als Problemlöser (mit all meinen Problemen war ich nicht der erste).
Nun aber bin ich mit meinem Latein am Ende.

Ich versuche eine LED-Leiste per DOIF zu schalten.
Das on funktioniert prima - beim off verzweifel ich.

Es soll ausgeschalten werden wenn
- MotionSensor = closed
- HIFI active = off

Wenn ich nur auf den MotionSensor gehe funktioniert es, wenn ich es mit HIFI verunde geht nichts mehr...
Funktionierendes DEF des DOIF:
( [motionSensorLiving:"closed"] ) ( set rgbLedWohnzimmer off )

Leider nicht funktionierendes DEF des DOIF - soll aber:
( [hifiActive:"off"] and [motionSensorLiving:"closed"] ) ( set rgbLedWohnzimmer off )

Hier mein DOIF:
Internals:
   DEF        ( [hifiActive:"off"] and [motionSensorLiving:"closed"] ) ( set rgbLedWohnzimmer off )
   NAME       motionLed
   NR         613
   NTFY_ORDER 50-motionLed
   STATE      initialized
   TYPE       DOIF
   READINGS:
     2017-11-11 18:16:10   cmd             0
     2017-11-11 18:16:10   state           initialized
   condition:
     0           EventDoIf('hifiActive',$hash,'off',1) and EventDoIf('motionSensorLiving',$hash,'closed',1)
   devices:
     0           hifiActive motionSensorLiving
     all         hifiActive motionSensorLiving
   do:
     0:
       0           set rgbLedWohnzimmer off
     1:
   helper:
     globalinit 1
     last_timer 0
     sleeptimer -1
   itimer:
   regexp:
     all:
   state:
     STATE:
   trigger:
     all         hifiActive motionSensorLiving
Attributes:
   checkReadingEvent 1
   do         always
   room       Wohnzimmer
   selftrigger all
   wait       300


Mein MotionSensor:
Internals:
   DEF        eabaa472 5
   IODev      ZWDongle_0
   LASTInputDev ZWDongle_0
   MSGCNT     197
   NAME       motionSensorLiving
   NR         591
   STATE      closed
   TYPE       ZWave
   ZWDongle_0_MSGCNT 197
   ZWDongle_0_RAWMSG 00040005063105030a0009
   ZWDongle_0_TIME 2017-11-11 18:13:08
   ZWaveSubDevice no
   homeId     eabaa472
   isWakeUp   1
   lastMsgSent 1510420387.18128
   nodeIdHex  05
   READINGS:
     2017-11-07 10:58:22   CMD             ZW_APPLICATION_UPDATE
     2017-11-11 18:11:56   alarm           HomeSecurity: Event cleared: Motion Detection - Unknown Location, arg 0108
     2017-11-07 13:04:25   alarm_type_00   level 255 node 5 seconds 0
     2017-09-28 13:02:01   assocGroup_1    Max 1 Nodes ZWDongle_0
     2017-09-28 13:02:01   assocGroup_2    Max 5 Nodes
     2017-09-28 13:02:01   assocGroup_3    Max 5 Nodes
     2017-09-28 13:02:01   assocGroup_4    Max 5 Nodes ZWDongle_0
     2017-09-28 13:02:01   assocGroup_5    Max 5 Nodes ZWDongle_0
     2017-09-28 13:02:01   assocGroups     5
     2017-11-07 09:14:59   battery         100 %
     2017-11-11 18:13:08   celsius         21.6
     2017-11-07 10:58:23   configAssociationsInZWaveNetwork18 15
     2017-11-07 10:58:23   configBASICCommandClassConfiguration BASICOnAndOFF
     2017-11-07 10:58:24   configBASICOFFCommandFrameValue 0
     2017-11-07 10:58:25   configBASICONCommandFrameValue 255
     2017-11-07 10:58:26   configLuminanceReportThreshold 50
     2017-11-07 10:58:27   configLuminanceReportsInterval 1800
     2017-11-07 10:58:28   configMotionDetectionAlarmCancellation6 30
     2017-11-07 10:58:29   configMotionDetectionBlindTime 15
     2017-11-07 10:58:31   configMotionDetectionNightDay 200
     2017-11-07 10:58:32   configMotionDetectionOperatingMode PIRSensorAlwaysActive
     2017-11-07 10:58:33   configMotionDetectionPulseCounter 2Pulses
     2017-11-07 10:58:34   configMotionDetectionSensitivity 15
     2017-11-07 10:58:35   configMotionDetectionWindowTime 12Seconds
     2017-11-07 10:58:36   configTamperAlarmBroadcastMode TamperAlarmSentTo3rdAssociation0
     2017-11-07 10:58:38   configTamperAlarmCancellation SendTamperCancellationReport
     2017-11-07 10:58:39   configTamperAlarmCancellationDelay 30
     2017-11-07 10:58:40   configTamperBackwardCompatible29 BackwardCompatibleTamperAlarm0
     2017-11-07 10:58:41   configTamperOperatingModes TamperOnly
     2017-11-07 10:58:42   configTamperSensitivity 20
     2017-11-07 10:58:43   configTemperatureMeasuringInterval 900
     2017-11-07 10:58:44   configTemperatureOffset 0
     2017-11-07 10:58:45   configTemperatureReportInterval 0
     2017-11-07 10:58:47   configTemperatureReportThreshold 10
     2017-11-07 10:58:48   configVisualLEDIndicatorBrightness 1
     2017-11-07 10:58:49   configVisualLEDIndicatorLuminanceFor82 100
     2017-11-07 10:58:50   configVisualLEDIndicatorLuminanceFor83 1000
     2017-11-07 10:58:51   configVisualLEDIndicatorSignallingMode LEDInactive
     2017-11-07 10:58:52   configVisualLEDIndicatorTamperAlarm TamperAlarmIsIndicated
     2017-11-07 10:58:53   configVisualLEDIndicatorTemperatureFor86 18
     2017-11-07 10:58:54   configVisualLEDIndicatorTemperatureFor87 28
     2017-11-11 18:13:08   luminance       9 Lux
     2017-11-11 18:13:08   lux             9
     2017-09-28 13:00:36   model           FIBARO System FGMS001-ZW5 Motion Sensor
     2017-09-28 13:00:36   modelConfig     fibaro/fgmszw5.xml
     2017-09-28 13:00:36   modelId         010f-0801-1001
     2017-11-11 18:13:08   motion          closed
     2017-11-11 18:11:56   reportedState   closed
     2017-11-11 18:11:56   state           closed
     2017-11-07 11:14:00   temperature     21.6 C
     2017-11-11 18:13:07   timeToAck       0.069
     2017-11-11 18:13:07   transmit        OK
     2017-11-11 18:13:05   wakeup          notification
     2017-11-07 10:58:56   wakeupReport    interval 7200 target 1
Attributes:
   IODev      ZWDongle_0
   classes    ZWAVEPLUS_INFO BASIC VERSION MANUFACTURER_SPECIFIC DEVICE_RESET_LOCALLY ASSOCIATION_GRP_INFO ASSOCIATION POWERLEVEL WAKE_UP BATTERY ALARM CRC_16_ENCAP CONFIGURATION SENSOR_MULTILEVEL MULTI_CHANNEL_ASSOCIATION APPLICATION_STATUS SENSOR_BINARY SENSOR_ALARM SECURITY FIRMWARE_UPDATE_MD
   group      MotionSensor
   room       Wohnzimmer,ZWave
   userReadings motion {ReadingsVal("motionSensorLiving","state","") =~/^open/? ReadingsVal("motionSensorLiving","state","0"):ReadingsVal("motionSensorLiving","reportedState","0")}, lux { ReadingsVal("motionSensorLiving","state","") =~/^luminance/? ReadingsNum("motionSensorLiving","state","0"):ReadingsNum("motionSensorLiving","luminance","0") }, celsius { ReadingsVal("motionSensorLiving","state","") =~/^temperature/? ReadingsNum("motionSensorLiving","state","0"):ReadingsNum("motionSensorLiving","temperature","0") }
   vclasses   ALARM:5 APPLICATION_STATUS:1 ASSOCIATION:2 ASSOCIATION_GRP_INFO:1 BASIC:1 BATTERY:1 CONFIGURATION:1 CRC_16_ENCAP:1 DEVICE_RESET_LOCALLY:1 FIRMWARE_UPDATE_MD:3 MANUFACTURER_SPECIFIC:2 MULTI_CHANNEL_ASSOCIATION:2 POWERLEVEL:1 SECURITY:1 SENSOR_ALARM:1 SENSOR_BINARY:1 SENSOR_MULTILEVEL:8 VERSION:2 WAKE_UP:2 ZWAVEPLUS_INFO:2


Mein hifiActive
Internals:
   CFGFN      ./FHEM/10_Presence.cfg
   NAME       hifiActive
   NR         82
   STATE      off
   TYPE       dummy
   READINGS:
     2017-11-11 17:31:54   state           off
Attributes:
   devStateIcon on:rc_GREEN:off off:rc_RED:on
   event-on-change-reading state
   group      Z_hifiActive
   room       Wohnzimmer

automatisierer

dein doif soll auf zwei events reagieren.
und da zwei events niemals gleichzeitig wahr sind, funktioniert dein doif nicht.
werte die readings aus, statt den events und es wird funktionieren

amenomade

automatisierer hat recht. Deswegen von Events auf Status gehen: statt
( [hifiActive:"off"] and [motionSensorLiving:"closed"] )
dann
( [hifiActive] eq "off" and [motionSensorLiving] eq "closed" )
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus