Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • 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

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. [Gelöst] Timer analog CUXD

NEWS

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

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

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

[Gelöst] Timer analog CUXD

Geplant Angeheftet Gesperrt Verschoben Skripten / Logik
15 Beiträge 2 Kommentatoren 1.5k Aufrufe
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • paul53P Offline
    paul53P Offline
    paul53
    schrieb am zuletzt editiert von
    #2

    @Stoni:

    kann mir jemand ein Javascript basteln? `

    const idTfk = '...';  // ID des TFK von Xiaomi eintragen
    
    var timer = null;
    
    on(idTfk, function(dp) {
       if(dp.state.val) {  // Fenster wird geöffnet
          timer = setTimeout(function() {
             sendTo("pushover", {
                 message:  'Fenster ist seit 5 Minuten offen', 
                 title:    'Kellerfenster'
             });
             timer = null;
           }, 300000);  // 5 Minuten   
       } else if(timer) {
          clearTimeout(timer);  // Timer wird gestoppt
          timer = null;
       }
    });
    

    Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
    Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

    1 Antwort Letzte Antwort
    0
    • S Offline
      S Offline
      Stoni
      schrieb am zuletzt editiert von
      #3

      Ui, das ging ja schnell!!! Sehr geil, vielen Dank!! Muss ich im Hinblick auf Pushover noch irgendwas ergänzen an dem Skript?

      1 Antwort Letzte Antwort
      0
      • paul53P Offline
        paul53P Offline
        paul53
        schrieb am zuletzt editiert von
        #4

        @Stoni:

        Muss ich im Hinblick auf Pushover noch irgendwas ergänzen an dem Skript? `
        Im Skript sollte es so ausreichen. Eine Instanz des Adapters iobroker.pushover muss aktiv sein.

        Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
        Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

        1 Antwort Letzte Antwort
        0
        • S Offline
          S Offline
          Stoni
          schrieb am zuletzt editiert von
          #5

          Ja die PO Instanz nutze ich bereits. Prima, werde es morgen mal ausprobieren.

          Herzlichen Dank!!!

          1 Antwort Letzte Antwort
          0
          • S Offline
            S Offline
            Stoni
            schrieb am zuletzt editiert von
            #6

            Hallo paul53,

            ich habe das Skript so übernommen und um die ID des TFK ergänzt.

            Das Fenster war länger als 5 Minuten auf, es kam aber keine Push-Nachricht.

            Woran kann das liegen?

            Der Status wird mit true/false ausgegeben. True = geöffnet.

            Gruß Stoni

            ~~![](</s><URL url=)<link_text text="https://uploads.tapatalk-cdn.com/201802 ... 625917.jpg">https://uploads.tapatalk-cdn.com/20180214/a9314edfa3175a5e618267bb2f625917.jpg</link_text>" />

            ![](</s><URL url=)<link_text text="https://uploads.tapatalk-cdn.com/201802 ... 4f32cf.jpg">https://uploads.tapatalk-cdn.com/20180214/0ab3cce5278baad5bb4ba8b7e14f32cf.jpg</link_text>" />~~

            1 Antwort Letzte Antwort
            0
            • paul53P Offline
              paul53P Offline
              paul53
              schrieb am zuletzt editiert von
              #7

              Du hast die ID des Kanals angegeben, nicht die ID des Datenpunktes. Versuche es mal so:

              const idTfk = 'mihome.0.devices.magnet_158d0001e41c54.state';
              

              Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
              Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

              1 Antwort Letzte Antwort
              0
              • S Offline
                S Offline
                Stoni
                schrieb am zuletzt editiert von
                #8

                Yupp, das wars. Besten Dank!!!

                1 Antwort Letzte Antwort
                0
                • paul53P Offline
                  paul53P Offline
                  paul53
                  schrieb am zuletzt editiert von
                  #9

                  Dann markiere bitte das Thema als gelöst (im ersten Beitrag).

                  Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                  Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                  1 Antwort Letzte Antwort
                  0
                  • S Offline
                    S Offline
                    Stoni
                    schrieb am zuletzt editiert von
                    #10

                    Hallo paul53,

                    ich spiele gerade mit dem sayit Adapter und würde den Fensterzustand per Sprachausgabe mitteilen.

                    Der sayit Adapter ist installiert und funktioniert mit dem Home24 Mediaplayer. Das habe ich bereits in einem einfachen Blockly Script getestet.

                    Kannst Du Dir mal das angepasste Script ansehen? Sollte das so passen?

                    Gruss Stoni![](</s><URL url=)<link_text text="https://uploads.tapatalk-cdn.com/201802 ... d6a3e7.jpg">https://uploads.tapatalk-cdn.com/20180217/00ef22628f419d53143fe8f854d6a3e7.jpg</link_text>" />

                    1 Antwort Letzte Antwort
                    0
                    • paul53P Offline
                      paul53P Offline
                      paul53
                      schrieb am zuletzt editiert von
                      #11

                      @Doku:

                      SayIt adapter cannot be used alone. It must be controlled from javascript adapter or from "vis" with specific widget. After creation of adapter instance will can find following objects:

                      sayit.N.tts.text: Phrase to be spoken.

                      sayit.N.tts.volume: volume which will be used by playing of the phrase.

                      sayit.N.tts.playing: true if text is now playing and false if not. Supported only for "windows" and "system" play mode.

                      sayit.N.tts.cachetext: Phrase to be cached and then it can be used without internet. E.g. you can enter here manually "No internet" and if ping to google.com is negative, write "No internet" to "tts.text" and it will pronounced. Of course cache must be enabled.

                      State tts.text supports extended syntax, so the langugage/engine and volume can be defined together with text. It is used to enable multi-language text2speech engines. E.g. if adapter has engine "Google-english", it is possible with phrase de:Sag es to force to use Google-Deustch speech engine.

                      With ru;75;Погода хорошая we can force to use russian language and volume 75%.

                      You can specify the volume of announcement in percent from current or given volume (not from maximal). E.g. if command is de;75;Gutes Wetterand "announce volume" is 50%, the announce will be played with volume 38% from 100% possible. `
                      Laut https://github.com/ioBroker/ioBroker.sayit/blob/master/README.md nicht mit sendTo(), sondern mit setState() (Zeilen 8 bis 10 durch folgende ersetzen).

                               setState('sayit.0.tts.text', 'de;Das Fenster von Maximilian ist seit zehn Minuten offen');
                      
                      

                      Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                      Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                      1 Antwort Letzte Antwort
                      0
                      • S Offline
                        S Offline
                        Stoni
                        schrieb am zuletzt editiert von
                        #12

                        @paul53:

                        @Doku:

                        SayIt adapter cannot be used alone. It must be controlled from javascript adapter or from "vis" with specific widget. After creation of adapter instance will can find following objects:

                        sayit.N.tts.text: Phrase to be spoken.

                        sayit.N.tts.volume: volume which will be used by playing of the phrase.

                        sayit.N.tts.playing: true if text is now playing and false if not. Supported only for "windows" and "system" play mode.

                        sayit.N.tts.cachetext: Phrase to be cached and then it can be used without internet. E.g. you can enter here manually "No internet" and if ping to google.com is negative, write "No internet" to "tts.text" and it will pronounced. Of course cache must be enabled.

                        State tts.text supports extended syntax, so the langugage/engine and volume can be defined together with text. It is used to enable multi-language text2speech engines. E.g. if adapter has engine "Google-english", it is possible with phrase de:Sag es to force to use Google-Deustch speech engine.

                        With ru;75;Погода хорошая we can force to use russian language and volume 75%.

                        You can specify the volume of announcement in percent from current or given volume (not from maximal). E.g. if command is de;75;Gutes Wetterand "announce volume" is 50%, the announce will be played with volume 38% from 100% possible. `
                        Laut https://github.com/ioBroker/ioBroker.sayit/blob/master/README.md nicht mit sendTo(), sondern mit setState() (Zeilen 8 bis 10 durch folgende ersetzen).

                                 setState('sayit.0.tts.text', 'de;Das Fenster von Maximilian ist seit zehn Minuten offen');
                        
                        ```` `  Hallo, danke für Deine Rückmeldung.
                        

                        Leider kommen da Warnhinweise im Script. Wo ist der Fehler?

                        ![](</s><URL url=)<link_text text="https://uploads.tapatalk-cdn.com/201802 ... 0f2a5b.jpg">https://uploads.tapatalk-cdn.com/20180218/116d8d74372d17f1f0f7e8c6830f2a5b.jpg</link_text>" />

                        1 Antwort Letzte Antwort
                        0
                        • paul53P Offline
                          paul53P Offline
                          paul53
                          schrieb am zuletzt editiert von
                          #13

                          Zelie 9 ist zuviel: Löschen !

                            });
                          

                          Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                          Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                          1 Antwort Letzte Antwort
                          0
                          • S Offline
                            S Offline
                            Stoni
                            schrieb am zuletzt editiert von
                            #14

                            Auch hier noch mal: viiiiiiieleeeeen Dank!!

                            1 Antwort Letzte Antwort
                            0
                            • S Offline
                              S Offline
                              Stoni
                              schrieb am zuletzt editiert von
                              #15

                              Hallo Paul53,

                              kann man das Script noch um die Auswahl der Stimme ergänzen? Ich hätte gerne die Hans Stimme, aber es kommt nur eine weibliche Stimme, obwohl im Sayit Adapter die Hans Stimme ausgewählt wurde.

                              Gruß Stoni

                              Gesendet von iPad mit Tapatalk

                              1 Antwort Letzte Antwort
                              0
                              Antworten
                              • In einem neuen Thema antworten
                              Anmelden zum Antworten
                              • Älteste zuerst
                              • Neuste zuerst
                              • Meiste Stimmen


                              Support us

                              ioBroker
                              Community Adapters
                              Donate

                              768

                              Online

                              32.4k

                              Benutzer

                              81.4k

                              Themen

                              1.3m

                              Beiträge
                              Community
                              Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                              ioBroker Community 2014-2025
                              logo
                              • Anmelden

                              • Du hast noch kein Konto? Registrieren

                              • Anmelden oder registrieren, um zu suchen
                              • Erster Beitrag
                                Letzter Beitrag
                              0
                              • Home
                              • Aktuell
                              • Tags
                              • Ungelesen 0
                              • Kategorien
                              • Unreplied
                              • Beliebt
                              • GitHub
                              • Docu
                              • Hilfe