Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. JavaScript
  5. Gelöst: Auslösung zwischen 17:00 und 21:00

NEWS

  • Neuer ioBroker-Blog online: Monatsrückblick März/April 2026
    BluefoxB
    Bluefox
    6
    1
    229

  • Verwendung von KI bitte immer deutlich kennzeichnen
    HomoranH
    Homoran
    8
    1
    222

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    896

Gelöst: Auslösung zwischen 17:00 und 21:00

Scheduled Pinned Locked Moved Solved JavaScript
javascript
22 Posts 3 Posters 1.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    michihorn
    wrote on last edited by
    #21

    @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

    1 Reply Last reply
    0
    • M Offline
      M Offline
      michihorn
      wrote on last edited by michihorn
      #22

      @Paul53: Du hattest geschrieben :
      Unbenannt2.JPG

      Hab noch ein "180" gefunden.
      Unbenannt1.JPG

      Ich bekomme bei den geänderten Script folgende WARN Meldung:
      Unbenannt.JPG

      Gruß
      Michael

      1 Reply Last reply
      0

      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
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      Support us

      ioBroker
      Community Adapters
      Donate

      629

      Online

      32.8k

      Users

      82.8k

      Topics

      1.3m

      Posts
      Community
      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
      ioBroker Community 2014-2025
      logo
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Home
      • Recent
      • Tags
      • Unread 0
      • Categories
      • Unreplied
      • Popular
      • GitHub
      • Docu
      • Hilfe