Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. [gelöst] Javascript Semikolon verursacht Fehler

    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

    [gelöst] Javascript Semikolon verursacht Fehler

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

      Hallo in die Runde,

      in folgendem Script verursacht das Semikolon in Zeile 28 einen Fehler. Leider finde ich nicht den Grund dafür.....Anfänger eben. Kann ein Profi eine Erklärung liefern ?

      var wol = require('wake_on_lan');
      var myPC1 = "24:00:00:00:00:00";
      
      on({id: "javascript.0.QnapEin", change: "ne"}, function (obj)
          {
          if (getState("javascript.0.QnapEin").val == true)
          {
          wol.wake(myPC1);
          } 
          else if (getState("javascript.0.QnapEin").val == false)
          {
          node_ssh = require('node-ssh').NodeSSH;
       
          ssh = new node_ssh();
       
          ssh.connect({
       
          host: '192.000.00.00',
       
          port: '22',
          
          username: 'XXXX',
       
          password: 'XXXX'
       
          }).then(() => 
          
          ssh.execCommand('sudo poweroff');
          }});
      

      Danke im Voraus !!!

      paul53 1 Reply Last reply Reply Quote 0
      • paul53
        paul53 @Wiednitz last edited by

        @wiednitz sagte: Semikolon in Zeile 28 einen Fehler.

        Fehlende schließende Klammer vor dem Semikolon?

        Wiednitz 1 Reply Last reply Reply Quote 0
        • Wiednitz
          Wiednitz @paul53 last edited by

          @paul53

          Vielen Dank ! Jetzt läuft es !

          UncleSam 1 Reply Last reply Reply Quote 0
          • UncleSam
            UncleSam Developer @Wiednitz last edited by

            @wiednitz Bitte noch [Gelöst] in den Titel schreiben, danke.

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

            Support us

            ioBroker
            Community Adapters
            Donate

            870
            Online

            31.8k
            Users

            80.0k
            Topics

            1.3m
            Posts

            3
            4
            281
            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