Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Gerät mit http Befehlen steuern/abfragen

    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

    Gerät mit http Befehlen steuern/abfragen

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

      Hallo.

      Ich habe dieses lustige Hutschienen-Dingsbums welches 12 ein und Ausgänge hat:
      link text
      link text

      Das Teil würde ich gerne sinnvoll mit Blockly in iobroker einbinden. Über den Browser kann ich Eingangszustände und Ausgangszustände abfragen und Ausgänge schalten:

      Beispiele:
      Eingangs-Zustand abfragen: http://192.168.1.57/input1?PW=33118
      Antwort: input1;OFF

      Ausgangs-Zustand abfragen: http://192.168.1.60/output2?PW=33118
      Antwort: output2;ON

      Ausgang schalten: http://192.168.1.60/outputaccess4?PW=33118&State=ON&
      Antwort: output;0014

      Wie macht man's richtig?

      Ich könnte natürlich einfach den Ausgang ein/ausschalten. Aber ich würde gerne auch in der VIS eine Rückmeldung sehen ob der Ausgang auch wirklich geschaltet wurde.
      Für mein Verständnis würde ich nun z.B. all 10 Sekunden oder so abfragen welcher Status jeder Ausgang nun hat, oder?

      Soll ich's so tun...?:

      <xml xmlns="http://www.w3.org/1999/xhtml">
        <block type="on_ext" id="|!p,R~kWe(W:{zM;s|Wo" x="-712" y="-837">
          <mutation items="1"></mutation>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="u3(^IY.L{?;)w]NIrTj`">
              <field name="oid">WEB_IO_192.168.1.Output_0.Output_1</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="KH*!rCsEC5nOPK8xzyv9">
              <mutation elseif="1"></mutation>
              <value name="IF0">
                <block type="logic_compare" id="$*4nWry8)/w5iQoy$UCj">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="get_value" id="1ZbyC8j};=CTguwEl6lF">
                      <field name="ATTR">val</field>
                      <field name="OID">WEB_IO_192.168.1.Output_0.Output_1</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_boolean" id="ycK$5%#=1MPZM#e(33!J">
                      <field name="BOOL">TRUE</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="request" id="n8Dr(.}Qe)!GH.yiUxaI">
                  <mutation with_statement="false"></mutation>
                  <field name="WITH_STATEMENT">FALSE</field>
                  <field name="LOG"></field>
                  <value name="URL">
                    <shadow type="text" id="`{D-$HwW!%t4.pdlipp*">
                      <field name="TEXT">http://192.168.1.60/outputaccess11?PW=33118&amp;State=ON&amp;</field>
                    </shadow>
                  </value>
                </block>
              </statement>
              <value name="IF1">
                <block type="logic_compare" id="}IQgNOq~VNB5kndZLNIh">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="get_value" id="$`kn;tPqaRtHq+u)ymQj">
                      <field name="ATTR">val</field>
                      <field name="OID">WEB_IO_192.168.1.Output_0.Output_1</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_boolean" id="_zUus@P3aQ//A.!!@x^y">
                      <field name="BOOL">FALSE</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO1">
                <block type="request" id="5-SR|,T4}e|CIk-@|nY=">
                  <mutation with_statement="false"></mutation>
                  <field name="WITH_STATEMENT">FALSE</field>
                  <field name="LOG"></field>
                  <value name="URL">
                    <shadow type="text" id="r=SYfE{xTq+ZAge*rTP3">
                      <field name="TEXT">http://192.168.1.60/outputaccess11?PW=33118&amp;State=OFF&amp;</field>
                    </shadow>
                  </value>
                </block>
              </statement>
            </block>
          </statement>
        </block>
        <block type="request" id="hjUZ%[Xvik{u@t)30nU," x="638" y="87">
          <mutation with_statement="false"></mutation>
          <field name="WITH_STATEMENT">FALSE</field>
          <field name="LOG"></field>
          <value name="URL">
            <shadow type="text" id="L#^[g*;uSo.I/5k:ten~">
              <field name="TEXT">text</field>
            </shadow>
          </value>
        </block>
        <block type="sendto_custom" id="#EVE2jdj~ADS~/,cYJm1" x="788" y="362">
          <mutation items="parameter1" with_statement="false"></mutation>
          <field name="INSTANCE">admin.0</field>
          <field name="COMMAND">send</field>
          <field name="WITH_STATEMENT">FALSE</field>
          <field name="LOG"></field>
          <value name="ARG0">
            <shadow type="text" id="D?k~o0CWmB=X[eSpLPL4">
              <field name="TEXT"></field>
            </shadow>
          </value>
        </block>
        <block type="email" id="{v$1UI];iX~tdmk|o@{!" x="388" y="512">
          <field name="INSTANCE"></field>
          <field name="IS_HTML">FALSE</field>
          <field name="LOG"></field>
          <value name="TO">
            <shadow type="text" id="^xQL-ex`R{hY/|4fNBjt">
              <field name="TEXT"></field>
            </shadow>
          </value>
          <value name="TEXT">
            <shadow type="text" id="KJLZ!S(CiR.Lf}cDjlu[">
              <field name="TEXT"></field>
            </shadow>
          </value>
          <value name="SUBJECT">
            <shadow type="text" id="mh!Vs^^RT%QOhyiF)Q~I">
              <field name="TEXT"></field>
            </shadow>
          </value>
        </block>
      </xml>
      

      Danke!
      Roelli.

      1 Reply Last reply Reply Quote 0
      • R
        Roelli last edited by

        So... inzwischen hab ich's dann doch geschafft den Ausgang ein/ausschaltbar zu machen.

        ABER:

        Wie kann ich in VIS anzeigen lassen welchen Zustand z.B. eine Lampe hat?

        ![https://www.dropbox.com/s/dx7p36botr16ihh/lanpe.jpg?dl=0](image url)

        Im Moment benutze ich das Lampensymbol in VIS, und das ändert auch den Zustand wenn eine Leuchte lokal über einen Schalter eingeschaltet wird.

        Woher weis diese Symbol welchen Zustand es haben soll?

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

        Support us

        ioBroker
        Community Adapters
        Donate

        505
        Online

        31.9k
        Users

        80.3k
        Topics

        1.3m
        Posts

        1
        2
        225
        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