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. Blockly
  5. fb-Checkpresence Adapter und Blockly

NEWS

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

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

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.2k

fb-Checkpresence Adapter und Blockly

Scheduled Pinned Locked Moved Blockly
4 Posts 2 Posters 467 Views 1 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.
  • P Offline
    P Offline
    Phil87
    wrote on last edited by
    #1

    Gutne Morgen,

    ich habe den Adapter installiert um die Anwesenheit abzufragen. Dazu habe ich dann ein Blockly erstellt welches mir immer mitteilen (telegramm) soll wenn jemand nicht mehr zu Hause ist.
    Wenn ich jetzt aber zu Hause oder unterwegs bin, wird mir in Regelmäßigen Abständen eine Mitteilung aufs Handy geschickt, dass alle weg sind oder noch da. Immer und immer wieder. So habe ich manchmal bis zu über 1000 Nachrichten auf meinem Handy.
    Kann mir hier jemad weiter helfen?

    on({id: 'fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active', val: false}, async function (obj) {
      var value = obj.state.val;
      var oldValue = obj.oldState.val;
      if (getState("fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active").val == false && getState("fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active").val == false) {
        setStateDelayed("shelly.0.SHPLG-S#021788#1.Relay0.Switch"/*[object Object]*/, false, 30000, true);
        sendTo("telegram", "send", {
            text: 'Alle sind unterwegs. Ich wünsche einen schönen Tag.'
        });
      }
    });
    on({id: 'fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active', val: false}, async function (obj) {
      var value = obj.state.val;
      var oldValue = obj.oldState.val;
      if (getState("fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active").val == false && getState("fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active").val == false) {
        setStateDelayed("shelly.0.SHPLG-S#021788#1.Relay0.Switch"/*[object Object]*/, false, 30000, true);
        sendTo("telegram", "send", {
            text: 'Alle sind unterwegs. Ich wünsche einen schönen Tag.'
        });
      }
    });
    
    on({id: 'fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active', change: "ne"}, async function (obj) {
      var value = obj.state.val;
      var oldValue = obj.oldState.val;
      if (getState("fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active").val == true && getState("fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active").val == true) {
        setStateDelayed("shelly.0.SHPLG-S#021788#1.Relay0.Switch"/*[object Object]*/, true, 30000, true);
        sendTo("telegram", "send", {
            text: 'Schön das ihr wieder da seit.'
        });
      }
    });
    on({id: 'fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active', change: "ne"}, async function (obj) {
      var value = obj.state.val;
      var oldValue = obj.oldState.val;
      if (getState("fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active").val == true && getState("fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active").val == true) {
        setStateDelayed("shelly.0.SHPLG-S#021788#1.Relay0.Switch"/*[object Object]*/, true, 30000, true);
        sendTo("telegram", "send", {
            text: 'Schön das ihr wieder da seit.'
        });
      }
    });
    
    on({id: 'fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active', val: false}, async function (obj) {
      var value = obj.state.val;
      var oldValue = obj.oldState.val;
      if (getState("fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active").val == false) {
        sendTo("telegram", "send", {
            text: 'Luisa ist unterwegs'
        });
      }
    });
    
    on({id: 'fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active', val: false}, async function (obj) {
      var value = obj.state.val;
      var oldValue = obj.oldState.val;
      if (getState("fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active").val == true) {
        sendTo("telegram", "send", {
            text: 'Luisa ist wieder zu Hause.'
        });
      }
    });
    
    paul53P 1 Reply Last reply
    0
    • P Phil87

      Gutne Morgen,

      ich habe den Adapter installiert um die Anwesenheit abzufragen. Dazu habe ich dann ein Blockly erstellt welches mir immer mitteilen (telegramm) soll wenn jemand nicht mehr zu Hause ist.
      Wenn ich jetzt aber zu Hause oder unterwegs bin, wird mir in Regelmäßigen Abständen eine Mitteilung aufs Handy geschickt, dass alle weg sind oder noch da. Immer und immer wieder. So habe ich manchmal bis zu über 1000 Nachrichten auf meinem Handy.
      Kann mir hier jemad weiter helfen?

      on({id: 'fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active', val: false}, async function (obj) {
        var value = obj.state.val;
        var oldValue = obj.oldState.val;
        if (getState("fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active").val == false && getState("fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active").val == false) {
          setStateDelayed("shelly.0.SHPLG-S#021788#1.Relay0.Switch"/*[object Object]*/, false, 30000, true);
          sendTo("telegram", "send", {
              text: 'Alle sind unterwegs. Ich wünsche einen schönen Tag.'
          });
        }
      });
      on({id: 'fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active', val: false}, async function (obj) {
        var value = obj.state.val;
        var oldValue = obj.oldState.val;
        if (getState("fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active").val == false && getState("fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active").val == false) {
          setStateDelayed("shelly.0.SHPLG-S#021788#1.Relay0.Switch"/*[object Object]*/, false, 30000, true);
          sendTo("telegram", "send", {
              text: 'Alle sind unterwegs. Ich wünsche einen schönen Tag.'
          });
        }
      });
      
      on({id: 'fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active', change: "ne"}, async function (obj) {
        var value = obj.state.val;
        var oldValue = obj.oldState.val;
        if (getState("fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active").val == true && getState("fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active").val == true) {
          setStateDelayed("shelly.0.SHPLG-S#021788#1.Relay0.Switch"/*[object Object]*/, true, 30000, true);
          sendTo("telegram", "send", {
              text: 'Schön das ihr wieder da seit.'
          });
        }
      });
      on({id: 'fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active', change: "ne"}, async function (obj) {
        var value = obj.state.val;
        var oldValue = obj.oldState.val;
        if (getState("fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active").val == true && getState("fb-checkpresence.0.fb-devices.Galaxy-A7-PhilippHandy.active").val == true) {
          setStateDelayed("shelly.0.SHPLG-S#021788#1.Relay0.Switch"/*[object Object]*/, true, 30000, true);
          sendTo("telegram", "send", {
              text: 'Schön das ihr wieder da seit.'
          });
        }
      });
      
      on({id: 'fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active', val: false}, async function (obj) {
        var value = obj.state.val;
        var oldValue = obj.oldState.val;
        if (getState("fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active").val == false) {
          sendTo("telegram", "send", {
              text: 'Luisa ist unterwegs'
          });
        }
      });
      
      on({id: 'fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active', val: false}, async function (obj) {
        var value = obj.state.val;
        var oldValue = obj.oldState.val;
        if (getState("fb-checkpresence.0.fb-devices.Galaxy-S7-Luisa-Handy.active").val == true) {
          sendTo("telegram", "send", {
              text: 'Luisa ist wieder zu Hause.'
          });
        }
      });
      
      paul53P Offline
      paul53P Offline
      paul53
      wrote on last edited by paul53
      #2

      @phil87
      Da es nur 2 Smartphones sind, verwende auch nur 2 Trigger mit "wurde geändert". Etwa so:

      Bild_2021-06-12_170113.png

      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

      P 1 Reply Last reply
      0
      • paul53P paul53

        @phil87
        Da es nur 2 Smartphones sind, verwende auch nur 2 Trigger mit "wurde geändert". Etwa so:

        Bild_2021-06-12_170113.png

        P Offline
        P Offline
        Phil87
        wrote on last edited by
        #3

        @paul53
        Danke für die Idee. Eine Frage habe ich aber noch dazu, was meinst du mit "msg"? Damit ist bestimmt der Messenger gemeint aber warum hat er eine eigene Variable? Kann ich da nicht gleich das sendto nehmen?

        paul53P 1 Reply Last reply
        0
        • P Phil87

          @paul53
          Danke für die Idee. Eine Frage habe ich aber noch dazu, was meinst du mit "msg"? Damit ist bestimmt der Messenger gemeint aber warum hat er eine eigene Variable? Kann ich da nicht gleich das sendto nehmen?

          paul53P Offline
          paul53P Offline
          paul53
          wrote on last edited by paul53
          #4

          @phil87 sagte: eine eigene Variable? Kann ich da nicht gleich das sendto nehmen?

          Kann man, verbraucht aber mehr Ressourcen, da sendTo() eine komplexe Funktion ist. Die Verwendung der Variablen msg (für Telegram message) ist effizienter.

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

          341

          Online

          32.6k

          Users

          82.2k

          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