Okay guys, here we go... looking forward to hear your thoughts. Please note that I use the userReadings Zuluftventilator (inputVent) and Betriebsart (seasonMode) I've already had before.
Two "at"
one for starting the ventilation all 3h for 30min but only when Betriebsart is winter and FanStages are 0
one for stopping it 30mins after the starting time when it's winter and fans are running.
define at_LueftungOn at +*03:00:00 {if ((ReadingsVal("Mythz","Betriebsart",0) eq "winter") && (ReadingsVal("Mythz","Zuluftventilator",0) == 0)) {fhem "set Mythz p07FanStageDay 1;; set Mythz p08FanStageNight 1"}}
attr at_LueftungOn alignTime 00:00
define at_LueftungOff at +*03:00:00 {if ((ReadingsVal("Mythz","Betriebsart",0) eq "winter") && (ReadingsVal("Mythz","Zuluftventilator",0) > 0)) {fhem "set Mythz p07FanStageDay 0;; set Mythz p08FanStageNight 0"}}
attr at_LueftungOff alignTime 00:30
Two notifys to start and stop fans depending on Betriebsart Winter/Summer
define notifyWintermode notify Mythz:Betriebsart {if ((ReadingsVal("Mythz","Betriebsart",0) eq "winter") && (ReadingsVal("Mythz","Zuluftventilator",0) > 0)) {fhem "set Mythz p07FanStageDay 0;; set Mythz p08FanStageNight 0"}}
define notifySummermode notify Mythz:Betriebsart {if ((ReadingsVal("Mythz","Betriebsart",0) eq "summer") && (ReadingsVal("Mythz","Zuluftventilator",0) == 0)) {fhem "set Mythz p07FanStageDay 1;; set Mythz p08FanStageNight 1"}}
One DOIF to start fans when humidity is too high in some rooms, but only when it's winter and Zuluftventilator is not already running (0) and creating two "at" to disable it after 45min. here i need an better idea to combine the two "at" within the DOIF.
define doifHighHum DOIF (([TF_BADOG:humidity] > 60 ) or ([TF_WZ:humidity] > 60 ) or ([RT_Schlafzimmer_Climate:humidity] > 55 ) and ([Mythz:Betriebsart] eq "winter") and ([Mythz:Zuluftventilator] == 0)) (set Mythz p07FanStageDay 1,set Mythz p08FanStageNight 1,define offagainafterhighhum1 at +00:45:00 set Mythz p07FanStageDay 0,define offagainafterhighhum2 at +00:45:00 set Mythz p08FanStageNight 0)