Hallo zusammen,
ich bin dabei meine Rollosteuerung per DOIF zu steuern. Leider funktioniert nur ein Teil. Hier der Code und das List:
Code:
([du_Rollo_Art:state] eq "Normal" and ([[du_Rollo_Zeit_ho] |8] or [[du_Rollo_Zeit_ho_WE] |7])) (set test_rollo_hoch on, set test_rollo_hoch_we on)
DOELSEIF ([du_Rollo_Art:state] eq "Normal" and ([[du_Rollo_Zeit_ho_Schlaf] |8] or [[du_Rollo_Zeit_ho_WE_Schlaf] |7])) (set test_rollo_hoch_we_schlaf on, set test_rollo_hoch_schlaf on)
DOELSEIF ([du_Rollo_Art:state] eq "Normal" and [du_Sonnenuntergang]) (set test_rollo_ru off)
DOELSEIF ([du_Rollo_Art:state] eq "Normal" and [du_Rollo_Zeit_ru_Schlaf]) (set test_rollo_ru_schlaf off)
List:
Internals:
DEF ([du_Rollo_Art:state] eq "Normal" and ([[du_Rollo_Zeit_ho] |8] or [[du_Rollo_Zeit_ho_WE] |7])) (set test_rollo_hoch on, set test_rollo_hoch_we on)
DOELSEIF ([du_Rollo_Art:state] eq "Normal" and ([[du_Rollo_Zeit_ho_Schlaf] |8] or [[du_Rollo_Zeit_ho_WE_Schlaf] |7])) (set test_rollo_hoch_we_schlaf on, set test_rollo_hoch_schlaf on)
DOELSEIF ([du_Rollo_Art:state] eq "Normal" and [du_Sonnenuntergang]) (set test_rollo_ru off)
DOELSEIF ([du_Rollo_Art:state] eq "Normal" and [du_Rollo_Zeit_ru_Schlaf]) (set test_rollo_ru_schlaf off)
NAME Rollo_Settings
NR 422
NTFY_ORDER 50-Rollo_Automatik
STATE cmd_3
TYPE DOIF
Readings:
2015-10-22 03:05:00 Device du_Sonnenuntergang
2015-10-21 19:59:07 cmd_event du_Rollo_Art
2015-10-21 19:59:07 cmd_nr 3
2015-10-21 20:42:32 e_du_Rollo_Art_state Normal
2015-10-21 19:46:53 e_du_Rollo_Zeit_ru_Schlaf_STATE 19:48
2015-10-22 03:05:00 e_du_Sonnenuntergang_STATE 18:51:04
2015-10-21 19:59:07 state cmd_3
2015-10-21 19:38:04 timer_1_c1 22.10.2015 19:21:00|8
2015-10-21 19:38:04 timer_2_c1 22.10.2015 19:24:00|7
2015-10-21 19:38:04 timer_3_c2 22.10.2015 19:22:00|8
2015-10-21 19:38:04 timer_4_c2 22.10.2015 19:23:00|7
Condition:
0 ReadingValDoIf('du_Rollo_Art','state','') eq "Normal" and (DOIF_time_once($hash,$hash->{timer}{0},$wday,"8") or DOIF_time_once($hash,$hash->{timer}{1},$wday,"7"))
1 ReadingValDoIf('du_Rollo_Art','state','') eq "Normal" and (DOIF_time_once($hash,$hash->{timer}{2},$wday,"8") or DOIF_time_once($hash,$hash->{timer}{3},$wday,"7"))
2 ReadingValDoIf('du_Rollo_Art','state','') eq "Normal" and InternalDoIf('du_Sonnenuntergang','STATE','')
3 ReadingValDoIf('du_Rollo_Art','state','') eq "Normal" and InternalDoIf('du_Rollo_Zeit_ru_Schlaf','STATE','')
Days:
0 8
1 7
2 8
3 7
Devices:
0 du_Rollo_Art
1 du_Rollo_Art
2 du_Rollo_Art du_Sonnenuntergang
3 du_Rollo_Art du_Rollo_Zeit_ru_Schlaf
all du_Rollo_Art du_Sonnenuntergang du_Rollo_Zeit_ru_Schlaf
Do:
0:
0 set test_rollo_hoch on, set test_rollo_hoch_we on
1:
0 set test_rollo_hoch_we_schlaf on, set test_rollo_hoch_schlaf on
2:
0 set test_rollo_ru off
3:
0 set test_rollo_ru_schlaf off
4:
Helper:
globalinit 1
last_timer 4
sleeptimer -1
Internals:
2 du_Sonnenuntergang:STATE
3 du_Rollo_Zeit_ru_Schlaf:STATE
all du_Sonnenuntergang:STATE du_Rollo_Zeit_ru_Schlaf:STATE
Itimer:
all du_Rollo_Zeit_ho du_Rollo_Zeit_ho_WE du_Rollo_Zeit_ho_Schlaf du_Rollo_Zeit_ho_WE_Schlaf
Readings:
0 du_Rollo_Art:state
1 du_Rollo_Art:state
2 du_Rollo_Art:state
3 du_Rollo_Art:state
all du_Rollo_Art:state
Realtime:
0 19:21:00
1 19:24:00
2 19:22:00
3 19:23:00
State:
Time:
0 [du_Rollo_Zeit_ho]
1 [du_Rollo_Zeit_ho_WE]
2 [du_Rollo_Zeit_ho_Schlaf]
3 [du_Rollo_Zeit_ho_WE_Schlaf]
Timecond:
0 0
1 0
2 1
3 1
Timer:
0 0
1 0
2 0
3 0
Timerfunc:
Timers:
0 0 1
1 2 3
Trigger:
Attributes:
Die Rollo on DOIF´s funktionieren aber die off´s nicht.
Vielen Dank für eure Hilfe.
weil dein DOIF nicht weiß welchen Zustand die beiden dummys als "state" haben
[du_Sonnenuntergang]
[du_Rollo_Zeit_ru_Schlaf]
da muss soetwas wie hin wie
[du_Sonnenuntergang] eq "Ein"
[du_Rollo_Zeit_ru_Schlaf] eq "Ein"
[du_Sonnenuntergang]
[du_Rollo_Zeit_ru_Schlaf]
Die Dummies in deiner Bedingung eine Zeit enthalten oder "", 0, 1.
hier mal die List der beiden Dummy´s:
Internals:
NAME du_Rollo_Zeit_ru_Schlaf
NR 480
STATE 19:48
TYPE dummy
Readings:
2015-10-21 19:46:53 state 19:48
Attributes:
alias Zeit runter Schlaf
devStateIcon .*:rc_BLANK
group Rollo_Settings
icon icoUhr
room Dummy,Jalousien
setList state:time
webCmd state
Internals:
CFGFN
NAME du_Sonnenuntergang
NR 1574
STATE 18:51:04
TYPE dummy
Readings:
2015-10-22 03:05:00 state 18:51:04
Attributes:
icon weather_sunset
room Dummy,Umwelt_Aussen
Aber so wie es aussieht, ist ein State vorhanden. Oder was meint Ihr?
Zitat von: skuggy am 22 Oktober 2015, 19:59:35
hier mal die List der beiden Dummy´s:
Internals:
NAME du_Rollo_Zeit_ru_Schlaf
NR 480
STATE 19:48
TYPE dummy
Readings:
2015-10-21 19:46:53 state 19:48
Attributes:
alias Zeit runter Schlaf
devStateIcon .*:rc_BLANK
group Rollo_Settings
icon icoUhr
room Dummy,Jalousien
setList state:time
webCmd state
Internals:
CFGFN
NAME du_Sonnenuntergang
NR 1574
STATE 18:51:04
TYPE dummy
Readings:
2015-10-22 03:05:00 state 18:51:04
Attributes:
icon weather_sunset
room Dummy,Umwelt_Aussen
Aber so wie es aussieht, ist ein State vorhanden. Oder was meint Ihr?
so wie Ellert dir geschrieben hat, hier hat state eine Zeit...!
ZitatDie Dummies in deiner Bedingung eine Zeit enthalten oder "", 0, 1.
Jetzt steh ich total auf dem Schlauch. Die Dummy´s müssen doch Zeiten enthalten, damit die Rollo runterfahren. Die anderen Dummy´s enthalten ebenfalls Zeiten. Hab ich Klammern vergessen oder wo liegt der Unterschied?
Deine Dummies wurden nach der Initialisierung des DOIF gesetzt, das funktioniert so nicht die benötigen eine doppelte eckige Klammer, wenn sie dynamische Inhalte haben sollen.
Sie könnten auch 0,"" für Falsch oder alles was nicht 0,"" ist für wahr enthalten.
Was drinstehen sollte ging aus Deiner Fragestellung nicht hervor.
Sorry für die fehlerhafte/mangelte Erklärung. Jetzt hab ich es aber verstanden. Ich habe eine doppelte Klammer gesetzt und siehe da, es funktioniert!
Danke...