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

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

    • 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.
    • totocotonio
      totocotonio @Samson71 last edited by

      @Samson71 sagte in Synology Surveillance Station API:

      @hobbycamper sagte in Synology Surveillance Station API:

      Hi zusammen,

      hat noch jemand @apollon77 Skript am laufen?

      var request = require('request');
      
      // Konfiguration
      var user = "XXXXXX";  // Synology Benutzer mit Berechtigung die Kamera anzuzeigen
      var pass = "XXXXXXX";  // Passwort zu eben eingegebenem Benutzer
      var ip = "192.168.178.XXX";  // IP-Adresse eures Synology-NAS
      var port = XXX;  // 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();
      

      Lief monatelang ohne Probleme. Scheinbar nach irgend einem Update, entweder iobroker oder SurveillanceStation (aktuell 8.2.3-5828), kommt kein Bild mehr. Wenn ich die angelegte URL aus dem Datenpunkt in den Browser kopiere, kommt auch kein Bild.
      Das wäre z.B. das Format des aktuellen Datenpunkt:

      http://192.168.178.XXX:XXX/webapi/SurveillanceStation/videoStreaming.cgi?api=SYNO.SurveillanceStation.VideoStream&version=1&method=Stream&cameraId=1&format=mjpeg&_sid=ibdh4MDGQhITs1790QDN403203
      

      Es kommt auch nicht "Seite nicht erreichbar", sondern der Browser sucht und sucht...

      Es hilft auch kein Neustart des iobroker oder der synology.

      Im Log kommt auch nichts ungewöhnliches:

      javascript.0	2019-03-02 08:29:30.867	info	script.js.common.Kamera: registered 0 subscriptions and 1 schedule
      javascript.0	2019-03-02 08:29:30.842	info	Start javascript script.js.common.Kamera
      javascript.0	2019-03-02 08:29:30.828	info	Stop script script.js.common.Kamera
      

      Ist da jemand schon was bekannt?

      LG
      Thomas

      Die Problem habe (hatte) ich auch.
      Snology hat mit dem Update auf die Surveillance Station 8.2.3-5828 die API verändert. Das Problem wird in den einschlägigen Foren auch diskutiert. Mittlerweile gibt es einen Fix in Form eines inoffiziellen Updates auf die 8.2.3-5829.

      Kann von hier runtergeladen werden:
      https://supfiles.synology.com/sharing/oXkk1MptJ

      Der Zugang ist passwortgeschützt. Gebe ich gern auf Chatanfrage weiter, da ich nicht weis ob ich das hier frei posten kann/darf.

      Hi,
      könntest du mir den Zugang bitte zukommen lassen.
      Ich habe das gleiche Problem.

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

        @totocotonio sagte in Synology Surveillance Station API:

        könntest du mir den Zugang bitte zukommen lassen.

        Hast PN.

        Was ist eigentlich an dem Satz

        @Samson71 sagte in Synology Surveillance Station API:
        Gebe ich gern auf Chatanfrage weiter, da ich nicht weis ob ich das hier frei posten kann/darf.

        nicht zu verstehen? 😉

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

          @Samson71 Vielen Dank für deine Hilfe es funktioniert.

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

            Hm,
            bei mir läuft es leider immer noch nicht 😞

            javascript.0 script.js.common.SurveillanceStation.CameraEsszimmer: Error update SurveillanceStation Stream URL: SyntaxError: Unexpected token u in JSON at position 0
            

            Jemand eine Idee, was das bedeutet?

            K 1 Reply Last reply Reply Quote 0
            • Z
              zahnheinrich last edited by

              @Samson71
              Würdest du mir den Zugangscode auch bitte zusenden?
              Vielen Dank im Voraus!

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

                @zahnheinrich sagte in Synology Surveillance Station API:

                @Samson71
                Würdest du mir den Zugangscode auch bitte zusenden?

                Hast ne Chatnachricht.

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

                  @Kueppert hab das Problem gefunden. Hatte https und port 5001. Wieder auf http und Port 5000 geändert - läuft wieder

                  1 Reply Last reply Reply Quote 0
                  • M
                    MarcoM last edited by

                    Mit dem Update auf die Version 8.2.3-5829 funktioniert es bei mir auch wieder.
                    Danke @Samson71

                    1 Reply Last reply Reply Quote 0
                    • W
                      web4wasch last edited by

                      Hallo zusammen,

                      ist das mit dem api-Code und dem Skript noch aktuell?
                      Ich bekomme leider über die URL vom Skript kein Bild angezeigt - nur über den RTSP-Stream über Freigabe und VLC funktioniert es bei mir.

                      Der Snapshot haut hin...

                      Danke für die Rückinfo.

                      Glasfaser 1 Reply Last reply Reply Quote 0
                      • Glasfaser
                        Glasfaser @web4wasch last edited by Glasfaser

                        @web4wasch

                        Das Script funktioniert und erstellt auch dann im Datenpunkt eine erzeugte URL.
                        Nur diese erstellte URL wird im VIS nicht angezeigt ,im Browser lädt sie endlos .......
                        nur im VLC wird einmalig mit der erstellten URL ein Standbild angezeigt .

                        Daher nutze ich da Script nicht .
                        Bin auch nicht weiterkommen , aber mir reicht das Snapshot mit Intervall.

                        W 1 Reply Last reply Reply Quote 0
                        • W
                          web4wasch @Glasfaser last edited by

                          @Glasfaser

                          danke dir für die schnelle Antwort.
                          Denke ich werde auch beim Intervall bleiben.

                          eigentlich voll schade ✌

                          Glasfaser 1 Reply Last reply Reply Quote 0
                          • Glasfaser
                            Glasfaser @web4wasch last edited by

                            @web4wasch

                            Ja leider ....

                            Kennst du das , auch sehr interessant für die Synology
                            Link Text

                            W 1 Reply Last reply Reply Quote 0
                            • W
                              web4wasch @Glasfaser last edited by

                              @Glasfaser

                              habe mal kurz überflogen, liest sich interessant!!!!

                              Hast du das schon mit einem Skript (Variable Anwesenheit) irgendwie umgesetzt?

                              Die Aktionsregeln habe ich just eingearbeitet, jetzt fehlt nur noch ein JS-Script oder Blocky.

                              Dank dir.

                              Glasfaser 1 Reply Last reply Reply Quote 0
                              • Glasfaser
                                Glasfaser @web4wasch last edited by

                                @web4wasch

                                Habe auch Aktionregel diese werden aber noch über die CCU ( Rasperrymatic ) angesteuert.,
                                deshalb wollte ich Sie auf IObrocker umziehen !
                                Aber leider weiß ich nicht wie man dort im Script Triggert

                                1111.JPG

                                2222.JPG
                                4444.JPG

                                Knallochse W 2 Replies Last reply Reply Quote 0
                                • Knallochse
                                  Knallochse @Glasfaser last edited by

                                  @Glasfaser eigentlich simpel
                                  In der Synology SurveillanceStation den API Befehl holen (Benutzername & Passwort ergänzen)
                                  118138FA-557D-4431-811E-1B7EAAB751F9.jpeg
                                  Und per Blockly einen Request zusammen klicken
                                  7FCB7F61-9EB9-4D96-8D77-3CF8337482B1.png

                                  Glasfaser 1 Reply Last reply Reply Quote 1
                                  • Glasfaser
                                    Glasfaser @Knallochse last edited by

                                    @Knallochse

                                    Genau nach deine Anleitung binn in vorgegangen ,Benutzername & Passwort auch ergänzt , aber keine Funktion damit !

                                    Knallochse 1 Reply Last reply Reply Quote 0
                                    • Knallochse
                                      Knallochse @Glasfaser last edited by

                                      @Glasfaser zeig mal deinen request Befehl

                                      Glasfaser 2 Replies Last reply Reply Quote 0
                                      • Glasfaser
                                        Glasfaser @Knallochse last edited by Glasfaser

                                        @Knallochse

                                        http://192.168.178.11:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.ExternalEvent&method="Trigger"&version=1&eventId=2&eventName="This is external event2"&account="{account}"&password="{password}"
                                        

                                        ssssssssssssssssssss.JPG

                                        scha.JPG

                                        1 Reply Last reply Reply Quote 0
                                        • Glasfaser
                                          Glasfaser @Knallochse last edited by

                                          @Knallochse

                                          Top es funktioniert 👍
                                          Danke dafür !!!!

                                          Sehr peinlich ..
                                          Mein Fehler war das ich eine Aktionsregel genommen habe, die ich ausversehen durch die Testerei deaktiviert hatte .😎

                                          Knallochse 1 Reply Last reply Reply Quote 0
                                          • Knallochse
                                            Knallochse @Glasfaser last edited by

                                            @Glasfaser kein Problem. Viel Spaß weiterhin 👍

                                            W 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

                                            757
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

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