Homematic Sonnenaufgang / Sonnenuntergang in Variable schreiben

Homematic kennt den Sonnenauf- und Untergang per Astrofunktion. Diese Werte stehen nur leider nicht in den Variablen. Möchte man die Werte z.B. im Mediola Neo anzeigen lassen, benötigt man die Werte in Variablen.
Hier zeige ich euch ein kleines Script, welches die Uhrzeit von Sonnenaufgang und Sonnenuntergang in 2 Variablen schreibt.
Los geht’s!

  • Variablen anlegen
  • Quicktipp: Variable anlegen

      Typ: Zeichenkette

    • Sonnenaufgang
    • Sonnenuntergang
  • Programm anlegen
    • Homematic Sonnenuntergang Variable

    • Bedingung: Wenn… Zeitsteuerung Serienmuster täglich jeden Tag, Zeitpunkt 00:00 Uhr
    • Aktivität: Dann… Script einfügen
    • !Sonnenaufgang / Sonnenuntergang in Variablen schreiben
      !Script by www.homematic-guru.de
      dom.GetObject('Sonnenaufgang').State(system.SunriseTime("%H:%M"));
      dom.GetObject('Sonnenuntergang').State(system.SunsetTime("%H:%M"));
      

    Fertig!

    Verwendete Hardware


    Warning: preg_match(): Compilation failed: invalid range in character class at offset 11 in /homepages/33/d683611508/htdocs/app683611566/wp-content/plugins/wysija-newsletters/helpers/render_engine.php on line 526

    Warning: preg_match(): Compilation failed: invalid range in character class at offset 11 in /homepages/33/d683611508/htdocs/app683611566/wp-content/plugins/wysija-newsletters/helpers/render_engine.php on line 526

    Warning: preg_match(): Compilation failed: invalid range in character class at offset 11 in /homepages/33/d683611508/htdocs/app683611566/wp-content/plugins/wysija-newsletters/helpers/render_engine.php on line 526

    Fatal error: Uncaught Exception: Template 'templates/form/web/widgets/#type.html' not found ! in /homepages/33/d683611508/htdocs/app683611566/wp-content/plugins/wysija-newsletters/helpers/render_engine.php:723 Stack trace: #0 /homepages/33/d683611508/htdocs/app683611566/wp-content/plugins/wysija-newsletters/helpers/render_engine.php(454): WYSIJA_help_render_engine->_loadTemplate('templates/form/...') #1 /homepages/33/d683611508/htdocs/app683611566/wp-content/plugins/wysija-newsletters/helpers/render_engine.php(169): WYSIJA_help_render_engine->_parse('\n{include file=...') #2 /homepages/33/d683611508/htdocs/app683611566/wp-content/plugins/wysija-newsletters/helpers/form_engine.php(756): WYSIJA_help_render_engine->render(Array, 'templates/form/...') #3 /homepages/33/d683611508/htdocs/app683611566/wp-content/plugins/wysija-newsletters/helpers/form_engine.php(638): WYSIJA_help_form_engine->render_web_body() #4 /homepages/33/d683611508/htdocs/app683611566/wp-content/plugins/wysija-newsletters/views/front/widget_nl.php(160): WY in /homepages/33/d683611508/htdocs/app683611566/wp-content/plugins/wysija-newsletters/helpers/render_engine.php on line 723