Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. axel_k

    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

    A
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 0
    • Groups 0

    axel_k

    @axel_k

    0
    Reputation
    6
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    axel_k Follow

    Latest posts made by axel_k

    • RE: Javascript: Synology NAS per ssh beep oder LED ansteuern

      Habs hinbekommen statt sudo -i gehört da sudo - S hin...

        SetState('0_userdata.0.WarteShutdown',true);
        on({id: '0_userdata.0.WarteShutdown', val:false}, function (obj) {
            const {NodeSSH} = require('node-ssh')
            const ssh = new NodeSSH()
            ssh.connect({   host: 'MeinNas',
                        port: 222,
                        username: 'axel',
                        password: 'Passwort'}).then(()=> {
                console.log("Shutdown startet");
                ssh.execCommand('echo "Passwort"|sudo -S sh -c "echo 9 > /dev/ttyS1"');  //* LED blinkt grün
                ssh.execCommand('echo "Passwort"|sudo -S shutdown -h +1');
                ssh.execCommand('echo "Passwort"|sudo -S sh -c "echo 2 > /dev/ttyS1"');  //* kurzer Beep
                   })
        });
      posted in JavaScript
      A
      axel_k
    • Javascript: Synology NAS per ssh beep oder LED ansteuern

      Hallo,
      wie kann ich LED und Beep auf meinem Synology per Javascript ansteuern?

      Ich bekomme es nicht hin, das Root-Passwort zu übergeben, Beeper und LED dürfen aber nur durch root angesteuert werden...
      Irgendwelche Ideen?

      Hier mein Skript; shutdown selber funktioniert.

      SetState('0_userdata.0.WarteShutdown',true);
      on({id: '0_userdata.0.WarteShutdown', val:false}, function (obj) {
          const {NodeSSH} = require('node-ssh')
      
          const ssh = new NodeSSH()
      
          ssh.connect({   host: 'MeinNas',
                      port: 222,
                      username: 'axel',
                      password: 'Passwort'}).then(()=> {
              console.log("Shutdown startet");
              ssh.execCommand('echo "Passwort"|sudo -i sh -c "echo 9 > /dev/ttyS1"');  //* LED blinkt grün
              ssh.execCommand('echo "Passwort"|sudo -S shutdown -h +1');
              ssh.execCommand('echo "Passwort"|sudo -i sh -c "echo 2 > /dev/ttyS1"');  //* kurzer Beep
          
                 })
      });
      

      Gruß, Axel

      posted in JavaScript
      A
      axel_k
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
    The ioBroker Community 2014-2023
    logo