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. Sayit - Sprachrückmeldung

NEWS

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

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    18
    1
    5.7k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.5k

Sayit - Sprachrückmeldung

Scheduled Pinned Locked Moved Skripten / Logik
27 Posts 5 Posters 3.4k Views
  • 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.
  • H Offline
    H Offline
    Hicki
    wrote on last edited by
    #21

    @gst666:

    Wenn Du innerhalb einer definierten Zeit mehrfach den Taster drückst (hier 300 Sek), so soll keine erneute Sprachausgabe gemacht werden. `

    Ahh, dass macht ja zum Teil Sinn.

    Ich danke Dir nochmals für Deine schnelle Hilfe.

    Gruß Andreas

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Hicki
      wrote on last edited by
      #22

      Ich habe Dein Script gerade eingebaut.

      Funktioniert nicht. In der LOG bringt er diese Meldung:

      • 00:16:38.578 [info] javascript.0 Stop script script.js.common.Couchtisch_-_Licht_an_2(1)
      00:16:38.616 [info] javascript.0 Start javascript script.js.common.Couchtisch_-_Licht_an_2(1)
      
      00:16:38.618 [error] javascript.0 script.js.common.Couchtisch_-_Licht_an_2(1): ReferenceError: any is not defined at script.js.common.Couchtisch_-_Licht_an_2(1):5:31 
      

      Gruß Andreas

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hicki
        wrote on last edited by
        #23

        Ich habe das Problem selbst finden können. Hier das korrigierte Script:

        var idSayIt     = "sayit.0.tts.text";                                   // Hier die entsprechende SayIt Text ID
        var idButton    = "hm-rpc.0.NEQ1660467.1.STATE";                        // Objekt
        
        // Nach Schalten wird folgender Text gesprochen
        on(idButton, function (obj) {                                           // auf Änderung
                 if (obj.state.val === true ) {                                 // Licht an
                          setState (idSayIt, "de;60;Couchtisch - Licht an");
                 } else if (obj.state.val === false ) {                         // Licht aus
                          setState (idSayIt, "de;60;Couchtisch - Licht Aus");
                 }      
        });
        
        

        Wie baue ich das Zeit-Glied oben wieder ein?

        if (!lastSay || ((new Date()).getTime() - lastSay) > 3000) {
                          lastSay = (new Date()).getTime();
        
        

        Gruß Andreas

        1 Reply Last reply
        0
        • H Offline
          H Offline
          Hicki
          wrote on last edited by
          #24

          hat keiner eine Idee.

          1 Reply Last reply
          0
          • H Offline
            H Offline
            Hicki
            wrote on last edited by
            #25
            var idSayIt     = "sayit.0.tts.text";                                   // Hier die entsprechende SayIt Text ID
            var idButton    = "hm-rpc.0.NEQ1660467.1.STATE";                        // Objekt
            
            // Nach Schalten wird folgender Text gesprochen
            on(idButton, function (obj) {                                           // auf Änderung
                     if (obj.state.val === true ) {                                 // Licht an
                              setState (idSayIt, "de;60;Couchtisch - Licht an");
                     } else if (obj.state.val === false ) {                         // Licht aus
                              setState (idSayIt, "de;60;Couchtisch - Licht Aus");
                     }      
            });
            
            

            Wie baue ich das Zeit-Glied wieder ein?

            Zeitglied:

            if (!lastSay || ((new Date()).getTime() - lastSay) > 3000) {
                              lastSay = (new Date()).getTime();
            
            

            Kann ich denn überhaut ein Zeitglied in das Script einbauen?

            Gruß Andreas

            1 Reply Last reply
            0
            • justrJ Offline
              justrJ Offline
              justr
              wrote on last edited by
              #26
              var idSayIt     = "sayit.0.tts.text";                                   // Hier die entsprechende SayIt Text ID
              var idButton    = "hm-rpc.0.NEQ1660467.1.STATE";                        // Objekt
              var lastSay     = null;
              
              // Nach Schalten wird folgender Text gesprochen
              on(idButton, function (obj) {                                           // auf Änderung
                  if (!lastSay || ((new Date()).getTime() - lastSay) > 3000) {
                      lastSay = (new Date()).getTime();
                      if (obj.state.val === true ) {                                 // Licht an
                          setState (idSayIt, "de;60;Couchtisch - Licht an");
                      } else if (obj.state.val === false ) {                         // Licht aus
                          setState (idSayIt, "de;60;Couchtisch - Licht Aus");
                      }
                  }
              });
              
              1 Reply Last reply
              0
              • H Offline
                H Offline
                Hicki
                wrote on last edited by
                #27

                Vielen Dank, für Deine Hilfe.

                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

                538

                Online

                32.7k

                Users

                82.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