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. Script Sonnenstand und Einstrahlung

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.9k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    2.3k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    16
    1
    3.4k

Script Sonnenstand und Einstrahlung

Scheduled Pinned Locked Moved Skripten / Logik
35 Posts 7 Posters 11.3k 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.
  • Y Offline
    Y Offline
    ykuendig
    wrote on last edited by
    #25

    Nö, schätze das ist die Abweichung zur Sichtlinie.

    Bin auf Arbeit… Muss das am Abend genauer betrachte.

    Memo an mich: https://pvpmc.sandia.gov/modeling-steps ... reflected/ lesen. Und das auch: http://www.solarconsultingservices.com/ ... ASES08.pdf

    Gruss Yves

    1 Reply Last reply
    0
    • Y Offline
      Y Offline
      ykuendig
      wrote on last edited by
      #26

      452_elektro05.png
      Das ist mir viel zu kompliziert. Wenn man den Wert mit 2.5 multipliziert, schauts aj soweit gut aus…

      Aber ich bin mir recht sicher, das die Werte 'Kack' -wir streichen das- ungenau sind.

      Zudem nützt mir das nichts. Für die Abschätzung, was die Module dereinst mal bringen, gibts im INet gute Quellen mit guten Modellen.

      Gruss Yves

      1 Reply Last reply
      0
      • ThisoftT Offline
        ThisoftT Offline
        Thisoft
        wrote on last edited by
        #27

        Du musst auch jetzt keine neue Formel extra für mich entwickeln ;) So war das nicht gemeint…

        Deine Aussage dass der Wert mit 2,5 multipliziert weit an die Realität heranreicht hilft mir schon ein ganzes Stück weiter.

        Danke und Gruß

        Thilo

        22 HM-Geräte; PivCCU2 auf RasPi

        ioBroker-Multihost; Ubuntu-Master auf Intel-Atom und 3 RasPi-Clients

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          ykuendig
          wrote on last edited by
          #28

          Ne; nun 2 Tage später kann ich sagen, dass es auch nicht 2.5 als Faktor braucht. Das war eben nur diffus so. nun mit direktem Licht schiesst er nun wieder drüber. 452_elektro06.png - was ja eigentlich zu erwarten war.

          Gruss Yves

          1 Reply Last reply
          0
          • S Offline
            S Offline
            simpixo
            wrote on last edited by
            #29

            Ich habe leider keine Photovoltaikanlage auf dem Dach, nur eine Solarthermieanlage :?

            Kann man eigentlich das Script auch für diese benutzten oder ist das eher was für die Stromerzeugung gedacht?

            Muss ich dann was am Script anpassen, damit ich ungefähre Werte erhalte?

            Gruß

            Adrian

            1 Reply Last reply
            0
            • ThisoftT Offline
              ThisoftT Offline
              Thisoft
              wrote on last edited by
              #30

              Nachdem ich mein Script jetzt seit ca. 2 Wochen laufen habe würde ich sagen dass die Werte ohne Korrekturfaktor doch einigermaßen realistisch sein könnten. Natürlich schwanken die Werte die von WU kommen relativ stark, eben so wie bei der Messstation gerade mal ne Wolke vorbeikommt. Aber als langfristigen Richtwert denke ich kann man's gebrauchen.

              Nun weiß ich nicht, wie der Wirkungsgrad bei Solarthermie ggü. Photovoltaik ist, aber prinzipiell sollte das schon einen Anhaltspunkt liefern wenn's dir nicht gerade auf 50W ankommt.

              22 HM-Geräte; PivCCU2 auf RasPi

              ioBroker-Multihost; Ubuntu-Master auf Intel-Atom und 3 RasPi-Clients

              giorgrazG 1 Reply Last reply
              0
              • Y Offline
                Y Offline
                ykuendig
                wrote on last edited by
                #31

                Die solare Einstahlung ist die Gleiche, unabhängig davon, wie Du sie nutzt. Der Wirkungsgrad ist bei thermischen Anwendungen wesentlich höher.

                Das kannst Du am Parameter 'modeff' anpassen. Jedoch ist mir nicht exakt klar was Du damit visualisieren möchtest.

                Gruss Yves

                1 Reply Last reply
                0
                • ThisoftT Thisoft

                  Nachdem ich mein Script jetzt seit ca. 2 Wochen laufen habe würde ich sagen dass die Werte ohne Korrekturfaktor doch einigermaßen realistisch sein könnten. Natürlich schwanken die Werte die von WU kommen relativ stark, eben so wie bei der Messstation gerade mal ne Wolke vorbeikommt. Aber als langfristigen Richtwert denke ich kann man's gebrauchen.

                  Nun weiß ich nicht, wie der Wirkungsgrad bei Solarthermie ggü. Photovoltaik ist, aber prinzipiell sollte das schon einen Anhaltspunkt liefern wenn's dir nicht gerade auf 50W ankommt.

                  giorgrazG Offline
                  giorgrazG Offline
                  giorgraz
                  wrote on last edited by
                  #32

                  @Thisoft I write u about solar radiation forecast script.

                  Do u use it ?

                  How can I install it on my iobroker ?

                  1 Reply Last reply
                  0
                  • Y ykuendig

                    Damit meiner Einer auch mal etwas an die Community zurückgeben kann:

                    Ich habe das Sonnenstand-Script aus dem Forum mit einem Python Programm von meinem vorherigen Solar-Pi gebastel verheiratet.

                    Herausgekommen ist eine Möglichkeit, die theoretische Leistung einer PV-Anlage abzuschätzen und zu loggen. Damit das etwas wissenschaftlich ausschaut, hab ich das mit allerlei Formelzeugs aus dem Internet vollgepackt.

                    Machen tue ich das so:

                    // calculates the sun position, path and power throughout the day
                    // based on from http://www.stjarnhimlen.se/comp/tutorial.html
                    // most var-names are identical to above tutorial
                    // combined with Sonnenstand-Script: paul53, pix; 06.07.2015 nach ioBroker Forum http://forum.iobroker.net/viewtopic.php?f=21&t=975&sid=6f0ba055de5f82eed6809424f49ca93b#p7635
                    // Angepasst ykuendig 12.02.17; stringify im log, ack = true bei setState und Diverses
                    
                    var suncalc = require('suncalc'),
                        result =  getObject("system.adapter.javascript.0"),
                        lat =  result.native.latitude,
                        long = result.native.longitude;
                    
                    var modtilt =       38;     //Dachneigung in Grad (Solar panel's tilt angle)
                    var modazi =        200;    //Ausrichtung des Hauses in Grad zB SSW (Solar panel's azimut)
                    var modsufrace =    56.0;   //Paneloberfläche in m2 (Solar panel's surface in sq. meters)
                    var modeff =        0.183;  //Annäherung an Panel-Wirkungsgrad zB 18 Prozent (modules efficiency correction)
                                                             // Hier kann an einem klaren Tag etwas geschraubt werden ;-)
                    
                    var altitude;       // Calculated Elevation
                    var azimuth;        // Calculated Azimuth
                    
                    createState('javascript.0.Solar.Sonnenstand.Elevation', 0, {unit: '°'});
                    createState('javascript.0.Solar.Sonnenstand.Azimut', 0, {unit: '°'});
                    createState('javascript.0.Solar.Sonnenstand.PanelPossible', 0, {unit: 'W'});
                    // ganz am Ende die setStates anpassen nicht vergessen!
                    
                    // Do not change below, until You know what You are doing!
                    // ********************************************************
                    
                    Math.degrees = function(radians) {return radians * 180 / Math.PI;};
                    Math.radians = function(degrees) {return degrees * Math.PI / 180;};
                    
                    function Sonnenstand_berechnen () {
                        var now = new Date();
                        var sunpos = suncalc.getPosition(now, lat, long);
                        log("Script Sonnenstand; latitude : " + result.native.latitude + " / longitude: " + result.native.longitude,'debug');
                        log("Script Sonnenstand; sunpos: " + JSON.stringify(sunpos),'debug');
                    
                        altitude = Math.degrees(sunpos.altitude);
                        azimuth =  Math.degrees(sunpos.azimuth) + 180;
                    
                        // The intensity of the direct component of sunlight throughout each day can be determined as 
                        // a function of air mass. based on: http://pveducation.org/pvcdrom/properties-of-sunlight/air-mass#formula
                        var airmass = 1/Math.cos((90-altitude)*4*Math.asin(1)/360); 
                    
                        // Sincident is the intensity on a plane perpendicular to the sun's rays in units of kW/m2 and AM is the air mass.
                        // The value of 1.353 kW/m2 is the solar constant and the number 0.7 arises from the fact that about 70% of the radiation incident on the atmosphere is transmitted
                        // to the Earth. The extra power term of 0.678 is an empirical fit to the observed data and takes into account the non-uniformities in the atmospheric layers.
                        // ykuendig: use different values because of pv instead thermal panels
                        var Sincident = (1.367*Math.pow(0.78,Math.pow(airmass,0.6)));
                        var fraction = Math.cos(altitude*4*Math.asin(1)/360)*Math.sin(modtilt*4*Math.asin(1)/360)*Math.cos(azimuth*4*Math.asin(1)/360-modazi*4*Math.asin(1)/360)+Math.sin(altitude*4*Math.asin(1)/360)*Math.cos(modtilt*4*Math.asin(1)/360);
                    
                        // W/m² light intensity on the module * module's surface
                        var SmoduleInt = Sincident * fraction * modsufrace * 1000;
                        if(SmoduleInt<0) {
                            SmoduleInt =    0;
                        }
                        // Module Effective in relation of the efficiency of the used panel
                        var SmoduleEff = SmoduleInt * modeff;
                    
                        if( altitude < 0 ) {
                            SmoduleInt =    0;
                            SmoduleEff =    0;
                            altitude =      0;
                        }
                    
                        log("Script Sonnenstand; Erfolgreich gelaufen, Werte akzeptiert", "info");
                        log("Script Sonnenstand; airmass: " + airmass,"debug");
                        log("Script Sonnenstand; azimuth: " + azimuth,"debug");
                        log("Script Sonnenstand; altitude: " + altitude,"debug");
                        log("Script Sonnenstand; SmoduleInt: " + SmoduleInt,"debug");
                        log("Script Sonnenstand; SmoduleEff: " + SmoduleEff,"debug");
                    
                        // Change ID to the created States
                        setState("javascript.0.Solar.Sonnenstand.Elevation",altitude.toFixed(1), true);
                        setState("javascript.0.Solar.Sonnenstand.Azimut",azimuth.toFixed(), true);
                        setState("javascript.0.Solar.Sonnenstand.PanelPossible", SmoduleEff.toFixed(), true);
                    }
                    
                    // -> Zyklisch
                    
                    schedule("*/1 * * * *", Sonnenstand_berechnen);
                    Sonnenstand_berechnen(); // bei Scriptstart
                    
                    

                    Aussehen kann das zum Beispiel so:
                    452_elektro02.png
                    Dafür muss aber Sonnenstand und Leistung mit einem der History-Adapter regelmässig gespeichert werden.

                    giorgrazG Offline
                    giorgrazG Offline
                    giorgraz
                    wrote on last edited by
                    #33

                    @ykuendig I write u about solar radiation forecast script. Have u an updated/final version ? How can I install it on my iobroker ?

                    1 Reply Last reply
                    0
                    • giorgrazG Offline
                      giorgrazG Offline
                      giorgraz
                      wrote on last edited by giorgraz
                      #34

                      How can I use this script ?

                      I'm new of iobroker...

                      My location forecast meteo data, will be available via FTP on a .CSV files, day by day.

                      So can someone help me to modify this script to use CSV, via FTP meteo data ?

                      giorgrazG 1 Reply Last reply
                      0
                      • giorgrazG giorgraz

                        How can I use this script ?

                        I'm new of iobroker...

                        My location forecast meteo data, will be available via FTP on a .CSV files, day by day.

                        So can someone help me to modify this script to use CSV, via FTP meteo data ?

                        giorgrazG Offline
                        giorgrazG Offline
                        giorgraz
                        wrote on last edited by
                        #35

                        @giorgraz I found this adapter https://github.com/ioBroker/ioBroker.parser

                        Can we use/call it on the script to get data, for any day, of meteo forecast parameter file ?

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        803

                        Online

                        32.4k

                        Users

                        81.6k

                        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