Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Mondphase in der VIS anzeigen

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Mondphase in der VIS anzeigen

    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Roelli last edited by

      Hallo.

      Ich wollte mir mal in der VIS anzeigen lassen ob Vollmond ist oder nicht. (damit ich weis warum ich nachts nicht pennen kann) 🙂

      Ich hab das Script (weiter unten) aus dem Thread benutzt. Re: Suche Skript für Mondphase

      Aber... ich gucke heute morgen zum Himmel... Vollmond!
      Der Datenpunkt sagt aber: "Dreiviertelmond ab"
      Ist da noch was falsch im Script oder ist das wirklich ein "Dreiviertelmond ab"? 😳

      Vollmond.jpg

      const suncalc = require('suncalc');
      const idVis = 'Vis.Mondphase'; // Für Vis
      
      createState(idVis, 0, {
      type: 'number',
      min: 0,
      max: 7,
      role: 'level',
      states: {
      0: 'Neumond',
      1: 'Viertelmond zu',
      2: 'Halbmond zu',
      3: 'Dreiviertelmond zu',
      4: 'Vollmond',
      5: 'Dreiviertelmond ab',
      6: 'Halbmond ab',
      7: 'Viertelmond ab'
      } 
      });
      
      function mpVis() {
      var mond = suncalc.getMoonIllumination(new Date());
      var mp = mond.phase;
      var state = 0; 
      if(mp > 0.05) state = 1;
      if(mp > 0.2) state = 2;
      if(mp > 0.3) state = 3;
      if(mp > 0.45) state = 4;
      if(mp > 0.55) state = 5;
      if(mp > 0.7) state = 6;
      if(mp > 0.8) state = 7;
      if(mp > 0.95) state = 0;
      setState(idVis, state, true);
      }
      
      mpVis(); // Skriptstart
      
      schedule("*/10 * * * *", mpVis); // alle 10 Minutenspoiler]![Vollmond.jpg](/assets/uploads/files/1665588526472-vollmond.jpg) 
      
      Homoran 1 Reply Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @Roelli last edited by

        @roelli sagte in Mondphase in der VIS anzeigen:

        ich gucke heute morgen zum Himmel... Vollmond!

        eher nicht. Vollmond ist vorbei.

        @roelli sagte in Mondphase in der VIS anzeigen:

        Dreiviertelmond ab

        klingt zwar zu weit, aber möglich, wenn die Stufen so groß sind und Voll nur am eigentlichen Tag gilt

        mickym 1 Reply Last reply Reply Quote 0
        • mickym
          mickym Most Active @Homoran last edited by mickym

          Vollmond und Neumond ist jeweils nur an einem Tag. Das was Du siehst ist ein abnehmender Dreiviertelmond - du siehst ja die rechte untere Ecke fehlt bereits.

          Generell sind Voll, Neu- und Halbmondphasen immer genau für einen Tag definiert - siehe Mondkalender:

          https://www.timeanddate.de/mond/phasen/deutschland/berlin

          1 Reply Last reply Reply Quote 1
          • First post
            Last post

          Support us

          ioBroker
          Community Adapters
          Donate

          564
          Online

          31.9k
          Users

          80.2k
          Topics

          1.3m
          Posts

          3
          3
          187
          Loading More Posts
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes
          Reply
          • Reply as topic
          Log in to reply
          Community
          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
          The ioBroker Community 2014-2023
          logo