Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Entwicklung
  4. Synology Chat ...

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    3.8k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.2k

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.5k

Synology Chat ...

Scheduled Pinned Locked Moved Entwicklung
chatsynologysynology diskstationadaptermessage handler
184 Posts 19 Posters 33.2k Views 16 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • GlasfaserG Glasfaser

    @ilovegym

    Ich habe mal was gebaut ... hänge aber noch daran , das er immer das alte Bild sendet, obwohl es aktualisiert wird .

    Vielleicht ein Grundbauststein:

    1.JPG

    <xml xmlns="https://developers.google.com/blockly/xml">
     <variables>
       <variable id="^RM=2sJ}E,A{F?bz`_me">URL_Chat</variable>
       <variable id="yW]q[i/Yfz.,5Z+Vb.a,">URL_ioBroker</variable>
       <variable id="u^a{RwAvq(*-0PK`(`@4">URL_Snapshot</variable>
       <variable id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</variable>
       <variable type="timeout" id="timeout">timeout</variable>
       <variable id=")2,KTR||]G~d7xyd!QUZ">send</variable>
       <variable type="timeout" id="timeout2">timeout2</variable>
       <variable id="s`TAk}2fZk|p^o$4+d@t">result</variable>
     </variables>
     <block type="variables_set" id="0jj@r*)y_VPw~)q+,3)N" x="163" y="188">
       <field name="VAR" id="^RM=2sJ}E,A{F?bz`_me">URL_Chat</field>
       <value name="VALUE">
         <block type="text" id="kB68_z,ak9jtsXj2XA[?">
           <field name="TEXT">http://xxxxxx.xxx.xxx.xx:5000/webapi/entry.cgi?api=SYNO.Chat.External&amp;method=incoming&amp;version=2&amp;token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;payload={"text":"</field>
         </block>
       </value>
       <next>
         <block type="variables_set" id="Q8SV]H7m2;RCEIl!I32S">
           <field name="VAR" id="yW]q[i/Yfz.,5Z+Vb.a,">URL_ioBroker</field>
           <value name="VALUE">
             <block type="text" id="Cw;l)b1L4K(P86t9=T}E">
               <field name="TEXT">http://xxxx.xxxx.xxx.xxx:8082/0_userdata.0/synology/bild.jpg</field>
             </block>
           </value>
           <next>
             <block type="variables_set" id="fT*7tvvXRtyOgN,6C,2?">
               <field name="VAR" id="u^a{RwAvq(*-0PK`(`@4">URL_Snapshot</field>
               <value name="VALUE">
                 <block type="get_value" id="Y$5X7J(i,Ijul8Pt3.]=">
                   <field name="ATTR">val</field>
                   <field name="OID">synology.0.SurveillanceStation.cameras.Haustür.linkSnapshot</field>
                 </block>
               </value>
               <next>
                 <block type="variables_set" id="m/`Hepc#d!=l=Yu?E{!6">
                   <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                   <value name="VALUE">
                     <block type="text" id="naz0gbDT{!MOKW]c|g8{">
                       <field name="TEXT">Es klingelt an der Haustuer</field>
                     </block>
                   </value>
                   <next>
                     <block type="on_ext" id="[.;w?/pK-.4zyW!UyYBl">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                       <field name="CONDITION">ne</field>
                       <field name="ACK_CONDITION"></field>
                       <value name="OID0">
                         <shadow type="field_oid" id="3VnM3u.?JEhM[^n/?X0p">
                           <field name="oid">default</field>
                         </shadow>
                       </value>
                       <statement name="STATEMENT">
                         <block type="procedures_callcustomnoreturn" id="J8Bxi=.l@zrRJkcGT150">
                           <mutation name="Bild_holen"></mutation>
                           <next>
                             <block type="timeouts_cleartimeout" id="1#Qx;^WXsqqn)X|6E2jF">
                               <field name="NAME">timeout</field>
                               <next>
                                 <block type="timeouts_cleartimeout" id="]P6ccsD65Q=LsNc=*[+u">
                                   <field name="NAME">timeout2</field>
                                   <next>
                                     <block type="timeouts_settimeout" id=",Vl,JVw3kG.#VrRAqd:b">
                                       <field name="NAME">timeout</field>
                                       <field name="DELAY">2000</field>
                                       <field name="UNIT">ms</field>
                                       <statement name="STATEMENT">
                                         <block type="variables_set" id="56pX+FA.eu/bi!ML3mDH">
                                           <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                           <value name="VALUE">
                                             <block type="text_join" id="+TV37k{5`41$R(X3%khD">
                                               <mutation items="4"></mutation>
                                               <value name="ADD0">
                                                 <block type="variables_get" id="Mkg|x~Kc=E8N`_Gd55y.">
                                                   <field name="VAR" id="^RM=2sJ}E,A{F?bz`_me">URL_Chat</field>
                                                 </block>
                                               </value>
                                               <value name="ADD1">
                                                 <block type="text_join" id="{ZtE{Zz7!b9OAowY)%1V">
                                                   <mutation items="2"></mutation>
                                                   <value name="ADD0">
                                                     <block type="variables_get" id="y!U|V20vIg%ipD-$G_XY">
                                                       <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                                     </block>
                                                   </value>
                                                   <value name="ADD1">
                                                     <block type="text" id="G|.7zo{,tbQ8-Uo83p,)">
                                                       <field name="TEXT">", "file_url": "</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                               <value name="ADD2">
                                                 <block type="variables_get" id="v/9SP;]`*blX7Qt=h~Eu">
                                                   <field name="VAR" id="yW]q[i/Yfz.,5Z+Vb.a,">URL_ioBroker</field>
                                                 </block>
                                               </value>
                                               <value name="ADD3">
                                                 <block type="text" id="z1]{?Af3zI_+#txN*=UR">
                                                   <field name="TEXT">"}</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="timeouts_settimeout" id="dUpl:*/S.GOlt6yy5+E?">
                                               <field name="NAME">timeout2</field>
                                               <field name="DELAY">1000</field>
                                               <field name="UNIT">ms</field>
                                               <statement name="STATEMENT">
                                                 <block type="request" id="939:VQbG=f:Lt(8,--UH">
                                                   <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                                                   <field name="WITH_STATEMENT">TRUE</field>
                                                   <field name="LOG"></field>
                                                   <value name="URL">
                                                     <shadow type="text" id="1o%c{S``+)7HEh-A%)U^">
                                                       <field name="TEXT">text</field>
                                                     </shadow>
                                                     <block type="variables_get" id="vAPQA_YY6uy)ow09^`*K">
                                                       <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                     </block>
                                                   </value>
                                                   <statement name="STATEMENT">
                                                     <block type="debug" id="qZVJ(@5Ef)}jneJ%Q)_N">
                                                       <field name="Severity">log</field>
                                                       <value name="TEXT">
                                                         <shadow type="text" id="S=pA)VcRi34L-{?F`HMz">
                                                           <field name="TEXT">test</field>
                                                         </shadow>
                                                         <block type="variables_get" id="N_1)-!F8nh][M#5EAmb6">
                                                           <field name="VAR" id="s`TAk}2fZk|p^o$4+d@t">result</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </statement>
                                                   <next>
                                                     <block type="debug" id="v:z{{P}3]9(0mcj`VrK7">
                                                       <field name="Severity">log</field>
                                                       <value name="TEXT">
                                                         <shadow type="text">
                                                           <field name="TEXT">test</field>
                                                         </shadow>
                                                         <block type="variables_get" id="/5v?Iwot|ODZ)QhG%957">
                                                           <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </statement>
                                             </block>
                                           </next>
                                         </block>
                                       </statement>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </statement>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
           </next>
         </block>
       </next>
     </block>
     <block type="procedures_defcustomnoreturn" id="Fh|~ouZqovH}}ZEi:0P{" x="638" y="338">
       <mutation statements="false"></mutation>
       <field name="NAME">Bild_holen</field>
       <field name="SCRIPT">DQoNCg0KcmVxdWVzdCgNCg0KICB7DQoNCiAgICB1cmw6IFVSTF9TbmFwc2hvdCAsDQoNCiAgICBlbmNvZGluZzogbnVsbCwNCg0KICB9LA0KDQogIChlcnJvciwgcmVzcG9uc2UsIGJvZHkpID0+IHsNCg0KICAgIGlmICghZXJyb3IgJiYgYm9keSkgew0KDQogICAgICB3cml0ZUZpbGUoIjBfdXNlcmRhdGEuMCIsICIvc3lub2xvZ3kvYmlsZC5qcGciLCBib2R5KTsNCg0KICAgIH0NCg0KICB9DQoNCik7DQo=</field>
       <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
     </block>
    </xml>
    

    var URL_Chat, URL_ioBroker, URL_Snapshot, Nachricht, timeout, send, timeout2, result;
    
    // Beschreibe diese Funktion …
    async function Bild_holen() {
        
        
        
        request(
        
          {
        
            url: URL_Snapshot ,
        
            encoding: null,
        
          },
        
          (error, response, body) => {
        
            if (!error && body) {
        
              writeFile("0_userdata.0", "/synology/bild.jpg", body);
        
            }
        
          }
        
        );
    
    }
    
    
    URL_Chat = 'http://deineIP:5000/webapi/entry.cgi?api=SYNO.Chat.External&method=incoming&version=2&token=deintoken&payload={"text":"';
    URL_ioBroker = 'http://IPvomioBroker:8082/0_userdata.0/synology/bild.jpg';
    URL_Snapshot = getState("synology.0.SurveillanceStation.cameras.Haustür.linkSnapshot").val;
    Nachricht = 'Es klingelt an der Haustuer';
    on({id: 'default', change: "ne"}, async function (obj) {
      var value = obj.state.val;
      var oldValue = obj.oldState.val;
      await Bild_holen();
      (function () {if (timeout) {clearTimeout(timeout); timeout = null;}})();
      (function () {if (timeout2) {clearTimeout(timeout2); timeout2 = null;}})();
      timeout = setTimeout(async function () {
        send = [URL_Chat,String(Nachricht) + '", "file_url": "',URL_ioBroker,'"}'].join('');
        timeout2 = setTimeout(async function () {
          try {
            require("request")(send, async function (error, response, result) {
              console.log(result);
            }).on("error", function (e) {console.error(e);});
          } catch (e) { console.error(e); }
          console.log(send);
        }, 1000);
      }, 2000);
    });
    

    ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #27

    @glasfaser sieht schon prima aus, bin bis jetzt nur zum Text verschicken gekommen, mit dem Bild hatte ich auch probleme..

    GlasfaserG 1 Reply Last reply
    0
    • ? A Former User

      @glasfaser sieht schon prima aus, bin bis jetzt nur zum Text verschicken gekommen, mit dem Bild hatte ich auch probleme..

      GlasfaserG Offline
      GlasfaserG Offline
      Glasfaser
      wrote on last edited by
      #28

      @ilovegym sagte in Synology Chat ...:

      mit dem Bild hatte ich auch probleme..

      ich habe es extra schon per writeFile. geschrieben .
      Das Bild ist auch aktuell , aber ich komme gerade nicht auf den Blöden Fehler warum er immer das erstellte ( alte ) Bild nimmt .

      Synology 918+ 16GB - ioBroker in Docker v9 , VISO auf Trekstor Primebook C13 13,3" , Hikvision Domkameras mit Surveillance Station .. CCU RaspberryMatic in Synology VM .. Zigbee CC2538+CC2592 .. Sonoff .. KNX .. Modbus ..

      ? HomoranH 2 Replies Last reply
      0
      • GlasfaserG Glasfaser

        @ilovegym sagte in Synology Chat ...:

        mit dem Bild hatte ich auch probleme..

        ich habe es extra schon per writeFile. geschrieben .
        Das Bild ist auch aktuell , aber ich komme gerade nicht auf den Blöden Fehler warum er immer das erstellte ( alte ) Bild nimmt .

        ? Offline
        ? Offline
        A Former User
        wrote on last edited by A Former User
        #29

        @glasfaser mal das alte Bild löschen lassen..?
        Ich mach das bei meinen Camera Scripten immer so: ( alle in Javascript )

        sendTo('telegram.0', {text: '/tmp/snap.jpg', caption: '🔔Es hat jemand geklingelt !🔔'});
        exec((['sudo cp /tmp/snap.jpg /mnt/photo/maindoor/maindoor-',formatDate(new Date(), "JJJJ_MM_TT_SS_mm_ss"),'.jpg'].join('')));
        exec((['sudo rm /tmp/snap.jpg'] ));
        
        

        Edit: nicht alles copiert.. ;-)

        1 Reply Last reply
        0
        • GlasfaserG Glasfaser

          @ilovegym sagte in Synology Chat ...:

          mit dem Bild hatte ich auch probleme..

          ich habe es extra schon per writeFile. geschrieben .
          Das Bild ist auch aktuell , aber ich komme gerade nicht auf den Blöden Fehler warum er immer das erstellte ( alte ) Bild nimmt .

          HomoranH Offline
          HomoranH Offline
          Homoran
          Global Moderator Administrators
          wrote on last edited by
          #30

          @glasfaser sagte in Synology Chat ...:

          komme gerade nicht auf den Blöden Fehler warum er immer das erstellte ( alte ) Bild nimmt

          ist zu dem Zeitpunkt des holens denn wirklich das neue Bild schon geschrieben?

          kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

          Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

          der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

          GlasfaserG 1 Reply Last reply
          0
          • HomoranH Homoran

            @glasfaser sagte in Synology Chat ...:

            komme gerade nicht auf den Blöden Fehler warum er immer das erstellte ( alte ) Bild nimmt

            ist zu dem Zeitpunkt des holens denn wirklich das neue Bild schon geschrieben?

            GlasfaserG Offline
            GlasfaserG Offline
            Glasfaser
            wrote on last edited by
            #31

            @homoran

            Ja , ich habe auch schon mehere timeout im Testscript eingebaut gehabt.

            Es wird geholt und geschrieben .
            Das Bild ist immer aktuell im Ordner 0_userdata.0

            Synology 918+ 16GB - ioBroker in Docker v9 , VISO auf Trekstor Primebook C13 13,3" , Hikvision Domkameras mit Surveillance Station .. CCU RaspberryMatic in Synology VM .. Zigbee CC2538+CC2592 .. Sonoff .. KNX .. Modbus ..

            ? 1 Reply Last reply
            0
            • GlasfaserG Glasfaser

              @homoran

              Ja , ich habe auch schon mehere timeout im Testscript eingebaut gehabt.

              Es wird geholt und geschrieben .
              Das Bild ist immer aktuell im Ordner 0_userdata.0

              ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #32

              @glasfaser hmm ich lass die immer nach /tmp schreiben.. wird es denn auch angelegt_

              GlasfaserG 1 Reply Last reply
              0
              • ? A Former User

                @glasfaser hmm ich lass die immer nach /tmp schreiben.. wird es denn auch angelegt_

                GlasfaserG Offline
                GlasfaserG Offline
                Glasfaser
                wrote on last edited by
                #33

                @ilovegym sagte in Synology Chat ...:

                wird es denn auch angelegt_

                Ja .

                e8337993-6cf5-404a-8f42-7d3bd9055223-grafik.png

                Synology 918+ 16GB - ioBroker in Docker v9 , VISO auf Trekstor Primebook C13 13,3" , Hikvision Domkameras mit Surveillance Station .. CCU RaspberryMatic in Synology VM .. Zigbee CC2538+CC2592 .. Sonoff .. KNX .. Modbus ..

                1 Reply Last reply
                0
                • GlasfaserG Glasfaser

                  @ilovegym

                  Ich habe mal was gebaut ... hänge aber noch daran , das er immer das alte Bild sendet, obwohl es aktualisiert wird .

                  Vielleicht ein Grundbauststein:

                  1.JPG

                  <xml xmlns="https://developers.google.com/blockly/xml">
                   <variables>
                     <variable id="^RM=2sJ}E,A{F?bz`_me">URL_Chat</variable>
                     <variable id="yW]q[i/Yfz.,5Z+Vb.a,">URL_ioBroker</variable>
                     <variable id="u^a{RwAvq(*-0PK`(`@4">URL_Snapshot</variable>
                     <variable id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</variable>
                     <variable type="timeout" id="timeout">timeout</variable>
                     <variable id=")2,KTR||]G~d7xyd!QUZ">send</variable>
                     <variable type="timeout" id="timeout2">timeout2</variable>
                     <variable id="s`TAk}2fZk|p^o$4+d@t">result</variable>
                   </variables>
                   <block type="variables_set" id="0jj@r*)y_VPw~)q+,3)N" x="163" y="188">
                     <field name="VAR" id="^RM=2sJ}E,A{F?bz`_me">URL_Chat</field>
                     <value name="VALUE">
                       <block type="text" id="kB68_z,ak9jtsXj2XA[?">
                         <field name="TEXT">http://xxxxxx.xxx.xxx.xx:5000/webapi/entry.cgi?api=SYNO.Chat.External&amp;method=incoming&amp;version=2&amp;token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;payload={"text":"</field>
                       </block>
                     </value>
                     <next>
                       <block type="variables_set" id="Q8SV]H7m2;RCEIl!I32S">
                         <field name="VAR" id="yW]q[i/Yfz.,5Z+Vb.a,">URL_ioBroker</field>
                         <value name="VALUE">
                           <block type="text" id="Cw;l)b1L4K(P86t9=T}E">
                             <field name="TEXT">http://xxxx.xxxx.xxx.xxx:8082/0_userdata.0/synology/bild.jpg</field>
                           </block>
                         </value>
                         <next>
                           <block type="variables_set" id="fT*7tvvXRtyOgN,6C,2?">
                             <field name="VAR" id="u^a{RwAvq(*-0PK`(`@4">URL_Snapshot</field>
                             <value name="VALUE">
                               <block type="get_value" id="Y$5X7J(i,Ijul8Pt3.]=">
                                 <field name="ATTR">val</field>
                                 <field name="OID">synology.0.SurveillanceStation.cameras.Haustür.linkSnapshot</field>
                               </block>
                             </value>
                             <next>
                               <block type="variables_set" id="m/`Hepc#d!=l=Yu?E{!6">
                                 <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                 <value name="VALUE">
                                   <block type="text" id="naz0gbDT{!MOKW]c|g8{">
                                     <field name="TEXT">Es klingelt an der Haustuer</field>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="on_ext" id="[.;w?/pK-.4zyW!UyYBl">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                     <field name="CONDITION">ne</field>
                                     <field name="ACK_CONDITION"></field>
                                     <value name="OID0">
                                       <shadow type="field_oid" id="3VnM3u.?JEhM[^n/?X0p">
                                         <field name="oid">default</field>
                                       </shadow>
                                     </value>
                                     <statement name="STATEMENT">
                                       <block type="procedures_callcustomnoreturn" id="J8Bxi=.l@zrRJkcGT150">
                                         <mutation name="Bild_holen"></mutation>
                                         <next>
                                           <block type="timeouts_cleartimeout" id="1#Qx;^WXsqqn)X|6E2jF">
                                             <field name="NAME">timeout</field>
                                             <next>
                                               <block type="timeouts_cleartimeout" id="]P6ccsD65Q=LsNc=*[+u">
                                                 <field name="NAME">timeout2</field>
                                                 <next>
                                                   <block type="timeouts_settimeout" id=",Vl,JVw3kG.#VrRAqd:b">
                                                     <field name="NAME">timeout</field>
                                                     <field name="DELAY">2000</field>
                                                     <field name="UNIT">ms</field>
                                                     <statement name="STATEMENT">
                                                       <block type="variables_set" id="56pX+FA.eu/bi!ML3mDH">
                                                         <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                         <value name="VALUE">
                                                           <block type="text_join" id="+TV37k{5`41$R(X3%khD">
                                                             <mutation items="4"></mutation>
                                                             <value name="ADD0">
                                                               <block type="variables_get" id="Mkg|x~Kc=E8N`_Gd55y.">
                                                                 <field name="VAR" id="^RM=2sJ}E,A{F?bz`_me">URL_Chat</field>
                                                               </block>
                                                             </value>
                                                             <value name="ADD1">
                                                               <block type="text_join" id="{ZtE{Zz7!b9OAowY)%1V">
                                                                 <mutation items="2"></mutation>
                                                                 <value name="ADD0">
                                                                   <block type="variables_get" id="y!U|V20vIg%ipD-$G_XY">
                                                                     <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                                                   </block>
                                                                 </value>
                                                                 <value name="ADD1">
                                                                   <block type="text" id="G|.7zo{,tbQ8-Uo83p,)">
                                                                     <field name="TEXT">", "file_url": "</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </value>
                                                             <value name="ADD2">
                                                               <block type="variables_get" id="v/9SP;]`*blX7Qt=h~Eu">
                                                                 <field name="VAR" id="yW]q[i/Yfz.,5Z+Vb.a,">URL_ioBroker</field>
                                                               </block>
                                                             </value>
                                                             <value name="ADD3">
                                                               <block type="text" id="z1]{?Af3zI_+#txN*=UR">
                                                                 <field name="TEXT">"}</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <next>
                                                           <block type="timeouts_settimeout" id="dUpl:*/S.GOlt6yy5+E?">
                                                             <field name="NAME">timeout2</field>
                                                             <field name="DELAY">1000</field>
                                                             <field name="UNIT">ms</field>
                                                             <statement name="STATEMENT">
                                                               <block type="request" id="939:VQbG=f:Lt(8,--UH">
                                                                 <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                                                                 <field name="WITH_STATEMENT">TRUE</field>
                                                                 <field name="LOG"></field>
                                                                 <value name="URL">
                                                                   <shadow type="text" id="1o%c{S``+)7HEh-A%)U^">
                                                                     <field name="TEXT">text</field>
                                                                   </shadow>
                                                                   <block type="variables_get" id="vAPQA_YY6uy)ow09^`*K">
                                                                     <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                   </block>
                                                                 </value>
                                                                 <statement name="STATEMENT">
                                                                   <block type="debug" id="qZVJ(@5Ef)}jneJ%Q)_N">
                                                                     <field name="Severity">log</field>
                                                                     <value name="TEXT">
                                                                       <shadow type="text" id="S=pA)VcRi34L-{?F`HMz">
                                                                         <field name="TEXT">test</field>
                                                                       </shadow>
                                                                       <block type="variables_get" id="N_1)-!F8nh][M#5EAmb6">
                                                                         <field name="VAR" id="s`TAk}2fZk|p^o$4+d@t">result</field>
                                                                       </block>
                                                                     </value>
                                                                   </block>
                                                                 </statement>
                                                                 <next>
                                                                   <block type="debug" id="v:z{{P}3]9(0mcj`VrK7">
                                                                     <field name="Severity">log</field>
                                                                     <value name="TEXT">
                                                                       <shadow type="text">
                                                                         <field name="TEXT">test</field>
                                                                       </shadow>
                                                                       <block type="variables_get" id="/5v?Iwot|ODZ)QhG%957">
                                                                         <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                       </block>
                                                                     </value>
                                                                   </block>
                                                                 </next>
                                                               </block>
                                                             </statement>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </statement>
                                                   </block>
                                                 </next>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </statement>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                   <block type="procedures_defcustomnoreturn" id="Fh|~ouZqovH}}ZEi:0P{" x="638" y="338">
                     <mutation statements="false"></mutation>
                     <field name="NAME">Bild_holen</field>
                     <field name="SCRIPT">DQoNCg0KcmVxdWVzdCgNCg0KICB7DQoNCiAgICB1cmw6IFVSTF9TbmFwc2hvdCAsDQoNCiAgICBlbmNvZGluZzogbnVsbCwNCg0KICB9LA0KDQogIChlcnJvciwgcmVzcG9uc2UsIGJvZHkpID0+IHsNCg0KICAgIGlmICghZXJyb3IgJiYgYm9keSkgew0KDQogICAgICB3cml0ZUZpbGUoIjBfdXNlcmRhdGEuMCIsICIvc3lub2xvZ3kvYmlsZC5qcGciLCBib2R5KTsNCg0KICAgIH0NCg0KICB9DQoNCik7DQo=</field>
                     <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                   </block>
                  </xml>
                  

                  var URL_Chat, URL_ioBroker, URL_Snapshot, Nachricht, timeout, send, timeout2, result;
                  
                  // Beschreibe diese Funktion …
                  async function Bild_holen() {
                      
                      
                      
                      request(
                      
                        {
                      
                          url: URL_Snapshot ,
                      
                          encoding: null,
                      
                        },
                      
                        (error, response, body) => {
                      
                          if (!error && body) {
                      
                            writeFile("0_userdata.0", "/synology/bild.jpg", body);
                      
                          }
                      
                        }
                      
                      );
                  
                  }
                  
                  
                  URL_Chat = 'http://deineIP:5000/webapi/entry.cgi?api=SYNO.Chat.External&method=incoming&version=2&token=deintoken&payload={"text":"';
                  URL_ioBroker = 'http://IPvomioBroker:8082/0_userdata.0/synology/bild.jpg';
                  URL_Snapshot = getState("synology.0.SurveillanceStation.cameras.Haustür.linkSnapshot").val;
                  Nachricht = 'Es klingelt an der Haustuer';
                  on({id: 'default', change: "ne"}, async function (obj) {
                    var value = obj.state.val;
                    var oldValue = obj.oldState.val;
                    await Bild_holen();
                    (function () {if (timeout) {clearTimeout(timeout); timeout = null;}})();
                    (function () {if (timeout2) {clearTimeout(timeout2); timeout2 = null;}})();
                    timeout = setTimeout(async function () {
                      send = [URL_Chat,String(Nachricht) + '", "file_url": "',URL_ioBroker,'"}'].join('');
                      timeout2 = setTimeout(async function () {
                        try {
                          require("request")(send, async function (error, response, result) {
                            console.log(result);
                          }).on("error", function (e) {console.error(e);});
                        } catch (e) { console.error(e); }
                        console.log(send);
                      }, 1000);
                    }, 2000);
                  });
                  

                  XBiTX Offline
                  XBiTX Offline
                  XBiT
                  wrote on last edited by
                  #34

                  @glasfaser

                  da wollte ich mal mitspielen aber bekomme nicht mal dein Blockly importiert...:cry:
                  sollte es laufen ist es echt gut ohne 3rd Anbieter alle Meldungen zu erhalten.

                  GlasfaserG 1 Reply Last reply
                  0
                  • XBiTX XBiT

                    @glasfaser

                    da wollte ich mal mitspielen aber bekomme nicht mal dein Blockly importiert...:cry:
                    sollte es laufen ist es echt gut ohne 3rd Anbieter alle Meldungen zu erhalten.

                    GlasfaserG Offline
                    GlasfaserG Offline
                    Glasfaser
                    wrote on last edited by Glasfaser
                    #35

                    @xbit

                    Versuche nochmal .. habe gerade es neu im Spoiler gesetzt

                    Synology 918+ 16GB - ioBroker in Docker v9 , VISO auf Trekstor Primebook C13 13,3" , Hikvision Domkameras mit Surveillance Station .. CCU RaspberryMatic in Synology VM .. Zigbee CC2538+CC2592 .. Sonoff .. KNX .. Modbus ..

                    XBiTX 2 Replies Last reply
                    0
                    • GlasfaserG Glasfaser

                      @xbit

                      Versuche nochmal .. habe gerade es neu im Spoiler gesetzt

                      XBiTX Offline
                      XBiTX Offline
                      XBiT
                      wrote on last edited by
                      #36

                      @glasfaser

                      Danke geht jetzt :+1:

                      1 Reply Last reply
                      0
                      • GlasfaserG Glasfaser

                        @xbit

                        Versuche nochmal .. habe gerade es neu im Spoiler gesetzt

                        XBiTX Offline
                        XBiTX Offline
                        XBiT
                        wrote on last edited by
                        #37

                        @glasfaser

                        Habe es mal verunstaltet :-) aber es geht... und bekomme auch immer das neue Bild....
                        Sollte ja auch mit dem Datenpunkt "synology.0.SurveillanceStation.cameras.XXXX.linkSnapshot" gehen nur bei mir geht der gerade nicht :D

                        <xml xmlns="https://developers.google.com/blockly/xml">
                          <variables>
                            <variable id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</variable>
                            <variable id=",O#!.RmBLV$D$25E`o7/">Syno_Port</variable>
                            <variable id="Eg)M29q*/71]Q#lGjYO;">Chat_token</variable>
                            <variable id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</variable>
                            <variable id="u^a{RwAvq(*-0PK`(`@4">URL_Snapshot</variable>
                            <variable id="yW]q[i/Yfz.,5Z+Vb.a,">URL_ioBroker</variable>
                            <variable type="timeout" id="timeout">timeout</variable>
                            <variable id=")2,KTR||]G~d7xyd!QUZ">send</variable>
                            <variable type="timeout" id="timeout2">timeout2</variable>
                            <variable id="s`TAk}2fZk|p^o$4+d@t">result</variable>
                          </variables>
                          <block type="on_ext" id="[.;w?/pK-.4zyW!UyYBl" x="163" y="88">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                            <field name="CONDITION">ne</field>
                            <field name="ACK_CONDITION"></field>
                            <value name="OID0">
                              <shadow type="field_oid" id="3VnM3u.?JEhM[^n/?X0p">
                                <field name="oid">0_userdata.0.Testbutton</field>
                              </shadow>
                            </value>
                            <statement name="STATEMENT">
                              <block type="variables_set" id="u^*rT,0CM,T_]XeGow}h">
                                <field name="VAR" id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</field>
                                <value name="VALUE">
                                  <block type="text" id="K]+z|W)qG[s?viD8cP}Q">
                                    <field name="TEXT">192.168.X.XXX</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="variables_set" id=",|/0@uFO[kJp[pSjyfW~">
                                    <field name="VAR" id=",O#!.RmBLV$D$25E`o7/">Syno_Port</field>
                                    <value name="VALUE">
                                      <block type="text" id="YmIhCu8+dV@OO0U[PWx#">
                                        <field name="TEXT">5000</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="variables_set" id="Z}%_nt.Jz``.b})ifYmx">
                                        <field name="VAR" id="Eg)M29q*/71]Q#lGjYO;">Chat_token</field>
                                        <value name="VALUE">
                                          <block type="text" id="[^9?/_`o:[u8zr_:o:`T">
                                            <field name="TEXT">XXXX</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="variables_set" id="m/`Hepc#d!=l=Yu?E{!6">
                                            <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                            <value name="VALUE">
                                              <block type="text" id="naz0gbDT{!MOKW]c|g8{">
                                                <field name="TEXT">Es klingelt an der Haustuer</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="variables_set" id="fT*7tvvXRtyOgN,6C,2?">
                                                <field name="VAR" id="u^a{RwAvq(*-0PK`(`@4">URL_Snapshot</field>
                                                <value name="VALUE">
                                                  <block type="text" id="N]=+,oldD=_C5-KIA*6[">
                                                    <field name="TEXT">http://192.168.X.XXX/action/snapshot</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="variables_set" id="Q8SV]H7m2;RCEIl!I32S">
                                                    <field name="VAR" id="yW]q[i/Yfz.,5Z+Vb.a,">URL_ioBroker</field>
                                                    <value name="VALUE">
                                                      <block type="text" id="Cw;l)b1L4K(P86t9=T}E">
                                                        <field name="TEXT">http://192.168.X.XXX:8082/0_userdata.0/synology/bild.jpg</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="procedures_callcustomnoreturn" id="J8Bxi=.l@zrRJkcGT150">
                                                        <mutation name="Bild_holen"></mutation>
                                                        <next>
                                                          <block type="timeouts_cleartimeout" id="1#Qx;^WXsqqn)X|6E2jF">
                                                            <field name="NAME">timeout</field>
                                                            <next>
                                                              <block type="timeouts_cleartimeout" id="]P6ccsD65Q=LsNc=*[+u">
                                                                <field name="NAME">timeout2</field>
                                                                <next>
                                                                  <block type="timeouts_settimeout" id=",Vl,JVw3kG.#VrRAqd:b">
                                                                    <field name="NAME">timeout</field>
                                                                    <field name="DELAY">2000</field>
                                                                    <field name="UNIT">ms</field>
                                                                    <statement name="STATEMENT">
                                                                      <block type="variables_set" id="0jj@r*)y_VPw~)q+,3)N">
                                                                        <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                        <value name="VALUE">
                                                                          <block type="text_join" id="Q^/K[ogSU%663c!lHXyf">
                                                                            <mutation items="11"></mutation>
                                                                            <value name="ADD0">
                                                                              <block type="text" id="Xp!K%fv+S+C7_K~7ka^c">
                                                                                <field name="TEXT">http://</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD1">
                                                                              <block type="variables_get" id="U#z.iPhHMr!oaBW_.L}$">
                                                                                <field name="VAR" id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD2">
                                                                              <block type="text" id="|ITd9=%HnJAhhwgaz3|-">
                                                                                <field name="TEXT">:</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD3">
                                                                              <block type="variables_get" id="_E?oZ@h{l{gD!e{A..FQ">
                                                                                <field name="VAR" id=",O#!.RmBLV$D$25E`o7/">Syno_Port</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD4">
                                                                              <block type="text" id="_^c23]w8ve_wLo_pG;lU">
                                                                                <field name="TEXT">/webapi/entry.cgi?api=SYNO.Chat.External&amp;method=incoming&amp;version=2&amp;token="</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD5">
                                                                              <block type="variables_get" id="p//Pgq^!$p27`+=TYO0t">
                                                                                <field name="VAR" id="Eg)M29q*/71]Q#lGjYO;">Chat_token</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD6">
                                                                              <block type="text" id="zG0}^=D_TXDv9Tjx8afb">
                                                                                <field name="TEXT">"&amp;payload={"text":"</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD7">
                                                                              <block type="variables_get" id="];FJ@4Io`JJ?oyGqhlTU">
                                                                                <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD8">
                                                                              <block type="text" id="G|.7zo{,tbQ8-Uo83p,)">
                                                                                <field name="TEXT">", "file_url": "</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD9">
                                                                              <block type="variables_get" id="v/9SP;]`*blX7Qt=h~Eu">
                                                                                <field name="VAR" id="yW]q[i/Yfz.,5Z+Vb.a,">URL_ioBroker</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD10">
                                                                              <block type="text" id="z1]{?Af3zI_+#txN*=UR">
                                                                                <field name="TEXT">"}</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                        <next>
                                                                          <block type="timeouts_settimeout" id="dUpl:*/S.GOlt6yy5+E?">
                                                                            <field name="NAME">timeout2</field>
                                                                            <field name="DELAY">1000</field>
                                                                            <field name="UNIT">ms</field>
                                                                            <statement name="STATEMENT">
                                                                              <block type="request" id="939:VQbG=f:Lt(8,--UH">
                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                                                                                <field name="WITH_STATEMENT">TRUE</field>
                                                                                <field name="LOG"></field>
                                                                                <value name="URL">
                                                                                  <shadow type="text" id="1o%c{S``+)7HEh-A%)U^">
                                                                                    <field name="TEXT">text</field>
                                                                                  </shadow>
                                                                                  <block type="variables_get" id="vAPQA_YY6uy)ow09^`*K">
                                                                                    <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                                  </block>
                                                                                </value>
                                                                                <statement name="STATEMENT">
                                                                                  <block type="debug" id="qZVJ(@5Ef)}jneJ%Q)_N">
                                                                                    <field name="Severity">log</field>
                                                                                    <value name="TEXT">
                                                                                      <shadow type="text" id="S=pA)VcRi34L-{?F`HMz">
                                                                                        <field name="TEXT">test</field>
                                                                                      </shadow>
                                                                                      <block type="variables_get" id="N_1)-!F8nh][M#5EAmb6">
                                                                                        <field name="VAR" id="s`TAk}2fZk|p^o$4+d@t">result</field>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </statement>
                                                                                <next>
                                                                                  <block type="debug" id="v:z{{P}3]9(0mcj`VrK7">
                                                                                    <field name="Severity">log</field>
                                                                                    <value name="TEXT">
                                                                                      <shadow type="text">
                                                                                        <field name="TEXT">test</field>
                                                                                      </shadow>
                                                                                      <block type="variables_get" id="/5v?Iwot|ODZ)QhG%957">
                                                                                        <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </statement>
                                                                          </block>
                                                                        </next>
                                                                      </block>
                                                                    </statement>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                          </block>
                          <block type="procedures_defcustomnoreturn" id="Fh|~ouZqovH}}ZEi:0P{" x="513" y="337">
                            <mutation statements="false"></mutation>
                            <field name="NAME">Bild_holen</field>
                            <field name="SCRIPT">DQoNCg0KcmVxdWVzdCgNCg0KICB7DQoNCiAgICB1cmw6IFVSTF9TbmFwc2hvdCAsDQoNCiAgICBlbmNvZGluZzogbnVsbCwNCg0KICB9LA0KDQogIChlcnJvciwgcmVzcG9uc2UsIGJvZHkpID0+IHsNCg0KICAgIGlmICghZXJyb3IgJiYgYm9keSkgew0KDQogICAgICB3cml0ZUZpbGUoIjBfdXNlcmRhdGEuMCIsICIvc3lub2xvZ3kvYmlsZC5qcGciLCBib2R5KTsNCg0KICAgIH0NCg0KICB9DQoNCik7DQo=</field>
                            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                          </block>
                        </xml>
                        
                        1 Reply Last reply
                        0
                        • GlasfaserG Glasfaser

                          @ilovegym

                          Ich habe mal was gebaut ... hänge aber noch daran , das er immer das alte Bild sendet, obwohl es aktualisiert wird .

                          Vielleicht ein Grundbauststein:

                          1.JPG

                          <xml xmlns="https://developers.google.com/blockly/xml">
                           <variables>
                             <variable id="^RM=2sJ}E,A{F?bz`_me">URL_Chat</variable>
                             <variable id="yW]q[i/Yfz.,5Z+Vb.a,">URL_ioBroker</variable>
                             <variable id="u^a{RwAvq(*-0PK`(`@4">URL_Snapshot</variable>
                             <variable id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</variable>
                             <variable type="timeout" id="timeout">timeout</variable>
                             <variable id=")2,KTR||]G~d7xyd!QUZ">send</variable>
                             <variable type="timeout" id="timeout2">timeout2</variable>
                             <variable id="s`TAk}2fZk|p^o$4+d@t">result</variable>
                           </variables>
                           <block type="variables_set" id="0jj@r*)y_VPw~)q+,3)N" x="163" y="188">
                             <field name="VAR" id="^RM=2sJ}E,A{F?bz`_me">URL_Chat</field>
                             <value name="VALUE">
                               <block type="text" id="kB68_z,ak9jtsXj2XA[?">
                                 <field name="TEXT">http://xxxxxx.xxx.xxx.xx:5000/webapi/entry.cgi?api=SYNO.Chat.External&amp;method=incoming&amp;version=2&amp;token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;payload={"text":"</field>
                               </block>
                             </value>
                             <next>
                               <block type="variables_set" id="Q8SV]H7m2;RCEIl!I32S">
                                 <field name="VAR" id="yW]q[i/Yfz.,5Z+Vb.a,">URL_ioBroker</field>
                                 <value name="VALUE">
                                   <block type="text" id="Cw;l)b1L4K(P86t9=T}E">
                                     <field name="TEXT">http://xxxx.xxxx.xxx.xxx:8082/0_userdata.0/synology/bild.jpg</field>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="variables_set" id="fT*7tvvXRtyOgN,6C,2?">
                                     <field name="VAR" id="u^a{RwAvq(*-0PK`(`@4">URL_Snapshot</field>
                                     <value name="VALUE">
                                       <block type="get_value" id="Y$5X7J(i,Ijul8Pt3.]=">
                                         <field name="ATTR">val</field>
                                         <field name="OID">synology.0.SurveillanceStation.cameras.Haustür.linkSnapshot</field>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="variables_set" id="m/`Hepc#d!=l=Yu?E{!6">
                                         <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                         <value name="VALUE">
                                           <block type="text" id="naz0gbDT{!MOKW]c|g8{">
                                             <field name="TEXT">Es klingelt an der Haustuer</field>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="on_ext" id="[.;w?/pK-.4zyW!UyYBl">
                                             <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                             <field name="CONDITION">ne</field>
                                             <field name="ACK_CONDITION"></field>
                                             <value name="OID0">
                                               <shadow type="field_oid" id="3VnM3u.?JEhM[^n/?X0p">
                                                 <field name="oid">default</field>
                                               </shadow>
                                             </value>
                                             <statement name="STATEMENT">
                                               <block type="procedures_callcustomnoreturn" id="J8Bxi=.l@zrRJkcGT150">
                                                 <mutation name="Bild_holen"></mutation>
                                                 <next>
                                                   <block type="timeouts_cleartimeout" id="1#Qx;^WXsqqn)X|6E2jF">
                                                     <field name="NAME">timeout</field>
                                                     <next>
                                                       <block type="timeouts_cleartimeout" id="]P6ccsD65Q=LsNc=*[+u">
                                                         <field name="NAME">timeout2</field>
                                                         <next>
                                                           <block type="timeouts_settimeout" id=",Vl,JVw3kG.#VrRAqd:b">
                                                             <field name="NAME">timeout</field>
                                                             <field name="DELAY">2000</field>
                                                             <field name="UNIT">ms</field>
                                                             <statement name="STATEMENT">
                                                               <block type="variables_set" id="56pX+FA.eu/bi!ML3mDH">
                                                                 <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                 <value name="VALUE">
                                                                   <block type="text_join" id="+TV37k{5`41$R(X3%khD">
                                                                     <mutation items="4"></mutation>
                                                                     <value name="ADD0">
                                                                       <block type="variables_get" id="Mkg|x~Kc=E8N`_Gd55y.">
                                                                         <field name="VAR" id="^RM=2sJ}E,A{F?bz`_me">URL_Chat</field>
                                                                       </block>
                                                                     </value>
                                                                     <value name="ADD1">
                                                                       <block type="text_join" id="{ZtE{Zz7!b9OAowY)%1V">
                                                                         <mutation items="2"></mutation>
                                                                         <value name="ADD0">
                                                                           <block type="variables_get" id="y!U|V20vIg%ipD-$G_XY">
                                                                             <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                                                           </block>
                                                                         </value>
                                                                         <value name="ADD1">
                                                                           <block type="text" id="G|.7zo{,tbQ8-Uo83p,)">
                                                                             <field name="TEXT">", "file_url": "</field>
                                                                           </block>
                                                                         </value>
                                                                       </block>
                                                                     </value>
                                                                     <value name="ADD2">
                                                                       <block type="variables_get" id="v/9SP;]`*blX7Qt=h~Eu">
                                                                         <field name="VAR" id="yW]q[i/Yfz.,5Z+Vb.a,">URL_ioBroker</field>
                                                                       </block>
                                                                     </value>
                                                                     <value name="ADD3">
                                                                       <block type="text" id="z1]{?Af3zI_+#txN*=UR">
                                                                         <field name="TEXT">"}</field>
                                                                       </block>
                                                                     </value>
                                                                   </block>
                                                                 </value>
                                                                 <next>
                                                                   <block type="timeouts_settimeout" id="dUpl:*/S.GOlt6yy5+E?">
                                                                     <field name="NAME">timeout2</field>
                                                                     <field name="DELAY">1000</field>
                                                                     <field name="UNIT">ms</field>
                                                                     <statement name="STATEMENT">
                                                                       <block type="request" id="939:VQbG=f:Lt(8,--UH">
                                                                         <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                                                                         <field name="WITH_STATEMENT">TRUE</field>
                                                                         <field name="LOG"></field>
                                                                         <value name="URL">
                                                                           <shadow type="text" id="1o%c{S``+)7HEh-A%)U^">
                                                                             <field name="TEXT">text</field>
                                                                           </shadow>
                                                                           <block type="variables_get" id="vAPQA_YY6uy)ow09^`*K">
                                                                             <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                           </block>
                                                                         </value>
                                                                         <statement name="STATEMENT">
                                                                           <block type="debug" id="qZVJ(@5Ef)}jneJ%Q)_N">
                                                                             <field name="Severity">log</field>
                                                                             <value name="TEXT">
                                                                               <shadow type="text" id="S=pA)VcRi34L-{?F`HMz">
                                                                                 <field name="TEXT">test</field>
                                                                               </shadow>
                                                                               <block type="variables_get" id="N_1)-!F8nh][M#5EAmb6">
                                                                                 <field name="VAR" id="s`TAk}2fZk|p^o$4+d@t">result</field>
                                                                               </block>
                                                                             </value>
                                                                           </block>
                                                                         </statement>
                                                                         <next>
                                                                           <block type="debug" id="v:z{{P}3]9(0mcj`VrK7">
                                                                             <field name="Severity">log</field>
                                                                             <value name="TEXT">
                                                                               <shadow type="text">
                                                                                 <field name="TEXT">test</field>
                                                                               </shadow>
                                                                               <block type="variables_get" id="/5v?Iwot|ODZ)QhG%957">
                                                                                 <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                               </block>
                                                                             </value>
                                                                           </block>
                                                                         </next>
                                                                       </block>
                                                                     </statement>
                                                                   </block>
                                                                 </next>
                                                               </block>
                                                             </statement>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </next>
                                               </block>
                                             </statement>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                           <block type="procedures_defcustomnoreturn" id="Fh|~ouZqovH}}ZEi:0P{" x="638" y="338">
                             <mutation statements="false"></mutation>
                             <field name="NAME">Bild_holen</field>
                             <field name="SCRIPT">DQoNCg0KcmVxdWVzdCgNCg0KICB7DQoNCiAgICB1cmw6IFVSTF9TbmFwc2hvdCAsDQoNCiAgICBlbmNvZGluZzogbnVsbCwNCg0KICB9LA0KDQogIChlcnJvciwgcmVzcG9uc2UsIGJvZHkpID0+IHsNCg0KICAgIGlmICghZXJyb3IgJiYgYm9keSkgew0KDQogICAgICB3cml0ZUZpbGUoIjBfdXNlcmRhdGEuMCIsICIvc3lub2xvZ3kvYmlsZC5qcGciLCBib2R5KTsNCg0KICAgIH0NCg0KICB9DQoNCik7DQo=</field>
                             <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                           </block>
                          </xml>
                          

                          var URL_Chat, URL_ioBroker, URL_Snapshot, Nachricht, timeout, send, timeout2, result;
                          
                          // Beschreibe diese Funktion …
                          async function Bild_holen() {
                              
                              
                              
                              request(
                              
                                {
                              
                                  url: URL_Snapshot ,
                              
                                  encoding: null,
                              
                                },
                              
                                (error, response, body) => {
                              
                                  if (!error && body) {
                              
                                    writeFile("0_userdata.0", "/synology/bild.jpg", body);
                              
                                  }
                              
                                }
                              
                              );
                          
                          }
                          
                          
                          URL_Chat = 'http://deineIP:5000/webapi/entry.cgi?api=SYNO.Chat.External&method=incoming&version=2&token=deintoken&payload={"text":"';
                          URL_ioBroker = 'http://IPvomioBroker:8082/0_userdata.0/synology/bild.jpg';
                          URL_Snapshot = getState("synology.0.SurveillanceStation.cameras.Haustür.linkSnapshot").val;
                          Nachricht = 'Es klingelt an der Haustuer';
                          on({id: 'default', change: "ne"}, async function (obj) {
                            var value = obj.state.val;
                            var oldValue = obj.oldState.val;
                            await Bild_holen();
                            (function () {if (timeout) {clearTimeout(timeout); timeout = null;}})();
                            (function () {if (timeout2) {clearTimeout(timeout2); timeout2 = null;}})();
                            timeout = setTimeout(async function () {
                              send = [URL_Chat,String(Nachricht) + '", "file_url": "',URL_ioBroker,'"}'].join('');
                              timeout2 = setTimeout(async function () {
                                try {
                                  require("request")(send, async function (error, response, result) {
                                    console.log(result);
                                  }).on("error", function (e) {console.error(e);});
                                } catch (e) { console.error(e); }
                                console.log(send);
                              }, 1000);
                            }, 2000);
                          });
                          

                          W Offline
                          W Offline
                          wrod
                          wrote on last edited by
                          #38

                          @glasfaser said in Synology Chat ...:

                          timeout, send, timeout2, result

                          Wie muss das Script denn aussehen, wenn man einfach eine Nachricht ohne Bild schicken will?

                          GlasfaserG 1 Reply Last reply
                          0
                          • W wrod

                            @glasfaser said in Synology Chat ...:

                            timeout, send, timeout2, result

                            Wie muss das Script denn aussehen, wenn man einfach eine Nachricht ohne Bild schicken will?

                            GlasfaserG Offline
                            GlasfaserG Offline
                            Glasfaser
                            wrote on last edited by Glasfaser
                            #39

                            @wrod

                            b9fe4e64-db08-48d7-98c1-812309b68e1e-grafik.png

                            Beispiel :

                            <block xmlns="https://developers.google.com/blockly/xml" type="on_ext" id="[.;w?/pK-.4zyW!UyYBl" x="163" y="88">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                              <field name="CONDITION">ne</field>
                              <field name="ACK_CONDITION"></field>
                              <value name="OID0">
                                <shadow type="field_oid" id="3VnM3u.?JEhM[^n/?X0p">
                                  <field name="oid">0_userdata.0.Test123</field>
                                </shadow>
                              </value>
                              <statement name="STATEMENT">
                                <block type="variables_set" id="*dQxDuFmm[ppsJg3%3!V">
                                  <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                  <value name="VALUE">
                                    <block type="text" id="+_Bx+X)YJc^_8RSz74zE">
                                      <field name="TEXT">Hier dein Text , ioBroker 2021</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="variables_set" id="u^*rT,0CM,T_]XeGow}h">
                                      <field name="VAR" id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</field>
                                      <value name="VALUE">
                                        <block type="text" id="K]+z|W)qG[s?viD8cP}Q">
                                          <field name="TEXT">192.168.xxx.xxx</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="variables_set" id=",|/0@uFO[kJp[pSjyfW~">
                                          <field name="VAR" id=",O#!.RmBLV$D$25E`o7/">Syno_Port</field>
                                          <value name="VALUE">
                                            <block type="text" id="YmIhCu8+dV@OO0U[PWx#">
                                              <field name="TEXT">5000</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="variables_set" id="Z}%_nt.Jz``.b})ifYmx">
                                              <field name="VAR" id="Eg)M29q*/71]Q#lGjYO;">Chat_token</field>
                                              <value name="VALUE">
                                                <block type="text" id="[^9?/_`o:[u8zr_:o:`T">
                                                  <field name="TEXT">xxxxxxxxxxxxxxxxxxxxx</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="timeouts_cleartimeout" id="1#Qx;^WXsqqn)X|6E2jF">
                                                  <field name="NAME">timeout</field>
                                                  <next>
                                                    <block type="timeouts_cleartimeout" id="]P6ccsD65Q=LsNc=*[+u">
                                                      <field name="NAME">timeout2</field>
                                                      <next>
                                                        <block type="timeouts_settimeout" id=",Vl,JVw3kG.#VrRAqd:b">
                                                          <field name="NAME">timeout</field>
                                                          <field name="DELAY">1000</field>
                                                          <field name="UNIT">ms</field>
                                                          <statement name="STATEMENT">
                                                            <block type="variables_set" id="0jj@r*)y_VPw~)q+,3)N">
                                                              <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                              <value name="VALUE">
                                                                <block type="text_join" id="Q^/K[ogSU%663c!lHXyf">
                                                                  <mutation items="9"></mutation>
                                                                  <value name="ADD0">
                                                                    <block type="text" id="Xp!K%fv+S+C7_K~7ka^c">
                                                                      <field name="TEXT">http://</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="ADD1">
                                                                    <block type="variables_get" id="U#z.iPhHMr!oaBW_.L}$">
                                                                      <field name="VAR" id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="ADD2">
                                                                    <block type="text" id="|ITd9=%HnJAhhwgaz3|-">
                                                                      <field name="TEXT">:</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="ADD3">
                                                                    <block type="variables_get" id="_E?oZ@h{l{gD!e{A..FQ">
                                                                      <field name="VAR" id=",O#!.RmBLV$D$25E`o7/">Syno_Port</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="ADD4">
                                                                    <block type="text" id="_^c23]w8ve_wLo_pG;lU">
                                                                      <field name="TEXT">/webapi/entry.cgi?api=SYNO.Chat.External&amp;method=incoming&amp;version=2&amp;token="</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="ADD5">
                                                                    <block type="variables_get" id="p//Pgq^!$p27`+=TYO0t">
                                                                      <field name="VAR" id="Eg)M29q*/71]Q#lGjYO;">Chat_token</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="ADD6">
                                                                    <block type="text" id="zG0}^=D_TXDv9Tjx8afb">
                                                                      <field name="TEXT">"&amp;payload={"text":"</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="ADD7">
                                                                    <block type="variables_get" id="];FJ@4Io`JJ?oyGqhlTU">
                                                                      <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="ADD8">
                                                                    <block type="text" id="G|.7zo{,tbQ8-Uo83p,)">
                                                                      <field name="TEXT">"}</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="timeouts_settimeout" id="dUpl:*/S.GOlt6yy5+E?">
                                                                  <field name="NAME">timeout2</field>
                                                                  <field name="DELAY">1000</field>
                                                                  <field name="UNIT">ms</field>
                                                                  <statement name="STATEMENT">
                                                                    <block type="request" id="939:VQbG=f:Lt(8,--UH">
                                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                                                                      <field name="WITH_STATEMENT">TRUE</field>
                                                                      <field name="LOG"></field>
                                                                      <value name="URL">
                                                                        <shadow type="text" id="1o%c{S``+)7HEh-A%)U^">
                                                                          <field name="TEXT">text</field>
                                                                        </shadow>
                                                                        <block type="variables_get" id="vAPQA_YY6uy)ow09^`*K">
                                                                          <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                        </block>
                                                                      </value>
                                                                      <statement name="STATEMENT">
                                                                        <block type="debug" id="qZVJ(@5Ef)}jneJ%Q)_N">
                                                                          <field name="Severity">log</field>
                                                                          <value name="TEXT">
                                                                            <shadow type="text" id="S=pA)VcRi34L-{?F`HMz">
                                                                              <field name="TEXT">test</field>
                                                                            </shadow>
                                                                            <block type="variables_get" id="N_1)-!F8nh][M#5EAmb6">
                                                                              <field name="VAR" id="s`TAk}2fZk|p^o$4+d@t">result</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </statement>
                                                                      <next>
                                                                        <block type="debug" id="v:z{{P}3]9(0mcj`VrK7">
                                                                          <field name="Severity">log</field>
                                                                          <value name="TEXT">
                                                                            <shadow type="text">
                                                                              <field name="TEXT">test</field>
                                                                            </shadow>
                                                                            <block type="variables_get" id="/5v?Iwot|ODZ)QhG%957">
                                                                              <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </statement>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </statement>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                            


                            Entweder vorgegeben , oder aus einem Datenpunkt

                            b211bf6f-530d-46f5-82d0-554b4d3557de-grafik.png

                            a990e810-9a56-4d46-ab31-2ad197d3eb3d-grafik.png
                            06a7a5fd-cf6a-4021-9232-e4f5811ea6a5-grafik.png
                            0ef473a0-df6f-4c33-80d0-5d97cf1070b4-grafik.png

                            Synology 918+ 16GB - ioBroker in Docker v9 , VISO auf Trekstor Primebook C13 13,3" , Hikvision Domkameras mit Surveillance Station .. CCU RaspberryMatic in Synology VM .. Zigbee CC2538+CC2592 .. Sonoff .. KNX .. Modbus ..

                            T 1 Reply Last reply
                            1
                            • W Offline
                              W Offline
                              wrod
                              wrote on last edited by
                              #40

                              @glasfaser Danke! Es läuft!

                              W 1 Reply Last reply
                              0
                              • GlasfaserG Glasfaser

                                @wrod

                                b9fe4e64-db08-48d7-98c1-812309b68e1e-grafik.png

                                Beispiel :

                                <block xmlns="https://developers.google.com/blockly/xml" type="on_ext" id="[.;w?/pK-.4zyW!UyYBl" x="163" y="88">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                  <field name="CONDITION">ne</field>
                                  <field name="ACK_CONDITION"></field>
                                  <value name="OID0">
                                    <shadow type="field_oid" id="3VnM3u.?JEhM[^n/?X0p">
                                      <field name="oid">0_userdata.0.Test123</field>
                                    </shadow>
                                  </value>
                                  <statement name="STATEMENT">
                                    <block type="variables_set" id="*dQxDuFmm[ppsJg3%3!V">
                                      <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                      <value name="VALUE">
                                        <block type="text" id="+_Bx+X)YJc^_8RSz74zE">
                                          <field name="TEXT">Hier dein Text , ioBroker 2021</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="variables_set" id="u^*rT,0CM,T_]XeGow}h">
                                          <field name="VAR" id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</field>
                                          <value name="VALUE">
                                            <block type="text" id="K]+z|W)qG[s?viD8cP}Q">
                                              <field name="TEXT">192.168.xxx.xxx</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="variables_set" id=",|/0@uFO[kJp[pSjyfW~">
                                              <field name="VAR" id=",O#!.RmBLV$D$25E`o7/">Syno_Port</field>
                                              <value name="VALUE">
                                                <block type="text" id="YmIhCu8+dV@OO0U[PWx#">
                                                  <field name="TEXT">5000</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="variables_set" id="Z}%_nt.Jz``.b})ifYmx">
                                                  <field name="VAR" id="Eg)M29q*/71]Q#lGjYO;">Chat_token</field>
                                                  <value name="VALUE">
                                                    <block type="text" id="[^9?/_`o:[u8zr_:o:`T">
                                                      <field name="TEXT">xxxxxxxxxxxxxxxxxxxxx</field>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="timeouts_cleartimeout" id="1#Qx;^WXsqqn)X|6E2jF">
                                                      <field name="NAME">timeout</field>
                                                      <next>
                                                        <block type="timeouts_cleartimeout" id="]P6ccsD65Q=LsNc=*[+u">
                                                          <field name="NAME">timeout2</field>
                                                          <next>
                                                            <block type="timeouts_settimeout" id=",Vl,JVw3kG.#VrRAqd:b">
                                                              <field name="NAME">timeout</field>
                                                              <field name="DELAY">1000</field>
                                                              <field name="UNIT">ms</field>
                                                              <statement name="STATEMENT">
                                                                <block type="variables_set" id="0jj@r*)y_VPw~)q+,3)N">
                                                                  <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                  <value name="VALUE">
                                                                    <block type="text_join" id="Q^/K[ogSU%663c!lHXyf">
                                                                      <mutation items="9"></mutation>
                                                                      <value name="ADD0">
                                                                        <block type="text" id="Xp!K%fv+S+C7_K~7ka^c">
                                                                          <field name="TEXT">http://</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="ADD1">
                                                                        <block type="variables_get" id="U#z.iPhHMr!oaBW_.L}$">
                                                                          <field name="VAR" id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="ADD2">
                                                                        <block type="text" id="|ITd9=%HnJAhhwgaz3|-">
                                                                          <field name="TEXT">:</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="ADD3">
                                                                        <block type="variables_get" id="_E?oZ@h{l{gD!e{A..FQ">
                                                                          <field name="VAR" id=",O#!.RmBLV$D$25E`o7/">Syno_Port</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="ADD4">
                                                                        <block type="text" id="_^c23]w8ve_wLo_pG;lU">
                                                                          <field name="TEXT">/webapi/entry.cgi?api=SYNO.Chat.External&amp;method=incoming&amp;version=2&amp;token="</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="ADD5">
                                                                        <block type="variables_get" id="p//Pgq^!$p27`+=TYO0t">
                                                                          <field name="VAR" id="Eg)M29q*/71]Q#lGjYO;">Chat_token</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="ADD6">
                                                                        <block type="text" id="zG0}^=D_TXDv9Tjx8afb">
                                                                          <field name="TEXT">"&amp;payload={"text":"</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="ADD7">
                                                                        <block type="variables_get" id="];FJ@4Io`JJ?oyGqhlTU">
                                                                          <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="ADD8">
                                                                        <block type="text" id="G|.7zo{,tbQ8-Uo83p,)">
                                                                          <field name="TEXT">"}</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                  <next>
                                                                    <block type="timeouts_settimeout" id="dUpl:*/S.GOlt6yy5+E?">
                                                                      <field name="NAME">timeout2</field>
                                                                      <field name="DELAY">1000</field>
                                                                      <field name="UNIT">ms</field>
                                                                      <statement name="STATEMENT">
                                                                        <block type="request" id="939:VQbG=f:Lt(8,--UH">
                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                                                                          <field name="WITH_STATEMENT">TRUE</field>
                                                                          <field name="LOG"></field>
                                                                          <value name="URL">
                                                                            <shadow type="text" id="1o%c{S``+)7HEh-A%)U^">
                                                                              <field name="TEXT">text</field>
                                                                            </shadow>
                                                                            <block type="variables_get" id="vAPQA_YY6uy)ow09^`*K">
                                                                              <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                            </block>
                                                                          </value>
                                                                          <statement name="STATEMENT">
                                                                            <block type="debug" id="qZVJ(@5Ef)}jneJ%Q)_N">
                                                                              <field name="Severity">log</field>
                                                                              <value name="TEXT">
                                                                                <shadow type="text" id="S=pA)VcRi34L-{?F`HMz">
                                                                                  <field name="TEXT">test</field>
                                                                                </shadow>
                                                                                <block type="variables_get" id="N_1)-!F8nh][M#5EAmb6">
                                                                                  <field name="VAR" id="s`TAk}2fZk|p^o$4+d@t">result</field>
                                                                                </block>
                                                                              </value>
                                                                            </block>
                                                                          </statement>
                                                                          <next>
                                                                            <block type="debug" id="v:z{{P}3]9(0mcj`VrK7">
                                                                              <field name="Severity">log</field>
                                                                              <value name="TEXT">
                                                                                <shadow type="text">
                                                                                  <field name="TEXT">test</field>
                                                                                </shadow>
                                                                                <block type="variables_get" id="/5v?Iwot|ODZ)QhG%957">
                                                                                  <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                                </block>
                                                                              </value>
                                                                            </block>
                                                                          </next>
                                                                        </block>
                                                                      </statement>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </statement>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                                


                                Entweder vorgegeben , oder aus einem Datenpunkt

                                b211bf6f-530d-46f5-82d0-554b4d3557de-grafik.png

                                a990e810-9a56-4d46-ab31-2ad197d3eb3d-grafik.png
                                06a7a5fd-cf6a-4021-9232-e4f5811ea6a5-grafik.png
                                0ef473a0-df6f-4c33-80d0-5d97cf1070b4-grafik.png

                                T Offline
                                T Offline
                                Tschaeens
                                wrote on last edited by Tschaeens
                                #41

                                @glasfaser
                                Hast du vielleicht eine Idee, warum keine Umlaute (ä, ö) oder zum Beispiel Grad Celcius als Zeichen nicht gehen. Dann kommt im Log immer ein Fehler?
                                Liebe Grüße

                                GlasfaserG 2 Replies Last reply
                                0
                                • T Tschaeens

                                  @glasfaser
                                  Hast du vielleicht eine Idee, warum keine Umlaute (ä, ö) oder zum Beispiel Grad Celcius als Zeichen nicht gehen. Dann kommt im Log immer ein Fehler?
                                  Liebe Grüße

                                  GlasfaserG Offline
                                  GlasfaserG Offline
                                  Glasfaser
                                  wrote on last edited by
                                  #42

                                  @tschaeens sagte in Synology Chat ...:

                                  warum keine Umlaute (ä, ö)

                                  Weil der Text noch :

                                  encodeURIComponent()

                                  Die Methode encodeURIComponent() kodiert eine Komponente des Uniform Resource Identifier (URI) indem jedes Vorkommen bestimmter Zeichen durch ein, zwei, drei oder vier Escape-Sequenzen ersetzt werden, die der UTF8-Kodierung des Zeichens entsprechen. Vier Escape-Sequenzen werden nur bei Zeichen bestehend aus zwei "Surrogate"-Zeichen verwendet.
                                  

                                  https://www.w3schools.com/jsref/jsref_encodeuricomponent.asp

                                  Klingelt%20jemand%20an%20der%20Haust%C3%BCr
                                  
                                  22%20%C2%B0C
                                  
                                  warum%20keine%20Umlaute%20(%C3%A4%2C%20%C3%B6)%20und%20kein%2022%20%C2%B0C
                                  

                                  ad104082-c5be-46cb-8d6a-33f0672cf392-grafik.png

                                  geht hiermit :

                                  dae651df-b67e-4566-997f-29ad4eae6bad-grafik.png

                                  .

                                  <xml xmlns="https://developers.google.com/blockly/xml">
                                   <variables>
                                     <variable id="$Tar!(b_)qw:24xtP(vj">url</variable>
                                     <variable id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</variable>
                                     <variable id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</variable>
                                     <variable id=",O#!.RmBLV$D$25E`o7/">Syno_Port</variable>
                                     <variable id="Eg)M29q*/71]Q#lGjYO;">Chat_token</variable>
                                     <variable type="timeout" id="timeout">timeout</variable>
                                     <variable id=")2,KTR||]G~d7xyd!QUZ">send</variable>
                                     <variable type="timeout" id="timeout2">timeout2</variable>
                                     <variable id="s`TAk}2fZk|p^o$4+d@t">result</variable>
                                   </variables>
                                   <block type="procedures_defcustomreturn" id="B`%(UJ@(5HI^#[)t`k$:" x="163" y="38">
                                     <mutation statements="false">
                                       <arg name="url" varid="$Tar!(b_)qw:24xtP(vj"></arg>
                                     </mutation>
                                     <field name="NAME">encodeURI</field>
                                     <field name="SCRIPT">dXJsID0gZW5jb2RlVVJJQ29tcG9uZW50KHVybCk7DQpyZXR1cm4gdXJsOw==</field>
                                     <comment pinned="false" h="80" w="160">encode URL function</comment>
                                   </block>
                                   <block type="comment" id="sn%:SFkGbJ1*B^:BY`FW" x="162" y="63">
                                     <field name="COMMENT">// https://forum.iobroker.net/topic/47210/synology-chat/41</field>
                                     <next>
                                       <block type="on_ext" id="[.;w?/pK-.4zyW!UyYBl">
                                         <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                         <field name="CONDITION">ne</field>
                                         <field name="ACK_CONDITION"></field>
                                         <value name="OID0">
                                           <shadow type="field_oid" id="3VnM3u.?JEhM[^n/?X0p">
                                             <field name="oid">0_userdata.0.Test123</field>
                                           </shadow>
                                         </value>
                                         <statement name="STATEMENT">
                                           <block type="comment" id="uRZ3rr;n#Cb)oaDZB3$)">
                                             <field name="COMMENT">encodeURIComponent hinzugefügt</field>
                                             <next>
                                               <block type="variables_set" id="*dQxDuFmm[ppsJg3%3!V">
                                                 <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                                 <value name="VALUE">
                                                   <block type="procedures_callcustomreturn" id="GD%^L~Wq_LIL_y86c}(2">
                                                     <mutation name="encodeURI">
                                                       <arg name="url"></arg>
                                                     </mutation>
                                                     <value name="ARG0">
                                                       <block type="text" id="+_Bx+X)YJc^_8RSz74zE">
                                                         <field name="TEXT">warum keine Umlaute (ä, ö) und kein 22 °C</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <next>
                                                   <block type="variables_set" id="u^*rT,0CM,T_]XeGow}h">
                                                     <field name="VAR" id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</field>
                                                     <value name="VALUE">
                                                       <block type="text" id="K]+z|W)qG[s?viD8cP}Q">
                                                         <field name="TEXT">192.168.xxx.xx</field>
                                                       </block>
                                                     </value>
                                                     <next>
                                                       <block type="variables_set" id=",|/0@uFO[kJp[pSjyfW~">
                                                         <field name="VAR" id=",O#!.RmBLV$D$25E`o7/">Syno_Port</field>
                                                         <value name="VALUE">
                                                           <block type="text" id="YmIhCu8+dV@OO0U[PWx#">
                                                             <field name="TEXT">5000</field>
                                                           </block>
                                                         </value>
                                                         <next>
                                                           <block type="variables_set" id="Z}%_nt.Jz``.b})ifYmx">
                                                             <field name="VAR" id="Eg)M29q*/71]Q#lGjYO;">Chat_token</field>
                                                             <value name="VALUE">
                                                               <block type="text" id="[^9?/_`o:[u8zr_:o:`T">
                                                                 <field name="TEXT">xxxxxxxxxxxxxxxxx</field>
                                                               </block>
                                                             </value>
                                                             <next>
                                                               <block type="timeouts_cleartimeout" id="1#Qx;^WXsqqn)X|6E2jF">
                                                                 <field name="NAME">timeout</field>
                                                                 <next>
                                                                   <block type="timeouts_cleartimeout" id="]P6ccsD65Q=LsNc=*[+u">
                                                                     <field name="NAME">timeout2</field>
                                                                     <next>
                                                                       <block type="timeouts_settimeout" id=",Vl,JVw3kG.#VrRAqd:b">
                                                                         <field name="NAME">timeout</field>
                                                                         <field name="DELAY">1000</field>
                                                                         <field name="UNIT">ms</field>
                                                                         <statement name="STATEMENT">
                                                                           <block type="variables_set" id="0jj@r*)y_VPw~)q+,3)N">
                                                                             <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                             <value name="VALUE">
                                                                               <block type="text_join" id="Q^/K[ogSU%663c!lHXyf">
                                                                                 <mutation items="9"></mutation>
                                                                                 <value name="ADD0">
                                                                                   <block type="text" id="Xp!K%fv+S+C7_K~7ka^c">
                                                                                     <field name="TEXT">http://</field>
                                                                                   </block>
                                                                                 </value>
                                                                                 <value name="ADD1">
                                                                                   <block type="variables_get" id="U#z.iPhHMr!oaBW_.L}$">
                                                                                     <field name="VAR" id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</field>
                                                                                   </block>
                                                                                 </value>
                                                                                 <value name="ADD2">
                                                                                   <block type="text" id="|ITd9=%HnJAhhwgaz3|-">
                                                                                     <field name="TEXT">:</field>
                                                                                   </block>
                                                                                 </value>
                                                                                 <value name="ADD3">
                                                                                   <block type="variables_get" id="_E?oZ@h{l{gD!e{A..FQ">
                                                                                     <field name="VAR" id=",O#!.RmBLV$D$25E`o7/">Syno_Port</field>
                                                                                   </block>
                                                                                 </value>
                                                                                 <value name="ADD4">
                                                                                   <block type="text" id="_^c23]w8ve_wLo_pG;lU">
                                                                                     <field name="TEXT">/webapi/entry.cgi?api=SYNO.Chat.External&amp;method=incoming&amp;version=2&amp;token="</field>
                                                                                   </block>
                                                                                 </value>
                                                                                 <value name="ADD5">
                                                                                   <block type="variables_get" id="p//Pgq^!$p27`+=TYO0t">
                                                                                     <field name="VAR" id="Eg)M29q*/71]Q#lGjYO;">Chat_token</field>
                                                                                   </block>
                                                                                 </value>
                                                                                 <value name="ADD6">
                                                                                   <block type="text" id="zG0}^=D_TXDv9Tjx8afb">
                                                                                     <field name="TEXT">"&amp;payload={"text":"</field>
                                                                                   </block>
                                                                                 </value>
                                                                                 <value name="ADD7">
                                                                                   <block type="variables_get" id="];FJ@4Io`JJ?oyGqhlTU">
                                                                                     <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                                                                   </block>
                                                                                 </value>
                                                                                 <value name="ADD8">
                                                                                   <block type="text" id="G|.7zo{,tbQ8-Uo83p,)">
                                                                                     <field name="TEXT">"}</field>
                                                                                   </block>
                                                                                 </value>
                                                                               </block>
                                                                             </value>
                                                                             <next>
                                                                               <block type="timeouts_settimeout" id="dUpl:*/S.GOlt6yy5+E?">
                                                                                 <field name="NAME">timeout2</field>
                                                                                 <field name="DELAY">1000</field>
                                                                                 <field name="UNIT">ms</field>
                                                                                 <statement name="STATEMENT">
                                                                                   <block type="request" id="939:VQbG=f:Lt(8,--UH">
                                                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                                                                                     <field name="WITH_STATEMENT">TRUE</field>
                                                                                     <field name="LOG"></field>
                                                                                     <value name="URL">
                                                                                       <shadow type="text" id="1o%c{S``+)7HEh-A%)U^">
                                                                                         <field name="TEXT">text</field>
                                                                                       </shadow>
                                                                                       <block type="variables_get" id="vAPQA_YY6uy)ow09^`*K">
                                                                                         <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                                       </block>
                                                                                     </value>
                                                                                     <statement name="STATEMENT">
                                                                                       <block type="debug" id="qZVJ(@5Ef)}jneJ%Q)_N">
                                                                                         <field name="Severity">log</field>
                                                                                         <value name="TEXT">
                                                                                           <shadow type="text" id="S=pA)VcRi34L-{?F`HMz">
                                                                                             <field name="TEXT">test</field>
                                                                                           </shadow>
                                                                                           <block type="variables_get" id="N_1)-!F8nh][M#5EAmb6">
                                                                                             <field name="VAR" id="s`TAk}2fZk|p^o$4+d@t">result</field>
                                                                                           </block>
                                                                                         </value>
                                                                                       </block>
                                                                                     </statement>
                                                                                     <next>
                                                                                       <block type="debug" id="v:z{{P}3]9(0mcj`VrK7">
                                                                                         <field name="Severity">log</field>
                                                                                         <value name="TEXT">
                                                                                           <shadow type="text">
                                                                                             <field name="TEXT">test</field>
                                                                                           </shadow>
                                                                                           <block type="variables_get" id="/5v?Iwot|ODZ)QhG%957">
                                                                                             <field name="VAR" id=")2,KTR||]G~d7xyd!QUZ">send</field>
                                                                                           </block>
                                                                                         </value>
                                                                                       </block>
                                                                                     </next>
                                                                                   </block>
                                                                                 </statement>
                                                                               </block>
                                                                             </next>
                                                                           </block>
                                                                         </statement>
                                                                       </block>
                                                                     </next>
                                                                   </block>
                                                                 </next>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </next>
                                               </block>
                                             </next>
                                           </block>
                                         </statement>
                                       </block>
                                     </next>
                                   </block>
                                  </xml>
                                  

                                  Synology 918+ 16GB - ioBroker in Docker v9 , VISO auf Trekstor Primebook C13 13,3" , Hikvision Domkameras mit Surveillance Station .. CCU RaspberryMatic in Synology VM .. Zigbee CC2538+CC2592 .. Sonoff .. KNX .. Modbus ..

                                  1 Reply Last reply
                                  0
                                  • T Tschaeens

                                    @glasfaser
                                    Hast du vielleicht eine Idee, warum keine Umlaute (ä, ö) oder zum Beispiel Grad Celcius als Zeichen nicht gehen. Dann kommt im Log immer ein Fehler?
                                    Liebe Grüße

                                    GlasfaserG Offline
                                    GlasfaserG Offline
                                    Glasfaser
                                    wrote on last edited by Glasfaser
                                    #43

                                    @tschaeens sagte in Synology Chat ...:

                                    oder zum Beispiel

                                    mit der Änderung oben , können jetzt auch Emoji mit versendet werden

                                    5d5f7edb-b4e7-416e-8cef-ce40eeff7000-grafik.png

                                    .
                                    d761096b-5240-4087-95c4-820ba178b279-grafik.png

                                    Synology 918+ 16GB - ioBroker in Docker v9 , VISO auf Trekstor Primebook C13 13,3" , Hikvision Domkameras mit Surveillance Station .. CCU RaspberryMatic in Synology VM .. Zigbee CC2538+CC2592 .. Sonoff .. KNX .. Modbus ..

                                    T 1 Reply Last reply
                                    0
                                    • W wrod

                                      @glasfaser Danke! Es läuft!

                                      W Offline
                                      W Offline
                                      wrod
                                      wrote on last edited by
                                      #44

                                      @wrod Danke.
                                      Es sieht nun so aus.
                                      Immer wenn ein anderer Vorgang (etwa ein anderes Skript) ein eigens erzeugtes Objekt "Nachrichtentext" ändert, wird dieser an mich versendet. Dann wird dieser wieder auf "false" gesetzt.
                                      4eadc9b8-822d-4d82-84b5-980d89a5f976-grafik.png

                                      Jetzt brauche ich noch Skripts, die auf Abfrage das Objekt "Nachrichtentext" sinnvoll befüllen.
                                      Gibt es dazu elegante Möglichkeiten, insbesondere für eine Abfrage mehrerer Objekte auf das Überschreiten von Grenzwerten, also etwa

                                      Wenn <Objekt_X> überschreitet <Grenzwert_X> dann setze Erzeuge Variable <Text> aus <Konstante_X> und ggf <Variable_X> und befülle Objekt <Nachrichtentext>; mit

                                      • <Objekt A> <Grenzwert A> <Konstante A> <Variable A>
                                      • <Objekt B> <Grenzwert B> <Konstante C> <Variable C>
                                      • ...
                                      • <Objekt n> <Grenzwert n> <Konstante n> <Variable n>

                                      Das wäre ja wohl eine Schleife oder Liste in Form von
                                      Für jedes Elemente in Liste x prüfe und setze.

                                      Das Skript müsste dann aber wohl ständig abfragen. Lässt sich das auch über eine Liste/Schleife lösen im Sinne von

                                      Wenn eines der folgenden Elemente sich ändert, dann prüfe?

                                      Dank im Voraus

                                      GlasfaserG 1 Reply Last reply
                                      0
                                      • W wrod

                                        @wrod Danke.
                                        Es sieht nun so aus.
                                        Immer wenn ein anderer Vorgang (etwa ein anderes Skript) ein eigens erzeugtes Objekt "Nachrichtentext" ändert, wird dieser an mich versendet. Dann wird dieser wieder auf "false" gesetzt.
                                        4eadc9b8-822d-4d82-84b5-980d89a5f976-grafik.png

                                        Jetzt brauche ich noch Skripts, die auf Abfrage das Objekt "Nachrichtentext" sinnvoll befüllen.
                                        Gibt es dazu elegante Möglichkeiten, insbesondere für eine Abfrage mehrerer Objekte auf das Überschreiten von Grenzwerten, also etwa

                                        Wenn <Objekt_X> überschreitet <Grenzwert_X> dann setze Erzeuge Variable <Text> aus <Konstante_X> und ggf <Variable_X> und befülle Objekt <Nachrichtentext>; mit

                                        • <Objekt A> <Grenzwert A> <Konstante A> <Variable A>
                                        • <Objekt B> <Grenzwert B> <Konstante C> <Variable C>
                                        • ...
                                        • <Objekt n> <Grenzwert n> <Konstante n> <Variable n>

                                        Das wäre ja wohl eine Schleife oder Liste in Form von
                                        Für jedes Elemente in Liste x prüfe und setze.

                                        Das Skript müsste dann aber wohl ständig abfragen. Lässt sich das auch über eine Liste/Schleife lösen im Sinne von

                                        Wenn eines der folgenden Elemente sich ändert, dann prüfe?

                                        Dank im Voraus

                                        GlasfaserG Offline
                                        GlasfaserG Offline
                                        Glasfaser
                                        wrote on last edited by
                                        #45

                                        @wrod sagte in Synology Chat ...:

                                        Jetzt brauche ich noch Skripts, die auf Abfrage das Objekt "Nachrichtentext" sinnvoll befüllen.

                                        Das würde jetzt diesen Thread "Synology Chat"dafür sprengen .



                                        @all

                                        Ich habe nochmal das Blockly verkürzt .

                                        3b7b38b1-41e8-4176-b17b-440cca22d34d-grafik.png

                                        <xml xmlns="https://developers.google.com/blockly/xml">
                                         <variables>
                                           <variable id="$Tar!(b_)qw:24xtP(vj">url</variable>
                                           <variable id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</variable>
                                           <variable id=",O#!.RmBLV$D$25E`o7/">Syno_Port</variable>
                                           <variable id="Eg)M29q*/71]Q#lGjYO;">Chat_token</variable>
                                           <variable id="D5Tj,(Y%B2Tp[@g/2DPn">Debug_URL</variable>
                                           <variable id="/j={Oe4(A3y)y{F~G67H">Debug_send_Result</variable>
                                           <variable id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</variable>
                                           <variable type="timeout" id="timeout">timeout</variable>
                                         </variables>
                                         <block type="procedures_defcustomreturn" id="B`%(UJ@(5HI^#[)t`k$:" x="488" y="-512">
                                           <mutation statements="false">
                                             <arg name="url" varid="$Tar!(b_)qw:24xtP(vj"></arg>
                                           </mutation>
                                           <field name="NAME">encodeURI</field>
                                           <field name="SCRIPT">dXJsID0gZW5jb2RlVVJJQ29tcG9uZW50KHVybCk7DQpyZXR1cm4gdXJsOw==</field>
                                           <comment pinned="false" h="80" w="160">encode URL function</comment>
                                         </block>
                                         <block type="procedures_defcustomnoreturn" id="c4Zobeu@zHx7@T7RCR[+" x="488" y="-487">
                                           <mutation statements="false"></mutation>
                                           <field name="NAME">Chat_senden</field>
                                           <field name="SCRIPT">dmFyIHRpbWVvdXQyMCA7DQpzZW5kID0gWydodHRwOi8vJyxTeW5vX1VSTCwnOicsU3lub19Qb3J0LCcvd2ViYXBpL2VudHJ5LmNnaT9hcGk9U1lOTy5DaGF0LkV4dGVybmFsJm1ldGhvZD1pbmNvbWluZyZ2ZXJzaW9uPTImdG9rZW49IicsQ2hhdF90b2tlbiwnIiZwYXlsb2FkPXsidGV4dCI6IicsTmFjaHJpY2h0LCcifSddLmpvaW4oJycpOw0KaWYgKERlYnVnX1VSTCA9PSB0cnVlKSB7DQogICAgY29uc29sZS5sb2coc2VuZCk7DQp9DQooZnVuY3Rpb24gKCkge2lmICh0aW1lb3V0MjApIHtjbGVhclRpbWVvdXQodGltZW91dDIwKTsgdGltZW91dDIgPSBudWxsO319KSgpOw0KdGltZW91dDIwID0gc2V0VGltZW91dChhc3luYyBmdW5jdGlvbiAoKSB7DQogICAgdHJ5IHsNCiAgICAgIHJlcXVpcmUoInJlcXVlc3QiKShzZW5kLCBhc3luYyBmdW5jdGlvbiAoZXJyb3IsIHJlc3BvbnNlLCByZXN1bHQpIHsNCiAgICAgICAgaWYgKERlYnVnX3NlbmRfUmVzdWx0ID09IHRydWUpIHsNCiAgICAgICAgY29uc29sZS5sb2cocmVzdWx0KTsNCiAgICAgIH0NCiAgICAgIH0pLm9uKCJlcnJvciIsIGZ1bmN0aW9uIChlKSB7Y29uc29sZS5lcnJvcihlKTt9KTsNCiAgICB9IGNhdGNoIChlKSB7IGNvbnNvbGUuZXJyb3IoZSk7IH0NCn0sIDEwMDApOw==</field>
                                           <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                         </block>
                                         <block type="comment" id="dh?Nq_).+o*LRx@ZBJ/P" x="488" y="-463">
                                           <field name="COMMENT">https://forum.iobroker.net/topic/47210/synology-chat/44</field>
                                           <next>
                                             <block type="comment" id="]-LvUJjLlh6nbfULNnAm">
                                               <field name="COMMENT">Synology Chat Daten</field>
                                               <next>
                                                 <block type="variables_set" id="u^*rT,0CM,T_]XeGow}h">
                                                   <field name="VAR" id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</field>
                                                   <value name="VALUE">
                                                     <block type="text" id="K]+z|W)qG[s?viD8cP}Q">
                                                       <field name="TEXT">192.168.xxx.xxx</field>
                                                     </block>
                                                   </value>
                                                   <next>
                                                     <block type="variables_set" id=",|/0@uFO[kJp[pSjyfW~">
                                                       <field name="VAR" id=",O#!.RmBLV$D$25E`o7/">Syno_Port</field>
                                                       <value name="VALUE">
                                                         <block type="text" id="YmIhCu8+dV@OO0U[PWx#">
                                                           <field name="TEXT">5000</field>
                                                         </block>
                                                       </value>
                                                       <next>
                                                         <block type="variables_set" id="Z}%_nt.Jz``.b})ifYmx">
                                                           <field name="VAR" id="Eg)M29q*/71]Q#lGjYO;">Chat_token</field>
                                                           <value name="VALUE">
                                                             <block type="text" id="[^9?/_`o:[u8zr_:o:`T">
                                                               <field name="TEXT">Hier dein Token</field>
                                                             </block>
                                                           </value>
                                                           <next>
                                                             <block type="comment" id="#X/LLHHf]+a]HP9ULZZA">
                                                               <field name="COMMENT">Debugmodus an/aus</field>
                                                               <next>
                                                                 <block type="variables_set" id="]Dg;,gKp,/]Sb1cUFi?n">
                                                                   <field name="VAR" id="D5Tj,(Y%B2Tp[@g/2DPn">Debug_URL</field>
                                                                   <value name="VALUE">
                                                                     <block type="logic_boolean" id="0~lqDtIM29hgH2or)}mL">
                                                                       <field name="BOOL">TRUE</field>
                                                                     </block>
                                                                   </value>
                                                                   <next>
                                                                     <block type="variables_set" id="W=GM=?`a~14E-J+QXSAQ">
                                                                       <field name="VAR" id="/j={Oe4(A3y)y{F~G67H">Debug_send_Result</field>
                                                                       <value name="VALUE">
                                                                         <block type="logic_boolean" id="*JUO/RsrY?M/l53;H_pF">
                                                                           <field name="BOOL">TRUE</field>
                                                                         </block>
                                                                       </value>
                                                                       <next>
                                                                         <block type="comment" id="[gDu2J;3btcPa(EESlU!">
                                                                           <field name="COMMENT">Ab hier Trigger</field>
                                                                           <next>
                                                                             <block type="on_ext" id="9h_zLLHz{65UPzm^$7}e">
                                                                               <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                                                               <field name="CONDITION">ne</field>
                                                                               <field name="ACK_CONDITION"></field>
                                                                               <value name="OID0">
                                                                                 <shadow type="field_oid" id="NgekYWG@PsA7G02OF}rj">
                                                                                   <field name="oid">0_userdata.0.Test123</field>
                                                                                 </shadow>
                                                                               </value>
                                                                               <statement name="STATEMENT">
                                                                                 <block type="controls_if" id="mSYXDpsYHKUM+j9uSS2s">
                                                                                   <mutation else="1"></mutation>
                                                                                   <value name="IF0">
                                                                                     <block type="logic_compare" id="55HN]QCkz$?W=xUf*cx_">
                                                                                       <field name="OP">EQ</field>
                                                                                       <value name="A">
                                                                                         <block type="on_source" id="l[/NtLhpCNaa5/@gH6X-">
                                                                                           <field name="ATTR">state.val</field>
                                                                                         </block>
                                                                                       </value>
                                                                                       <value name="B">
                                                                                         <block type="logic_boolean" id="),*:R)Nryc!rExr_0IK=">
                                                                                           <field name="BOOL">TRUE</field>
                                                                                         </block>
                                                                                       </value>
                                                                                     </block>
                                                                                   </value>
                                                                                   <statement name="DO0">
                                                                                     <block type="variables_set" id="*dQxDuFmm[ppsJg3%3!V">
                                                                                       <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                                                                       <value name="VALUE">
                                                                                         <block type="procedures_callcustomreturn" id="GD%^L~Wq_LIL_y86c}(2">
                                                                                           <mutation name="encodeURI">
                                                                                             <arg name="url"></arg>
                                                                                           </mutation>
                                                                                           <value name="ARG0">
                                                                                             <block type="text" id="+_Bx+X)YJc^_8RSz74zE">
                                                                                               <field name="TEXT">Ich bin ein kleiner 🐧</field>
                                                                                             </block>
                                                                                           </value>
                                                                                         </block>
                                                                                       </value>
                                                                                       <next>
                                                                                         <block type="timeouts_settimeout" id="ht3)ckT6?(PDbQipm{_z">
                                                                                           <field name="NAME">timeout</field>
                                                                                           <field name="DELAY">1000</field>
                                                                                           <field name="UNIT">ms</field>
                                                                                           <statement name="STATEMENT">
                                                                                             <block type="procedures_callcustomnoreturn" id="[EP#gKV7fF}Y+8x8zkZ^">
                                                                                               <mutation name="Chat_senden"></mutation>
                                                                                             </block>
                                                                                           </statement>
                                                                                         </block>
                                                                                       </next>
                                                                                     </block>
                                                                                   </statement>
                                                                                   <statement name="ELSE">
                                                                                     <block type="timeouts_cleartimeout" id="TKEEXDr0Qo(}RX.!blS5">
                                                                                       <field name="NAME">timeout</field>
                                                                                     </block>
                                                                                   </statement>
                                                                                 </block>
                                                                               </statement>
                                                                             </block>
                                                                           </next>
                                                                         </block>
                                                                       </next>
                                                                     </block>
                                                                   </next>
                                                                 </block>
                                                               </next>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </next>
                                             </block>
                                           </next>
                                         </block>
                                        </xml>
                                        

                                        @dslraser
                                        kann man das schon Produktiv übernehmen , was meinst du oder eher noch eine Testphase !

                                        Beispiel :

                                        https://forum.iobroker.net/topic/40424/alexa-ansagen-i-telegram-i-email-i-alias-i-visu-i-html?_=1640618730944

                                        Das einzigste was mich stört , ich finde keinen Butten um eine ( Test ) -Nachricht im Syn Chat zu löschen !?

                                        Synology 918+ 16GB - ioBroker in Docker v9 , VISO auf Trekstor Primebook C13 13,3" , Hikvision Domkameras mit Surveillance Station .. CCU RaspberryMatic in Synology VM .. Zigbee CC2538+CC2592 .. Sonoff .. KNX .. Modbus ..

                                        dslraserD GlasfaserG 4 Replies Last reply
                                        0
                                        • GlasfaserG Glasfaser

                                          @wrod sagte in Synology Chat ...:

                                          Jetzt brauche ich noch Skripts, die auf Abfrage das Objekt "Nachrichtentext" sinnvoll befüllen.

                                          Das würde jetzt diesen Thread "Synology Chat"dafür sprengen .



                                          @all

                                          Ich habe nochmal das Blockly verkürzt .

                                          3b7b38b1-41e8-4176-b17b-440cca22d34d-grafik.png

                                          <xml xmlns="https://developers.google.com/blockly/xml">
                                           <variables>
                                             <variable id="$Tar!(b_)qw:24xtP(vj">url</variable>
                                             <variable id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</variable>
                                             <variable id=",O#!.RmBLV$D$25E`o7/">Syno_Port</variable>
                                             <variable id="Eg)M29q*/71]Q#lGjYO;">Chat_token</variable>
                                             <variable id="D5Tj,(Y%B2Tp[@g/2DPn">Debug_URL</variable>
                                             <variable id="/j={Oe4(A3y)y{F~G67H">Debug_send_Result</variable>
                                             <variable id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</variable>
                                             <variable type="timeout" id="timeout">timeout</variable>
                                           </variables>
                                           <block type="procedures_defcustomreturn" id="B`%(UJ@(5HI^#[)t`k$:" x="488" y="-512">
                                             <mutation statements="false">
                                               <arg name="url" varid="$Tar!(b_)qw:24xtP(vj"></arg>
                                             </mutation>
                                             <field name="NAME">encodeURI</field>
                                             <field name="SCRIPT">dXJsID0gZW5jb2RlVVJJQ29tcG9uZW50KHVybCk7DQpyZXR1cm4gdXJsOw==</field>
                                             <comment pinned="false" h="80" w="160">encode URL function</comment>
                                           </block>
                                           <block type="procedures_defcustomnoreturn" id="c4Zobeu@zHx7@T7RCR[+" x="488" y="-487">
                                             <mutation statements="false"></mutation>
                                             <field name="NAME">Chat_senden</field>
                                             <field name="SCRIPT">dmFyIHRpbWVvdXQyMCA7DQpzZW5kID0gWydodHRwOi8vJyxTeW5vX1VSTCwnOicsU3lub19Qb3J0LCcvd2ViYXBpL2VudHJ5LmNnaT9hcGk9U1lOTy5DaGF0LkV4dGVybmFsJm1ldGhvZD1pbmNvbWluZyZ2ZXJzaW9uPTImdG9rZW49IicsQ2hhdF90b2tlbiwnIiZwYXlsb2FkPXsidGV4dCI6IicsTmFjaHJpY2h0LCcifSddLmpvaW4oJycpOw0KaWYgKERlYnVnX1VSTCA9PSB0cnVlKSB7DQogICAgY29uc29sZS5sb2coc2VuZCk7DQp9DQooZnVuY3Rpb24gKCkge2lmICh0aW1lb3V0MjApIHtjbGVhclRpbWVvdXQodGltZW91dDIwKTsgdGltZW91dDIgPSBudWxsO319KSgpOw0KdGltZW91dDIwID0gc2V0VGltZW91dChhc3luYyBmdW5jdGlvbiAoKSB7DQogICAgdHJ5IHsNCiAgICAgIHJlcXVpcmUoInJlcXVlc3QiKShzZW5kLCBhc3luYyBmdW5jdGlvbiAoZXJyb3IsIHJlc3BvbnNlLCByZXN1bHQpIHsNCiAgICAgICAgaWYgKERlYnVnX3NlbmRfUmVzdWx0ID09IHRydWUpIHsNCiAgICAgICAgY29uc29sZS5sb2cocmVzdWx0KTsNCiAgICAgIH0NCiAgICAgIH0pLm9uKCJlcnJvciIsIGZ1bmN0aW9uIChlKSB7Y29uc29sZS5lcnJvcihlKTt9KTsNCiAgICB9IGNhdGNoIChlKSB7IGNvbnNvbGUuZXJyb3IoZSk7IH0NCn0sIDEwMDApOw==</field>
                                             <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                           </block>
                                           <block type="comment" id="dh?Nq_).+o*LRx@ZBJ/P" x="488" y="-463">
                                             <field name="COMMENT">https://forum.iobroker.net/topic/47210/synology-chat/44</field>
                                             <next>
                                               <block type="comment" id="]-LvUJjLlh6nbfULNnAm">
                                                 <field name="COMMENT">Synology Chat Daten</field>
                                                 <next>
                                                   <block type="variables_set" id="u^*rT,0CM,T_]XeGow}h">
                                                     <field name="VAR" id="0;mm8IOdOmH_wz;%[zPo">Syno_URL</field>
                                                     <value name="VALUE">
                                                       <block type="text" id="K]+z|W)qG[s?viD8cP}Q">
                                                         <field name="TEXT">192.168.xxx.xxx</field>
                                                       </block>
                                                     </value>
                                                     <next>
                                                       <block type="variables_set" id=",|/0@uFO[kJp[pSjyfW~">
                                                         <field name="VAR" id=",O#!.RmBLV$D$25E`o7/">Syno_Port</field>
                                                         <value name="VALUE">
                                                           <block type="text" id="YmIhCu8+dV@OO0U[PWx#">
                                                             <field name="TEXT">5000</field>
                                                           </block>
                                                         </value>
                                                         <next>
                                                           <block type="variables_set" id="Z}%_nt.Jz``.b})ifYmx">
                                                             <field name="VAR" id="Eg)M29q*/71]Q#lGjYO;">Chat_token</field>
                                                             <value name="VALUE">
                                                               <block type="text" id="[^9?/_`o:[u8zr_:o:`T">
                                                                 <field name="TEXT">Hier dein Token</field>
                                                               </block>
                                                             </value>
                                                             <next>
                                                               <block type="comment" id="#X/LLHHf]+a]HP9ULZZA">
                                                                 <field name="COMMENT">Debugmodus an/aus</field>
                                                                 <next>
                                                                   <block type="variables_set" id="]Dg;,gKp,/]Sb1cUFi?n">
                                                                     <field name="VAR" id="D5Tj,(Y%B2Tp[@g/2DPn">Debug_URL</field>
                                                                     <value name="VALUE">
                                                                       <block type="logic_boolean" id="0~lqDtIM29hgH2or)}mL">
                                                                         <field name="BOOL">TRUE</field>
                                                                       </block>
                                                                     </value>
                                                                     <next>
                                                                       <block type="variables_set" id="W=GM=?`a~14E-J+QXSAQ">
                                                                         <field name="VAR" id="/j={Oe4(A3y)y{F~G67H">Debug_send_Result</field>
                                                                         <value name="VALUE">
                                                                           <block type="logic_boolean" id="*JUO/RsrY?M/l53;H_pF">
                                                                             <field name="BOOL">TRUE</field>
                                                                           </block>
                                                                         </value>
                                                                         <next>
                                                                           <block type="comment" id="[gDu2J;3btcPa(EESlU!">
                                                                             <field name="COMMENT">Ab hier Trigger</field>
                                                                             <next>
                                                                               <block type="on_ext" id="9h_zLLHz{65UPzm^$7}e">
                                                                                 <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                                                                 <field name="CONDITION">ne</field>
                                                                                 <field name="ACK_CONDITION"></field>
                                                                                 <value name="OID0">
                                                                                   <shadow type="field_oid" id="NgekYWG@PsA7G02OF}rj">
                                                                                     <field name="oid">0_userdata.0.Test123</field>
                                                                                   </shadow>
                                                                                 </value>
                                                                                 <statement name="STATEMENT">
                                                                                   <block type="controls_if" id="mSYXDpsYHKUM+j9uSS2s">
                                                                                     <mutation else="1"></mutation>
                                                                                     <value name="IF0">
                                                                                       <block type="logic_compare" id="55HN]QCkz$?W=xUf*cx_">
                                                                                         <field name="OP">EQ</field>
                                                                                         <value name="A">
                                                                                           <block type="on_source" id="l[/NtLhpCNaa5/@gH6X-">
                                                                                             <field name="ATTR">state.val</field>
                                                                                           </block>
                                                                                         </value>
                                                                                         <value name="B">
                                                                                           <block type="logic_boolean" id="),*:R)Nryc!rExr_0IK=">
                                                                                             <field name="BOOL">TRUE</field>
                                                                                           </block>
                                                                                         </value>
                                                                                       </block>
                                                                                     </value>
                                                                                     <statement name="DO0">
                                                                                       <block type="variables_set" id="*dQxDuFmm[ppsJg3%3!V">
                                                                                         <field name="VAR" id="`=hGQ*[0C+pxdf]k]sV]">Nachricht</field>
                                                                                         <value name="VALUE">
                                                                                           <block type="procedures_callcustomreturn" id="GD%^L~Wq_LIL_y86c}(2">
                                                                                             <mutation name="encodeURI">
                                                                                               <arg name="url"></arg>
                                                                                             </mutation>
                                                                                             <value name="ARG0">
                                                                                               <block type="text" id="+_Bx+X)YJc^_8RSz74zE">
                                                                                                 <field name="TEXT">Ich bin ein kleiner 🐧</field>
                                                                                               </block>
                                                                                             </value>
                                                                                           </block>
                                                                                         </value>
                                                                                         <next>
                                                                                           <block type="timeouts_settimeout" id="ht3)ckT6?(PDbQipm{_z">
                                                                                             <field name="NAME">timeout</field>
                                                                                             <field name="DELAY">1000</field>
                                                                                             <field name="UNIT">ms</field>
                                                                                             <statement name="STATEMENT">
                                                                                               <block type="procedures_callcustomnoreturn" id="[EP#gKV7fF}Y+8x8zkZ^">
                                                                                                 <mutation name="Chat_senden"></mutation>
                                                                                               </block>
                                                                                             </statement>
                                                                                           </block>
                                                                                         </next>
                                                                                       </block>
                                                                                     </statement>
                                                                                     <statement name="ELSE">
                                                                                       <block type="timeouts_cleartimeout" id="TKEEXDr0Qo(}RX.!blS5">
                                                                                         <field name="NAME">timeout</field>
                                                                                       </block>
                                                                                     </statement>
                                                                                   </block>
                                                                                 </statement>
                                                                               </block>
                                                                             </next>
                                                                           </block>
                                                                         </next>
                                                                       </block>
                                                                     </next>
                                                                   </block>
                                                                 </next>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </next>
                                               </block>
                                             </next>
                                           </block>
                                          </xml>
                                          

                                          @dslraser
                                          kann man das schon Produktiv übernehmen , was meinst du oder eher noch eine Testphase !

                                          Beispiel :

                                          https://forum.iobroker.net/topic/40424/alexa-ansagen-i-telegram-i-email-i-alias-i-visu-i-html?_=1640618730944

                                          Das einzigste was mich stört , ich finde keinen Butten um eine ( Test ) -Nachricht im Syn Chat zu löschen !?

                                          dslraserD Offline
                                          dslraserD Offline
                                          dslraser
                                          Forum Testing Most Active
                                          wrote on last edited by dslraser
                                          #46

                                          @glasfaser sagte in Synology Chat ...:

                                          kann man das schon Produktiv übernehmen , was meinst du oder eher noch eine Testphase !

                                          Ich habe bisher hier nur mitgelesen. Ich habe das Blockly noch nicht probiert, aber auf jeden Fall interessant.

                                          EDIT: nur zur Info, hier reicht Wert ( = wahr kann weg wenn Du auf wahr triggern möchtest, sonst nicht Wertnehmen)

                                          Bildschirmfoto 2021-12-29 um 14.31.04.png

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          296

                                          Online

                                          32.7k

                                          Users

                                          82.4k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Home
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe