Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Tür klingel mit ip cam verbinden

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Tür klingel mit ip cam verbinden

    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dan4711 last edited by

      Moin Moin,
      ich hab da mal wieder eine frage.
      Ich habe meine türklingel mit einem shelly smart gemacht und habe ein skript für alexa und telegram das sie mir sagt und es mir geschickt wird wenn es geklingelt hat.nun möchte ich gern ein schritt weiter gehen und meine ip cam von der haustür einbinden ,quasi so das wenn geklingelt wird auch ein bild von der ip kam per telegram kommt. wie kann ich ein schnappschuss von der ip cam per telegram bekommen wenn es geklingelt hat? MfG daniel

      Peoples crunchip 2 Replies Last reply Reply Quote 0
      • Peoples
        Peoples @dan4711 last edited by

        @dan4711
        Mein Beispiel

        Du kannst über Telegram auch Bilder verschicken:

        // Hier der Aufruf
        //bild_senden(source_url_main_door, 'Es hat an der Haustüre geklingelt');
        
        // Deine Bildquelle
        var source_url_main_door = 'http://http://192.168.2.50/tmpfs/snap.jpg';
        
        // Die Funktion zum versenden
        function bild_senden(source_url, meldung) {
            //Definition der Bild URL in Script Kamera_Bilder_speichern
            request.get({url: source_url, encoding: 'binary'}, function (err, response, body) {
                fs.writeFile("/tmp/snap.jpg", body, 'binary', function(err) {
                    if (err) {
                        log(err);
                    } 
                    else {
                        log('Bild versenden ausgeführt');
                        setTimeout(function() {sendTo('telegram.0', 'send', {text: '/tmp/snap.jpg', caption: meldung});}, 2000);
                    }
                });
                
            });
        }
        
        D 1 Reply Last reply Reply Quote 0
        • D
          dan4711 @Peoples last edited by

          @Peoples wie sieht das in blockly aus? ich bin anfänger

          Peoples 1 Reply Last reply Reply Quote 0
          • Peoples
            Peoples @dan4711 last edited by

            @dan4711
            sorry aber ich habe keine Ahnung von Blocky hab mich nie damit beschäftigt.

            Als ich angefangen habe war für mich klar dass ich das alles Coden können möchte somit war Blocky nie eine Option.

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

              @dan4711 ein Beispiel in Blockly

              <xml xmlns="http://www.w3.org/1999/xhtml">
                <variables>
                  <variable type="undefined" id="timeout">timeout</variable>
                  <variable type="undefined" id="timeout2">timeout2</variable>
                </variables>
                <block type="procedures_defnoreturn" id="~pPk?PHjzu0{iCY*^,Mh" x="-1487" y="-537">
                  <field name="NAME">foto senden</field>
                  <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                  <statement name="STACK">
                    <block type="timeouts_settimeout" id="%parHE%U;Jg[8keop7B#">
                      <field name="NAME">timeout</field>
                      <field name="DELAY">1500</field>
                      <field name="UNIT">ms</field>
                      <statement name="STATEMENT">
                        <block type="exec" id=")s4eqoL)+rnTyhSAl1/f">
                          <mutation with_statement="false"></mutation>
                          <field name="WITH_STATEMENT">FALSE</field>
                          <field name="LOG"></field>
                          <value name="COMMAND">
                            <shadow type="text" id="x`Y6eq`nky[SMncjoLv.">
                              <field name="TEXT">wget --output-document /opt/iobroker/ipcam/alarm.jpg  http://benutzer:pw@192.168.178.xx:xx/mjpeg/snap.cgi?chn=0</field>
                            </shadow>
                          </value>
                          <next>
                            <block type="timeouts_settimeout" id="%@nkC[RH(?Ec:@AGgZ:,">
                              <field name="NAME">timeout2</field>
                              <field name="DELAY">1500</field>
                              <field name="UNIT">ms</field>
                              <statement name="STATEMENT">
                                <block type="telegram" id="d38k#q#az~Oi^iSLuj9.">
                                  <field name="INSTANCE">.1</field>
                                  <field name="LOG"></field>
                                  <field name="SILENT">FALSE</field>
                                  <field name="PARSEMODE">default</field>
                                  <value name="MESSAGE">
                                    <shadow type="text" id="at(q2i6A623??3sky7BI">
                                      <field name="TEXT">/opt/iobroker/ipcam/alarm.jpg</field>
                                    </shadow>
                                  </value>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </statement>
                </block>
                <block type="on_ext" id="`GUr59!Yl5mDs=I+Jo5B" x="-2087" y="-438">
                  <mutation items="1"></mutation>
                  <field name="CONDITION">ne</field>
                  <field name="ACK_CONDITION"></field>
                  <value name="OID0">
                    <shadow type="field_oid" id="n1LLug[:];X(NGRrHI9M">
                      <field name="oid">kamera.0.detection-haustuer</field>
                    </shadow>
                  </value>
                  <statement name="STATEMENT">
                    <block type="controls_if" id="Ci9yel;nZt;3HGWWTd%p">
                      <value name="IF0">
                        <block type="logic_compare" id="fsEVLCKjDeTnXQO4viQs">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="get_value" id="G2%KCoV,9q)w;P-cWe8F">
                              <field name="ATTR">val</field>
                              <field name="OID">kamera.0.detection-haustuer</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_boolean" id="T#4?AUYpx3)^tR)foJe(">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="telegram" id="4N)7(_2cP}HZ|}FBw=8|">
                          <field name="INSTANCE">.1</field>
                          <field name="LOG"></field>
                          <field name="SILENT">FALSE</field>
                          <field name="PARSEMODE">default</field>
                          <value name="MESSAGE">
                            <shadow type="text" id="W6;1HREN=O|*]-[/it?8">
                              <field name="TEXT">Bewegung erkannt!</field>
                            </shadow>
                          </value>
                          <next>
                            <block type="procedures_callnoreturn" id="0[]Zqa;B0EX}E|~T8FNe">
                              <mutation name="foto senden"></mutation>
                              <next>
                                <block type="control" id="=~//[QijuXgTUV`dhK6C">
                                  <mutation delay_input="true"></mutation>
                                  <field name="OID">javascript.0.scriptEnabled.Kamera.Haustür.tastatur_telegram</field>
                                  <field name="WITH_DELAY">TRUE</field>
                                  <field name="DELAY_MS">4000</field>
                                  <field name="UNIT">ms</field>
                                  <field name="CLEAR_RUNNING">FALSE</field>
                                  <value name="VALUE">
                                    <block type="logic_boolean" id="*BFJ2YXRb2o:Qeq*N?5X">
                                      <field name="BOOL">TRUE</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="control" id="!m?e.^@6?i_F`}]9=Ft8">
                                      <mutation delay_input="true"></mutation>
                                      <field name="OID">kamera.0.detection-haustuer</field>
                                      <field name="WITH_DELAY">TRUE</field>
                                      <field name="DELAY_MS">1000</field>
                                      <field name="UNIT">ms</field>
                                      <field name="CLEAR_RUNNING">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="{v962!L:c8dT,7_3LPG/">
                                          <field name="BOOL">FALSE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </statement>
                  <next>
                    <block type="on_ext" id="f}:uXO2?99R}?f]h]J-S">
                      <mutation items="1"></mutation>
                      <field name="CONDITION">ne</field>
                      <field name="ACK_CONDITION"></field>
                      <value name="OID0">
                        <shadow type="field_oid" id="O~3FDvDA|ALVHq{WMp,,">
                          <field name="oid">kamera.0.trigger-haustuer</field>
                        </shadow>
                      </value>
                      <statement name="STATEMENT">
                        <block type="controls_if" id="=39a/~tBL~MwYaS3UiJy">
                          <value name="IF0">
                            <block type="logic_compare" id="HiX[Jr;9d)MV4H#35zrD">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="6?v]cu);WSySwi#k(|I3">
                                  <field name="ATTR">val</field>
                                  <field name="OID">kamera.0.trigger-haustuer</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="-012d]m,uHS7@TBav3ER">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="procedures_callnoreturn" id="ZPW9T~}t6~|bgFE0{,DB">
                              <mutation name="foto senden"></mutation>
                              <next>
                                <block type="control" id="E=-#mYU=W5y(Y~c1;!CP">
                                  <mutation delay_input="false"></mutation>
                                  <field name="OID">kamera.0.trigger-haustuer</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="logic_boolean" id="Ix*!Q|=a`[:8b(M-yoEw">
                                      <field name="BOOL">FALSE</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="control" id="81sYN{XDiN!(STP#]^2j">
                                      <mutation delay_input="false"></mutation>
                                      <field name="OID">javascript.0.scriptEnabled.Kamera.Haustür.tastatur_telegram</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="ng^-#81XBFGuI63xNT:k">
                                          <field name="BOOL">FALSE</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="control" id="f*#!W[jcd/GhWJRn{%ZK">
                                          <mutation delay_input="true"></mutation>
                                          <field name="OID">javascript.0.scriptEnabled.Kamera.Haustür.tastatur_telegram</field>
                                          <field name="WITH_DELAY">TRUE</field>
                                          <field name="DELAY_MS">3</field>
                                          <field name="UNIT">sec</field>
                                          <field name="CLEAR_RUNNING">FALSE</field>
                                          <value name="VALUE">
                                            <block type="logic_boolean" id="y5E9=KXkltEoCF#+;m7y">
                                              <field name="BOOL">TRUE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                      </statement>
                    </block>
                  </next>
                </block>
              </xml>
              
              E 1 Reply Last reply Reply Quote 0
              • E
                el_malto @crunchip last edited by

                @crunchip sagte in Tür klingel mit ip cam verbinden:

                @dan4711 ein Beispiel in Blockly

                Auch wenn vielleicht nur alles Netzintern, aber man sieht das Benutzer und PW von deiner Cam im Skript.

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

                Support us

                ioBroker
                Community Adapters
                Donate

                470
                Online

                31.9k
                Users

                80.3k
                Topics

                1.3m
                Posts

                4
                6
                544
                Loading More Posts
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes
                Reply
                • Reply as topic
                Log in to reply
                Community
                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                The ioBroker Community 2014-2023
                logo