Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. Frigate Adapter für ioBroker

    NEWS

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    Frigate Adapter für ioBroker

    This topic has been deleted. Only users with topic management privileges can see it.
    • crunchip
      crunchip Forum Testing Most Active @Wal last edited by

      @wal mal nur bedingt mit dem Adapter zu tun.

      Ich hab frigate auf unraid laufen, nun ist mir aufgefallen, wenn nachts das backup läuft und der Container währenddessen gestoppt wird, werden die Datenpunkte(speziell zum triggern einer Bewegung) anschiessend nicht mehr aktualisiert.
      Ist mir erst aufgefallen nachdem kein Bild gesendet wurde, als die Post da war.

      Ich muss dann mqtt und den Adapter neu starten, dann funktioniert es wieder, bis zum nachsten backup.

      Variante 1, ich lass beide Instanzen nach dem backup automatisch neu starten
      Variante 2, den container nicht zu stoppen während des backups.

      Vllt hast du diesbezüglich ja eine Idee

      Ps: iobroker läuft noch als VM auf nem anderen Rechner(Proxmox)

      Wal 1 Reply Last reply Reply Quote 0
      • Wal
        Wal Developer @crunchip last edited by

        @crunchip ,
        ich mache das ja unter Proxmox auch alle 2 Tage, da läuft es danach aber wieder.
        Machst du es wie ich mit einem Mosquitto Server und dem mqtt client Adapter ?

        crunchip 1 Reply Last reply Reply Quote 0
        • crunchip
          crunchip Forum Testing Most Active @Wal last edited by

          @wal ja hab nen mqtt container auf unraid und client im iobroker laufen.

          Muss ich mich mal demnächst näher damit beschäftigen warum nicht mehr aktualisiert wird.

          Aktuell ist zuhause und Umgebung allerdings totaler Stromausfall, das scheint was größeres zu sein.

          1 Reply Last reply Reply Quote 0
          • D
            dragst3r last edited by dragst3r

            Ich habe derzeit das Problem, dass immer wieder die Webclips oder Snapshots URLs kein Event (noevent) haben und somit verschiedene Fehler in Skripten/Adapter erzeugen. Das liegt mMn daran, das Snapshots oder Webclips pauschal im Objekt aktualisiert werden ohne eine Validierung, ob was existiert.

            Laut JSON von Frigate gibt es ja die Werte:
            "has_clip": true,
            "has_snapshot": true

            EDIT: Ich glaube die Logik war schon enthalten, funktioniert aber nicht "mehr"?
            const bsnap = await this.getStateAsync(beforecamera + '.snapshots.state');
            const bclip = await this.getStateAsync(beforecamera + '.recordings.state');

            Wäre es daher nicht sinnvoll, beim schreiben des jeweiligen Objektes von Clip/Snap dies vorher abzufragen?

            VG
            dragst3r

            EDIT2: Ich habe mich mal versucht in github direkt was zu ändern. Keine Ahnung ob das so richtig war.

            Wal 1 Reply Last reply Reply Quote 0
            • Wal
              Wal Developer @dragst3r last edited by

              @dragst3r ,
              schau ich mir mal zeitnah an.

              D 1 Reply Last reply Reply Quote 0
              • D
                dragst3r @Wal last edited by

                @wal ,
                falls meine Änderungen in Github nicht abgeschickt worden sind, reicht schon folgendes, markiert mit // NEU bzw. anders

                 async onEventChange(obj) {
                        const extractedJSON = JSON.parse(obj.val);
                        const beforecamera = extractedJSON.before.camera;
                        const before = extractedJSON.before; // NEU 
                        const beforelabel = extractedJSON.before.label;
                        const afterid = extractedJSON.after.id;
                        const topscore = extractedJSON.after.top_score;
                        const eventtype = extractedJSON.type;
                        const id1 = beforecamera + '.event';
                        const id2 = beforecamera + '.objects.' + beforelabel;
                        const websnap = weburl + '/api/events/' + afterid + '/snapshot.jpg';
                        const webclip = weburl + '/api/events/' + afterid + '/clip.mp4';
                
                
                        const bsnap = before.has_snapshot; // NEU bzw. anders
                        const bclip = before.has_clip; // NEU bzw. anders
                        if ((bsnap == null) || (bclip == null)) {
                            this.log.info('restart MQTT Broker please !!!');
                            return;
                        }
                        this.log.debug(`Snap: ${bsnap}`);
                        this.log.debug(`Clip: ${bclip}`);
                        this.log.debug(`changed: ${obj.val}`);
                        try {
                            if (eventtype == 'new') {
                                //------------------------------
                                //      Bewegung erkannt
                                //------------------------------
                                this.setState('event', { val: true, ack: true });
                                //------------------------------
                                //       Kamera erkannt
                                //------------------------------
                                await this.setObjectNotExistsAsync(id1, {
                                    type: 'state',
                                    common: {
                                        name: 'Camera detected',
                                        type: 'boolean',
                                        role: 'indicator',
                                        read: true,
                                        write: false,
                                        def: false
                                    },
                                    native: {},
                                });
                                this.setState(id1, { val: true, ack: true });
                                //------------------------------
                                //       Objekt erkannt
                                //------------------------------
                                await this.setObjectNotExistsAsync(id2 + '.event', {
                                    type: 'state',
                                    common: {
                                        name: beforelabel + ' detected',
                                        type: 'boolean',
                                        role: 'indicator',
                                        read: true,
                                        write: false,
                                        def: false
                                    },
                                    native: {},
                                });
                                this.setState(id2 + '.event', { val: true, ack: true });
                            } else if (eventtype == 'end') {
                                //------------------------------
                                //         Event ID
                                //------------------------------
                                await this.setObjectNotExistsAsync(id2 + '.id', {
                                    type: 'state',
                                    common: {
                                        name: 'Event ID',
                                        type: 'string',
                                        role: 'value',
                                        read: true,
                                        write: false,
                                        def: 'none'
                                    },
                                    native: {},
                                });
                                this.setState(id2 + '.id', { val: afterid, ack: true });
                                //------------------------------
                                //         Cam + Event ID
                                //------------------------------
                                await this.setObjectNotExistsAsync(id2 + '.camid', {
                                    type: 'state',
                                    common: {
                                        name: 'Cam ID',
                                        type: 'string',
                                        role: 'value',
                                        read: true,
                                        write: false,
                                        def: 'none'
                                    },
                                    native: {},
                                });
                                this.setState(id2 + '.camid', { val: beforecamera + '-' + afterid, ack: true });
                                this.setState('lastcamid', { val: beforecamera + '-' + afterid, ack: true });
                                this.setState('lastidurl', { val: websnap, ack: true });
                                //------------------------------
                                //           WebURL
                                //------------------------------
                                const anz = this.config.webnum;
                                if (bsnap == true) { // NEU bzw. anders
                                    for (let i = 0; i < anz; i++)
                                        await this.setObjectNotExistsAsync(id2 + '.web.snap.snap_' + i.toString(), {
                                            type: 'state',
                                            common: {
                                                name: 'Snapshot WebUrl ' + i.toString(),
                                                type: 'string',
                                                role: 'value',
                                                read: true,
                                                write: false,
                                                def: ''
                                            },
                                            native: {},
                                        });
                
                                    for (let i = anz - 1; i > -1; i--) {
                                        if (i == 0) {
                                            this.setState(id2 + '.web.snap.snap_' + i.toString(), { val: websnap, ack: true });
                                        } else {
                                            const str = await this.getStateAsync(id2 + '.web.snap.snap_' + (i - 1).toString());
                                            if (str != null)
                                                this.setState(id2 + '.web.snap.snap_' + i.toString(), { val: str.val, ack: true });
                                        }
                                    }
                                }
                                if (bclip == true) { // NEU bzw. anders
                                    for (let i = 0; i < anz; i++)
                                        await this.setObjectNotExistsAsync(id2 + '.web.clip.clip_' + i.toString(), {
                                            type: 'state',
                                            common: {
                                                name: 'Clip WebUrl ' + i.toString(),
                                                type: 'string',
                                                role: 'value',
                                                read: true,
                                                write: false,
                                                def: ''
                                            },
                                            native: {},
                                        });
                
                                    for (let i = anz - 1; i > -1; i--) {
                                        if (i == 0) {
                                            this.setState(id2 + '.web.clip.clip_' + i.toString(), { val: webclip, ack: true });
                                        } else {
                                            const str = await this.getStateAsync(id2 + '.web.clip.clip_' + (i - 1).toString());
                                            if (str != null)
                                                this.setState(id2 + '.web.clip.clip_' + i.toString(), { val: str.val, ack: true });
                                        }
                                    }
                                }
                                //------------------------------
                                //       Erkennungsrate
                                //------------------------------
                                await this.setObjectNotExistsAsync(id2 + '.score', {
                                    type: 'state',
                                    common: {
                                        type: 'number',
                                        read: true,
                                        write: false,
                                        name: 'detection rate',
                                        role: 'value.score',
                                        unit: '%',
                                        def: 0
                                    },
                                    native: {},
                                });
                                this.setState(id2 + '.score', { val: Math.round(topscore * 100), ack: true });
                                //------------------------------
                                //      Reset Event States
                                //------------------------------
                                this.setState('event', { val: false, ack: true });
                                this.setState(id1, { val: false, ack: true });
                                this.setState(id2 + '.event', { val: false, ack: true });
                            }
                        } catch (error) {
                            this.log.error(error);
                        }
                    }
                
                1 Reply Last reply Reply Quote 1
                • Wal
                  Wal Developer last edited by

                  Version 2.8 mit den Änderungen von @dragst3r erstellt.

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    dragst3r @Wal last edited by

                    @wal danke, bei Github heiße ich allerdings anders 🙂 und zwar Obsthaendler falls es wichtig ist.

                    U 1 Reply Last reply Reply Quote 0
                    • U
                      uwe72 @dragst3r last edited by

                      Kann mir jemand helfen? Frigate läuft. In ioBroker habe ich den Frigate Adapter installiert.

                      Was muss ich noch machen. MQTT-Client Adapter installieren? Wie muss ich den konfigurieren?

                      Möchte benachrichtigt werden, wenn Frigate einen Alarm auslöst.

                      DANKE!

                      Wal 1 Reply Last reply Reply Quote 0
                      • Wal
                        Wal Developer @uwe72 last edited by Wal

                        @uwe72 ,
                        wenn du noch kein MQTT-Broker am laufen hast, den MQTT-Adapter als Server einrichten.
                        Danach Frigate so einrichten das er sich am MQTT-Server anmeldet und wenn das läuft den Frigate-Adapter auf "mqtt.0.frigate" incl. IP/Port von Frigate konfigurieren.

                        U 1 Reply Last reply Reply Quote 0
                        • U
                          uwe72 @Wal last edited by

                          @wal Sorry, ich wollte fragen, ob Du mir helfen kannst den MQTT-Server einzurichten? Hast Du mir Screenshots von den 3 Reitern?

                          Wal 1 Reply Last reply Reply Quote 0
                          • Wal
                            Wal Developer @uwe72 last edited by

                            @uwe72 ,
                            müsste so passen, ohne Gewähr.
                            mqttfri.jpg

                            wendy2702 U 2 Replies Last reply Reply Quote 0
                            • wendy2702
                              wendy2702 @Wal last edited by

                              @wal Sorry: Offtopic aber hattest du nicht ne Anleitung zu Frigate installation Proxmox mit Corel USB erstellt?

                              Habe mir heute auch den Corel USB bestellt und wollte Frigate mal testen bevor ich Motioneye in Rente schicke.

                              Hast du zufällig den Link dahin parat?

                              Wal M 2 Replies Last reply Reply Quote 0
                              • Wal
                                Wal Developer @wendy2702 last edited by

                                @wendy2702 sagte in Test Frigate Adapter 0.2.8:

                                Anleitung zu Frigate installation Proxmox mit Corel USB erstellt?

                                Nein,war eine für eine coral dual tpu.

                                1 Reply Last reply Reply Quote 0
                                • M
                                  martinschm @wendy2702 last edited by

                                  @wendy2702 said in Test Frigate Adapter 0.2.8:

                                  @wal Sorry: Offtopic aber hattest du nicht ne Anleitung zu Frigate installation Proxmox mit Corel USB erstellt?

                                  Habe mir heute auch den Corel USB bestellt und wollte Frigate mal testen bevor ich Motioneye in Rente schicke.

                                  Hast du zufällig den Link dahin parat?

                                  Hab den USB Coral und hab damit auch motioneye in Rente geschickt. Leider hab ich die Schritte nicht dokumentiert, da ich mich selber ein wenig durch gewurschtelt habe. Insgesamt war ich als Docker und frigate Newbie aber überrascht, das ich es so schnell ans Laufen bekommen habe.

                                  Bin bisher super zufrieden, die Erkennung is echt gut und endlich werde ich nicht mehr bei jeder "Bewegung" vor der Haustür mit Bildern per Telegram bombardiert.

                                  1 Reply Last reply Reply Quote 1
                                  • U
                                    uwe72 @Wal last edited by uwe72

                                    @wal DANKE!

                                    Ich scheine einen Schritt weiter zu sein.

                                    1 Reply Last reply Reply Quote 0
                                    • T
                                      tombox @Wal last edited by tombox

                                      @Wal

                                      Ich habe den Adapter neu geschrieben.

                                      • Er kommt ohne MQTT adapter aus, somit werden die Daten schneller transportiert
                                      • Die snapshots können direkt in die vis integriert werden
                                      • Integrierte Notification Funktion für Snapshots und Clips

                                      Achtung bei der Installations werden die alten Datenpunkte gelöscht es muss also Anpassung für Skripte oder Vis durchgeführt werden

                                      Installation für Test:

                                      1. Unter Adapter Experten Modus aktivieren:
                                        9309457a-cad0-4ff4-946f-28df05d32801-image.png

                                      2. Unter Adapter das Github Icon klicken:
                                        ef5f973f-4a70-43be-bf9a-460726a69d1d-image.png

                                      3. Benutzerdefiniert auswählen und die Url https://github.com/iobroker-community-adapters/ioBroker.frigate einfügen.
                                        8328414c-da64-41d4-b524-5a75a25cb683-image.png

                                      Bitte testen und gerne zusätzliche Features äußern.

                                      Anleitung:
                                      https://github.com/iobroker-community-adapters/ioBroker.frigate/blob/main/README.md

                                      Wal H 2 Replies Last reply Reply Quote 2
                                      • Wal
                                        Wal Developer @tombox last edited by

                                        @tombox,
                                        sehr gut gemacht.

                                        @tombox sagte in Test Frigate Adapter 0.2.8:

                                        Bitte testen und gerne zusätzliche Features äußern.

                                        Die Möglichkeit erst ab einem bestimmten Score die z.B. Telegram Nachricht zu senden und wenn man die die letzten Urls im Ringpuffer auch wieder hätten wäre auch nicht schlecht.

                                        T 1 Reply Last reply Reply Quote 0
                                        • T
                                          tombox @Wal last edited by

                                          @wal minimum score habe ich eingebaut und die letzten events sind unter events.history bzw als json events.history.json

                                          Wal 3 Replies Last reply Reply Quote 1
                                          • Wal
                                            Wal Developer @tombox last edited by

                                            @tombox sagte in Test Frigate Adapter 0.2.8:

                                            die letzten events sind unter events.history bzw als json events.history.json

                                            Hatte ich glatt übersehen, danke.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            511
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            42
                                            358
                                            47393
                                            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