Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Gosund per Blockly steuern

    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

    Gosund per Blockly steuern

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

      Hallo zusammen,
      ich bin momentan am verzweifeln.
      Ich versuche eine Gosund SP1 Steckdose per Blockly zu schalten.
      Dazu habe ich einen Zeitplan angelegt und eine feste Uhrzeit vergeben. Dann steuere ich die Objekt ID "switch_1" auf "false".

      Sobald die Uhrzeit erreicht ist, sagt mir das Script folgendes:

      javascript.0 (20459) script.js.Musik.Musik-Wohnzimmer: setForeignState(id=tuya.0.02755385d8f15bdd799a.1, state=false) - wurde nicht ausgeführt, während der Debug-Modus aktiv ist
      

      So sieht mein Blockly Script aus:

      schedule("34 19 * * *", function () {
        setState("tuya.0.02755385d8f15bdd799a.1"/*switch_1*/, false);
      });
      
      

      Über "Objekte" kann ich manuell die Steckdose ein und ausschalten (Tuya Adapter/original FW).

      Vielen Dank für die Hilfe!
      Grüße
      Sascha

      harrym 1 Reply Last reply Reply Quote 0
      • harrym
        harrym @SirSpielALot last edited by

        @SirSpielALot na dann schalte doch den Debug modus aus?

        S 1 Reply Last reply Reply Quote 0
        • S
          SirSpielALot @harrym last edited by SirSpielALot

          @harrym, ich hatte kurz gehofft das es so einfach sei. Direkt getestet. Allerdings schaltet der nicht.

          Jetzt sagt er:

          error on get: Error: No connection has been made to the device.
          
          harrym 2 Replies Last reply Reply Quote 0
          • harrym
            harrym @SirSpielALot last edited by

            @SirSpielALot rechts oben ... schraubenschlüssel. da hast du 2 möglichkeiten ... debug und verbose .... da kannste den debug wieder deaktivieren. Ja, es ist so einfach 😉

            S 1 Reply Last reply Reply Quote 0
            • S
              SirSpielALot @harrym last edited by

              @harrym, das ist mir gerade recht peinlich. Vielen Dank für deine Hilfe!

              1 Reply Last reply Reply Quote 0
              • harrym
                harrym @SirSpielALot last edited by

                @SirSpielALot und dein blockly ist da echt sehr spartanisch. mach mal nen export und stell ihn hier rein. (unter code tags)

                S 1 Reply Last reply Reply Quote 0
                • S
                  SirSpielALot @harrym last edited by SirSpielALot

                  @harrym, das schalten funktioniert jetzt.

                  <xml xmlns="https://developers.google.com/blockly/xml">
                    <block type="schedule" id="*%%5Ue`],J9(GiZmFbZv" x="63" y="-312">
                      <field name="SCHEDULE">0 22 * * 1-5</field>
                      <statement name="STATEMENT">
                        <block type="control" id="/7y.NYqhbw9@1q@T1P82">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">tuya.0.02755385d8f15bdd799a.1</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="[L;und},D$c+TKmr=BC~">
                              <field name="BOOL">FALSE</field>
                            </block>
                          </value>
                        </block>
                      </statement>
                      <next>
                        <block type="schedule" id="@GgD+[Ix8l~XNBzTVU24">
                          <field name="SCHEDULE">0 2 * * 0,6</field>
                          <statement name="STATEMENT">
                            <block type="control" id="P_%xziqgbb?;%dx9bzC.">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">tuya.0.02755385d8f15bdd799a.1</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="logic_boolean" id="L/k1x++3oMYejb^0=$]{">
                                  <field name="BOOL">FALSE</field>
                                </block>
                              </value>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </xml>
                  
                  harrym 1 Reply Last reply Reply Quote 0
                  • harrym
                    harrym @SirSpielALot last edited by

                    @SirSpielALot na dann ist ja alles gut 😉

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

                    Support us

                    ioBroker
                    Community Adapters
                    Donate

                    625
                    Online

                    31.8k
                    Users

                    80.0k
                    Topics

                    1.3m
                    Posts

                    blockly
                    2
                    8
                    410
                    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