Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. Unifi Protect einbinden?

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Unifi Protect einbinden?

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

      Hallo Zusammen,
      ich habe mich jetzt hier im Forum durch einige Threads durchgelesen was ich zum Unifi Protect finden konnte. Installiert habe ich den Unifi Protect Adapter 1.0.1. Verbindung ist hergestellt und meine Testkamera ist auch in den Objekten verbunden. Ich komme bei den Daten wie ein Stream und Standbild nicht klar.
      Gibt es einen Datenpunkt, wo ich die Daten finde?

      Ich kapiere auch noch nicht so ganz, wie ich das Skript einbinden kann, welches als Beispiel hinterlegt ist.

      // Settings
      const path = '/opt/iobroker/tmp/temp.jpg';
      const threshold = 50;
      
      // Send to Telegram ( or what you prefer )
      function sendImage(path) {
          sendTo('telegram.0', path);
      }
      
      //Trigger Script
      on({ id: 'unifi-protect.0.motions.lastMotion.thumbnail', change: "ne" }, function () {
          const thumb = getState('unifi-protect.0.motions.lastMotion.thumbnail'/*thumbnail*/).val;
          const end = getState('unifi-protect.0.motions.lastMotion.end'/*thumbnail*/).val;
          const cameraid = getState('unifi-protect.0.motions.lastMotion.camera'/*thumbnail*/).val;
          const score = getState('unifi-protect.0.motions.lastMotion.score'/*thumbnail*/).val;
          if (score < threshold) { return; }
          // if Event has ended send the Thumbnail otherwise get current Snapshot
          if (end != null) {
              sendTo('unifi-protect.0', 'getThumbnail', { "thumbnail": thumb, "path": path }, function (res) {
                  sendImage(path);
              });
          } else {
              sendTo('unifi-protect.0', 'getSnapshot', { "cameraid": cameraid, "path": path }, function (res) {
                  sendImage(path);
              });
          }
      });
      

      Danke für Unterstützung
      Marcus

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

      Support us

      ioBroker
      Community Adapters
      Donate

      897
      Online

      31.9k
      Users

      80.2k
      Topics

      1.3m
      Posts

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