Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Synology Surveillance Station API

    NEWS

    • [erledigt] 15. 05. Wartungsarbeiten am ioBroker Forum

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Synology Surveillance Station API

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

      @apollon77 @der_Auge

      Hallo,

      du hattest mal hier irgendwo dieses script bereitgestellt (finde es leider nicht mehr im original)

      @der_Auge said in Synology Surveillance Station API:
      @apollon77:

      Hey,

      weil bisher primär PHP Code gepostet wurde, hier mal meine Lösung die ich aktuell verwende.

      In der Synology Surveillancestation bei der "Stream Gültigkeit" habe ich "Dauerhaft" gewählt, trotzdem wird die URL nach 1-2 Wochen ungültig, also hole ich Sie jetzt täglich neu.

      var request = require('request');
      
      // Konfiguration
      var user = "surveillanceUser";  // Synology Benutzer mit Berechtigung die Kamera anzuzeigen
      var pass = "...";  // Passwort zu eben eingegebenem Benutzer
      var ip = "...";  // IP-Adresse eures Synology-NAS
      var port = 5000;  // default Port der Surveillance Station
      var cameraID = 1;  // ID der Kamera, welche angezeigt werden soll
      
      createState('javascript.' + instance + '.Anzeigen.Kamera.Eingangstuer-Stream', {'type': 'string', 'read': true, 'write': true, 'role': 'value', 'def': ""});
      
      // Authentifizierung an Synology Surveillance Station WebAPI und auslesen der SID
      
      function updateStreamUrl() {
          request('http://' + ip + ':' + port + '/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=3&account=' + user + '&passwd=' + pass + '&session=SurveillanceStation&format=sid', function (error, response, body) {
              //console.log('error:', error); // Print the error if one occurred
              //console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received
              //console.log('body:', body); // Print the HTML for the Google homepage.
              try {
                  var bodyObj = JSON.parse(body);
              }
              catch (e) {
                  console.log("Error update SurveillanceStation Stream URL: " + e);
                  return;
              }
              if (bodyObj && bodyObj.data && bodyObj.data.sid) {
                  var sid = bodyObj.data.sid;
                  setState('javascript.' + instance + '.Anzeigen.Kamera.Eingangstuer-Stream', 'http://' + ip + ':' + port + '/webapi/SurveillanceStation/videoStreaming.cgi?api=SYNO.SurveillanceStation.VideoStream&version=1&method=Stream&cameraId=' + cameraID + '&format=mjpeg&_sid=' + sid, true);
              }
              else {
                  console.log("Invalid return on SurveillanceStation Stream URL: " + JSON.stringify(bodyObj));
                  return;
              }
          });
      }
      
      schedule("0 * * * *", function() {
          updateStreamUrl();
      });
      
      updateStreamUrl();
      

      Es gibt dann einen Datenpunkt wo ich einmal pro Stunde ne neue URL hole und reinschreibe.

      In Vis zeige ich es dann mit dem Cam-Widget an und {javascript.0.Anzeigen.Kamera.Eingangstuer-Stream} als "Source"/Quelle. Das klappt recht gut

      Ingo `

      Super Danke

      Genau so habe ich es übernommen. Und es funktioniert.

      Gruß

      Jürgen

      Ich habe das Problem das die Synology nach einiger Zeit ca 20 mal die videostreaming.cgi offen hat und die CPU Last bei 99% ist.
      Nach einen Neustart der SurveillanceStation geht es erst mal ein paar Stunden wieder bis die Prozesse in der Anzahl wieder ansteigen.

      Gibt es dafür eine Lösung?
      Hat noch jemand dieses Verhalten?

      Gruß XBiT

      Neuschwansteini 1 Reply Last reply Reply Quote 0
      • Neuschwansteini
        Neuschwansteini @XBiT last edited by

        @XBiT ...das Problem hab ich auch... dachte erst, es liegt daran, dass ich 18 Kameras eingebunden habe, aber das hat damit nix zu tun.. irgendwas hängt sich da..:-(

        XBiT 1 Reply Last reply Reply Quote 0
        • XBiT
          XBiT @Neuschwansteini last edited by

          @ilovegym

          Ich denke mal das es an der schedule Funktion im Script liegt die jede Stunde die Ausführung startet.
          Habe mal das Script gestoppt, die Werte sind ja im Object vorhanden und habe nicht mehr so viele videostreaming.cgi sessions offen. (jedenfalls bis jetzt 2 Stunden lang)

          1 Reply Last reply Reply Quote 0
          • S
            skokarl last edited by

            Morgen,
            ich kann Euch gerade nicht allen folgen, ist mir noch zu schwierig.

            Ich hab ne DS718+, mit 2 Kameras in der Surveillance Station.
            Komme ich noch irgendwie an den Stream und kann mir damit MotionEye auf meiner Nuc sparen ?
            oder ist das zu aufwändig, anfällig, oder wie auch immer ?

            Bewegungsaufzeichnung etc, brauch ich alles nicht, ich brauche nur das Livebild für die View.

            Samson71 1 Reply Last reply Reply Quote 0
            • Samson71
              Samson71 Global Moderator @skokarl last edited by

              @skokarl
              Bei mir funktioniert es immer noch mit dem Skript von Apollon. Allerdings ist das kein echter Livestream, sondern ein Standbild mit sekündlicher Aktualisierung. Reicht mir aber. Die Aufzeichnung läuft nativ über die Syno.

              S 1 Reply Last reply Reply Quote 0
              • S
                skokarl @Samson71 last edited by

                @Samson71 sagte in Synology Surveillance Station API:

                @skokarl
                Bei mir funktioniert es immer noch mit dem Skript von Apollon. Allerdings ist das kein echter Livestream, sondern ein Standbild mit sekündlicher Aktualisierung. Reicht mir aber. Die Aufzeichnung läuft nativ über die Syno.

                Benötigt man nur das Script ?
                Wo kriege ich das her ?

                Samson71 K Neuschwansteini 3 Replies Last reply Reply Quote 0
                • Samson71
                  Samson71 Global Moderator @skokarl last edited by Samson71

                  @skokarl
                  Das "Original" stammt meine ich von der 2. Seite dieses Threads:
                  https://forum.iobroker.net/topic/3742/synology-surveillance-station-api/40
                  Ist schon etwas her.

                  1 Reply Last reply Reply Quote 0
                  • K
                    Kueppert @skokarl last edited by

                    @skokarl bei mir läuft das Skript auch noch und funktioniert 🙂 Probiere es mal aus

                    Endurance 1 Reply Last reply Reply Quote 0
                    • Endurance
                      Endurance @Kueppert last edited by

                      @Kueppert @skokarl
                      kann ich bestätigen, hab es gerade getestet, läuft noch. noch.... 😉

                      1 Reply Last reply Reply Quote 0
                      • Negalein
                        Negalein Global Moderator last edited by Negalein

                        der neue Thread zum ioBroker Synology Adapter findet hier hier

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate
                        FAQ Cloud / IOT
                        HowTo: Node.js-Update
                        HowTo: Backup/Restore
                        Downloads
                        BLOG

                        741
                        Online

                        31.6k
                        Users

                        79.5k
                        Topics

                        1.3m
                        Posts

                        51
                        181
                        50196
                        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