NEWS
Gelöst: Auslösung zwischen 17:00 und 21:00
-
@paul53 sagte in Gelöst: Auslösung zwischen 17:00 und 21:00:
//Zeit / Automatiksteuerung Rollo Esszimmer const idRollo='hm-rpc.1.CUX4000002.1.LEVEL'; const idLichtsensor = 'hm-rpc.2.000D58A9915658.1.CURRENT_ILLUMINATION'; const idAuto = 'javascript.0.Rolladen.Zeitsteuerung.EINS.AUTO'; const idNr = 'javascript.0.Rolladen.Zeitsteuerung.EINS.Nr'; const idAStunde = "javascript.0.Rolladen.Zeitsteuerung.EINS.A_stunde"; const idAMinute = "javascript.0.Rolladen.Zeitsteuerung.EINS.A_minute"; const idRStunde = "javascript.0.Rolladen.Zeitsteuerung.EINS.R_stunde"; const idRMinute = "javascript.0.Rolladen.Zeitsteuerung.EINS.R_minute"; const idLux = "javascript.0.Rolladen.Zeitsteuerung.EINS.LUX"; createState(idAStunde,{read: true,write: true,desc: "Zeiteingabe Stunden ein,",type: "number",min:'0', max:'24',def:6}); createState(idAMinute,{read: true,write: true,desc: "Zeiteingabe Minuten ein,",type: "number",min:'0', max:'60',def:5}); createState(idRStunde,{read: true,write: true,desc: "Zeiteingabe Stunden ein,",type: "number",min:'0', max:'24',def:23}); createState(idRMinute,{read: true,write: true,desc: "Zeiteingabe Minuten ein,",type: "number",min:'0', max:'60',def:25}); var A_stunde = getState(idAStunde).val; var A_minute = getState(idAMinute).val; var R_stunde = getState(idRStunde).val; var R_minute = getState(idRMinute).val; var gwLux = getState(idLux).val; var schedAuf, schedRunter; function Aktion(pos) { if(getState(idRollo).val != pos && getState(idAuto).val) { setState(idRollo, pos); if(pos) log("*****Rolladen LINKS fährt Rauf***** "); else log("*****Rolladen LINKS fährt Runter***** "); } } // Skriptstart if(compareTime('17:00', '21:00', 'between') && getState(idLichtsensor).val <= 180) Aktion(0); on({id: idLichtsensor, valLe: gwLux, oldValGt: gwLux}, function() { if(compareTime('17:00', '21:00', 'between')) Aktion(0); }); schedule('0 17 * * *', function() { if(getState(idLichtsensor).val <= gwLux) Aktion(0); }); //Wohnzimmer LINKS RUNTER function links_runter() { if(schedRunter) clearSchedule(schedRunter); schedRunter = schedule(R_minute + ' ' + R_stunde + ' * * *', function () { if(getState(idNr).val == 1) Aktion(0); }); } //Wohnzimmer LINKS AUF function links_auf() { if(schedAuf) clearSchedule(schedAuf); schedAuf = schedule(A_minute + ' ' + A_stunde + ' * * *', function () { if(getState(idNr).val == 2) Aktion(100); }); } // Skriptstart links_auf(); links_runter(); on(idAStunde, function(dp) { A_stunde = dp.state.val; links_auf(); }); on(idAMinute, function(dp) { A_minute = dp.state.val; links_auf(); }); on(idRStunde, function(dp) { R_stunde = dp.state.val; links_runter(); }); on(idRMinute, function(dp) { R_minute = dp.state.val; links_runter(); }); on(idLux, function(dp) { gwLux = dp.state.val; });Danke Paul
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login


