hallo,
ich möchte einen dimmer immer dann bei bewegung aktivieren, wenn es entweder draussen dunkler wird oder die vorhänge zugezogen werden.
aber egal ob ich lt oder gt für die auswerung der lux werte benutze das licht geht immer an.
hier das listing des doifs:
Internals:
DEF (([kuche_sensor_12:reportedState] eq "open" and [hell2:twilight_weather] < 80)
or
([kuche_sensor_12:reportedState] eq "open" and [kuche_sensor_12:luminance] lt "60 Lux"))
(set kuche_dimmer_weiss_8 configTimeOfAUTOMATICMovingBetweenThe10 1,set kuche_dimmer_weiss_8 on)
DOELSEIF ([kuche_sensor_12:reportedState] eq "closed")
(set kuche_dimmer_weiss_8 configTimeOfAUTOMATICMovingBetweenThe10 20,set kuche_dimmer_weiss_8 off)
NAME kochenlicht.w
NR 44
NTFY_ORDER 50-kochenlicht.w
STATE cmd_2
TYPE DOIF
Readings:
2015-07-11 13:00:01 cmd_event kuche_sensor_12
2015-07-11 13:00:01 cmd_nr 2
2015-07-11 13:02:09 e_hell2_twilight_weather 100
2015-07-11 13:02:20 e_kuche_sensor_12_luminance 128 Lux
2015-07-11 13:02:20 e_kuche_sensor_12_reportedState closed
2015-07-11 13:00:01 state cmd_2
2015-07-11 13:00:01 wait_timer no timer
Condition:
0 (ReadingValDoIf('kuche_sensor_12','reportedState','') eq "open" and ReadingValDoIf('hell2','twilight_weather','') < 80) or (ReadingValDoIf('kuche_sensor_12','reportedState','') eq "open" and ReadingValDoIf('kuche_sensor_12','luminance','') lt "60 Lux")
1 ReadingValDoIf('kuche_sensor_12','reportedState','') eq "closed"
Devices:
0 kuche_sensor_12 hell2
1 kuche_sensor_12
all kuche_sensor_12 hell2
Do:
0 set kuche_dimmer_weiss_8 configTimeOfAUTOMATICMovingBetweenThe10 1,set kuche_dimmer_weiss_8 on
1 set kuche_dimmer_weiss_8 configTimeOfAUTOMATICMovingBetweenThe10 20,set kuche_dimmer_weiss_8 off
Helper:
last_timer 0
sleepdevice kuche_sensor_12
sleeptimer -1
Internals:
Itimer:
Readings:
0 kuche_sensor_12:reportedState hell2:twilight_weather kuche_sensor_12:luminance
1 kuche_sensor_12:reportedState
all kuche_sensor_12:reportedState hell2:twilight_weather kuche_sensor_12:luminance
State:
Timerfunc:
Trigger:
Attributes:
room Doif
wait wait 0:20
also irgendetwas mache ich falsch. ich wäre für einen tipp von euch dankbar.
grüße horst
Hallo Horst,
versuche es 'mal mit
[kuche_sensor_12:luminance:d] < 60
Auszug aus deutscher commandref zu DOIF:
Filtern nach Zahlen
Es soll aus einem Reading, das z. B. ein Prozentzeichen beinhaltet, nur der Zahlenwert für den Vergleich genutzt werden:
define di_heating DOIF ([adjusting:actuator:d] < 10) (set heating off) DOELSE (set heating on)
Andreas
hallo andreas,
das hatte ich vorher schon mal so, dann bekomme ich aber tausende von perlwarnungen im logfile:
2015.07.01 03:34:35 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3226) line 1.
2015.07.01 03:34:35 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3226) line 1.
2015.07.01 03:34:35 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3228) line 1.
2015.07.01 03:34:35 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3228) line 1.
2015.07.01 03:34:35 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3229) line 1.
2015.07.01 03:34:35 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3229) line 1.
2015.07.01 03:34:35 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3230) line 1.
2015.07.01 03:34:35 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3230) line 1.
2015.07.01 03:34:36 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3232) line 1.
2015.07.01 03:34:36 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3232) line 1.
2015.07.01 03:34:36 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3233) line 1.
2015.07.01 03:34:36 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3233) line 1.
2015.07.01 03:34:36 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3234) line 1.
2015.07.01 03:34:36 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3234) line 1.
2015.07.01 03:34:38 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3236) line 1.
2015.07.01 03:34:38 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3236) line 1.
2015.07.01 03:34:38 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3237) line 1.
2015.07.01 03:34:38 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3237) line 1.
2015.07.01 03:34:38 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3238) line 1.
2015.07.01 03:34:38 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3238) line 1.
2015.07.01 03:34:42 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3240) line 1.
2015.07.01 03:34:42 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3240) line 1.
2015.07.01 03:34:42 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3241) line 1.
2015.07.01 03:34:42 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3241) line 1.
2015.07.01 03:34:42 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3242) line 1.
2015.07.01 03:34:42 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3242) line 1.
2015.07.01 03:34:51 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3249) line 1.
2015.07.01 03:34:51 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3249) line 1.
2015.07.01 03:34:51 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3250) line 1.
2015.07.01 03:34:51 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3250) line 1.
2015.07.01 03:34:51 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3251) line 1.
2015.07.01 03:34:51 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3251) line 1.
2015.07.01 03:34:52 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric lt (<) at (eval 3252) line 1.
2015.07.01 03:34:52 1: PERL WARNING: Argument "41 Lux" isn't numeric in numeric gt (>) at (eval 3252) line 1.
2015.07.01 03:34:52 2: ZWave set kuche_dimmer_gruen_5 on
2015.07.01 03:34:58 1: PERL WARNING: Argument "42 Lux" isn't numeric in numeric lt (<) at (eval 3256) line 1.
2015.07.01 03:34:58 1: PERL WARNING: Argument "42 Lux" isn't numeric in numeric gt (>) at (eval 3256) line 1.
2015.07.01 03:34:58 1: PERL WARNING: Argument "42 Lux" isn't numeric in numeric lt (<) at (eval 3257) line 1.
2015.07.01 03:34:58 1: PERL WARNING: Argument "42 Lux" isn't numeric in numeric gt (>) at (eval 3257) line 1.
2015.07.01 03:34:58 1: PERL WARNING: Argument "42 Lux" isn't numeric in numeric lt (<) at (eval 3258) line 1.
2015.07.01 03:34:58 1: PERL WARNING: Argument "42 Lux" isn't numeric in numeric gt (>) at (eval 3258) line 1.
2015.07.01 03:35:00 1: PERL WARNING: Argument "42 Lux" isn't numeric in numeric lt (<) at (eval 3262) line 1.
2015.07.01 03:35:00 1: PERL WARNING: Argument "42 Lux" isn't numeric in numeric gt (>) at (eval 3262) line 1.
2015.07.01 03:35:00 1: PERL WARNING: Argument "42 Lux" isn't numeric in numeric lt (<) at (eval 3263) line 1.
deshalb habe ich es geändert
ich habe das :d eben beim lesen übersehen.
was macht das denn?
werde ich mal testen
läuft, danke