Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. [gelöst]Pushover und sayit

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [gelöst]Pushover und sayit

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

      Hallo,

      wie kann ich es realisieren dass wenn mein bewegungsmelder eine Bewegung erkennt ich eine pushover Nachricht bekomme und sayit sagt zb "Bewegung vor deinem haus"? habe da schon was vorbereitet:

      // To specify subject or other options
      sendTo("pushover.0", {
         message:  'Bewegung vor deinem Haus', // mandatory - your text message
         title:    'MyHome', // optional  - your message's title, otherwise your app's name is used
         sound:    'magic',     // optional  - the name of one of the sounds supported by device clients to override the user's default sound choice
                                //    pushover, bike, bugle, cashregister, classical, cosmic, falling,
                                //    gamelan, incoming, intermission, magic, mechanical, pianobar, siren,
                                //    spacealarm, tugboat, alien, climb, persistent, echo, updown, none
         priority: 1,          // optional
                                //    -1 to always send as a quiet notification,
                                //    1 to display as high-priority and bypass the user's quiet hours, or
                                //    2 to also require confirmation from the user
          device: 'IPhone',              // optional  - your user's device name to send the message directly to that device, rather than all of the user's devices
      });
      

      ist natürlich von der readme. ich hatte bereits was gebastelt, das Problem war das push zb auch wenn der bw von true auf false wieder schaltet mir auch eine Nachricht geschickt hat.

      kann mir da jemand helfen?

      danke Mit freundlichen Grüßen

      1 Reply Last reply Reply Quote 0
      • paul53
        paul53 last edited by

        @fischi87:

        …das Problem war das push zb auch wenn der bw von true auf false wieder schaltet mir auch eine Nachricht geschickt hat. `

        var bmid = 'hm-rpc...';
        
        on({id: bmid, change: 'ne', val: true}, function() {
            mache was (pushover, sayit);
        });
        

        oder (ist identisch):

        var bmid = 'hm-rpc...';
        
        on(bmid, function(dp) {
            if(dp.state.val) {
                mache was (pushover, sayit);
            }
        });
        
        1 Reply Last reply Reply Quote 0
        • fischi87
          fischi87 last edited by

          danke für den Ansatz Paul, hat funktioniert

          Mit freundlichen Grüßen

          1 Reply Last reply Reply Quote 0
          • P
            pix last edited by

            Hier noch eine kleine Erweiterung, wenn mehrere Bewegungsmelder genutzt werden sollen.

            alle Bewegungsmelder im System:

            $('channel[state.id=*.MOTION]').on(function (obj) {
                if (obj.state.val) { // Wenn Bewegung erkannt
                    var nachricht = obj.deviceName + ' meldet Bewegung';
                    log(nachricht);
                } // Ende Bewegung erkannt
            });
            
            

            oder etwas anders und mit Begrenzung auf einen Raum:

            var motion_buero = $('channel[state.id=*.MOTION](rooms=Büro)');
            motion_buero.on(function(obj){
                if (obj.state.val) { // hier kann man mit && z.B. noch den Status der Alarmanlage mit rein bringen >> if ( (obj.state.val) && getState(idAlarmanlage).val )
                   // machwas()   
                }
            });
            
            

            Gruß

            Pix

            1 Reply Last reply Reply Quote 0
            • fischi87
              fischi87 last edited by

              Danke für die Ansätze.

              Mit freundlichen Grüßen

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

              Support us

              ioBroker
              Community Adapters
              Donate

              885
              Online

              31.7k
              Users

              79.7k
              Topics

              1.3m
              Posts

              3
              5
              1041
              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