Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. [Neuer Adapter] nextcloud talk messenger

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [Neuer Adapter] nextcloud talk messenger

    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      johen @hydrotec last edited by johen

      @hydrotec / all

      es gibt ein neues Release 0.3.0, welche das File Sharing ermöglicht.
      Im log darauf achten, dass nctalkclient 1.4.0 verwendet wird: "nctalk.0 2022-01-07 14:46:06.456 info Debug Event START nctalkclient 1.4.0"

      Es gibt zwei neue Parameter zu konfigurieren - der Upload-Pfad und ob bereits vorhandene Dateien überschrieben werden dürfen
      4ae8692e-2645-446a-8afc-582b2a56e41d-grafik.png

      und es sind drei neue iobroker Objekte im Unterverzeichnis "ShareFile" hinzugekommen
      3a2b2d9e-7276-43d7-9da5-b45dc77f22cf-grafik.png

      Beispiel NextcloudPath - hier muss die Datei bereits in nextcloud hochgeladen und verfügbar sein
      Setze Wert auf: /talk/existingfile.jpg

      Beispiel für ...ShareFile.URL
      Setze Wert auf: {"filename": "webupload.png", "url": "https://raw.githubusercontent.com/jjqoie/iobroker.nctalk/main/img/nctalk-objects.png"}

      Das Datenformat für "UploadShareObj" schaut wie folgt aus: {'filename':'tests123.png','data':{'type':'Buffer','data':[137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,11,64,0,0,7,8,8,6,0,0,0,175,....}
      Beispiel für "UploadShareObj" zusammen mit dem javascript adapter

      var https = require("https");
      
      var options = {
          host: 'raw.githubusercontent.com',
          port: 443,
          path: '/jjqoie/iobroker.nctalk/main/img/nctalk-objects.png',
          method: 'GET',
      };
      
      
      https.get(options, function(res) {
          res.setEncoding('binary');
          let chunks = [];
      
          res.on('data', (chunk) => {
              chunks.push(Buffer.from(chunk, 'binary'));
          });
      
          res.on('end', () => {
              let binary = Buffer.concat(chunks);
              // binary is now a Buffer that can be used as Uint8Array or as
              // any other TypedArray for data processing in NodeJS or 
              // passed on via the Buffer to something else.
              //console.log(JSON.stringify(binary));
              //require("fs").writeFile("test.jpg", binary, () => {
              //});
              const imgNextcloud = {
                  filename: "tests123.png",
                  data: binary
              }
              setState("nctalk.0.kjf53yuu.ShareFile.UploadShareObj", imgNextcloud);
          });
      });
      

      PS: Der Upload Ordner ist notwendig, da bei Talk nur Dateien/Bilder, welche sich bereits in Nextcloud befinden geteilt/angezeigt werden können und der Adapter diese vorher per webdav in diesen Ordner hochlädt.

      hydrotec 1 Reply Last reply Reply Quote 0
      • hydrotec
        hydrotec @johen last edited by

        @johen

        Hallo Jochen,

        jetzt hast du mich etwas abgehängt.

        Wenn ich bei den Einstellungen den UploadPath eintrage, wird er in Nextcloud angelegt.
        Der Einfachheit hab ich "/Talk" (ist auf Nextcloud schon vorhanden) eingetragen.
        Wenn ich von Benutzer "karsten" über das mobile ein Bild an Benutzer "iobroker" versende,
        wird es vom Adapter korrekt erkannt. (denke ich mal so 😉 )
        nextcloud_talk_20.png

        Doch mit dem Senden eines Bildes von "iobroker" an "karsten" komme ich nicht ganz mit.
        Sorry bin mit javascript noch nicht so fit. 😕
        Angenommen ich habe folgendes file "/opt/iobroker/iobroker-data/tmp/dafang01/dafang01.jpg"
        Wohin muss ich das uploaden, bzw. wie kann ich das versenden?

        Gruß, Karsten

        J 1 Reply Last reply Reply Quote 0
        • J
          johen @hydrotec last edited by

          @hydrotec
          ...ShareFile.URL funktioniert nur für alles was direkt via http/https Zugriff erreichbar ist.

          Ok verstehe dein Usecase, die Datei befindet sich lokal auf der Festplatte.
          Hierzu muss das Beispiel Script für "UploadShareObj" angepasst werden, so dass der Dateiinhalt (byte für byte) nicht von einem https Zugriff in den Abreitsspeicher kommt und dann an UploadShareObj übergeben wird, sondern über ein fs.readfile("/opt/iobroker/iobroker-data/tmp/dafang01/dafang01.jpg", null); encoding müsste null sein um ein Buffer Typ zu bekommen (habs aber nicht getestet) https://nodejs.dev/learn/reading-files-with-nodejs

          hydrotec 1 Reply Last reply Reply Quote 0
          • hydrotec
            hydrotec @johen last edited by

            @johen

            Dankeschön für die schnelle Rückmeldung. 👍

            Werde mir das im Laufe des Wochenendes noch einmal genauer ansehen.

            Angenehmes Wochende
            Gruß, Karsten

            J 1 Reply Last reply Reply Quote 0
            • J
              johen @hydrotec last edited by johen

              @hydrotec

              habs mal schnell probiert bei mir hats funktioniert...
              Werde diese Funktion noch direkt mit in den Adapter aufnehmen und ein weiteres iobroker Objekt hierfür anlegen...

              var fs = require("fs");
              
              fs.readFile("/opt/iobroker/iobroker-data/tmp/dafang01/dafang01.png", null , (err, data) => {
                if (err) {
                  console.error(err)
                  return
                }
              
                  const fileNextcloud = {
                      filename: "tests123.png",
                      data: data
                  }
                  //console.log(fileNextcloud)
                  setState("nctalk.0.kjf53yuu.ShareFile.UploadShareObj", fileNextcloud);
              })
              

              PS: Das Datenformat für "UploadShareObj" schaut wie folgt aus: {'filename':'tests123.png','data':{'type':'Buffer','data':[137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,11,64,0,0,7,8,8,6,0,0,0,175,....}

              hydrotec 1 Reply Last reply Reply Quote 2
              • hydrotec
                hydrotec @johen last edited by

                @johen

                Nach ein paar Versuchen funktioniert der Versand eines Bildes.

                const fs = require('fs');
                
                fs.readFile('/opt/iobroker/iobroker-data/tmp/dafang01/dafang01.jpg', (err, data) => {
                  if (err) {
                    console.error(err)
                    return
                  }
                  const fileNextcloud = {
                      filename: "dafang01.jpg",
                      data: data
                  }
                  //console.log(fileNextcloud)
                  setState('nctalk.0.karsten.ShareFile.UploadShareObj', fileNextcloud);
                })
                

                Was mir aufgefallen ist, das das Vorschaubild in der Talk-App nicht aktualisiert wird.
                Erst wenn ich die App neu starte.
                Denke mal das es eher an der App und nicht am Adapter liegt.

                Werde diese Funktion noch direkt mit in den Adapter aufnehmen und ein weiteres iobroker Objekt hierfür anlegen...

                Für mich, als js-noob, wäre das echt hilfreich. 👍

                Gruß, Karsten

                J 1 Reply Last reply Reply Quote 0
                • J
                  johen @hydrotec last edited by

                  @hydrotec
                  Eine Frage hätte ich - hab gesehen dafang ist eine Webcam - wie kommt hier der Schnappschuss auf die lokale Platte ?

                  hydrotec 1 Reply Last reply Reply Quote 0
                  • hydrotec
                    hydrotec @johen last edited by

                    @johen

                    Bei mir mit blockly
                    nextcloud_talk_21.png

                    wget --quiet --output-document /opt/iobroker/iobroker-data/tmp/dafang01/dafang01.jpg --user <username> --password <password> https://192.168.XXX.XXX/cgi-bin/currentpic.cgi --no-check-certificate
                    
                    J 1 Reply Last reply Reply Quote 0
                    • J
                      johen @hydrotec last edited by johen

                      @hydrotec

                      das könntest du auch direkt über ShareFile.URL machen
                      {"filename": "snapshot.jpg", "url": "https://username:password@192.168.XXX.XXX/cgi-bin/currentpic.cgi"}
                      da snapshot.jpg nun immer gleich ist, wird dies in nextcloud immer überschrieben und dir geht die Historie verloren.
                      Hier könntest du ein script schreiben, welches ein Zähler oder das Datum/Uhrzeit an "filename" mit anhängt und so hast du automatisch ein Archiv.

                      -cs- hydrotec 3 Replies Last reply Reply Quote 0
                      • -cs-
                        -cs- @johen last edited by

                        @johen
                        Super was Ihr hier macht.

                        Ich hatte am WE auch mehrmals versucht einfache Texte zu senden.
                        Wie aktuell auch verschiedenes z.B. Waschmaschine/Trockner fertig, Licht ist noch an usw..
                        Also nichts großes, aber sobald ich den Adapter an habe, wird meine Nextcloud auf hosting.de total ausgebremst, alles lädt sehr verlangsamt, auch Zugriffe auf andere Bereiche innerhalb der Nextcloud. Die App braucht ewig, bis alles geladen ist. Texte kommen sehr zeitverzögert im Bereich ca. 5 - 60 sec..

                        Habe da die 500er Version bei hosting. Dachte mir mit kurzen Befehlen usw. kann doch Talk nicht die ganze Cloud ausbremsen. Ok, wenn hier mit allen 6 Benutzern viel los währ bestimmt, aber ich hatte ja nur vom ioBroker- Benutzer zu mir gesendet/empfangen. Also nur 2 Benutzer, welche Talk benutzen.

                        Sobald ich den Adapter im ioBroker ausschaltete, lief die Cloud wieder wie am Schnürchen ohne zu haken.

                        Also für eine Managed Nextcloud bei z.B. Hosting nichts? 😧

                        FredF 1 Reply Last reply Reply Quote 0
                        • FredF
                          FredF Most Active Forum Testing @-cs- last edited by

                          @csr Ich lese hier aus Interesse das auch mal zu nutzen mit. Die Managed Nextcloud kannte ich noch nicht, danke dafür.
                          Evtl. Liegt dein Problem an dieser Fussnote:
                          1274f235-81b0-4b73-b444-b3af68690c6a-grafik.png

                          -cs- 2 Replies Last reply Reply Quote 0
                          • -cs-
                            -cs- @FredF last edited by -cs-

                            @fredf ja, diese Fußnote kenne ich.

                            Talk funktioniert ja selbst mit 6 Benutzern einwandfrei. Im Familienchat kein Problem, nur wenn der Adapter hinzugeschaltet wird, wird alles ausgebremst.
                            Somit ist die Nutzung von Talk kein Problem, nur in Verbindung mit dem Adapter.

                            J 1 Reply Last reply Reply Quote 0
                            • hydrotec
                              hydrotec @johen last edited by hydrotec

                              @johen sagte in [Neuer Adapter] nextcloud talk messenger:

                              @hydrotec

                              das könntest du auch direkt über ShareFile.URL machen
                              {"filename": "snapshot.jpg", "url": "https://username:password@192.168.XXX.XXX/cgi-bin/currentpic.cgi"}

                              Funktioniert so leider nicht.

                              {"filename": "snapshot.jpg", "url": "https://<username>:<password>@192.168.XXX.XXX/cgi-bin/currentpic.cgi"}
                              

                              2022-01-10 14:11:02.155 - info: nctalk.0 (26650) starting. Version 0.3.0 in /opt/iobroker/node_modules/iobroker.nctalk, node: v14.18.2, js-controller: 3.3.22
                              2022-01-10 14:11:02.171 - info: nctalk.0 (26650) CreateUploadPathIfnotExist /Talk
                              2022-01-10 14:11:02.689 - info: nctalk.0 (26650) Debug Event START nctalkclient 1.4.0
                              2022-01-10 14:11:02.690 - info: nctalk.0 (26650) Debug Event Get capabilities
                              2022-01-10 14:11:03.285 - info: nctalk.0 (26650) Debug Event {"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK","totalitems":"","itemsperpage":""},"data":{"version":{"major":22,"minor":2,"micro":3,"string":"22.2.3 Enterprise","edition":"","extendedSupport":false},"capabilities":{"core":{"pollinterval":60,"webdav-root":"remote.php\/webdav"},"bruteforce":{"delay":0},"files":{"bigfilechunking":true,"blacklisted_files":[".htaccess"],"directEditing":{"url":"https:\/\/my.domain.name\/ocs\/v2.php\/apps\/files\/api\/v1\/directEditing","etag":"f04030fc05cebbb2ab8b98f195a370b9"},"comments":true,"undelete":true,"versioning":true},"activity":{"apiv2":["filters","filters-api","previews","rich-strings"]},"circles":{"version":"22.1.1","status":{"globalScale":false},"settings":{"frontendEnabled":true,"allowedCircles":131071,"allowedUserTypes":31,"membersLimit":-1},"circle":{"constants":{"flags":{"1":"Einzeln","2":"Pers\u00f6nlich","4":"System","8":"Sichtbar","16":"Offen","32":"Einladen","64":"Betrittsanfrage","128":"Freunde","256":"Passwortgesch\u00fctzt","512":"Kein Besitzer","1024":"Versteckt","2048":"Backend","4096":"Lokal","8192":"Root","16384":"Einladung zu Kreis","32768":"Federated","65536":"Einh\u00e4ngepunkt"},"source":{"core":{"1":"Nextcloud-Benutzer","2":"Nextcloud-Gruppe","4":"E-Mail-Adresse","8":"Kontakt","16":"Kreis","10000":"Nextcloud-App"},"extra":{"10001":"Circles App","10002":"Admin Command Line"}}},"config":{"coreFlags":[1,2,4],"systemFlags":[512,1024,2048]}},"member":{"constants":{"level":{"1":"Mitglied","4":"Moderator","8":"Administrator","9":"Eigent\u00fcmer"}},"type":{"0":"single","1":"user","2":"group","4":"mail","8":"contact","16":"circle","10000":"app"}}},"ocm":{"enabled":true,"apiVersion":"1.0-proposal1","endPoint":"https:\/\/my.domain.name\/index.php\/ocm","resourceTypes":[{"name":"file","shareTypes":["user","group"],"protocols":{"webdav":"\/public.php\/webdav\/"}}]},"dav":{"chunking":"1.0"},"deck":{"version":"1.5.5","canCreateBoards":true,"apiVersions":["1.0","1.1"]},"notes":{"api_version":["0.2","1.2"],"version":"4.2.0"},"notifications":{"ocs-endpoints":["list","get","delete","delete-all","icons","rich-strings","action-web","user-status"],"push":["devices","object-data","delete"],"admin-notifications":["ocs","cli"]},"password_policy":{"minLength":10,"enforceNonCommonPassword":true,"enforceNumericCharacters":false,"enforceSpecialCharacters":false,"enforceUpperLowerCase":false,"api":{"generate":"https:\/\/my.domain.name\/ocs\/v2.php\/apps\/password_policy\/api\/v1\/generate","validate":"https:\/\/my.domain.name\/ocs\/v2.php\/apps\/password_policy\/api\/v1\/validate"}},"provisioning_api":{"version":"1.12.0","AccountPropertyScopesVersion":2,"AccountPropertyScopesFederationEnabled":true},"quicknotes":{"version":"0.7.3","api_version":"1.0"},"files_sharing":{"sharebymail":{"enabled":true,"send_password_by_mail":true,"upload_files_drop":{"enabled":true},"password":{"enabled":true,"enforced":true},"expire_date":{"enabled":true,"enforced":false}},"api_enabled":true,"public":{"enabled":true,"password":{"enforced":true,"askForOptionalPassword":false},"expire_date":{"enabled":true,"days":7,"enforced":false},"multiple_links":true,"expire_date_internal":{"enabled":true,"days":7,"enforced":false},"expire_date_remote":{"enabled":false},"send_mail":false,"upload":true,"upload_files_drop":true},"resharing":true,"user":{"send_mail":false,"expire_date":{"enabled":true}},"group_sharing":true,"group":{"enabled":true,"expire_date":{"enabled":true}},"default_permissions":31,"federation":{"outgoing":true,"incoming":true,"expire_date":{"enabled":true},"expire_date_supported":{"enabled":true}},"sharee":{"query_lookup_default":false,"always_show_unique":true}},"spreed":{"features":["audio","video","chat-v2","conversation-v4","guest-signaling","empty-group-room","guest-display-names","multi-room-users","favorites","last-room-activity","no-ping","system-messages","delete-messages","mention-flag","in-call-flags","conversation-call-flags","notification-levels","invite-groups-and-mails","locked-one-to-one-rooms","read-only-rooms","listable-rooms","chat-read-marker","webinary-lobby","start-call-flag","chat-replies","circles-support","force-mute","sip-support","chat-read-status","phonebook-search","raise-hand","room-description","rich-object-sharing","temp-user-avatar-api","geo-location-sharing","voice-message-sharing","signaling-v3","publishing-permissions","clear-history","chat-reference-id"],"config":{"attachments":{"allowed":true,"folder":"\/Talk"},"chat":{"max-length":32000,"read-privacy":0},"conversations":{"can-create":true},"previews":{"max-gif-size":3145728}}},"theming":{"name":"NextCloud","url":"https:\/\/www.ionos.de","slogan":"","color":"#808080","color-text":"#ffffff","color-element":"#808080","color-element-bright":"#808080","color-element-dark":"#808080","logo":"https:\/\/my.domain.name\/index.php\/apps\/theming\/image\/logo?useSvg=1&v=20","background":"https:\/\/my.domain.name\/index.php\/apps\/theming\/image\/background?v=20","background-plain":false,"background-default":false,"logoheader":"https:\/\/my.domain.name\/index.php\/apps\/theming\/image\/logo?useSvg=1&v=20","favicon":"https:\/\/my.domain.name\/index.php\/apps\/theming\/image\/logo?useSvg=1&v=20"},"user_status":{"enabled":true,"supports_emoji":true},"weather_status":{"enabled":true}}}}}
                              2022-01-10 14:11:03.286 - info: nctalk.0 (26650) Debug Event Get capabilities done
                              2022-01-10 14:11:03.286 - info: nctalk.0 (26650) Debug Event Get Rooms
                              2022-01-10 14:11:04.061 - info: nctalk.0 (26650) Debug Event {"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":[{"id":11,"token":"iobroker","type":4,"name":"iobroker","displayName":"Talk Aktualisierungen \u2705","objectType":"","objectId":"","participantType":3,"participantFlags":0,"readOnly":1,"hasPassword":false,"hasCall":false,"canStartCall":true,"lastActivity":1639898217,"lastReadMessage":712,"unreadMessages":0,"unreadMention":false,"isFavorite":false,"canLeaveConversation":true,"canDeleteConversation":false,"notificationLevel":2,"lobbyState":0,"lobbyTimer":0,"lastPing":0,"sessionId":"0","lastMessage":{"id":712,"token":"iobroker","actorType":"bots","actorId":"changelog","actorDisplayName":"Talk Aktualisierungen \u2705","timestamp":1639898216,"message":"- F\u00fcge Gruppen zu einer Unterhaltung hinzu und die Gruppenmitglieder werden automatisch als Teilnehmer hinzugef\u00fcgt","messageParameters":[],"systemMessage":"","messageType":"comment","isReplyable":false,"referenceId":""},"sipEnabled":0,"actorType":"users","actorId":"iobroker","attendeeId":12,"publishingPermissions":7,"canEnableSIP":false,"attendeePin":"","description":"","lastCommonReadMessage":712,"listable":0,"callFlag":0},{"id":12,"token":"karsten","type":1,"name":"karsten","displayName":"Karsten","objectType":"","objectId":"","participantType":1,"participantFlags":0,"readOnly":0,"hasPassword":false,"hasCall":false,"canStartCall":true,"lastActivity":1641820060,"lastReadMessage":885,"unreadMessages":0,"unreadMention":false,"isFavorite":false,"canLeaveConversation":true,"canDeleteConversation":false,"notificationLevel":1,"lobbyState":0,"lobbyTimer":0,"lastPing":0,"sessionId":"0","lastMessage":{"id":885,"token":"karsten","actorType":"users","actorId":"iobroker","actorDisplayName":"ioBroker","timestamp":1641820058,"message":"{file}","messageParameters":{"actor":{"type":"user","id":"iobroker","name":"ioBroker"},"file":{"type":"file","id":"39909","name":"dafang01.jpg","size":159317,"path":"Talk\/dafang01.jpg","link":"https:\/\/my.domain.name\/index.php\/f\/39909","mimetype":"image\/jpeg","preview-available":"yes"}},"systemMessage":"","messageType":"comment","isReplyable":true,"referenceId":""},"sipEnabled":0,"actorType":"users","actorId":"iobroker","attendeeId":14,"publishingPermissions":7,"canEnableSIP":false,"attendeePin":"","description":"","lastCommonReadMessage":885,"listable":0,"callFlag":0}]}}
                              2022-01-10 14:11:04.062 - info: nctalk.0 (26650) Talk client is ready and has fetched capabilities and room information
                              2022-01-10 14:11:04.071 - info: nctalk.0 (26650) Debug Event Get rooms done
                              2022-01-10 14:11:04.071 - info: nctalk.0 (26650) Debug Event WaitNewMessages IN iobroker
                              2022-01-10 14:11:04.072 - info: nctalk.0 (26650) Debug Event WaitNewMessages IN karsten
                              2022-01-10 14:11:18.012 - error: nctalk.0 (26650) UploadFileFromURL failed, snapshot.jpg, https://<username>:<password>@192.168.78.86/cgi-bin/currentpic.cgi
                              2022-01-10 14:11:34.701 - info: nctalk.0 (26650) Debug Event WaitNewMessages OUT karsten true
                              2022-01-10 14:11:34.702 - info: nctalk.0 (26650) Debug Event{"statusCode":304,"headers":{"connection":"close","date":"Mon, 10 Jan 2022 13:11:34 GMT","expires":"Thu, 19 Nov 1981 08:52:00 GMT","pragma":"no-cache","set-cookie":["oc_sessionPassphrase=XXXCz3xygW2IZjmqoZLUX7wQ3LyOiOfGWhMMwO5JXbjJHx2JxOKNF7yXXX%XXXorp1xtAXkQDA%2FBumGhaSl7JCkHB0VOFetZLysQkRjgGsHrpJgitvS4Ac8N8w34QKFXXX; path=/; secure; HttpOnly; SameSite=Lax","__Host-nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax","__Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict","XXXpb7ado4h5=ebcbd08cf9ffc059ba9142ca41a77XXX; path=/; secure; HttpOnly; SameSite=Lax","cookie_test=test; expires=Mon, 10-Jan-2022 14:11:04 GMT; Max-Age=3600"],"cache-control":"no-cache, no-store, must-revalidate","content-security-policy":"default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'","feature-policy":"autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'","x-robots-tag":"none, none","referrer-policy":"no-referrer","x-content-type-options":"nosniff","x-download-options":"noopen","x-frame-options":"SAMEORIGIN","x-permitted-cross-domain-policies":"none","x-xss-protection":"1; mode=block","strict-transport-security":"max-age=15724800; includeSubDomains"},"body":""}
                              2022-01-10 14:11:34.702 - info: nctalk.0 (26650) Debug Event WaitNewMessages - Talk timeout empty reply after no new message was received
                              2022-01-10 14:11:34.702 - info: nctalk.0 (26650) Debug Event WaitNewMessages done
                              2022-01-10 14:11:34.703 - info: nctalk.0 (26650) Debug Event WaitNewMessages IN karsten
                              2022-01-10 14:11:34.707 - info: nctalk.0 (26650) Debug Event WaitNewMessages OUT iobroker true
                              

                              Kann es sein, das es am selbstsignierten Zertifikat der WebCam liegt?


                              EDIT 11.01.2022
                              Hat sich erledigt. (siehe hier)



                              @csr sagte in [Neuer Adapter] nextcloud talk messenger:

                              ...
                              Somit ist die Nutzung von Talk kein Problem, nur in Verbindung mit dem Adapter.

                              Nextcloud Talk braucht extrem viele Ressourcen.
                              Vermutlich wird dein hostet Nextcloud mit 6 Benutzern gerade so noch flüssig laufen.
                              Zum vergleichen.
                              Den verwende ich ionos nextcloud

                              {
                               "ocs": {
                                 "meta": {
                                   "status": "ok",
                                   "statuscode": 200,
                                   "message": "OK"
                                 },
                                 "data": {
                                   "nextcloud": {
                                     "system": {
                                       "version": "22.2.3.1",
                                       "theme": "none",
                                       "enable_avatars": "yes",
                                       "enable_previews": "yes",
                                       "memcache.local": "\\OC\\Memcache\\APCu",
                                       "memcache.distributed": "\\OC\\Memcache\\Redis",
                                       "filelocking.enabled": "yes",
                                       "memcache.locking": "\\OC\\Memcache\\Redis",
                                       "debug": "no",
                                       "freespace": null,
                                       "cpuload": [
                                         0.7734375,
                                         0.64990234375,
                                         0.7138671875
                                       ],
                                       "mem_total": 20384788,
                                       "mem_free": 15667888,
                                       "swap_total": 0,
                                       "swap_free": 0,
                                       "apps": {
                                         "num_installed": 59,
                                         "num_updates_available": 2,
                                         "app_updates": {
                                           "appointments": "1.11.10",
                                           "notes": "4.3.0"
                                         }
                                       }
                                     },
                                     "storage": {
                                       "num_users": 11,
                                       "num_files": 32946,
                                       "num_storages": 13,
                                       "num_storages_local": 0,
                                       "num_storages_home": 0,
                                       "num_storages_other": 13
                                     },
                                     "shares": {
                                       "num_shares": 22,
                                       "num_shares_user": 0,
                                       "num_shares_groups": 0,
                                       "num_shares_link": 0,
                                       "num_shares_mail": 0,
                                       "num_shares_room": 11,
                                       "num_shares_link_no_password": 0,
                                       "num_fed_shares_sent": 0,
                                       "num_fed_shares_received": 0,
                                       "permissions_11_0": "1",
                                       "permissions_10_19": "11",
                                       "permissions_11_19": "10"
                                     }
                                   },
                                   "server": {
                                     "webserver": "nginx\/1.21.1",
                                     "php": {
                                       "version": "8.0.12",
                                       "memory_limit": 536870912,
                                       "max_execution_time": 3600,
                                       "upload_max_filesize": 17179869184,
                                       "opcache": {
                                         "opcache_enabled": true,
                                         "cache_full": false,
                                         "restart_pending": false,
                                         "restart_in_progress": false,
                                         "memory_usage": {
                                           "used_memory": 52910408,
                                           "free_memory": 78375032,
                                           "wasted_memory": 2932288,
                                           "current_wasted_percentage": 2.184724807739258
                                         },
                                         "interned_strings_usage": {
                                           "buffer_size": 6291008,
                                           "used_memory": 6291008,
                                           "free_memory": 0,
                                           "number_of_strings": 102582
                                         },
                                         "opcache_statistics": {
                                           "num_cached_scripts": 2867,
                                           "num_cached_keys": 5418,
                                           "max_cached_keys": 16229,
                                           "hits": 637452821,
                                           "start_time": 1639528931,
                                           "last_restart_time": 0,
                                           "oom_restarts": 0,
                                           "hash_restarts": 0,
                                           "manual_restarts": 0,
                                           "misses": 4065,
                                           "blacklist_misses": 0,
                                           "blacklist_miss_ratio": 0,
                                           "opcache_hit_rate": 99.99936230981432
                                         },
                                         "jit": {
                                           "enabled": false,
                                           "on": false,
                                           "kind": 5,
                                           "opt_level": 4,
                                           "opt_flags": 6,
                                           "buffer_size": 0,
                                           "buffer_free": 0
                                         }
                                       },
                                       "apcu": {
                                         "cache": {
                                           "num_slots": 4099,
                                           "ttl": 0,
                                           "num_hits": 43161790,
                                           "num_misses": 296682,
                                           "num_inserts": 296687,
                                           "num_entries": 2702,
                                           "expunges": 0,
                                           "start_time": 1639528931,
                                           "mem_size": 2607176,
                                           "memory_type": "mmap"
                                         },
                                         "sma": {
                                           "num_seg": 1,
                                           "seg_size": 33554312,
                                           "avail_mem": 30820616
                                         }
                                       }
                                     },
                                     "database": {
                                       "type": "mysql",
                                       "version": "10.5.12",
                                       "size": "35979264"
                                     }
                                   },
                                   "activeUsers": {
                                     "last5minutes": 5,
                                     "last1hour": 5,
                                     "last24hours": 6
                                   }
                                 }
                               }
                              }
                              

                              Gruß, Karsten

                              -cs- 1 Reply Last reply Reply Quote 0
                              • -cs-
                                -cs- @hydrotec last edited by -cs-

                                @hydrotec sagte in [Neuer Adapter] nextcloud talk messenger:

                                Nextcloud Talk braucht extrem viele Ressourcen.
                                Vermutlich wird dein hostet Nextcloud mit 6 Benutzern gerade so noch flüssig laufen.

                                Nur war bei dem Test keiner der anderen Aktiv.

                                Es waren immer nur ich und der Adapter (iobroker- Benutzer aktiv) als ich testete.

                                Welche nutzt Du 500 oder lese ich das falsch?

                                hydrotec 2 Replies Last reply Reply Quote 0
                                • hydrotec
                                  hydrotec @-cs- last edited by

                                  @csr sagte in [Neuer Adapter] nextcloud talk messenger:

                                  Nur war bei dem Test keiner der anderen Aktiv.

                                  Es waren immer nur ich und der Adapter (iobroker- Benutzer aktiv) als ich testete.

                                  Talk wird im Hintergrund für alle Benutzer aktiv gehalten.
                                  (kann ja sein das der dritte Benutzer sich auch die App installiert)

                                  1 Reply Last reply Reply Quote 0
                                  • hydrotec
                                    hydrotec @-cs- last edited by

                                    @csr sagte in [Neuer Adapter] nextcloud talk messenger:

                                    Welche nutzt Du 500 oder lese ich das falsch?

                                    1000 GB für 9€/Mon.

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      johen @-cs- last edited by johen

                                      @csr
                                      Wenn ich heute Abend am PC bin schick ich zu diesem Thema mal ein paar Hintergrund Infos - soviel vorweg der Adapter erzeugt nicht viel Traffic pro Chatraum 2 http request pro min - der Traffic ist wirklich gering und es liegt an der API welche ein sog "long polling request" für den server darstellt. Ich bin auch am überlegen eine Alternativ Polling Option auf Client Seite umzusetzen was mit mehr Requests (EDIT: traffic wird weiterhin klein sein denke so etwa 1KB pro Anfrage) und die Reaktionszeit auf neue Nachrichten evtl. leicht erhöht, da dann nun nur alle N ms auf neue Nachrichten geprüft wird aber dafür wird der API call auf Server Seite sofort quittiert… Bin grad auf einen anderen Ansatz gestoßen... Falls jemand zufällig Entwickler für nextcloud ist, gerne direkt PN an mich 🙂
                                      Denke für die meisten sind diese Details nicht wirklich relevant...

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        johen @johen last edited by johen

                                        Seh gerade hatte dazu schon was geschrieben...

                                        @johen said in [Neuer Adapter] nextcloud talk messenger:

                                        An alle die Performance Probleme (stark verlängerte Reaktionszeiten bis zu 30sec) mit Ihrer Nextcloud Instance sehen, sollten unbedingt ihre FPM Einstellungen prüfen, vor allem wenn die offizielle docker compose Installation mit NGINX (https://github.com/nextcloud/docker) verwendet wurde. Hier sind die Standardeinstellungen für max_children gleich 5, was für Talk zu wenig ist.

                                        Im fpm_app container ist die Config hier zu finden. Bitte beachten, dass mit der Config unten auch mal 8GB RAM benötigt wird vor allem beim Bilder anschauen.
                                        /usr/local/etc/php-fpm.d/www.conf

                                        pm = dynamic
                                        pm.max_children = 32
                                        pm.start_servers = 12
                                        pm.min_spare_servers = 8
                                        pm.max_spare_servers = 16
                                        pm.max_requests = 1000

                                        Weiterführende Links:
                                        https://www.technik-blog.eu/2018/08/php-fpm-einstellungen-optimieren.html
                                        https://www.kinamo.be/en/support/faq/determining-the-correct-number-of-child-processes-for-php-fpm-on-nginx
                                        https://help.nextcloud.com/t/nextcloudpi-and-talk-configuration-incompatible/79469

                                        https://nextcloud-talk.readthedocs.io/en/latest/system-requirements/#webserver
                                        https://github.com/nextcloud/spreed/issues/6738

                                        jjqoie created this issue in nextcloud/spreed

                                        closed Multiple polling of new messages API calls slows down the whole nextcloud instance #6738

                                        1 Reply Last reply Reply Quote 0
                                        • hydrotec
                                          hydrotec @johen last edited by

                                          @johen

                                          @hydrotec sagte in [Neuer Adapter] nextcloud talk messenger:

                                          @johen sagte in [Neuer Adapter] nextcloud talk messenger:

                                          @hydrotec

                                          das könntest du auch direkt über ShareFile.URL machen
                                          {"filename": "snapshot.jpg", "url": "https://username:password@192.168.XXX.XXX/cgi-bin/currentpic.cgi"}

                                          Funktioniert so leider nicht.

                                          {"filename": "snapshot.jpg", "url": "https://<username>:<password>@192.168.XXX.XXX/cgi-bin/currentpic.cgi"}
                                          

                                          Nach kurzem Hinweis von Jochen (Danke nochmal), funktioniert es jetzt auch bei mir.
                                          Da war ich etwas zu schnell mit dem Adapter Update auf v0.3.0 😉
                                          Gerade das Update noch einmal eingespielt, und jetzt läuft es wie gewünscht.

                                          Kleines funktionierendes Beispiel.
                                          (Bilderserie von 5 screenshots der WebCam)
                                          nextcloud_talk_22.png

                                          <xml xmlns="https://developers.google.com/blockly/xml">
                                           <variables>
                                             <variable id="qP[NdaL~smM}UnW:#!z)">counter</variable>
                                             <variable type="interval" id="Intervall">Intervall</variable>
                                           </variables>
                                           <block type="variables_set" id="Ixqk@u%J17jK0][wZH?i" x="238" y="-63">
                                             <field name="VAR" id="qP[NdaL~smM}UnW:#!z)">counter</field>
                                             <value name="VALUE">
                                               <block type="math_number" id="H}TJ/.2[{8})um69O!63">
                                                 <field name="NUM">0</field>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="on" id="h)gn)T@5Zc@w!AJN%ke}">
                                                 <field name="OID">mqtt.1.zigbee2mqtt.xi_sensor_contact_01.contact</field>
                                                 <field name="CONDITION">ne</field>
                                                 <field name="ACK_CONDITION"></field>
                                                 <statement name="STATEMENT">
                                                   <block type="controls_if" id="ciCsZieaNY{O|A|kJ3mM">
                                                     <value name="IF0">
                                                       <block type="logic_operation" id="*gbLhDLk]r]Bv9L,EIxl" inline="false">
                                                         <field name="OP">AND</field>
                                                         <value name="A">
                                                           <block type="logic_negate" id="DeAFIFFV5^bHfHT.GX_.">
                                                             <value name="BOOL">
                                                               <block type="on_source" id="s}!}cj}7u0X[yufic[_h">
                                                                 <field name="ATTR">state.val</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <value name="B">
                                                           <block type="logic_compare" id="MT]zgLN82%v$UE5gCxY{">
                                                             <field name="OP">EQ</field>
                                                             <value name="A">
                                                               <block type="get_value" id="h!yKQb8aZ*6n^ZK;IAW!">
                                                                 <field name="ATTR">val</field>
                                                                 <field name="OID">0_userdata.0.general.presence.MyPhone11Pro.presence</field>
                                                               </block>
                                                             </value>
                                                             <value name="B">
                                                               <block type="logic_boolean" id="@FYlcJ!P9-/XJerc(RB?">
                                                                 <field name="BOOL">FALSE</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <statement name="DO0">
                                                       <block type="timeouts_setinterval" id=":rzT#K~T%DJZ=7:_JST0">
                                                         <field name="NAME">Intervall</field>
                                                         <field name="INTERVAL">2000</field>
                                                         <field name="UNIT">ms</field>
                                                         <statement name="STATEMENT">
                                                           <block type="math_change" id="P~:xo}[YOAs0CSAqSU}8">
                                                             <field name="VAR" id="qP[NdaL~smM}UnW:#!z)">counter</field>
                                                             <value name="DELTA">
                                                               <shadow type="math_number" id="wHvlFh-(//zcSlQAzAOg">
                                                                 <field name="NUM">1</field>
                                                               </shadow>
                                                             </value>
                                                             <next>
                                                               <block type="controls_if" id="-uv[,~#6i2OojNW.Uk(X">
                                                                 <mutation else="1"></mutation>
                                                                 <value name="IF0">
                                                                   <block type="logic_operation" id="KwNhKTbmZy0BqRv{b+*8" inline="false">
                                                                     <field name="OP">AND</field>
                                                                     <value name="A">
                                                                       <block type="logic_compare" id="]Ng2uSEIEXUJhP@/#1YR">
                                                                         <field name="OP">GTE</field>
                                                                         <value name="A">
                                                                           <block type="variables_get" id="r:,zTpWu)}]TotGM.I_|">
                                                                             <field name="VAR" id="qP[NdaL~smM}UnW:#!z)">counter</field>
                                                                           </block>
                                                                         </value>
                                                                         <value name="B">
                                                                           <block type="math_number" id="VI;U%[S6+)V!Ai~S91H.">
                                                                             <field name="NUM">1</field>
                                                                           </block>
                                                                         </value>
                                                                       </block>
                                                                     </value>
                                                                     <value name="B">
                                                                       <block type="logic_compare" id="h@O-A:V|n:|aZ[Rb%k^U">
                                                                         <field name="OP">LTE</field>
                                                                         <value name="A">
                                                                           <block type="variables_get" id=")=sfNwrS-l%}S]FEP:*a">
                                                                             <field name="VAR" id="qP[NdaL~smM}UnW:#!z)">counter</field>
                                                                           </block>
                                                                         </value>
                                                                         <value name="B">
                                                                           <block type="math_number" id="Ut3g]ht#W?WNM8p9tej3">
                                                                             <field name="NUM">5</field>
                                                                           </block>
                                                                         </value>
                                                                       </block>
                                                                     </value>
                                                                   </block>
                                                                 </value>
                                                                 <statement name="DO0">
                                                                   <block type="control" id=":-;wF7aRFa:}*7XvVxa?">
                                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                     <field name="OID">nctalk.0.karsten.ShareFile.URL</field>
                                                                     <field name="WITH_DELAY">FALSE</field>
                                                                     <value name="VALUE">
                                                                       <block type="text_join" id="dKNJFj%iYk%TVdShhlXj">
                                                                         <mutation items="3"></mutation>
                                                                         <value name="ADD0">
                                                                           <block type="text" id="P5$YGy,gj{T`kZDl50ey">
                                                                             <field name="TEXT">{"filename": "snapshot_0</field>
                                                                           </block>
                                                                         </value>
                                                                         <value name="ADD1">
                                                                           <block type="variables_get" id="=$,/FuG{drT*1|}o;jt?">
                                                                             <field name="VAR" id="qP[NdaL~smM}UnW:#!z)">counter</field>
                                                                           </block>
                                                                         </value>
                                                                         <value name="ADD2">
                                                                           <block type="text" id="n)])5NBu2,Tofudc`e+^">
                                                                             <field name="TEXT">.jpg", "url": "https://&lt;username&gt;:&lt;password&gt;@192.168.78.86/cgi-bin/currentpic.cgi"}</field>
                                                                           </block>
                                                                         </value>
                                                                       </block>
                                                                     </value>
                                                                   </block>
                                                                 </statement>
                                                                 <statement name="ELSE">
                                                                   <block type="timeouts_clearinterval" id="yk4{h*nNtC(+i?$W~eC+">
                                                                     <field name="NAME">Intervall</field>
                                                                   </block>
                                                                 </statement>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </statement>
                                                       </block>
                                                     </statement>
                                                   </block>
                                                 </statement>
                                               </block>
                                             </next>
                                           </block>
                                          </xml>
                                          

                                          Gruß, Karsten

                                          -cs- 1 Reply Last reply Reply Quote 0
                                          • hydrotec
                                            hydrotec last edited by

                                            @die werten Mitstreiter hier

                                            Wie habt ihr es gelöst, das man über die Talk-App auch Abfragen an ioBroker senden kann.
                                            Also eine Art "Menü".

                                            Ich hab das bis jetzt so gelöst, das ich mir die einzelnen Befehle, über die Eingabe von "Menü" im Chat auflisten lasse.
                                            (kann mir nicht alle merken, werde alt 😉 )
                                            So kann ich wenigstens die Befehle kopieren, und im Chat wieder einfügen.
                                            nextcloud_talk_23.png

                                            Würde mich über Anregungen, oder auch Kritik, freuen.
                                            Gruß, Karsten

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            797
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            adapter message nextcloud push push notifications talk
                                            8
                                            78
                                            7370
                                            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