Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. node-ssh für Javascript Adapter

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    node-ssh für Javascript Adapter

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

      Hallo Community,

      ich scheitere daran den node-ssh adapter aktiviert/installliert zu bekommen. Habe ihn in der Adapterkonfiguration des Javascript.0 Adapters in Zusätzliche NPM-Module eingetragen: 'node-ssh'

      er wird auch angezeigt aber das war es leiden schon. Was muss ich tun um die installation zu triggern. Unter /opt/iobroker/node_modules/ wird node-ssh nicht angezeigt. Manuelle installation soll man ja vermeiden.

      Vielen Dank vorab.

      gruß
      Thomas

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

        @syrex sagte:

        Unter /opt/iobroker/node_modules/ wird node-ssh nicht angezeigt.

        Die Module für den Javascript-Adapter befinden sich unter /opt/iobroker/node_modules/iobroker.javascript/node_modules

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

          @paul53 said in node-ssh für Javascript Adapter:

          /opt/iobroker/node_modules/iobroker.javascript/node_modules

          Hi Paul,

          hier wird der adapter angezeigt:
          pi@Raspi4B-ioBroker:/opt/iobroker/node_modules/iobroker.javascript/node_modules $ ls
          @iobroker node-ssh qs request semver tough-cookie @types

          leider funktioniert mein script trotzdem nicht.

          javascript.0 2021-01-06 19:34:12.465 error (7367) at Immediate.setImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5384:37)
          javascript.0 2021-01-06 19:34:12.465 error (7367) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:472:25)
          javascript.0 2021-01-06 19:34:12.464 error (7367) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1055:38)
          javascript.0 2021-01-06 19:34:12.464 error (7367) at Object.on (script.js.common.Ambilight_Shutdown:10:15)
          javascript.0 2021-01-06 19:34:12.463 error (7367) Error in callback: TypeError: node_ssh is not a constructor

          Vielleicht liegt es ja gar nciht am node-ssh. Ist mein Script falsch?

          node_ssh = require('node-ssh');
          on({id:'0_userdata.0.Ambilight', change: 'ne'}, (dp) => {
          if(dp.state.val == false) {
          let ssh = new node_ssh();
          ssh.connect({ host: '192.168.178.149',
          username: 'pi',
          password: '*******'}).then(()=> {
          ssh.execCommand("sudo shutdown -h 1");
          })
          }
          });

          gruß
          Thomas

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

          Support us

          ioBroker
          Community Adapters
          Donate
          FAQ Cloud / IOT
          HowTo: Node.js-Update
          HowTo: Backup/Restore
          Downloads
          BLOG

          361
          Online

          32.0k
          Users

          80.3k
          Topics

          1.3m
          Posts

          javascript adapter node-ssh npm-modules
          2
          3
          509
          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