Hi,
ich habe ein Dropdwon für den geplanten Waschmaschinenstart in FHEM eingebaut. Die Waschmaschine ist per Homematic Funksteckdose mit Leistungsmessung eingebunden. Wenn das Waschprogramm gewählt und gestartet ist schalte ich die Funksteckdose aus und zu einem späteren Zeitpunkt wieder ein. Ich habe dazu jetzt eine Kombination aus dummy, at, und notify gebaut.
Sieht jetzt so aus:
define keller_waschmaschine_timer dummy
attr keller_waschmaschine_timer alias Geplanter Waschmaschinenstart
attr keller_waschmaschine_timer group Haushalt
attr keller_waschmaschine_timer icon time_timer
attr keller_waschmaschine_timer room Keller
attr keller_waschmaschine_timer setList state:ungeplant,0:00,1:00,2:00,3:00,4:00,5:00,6:00,7:00,8:00,9:00,10:00,11:00,12:00,13:00,14:00,15:00,16:00,17:00,18:00,19:00,20:00,21:00,22:00,23:00
attr keller_waschmaschine_timer webCmd state
define keller_waschmaschine_timer_notify notify keller_waschmaschine_timer:.* delete keller_waschmaschine_timer_at;;{ if ($EVENT ne "ungeplant") { fhem("define keller_waschmaschine_timer_at at $EVENT set waschmaschine_Sw on;;;;;;;;set keller_waschmaschine_timer ungeplant") }}
Als Bonus dazu noch
define keller_waschmaschine_timer_wd watchdog waschmaschine_Sw:on 00:10 waschmaschine_betrieb:on set pushover_all_at_home_or_all 'Waschmaschine' 'Steckdose eingeschaltet aber Waschmaschine wurde nicht gestartet.'
um mitzubekommen wenn irgendwas nicht funktioniert hat.
Habt ihr dazu noch Verbesserungsvorschläge? Wie löst ihr sowas?
Viele Grüße
Peter
Hallo Peter,
habe die gleiche Hardware im Einsatz und löse das mit einem Dummy (siehe http://forum.fhem.de/index.php/topic,37359.msg296362.html#msg296362 (http://forum.fhem.de/index.php/topic,37359.msg296362.html#msg296362))und einem DOIF
Dummy:
Internals:
CFGFN
NAME d_Waschmaschine
NR 2496
STATE controlMode manual
TYPE dummy
CHANGETIME:
Helper:
Dblog:
Controlmode:
Dblog:
TIME 1431946320.12812
VALUE manual
State:
Dblog:
TIME 1431946320.00825
VALUE controlMode manual
Stoptime:
Dblog:
TIME 1431920869.63159
VALUE 15:30
Readings:
2015-05-18 12:52:00 controlMode manual
2015-05-18 12:52:00 state controlMode manual
2015-05-18 05:47:49 stopTime 15:30
Attributes:
alias Waschmaschine
room 0.6:Waschkeller
setList controlMode:auto,manual stopTime:00:00,00:15,00:30,00:45,01:00,01:15,01:30,01:45,02:00,02:15,02:30,02:45,03:00,03:15,03:30,03:45,04:00,04:15,04:30,04:45,05:00,05:15,05:30,05:45,06:00,06:15,06:30,06:45,07:00,07:15,07:30,07:45,08:00,08:15,08:30,08:45,09:00,09:15,09:30,09:45,10:00,10:15,10:30,10:45,11:00,11:15,11:30,11:45,12:00,12:15,12:30,12:45,13:00,13:15,13:30,13:45,14:00,14:15,14:30,14:45,15:00,15:15,15:30,15:45,16:00,16:15,16:30,16:45,17:00,17:15,17:30,17:45,18:00,18:15,18:30,18:45,19:00,19:15,19:30,19:45,20:00,20:15,20:30,20:45,21:00,21:15,21:30,21:45,22:00,22:15,22:30,22:45,23:00,23:15,23:30,23:45,
webCmd stopTime:controlMode
DOIF
Internals:
CFGFN
DEF ([([d_Waschmaschine:stopTime]-[02:30])] and [d_Waschmaschine:controlMode] eq 'auto')
(set d_Waschmaschine controlMode manual, set HM_2C10D8_Sw on)
DOELSEIF
([HM_2C10D8_SenPwr] < 3)(set HM_2C10D8_Sw off)
NAME di_Waschmaschine
STATE initialized
TYPE DOIF
Readings:
2015-05-21 19:04:30 state initialized
2015-05-21 19:04:30 timer_1_c1 22.05.2015 12:45:00
Attributes:
cmdState set on|set off
wait 0:180
Als Visualisierung habe ich dann noch eine kleine Readingsgroup:
(http://forum.fhem.de/index.php?action=dlattach;topic=37400.0;attach=32356)
Grüße
igami