Node-red-contrib-mpi-s7 installation error

undefined ls-remote -h -t ssh://git@github.com/gfcittolin/node-usb.git

Welcome to the forum @parthsarthi94.

Please show us the command you are using and the full output. Also what OS you are running? When pasting the output here use the </> button at the top of the forum entry window and paste it in.

Dear...

The question isn't 100% clear for me.
But I think you are looking for a connection S7 with MPI of Siemens PLC.
In stead of communication over ethernet,
S7 MPI works with T-sap adres..MPI = Multi Point Interface.
This is the location of the communication port on the "backbone bus".
mostly the MPI port of the PLC does have adres 2.1
I can't explain hou to program it but you need to communicatie with this number.
I think you better can switch to put and get command.
See for aditional information Siemens:
Siemens PLC document

Hopefully this will help you.

Best Regards Ton

OS is Yocto 2.6 based OpenEmbedded for IoT2040 Siemens Gateway

`npm i -g -unsafe--perm node-red-contrib-mpi-s7`

output:

npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/gfcittolin/node-usb.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/root/.npm/_logs/2021-01-11T04_16_18_667Z-debug.log

I think you need to have Git installed for that line to succeed. :face_with_monocle:

I'm not familiar with Yocto, but it doesn't seem to be a general purpose Linux distribution. So you'd have to consult their docs on how to achieve that.

2 Likes

Is that the full output from the install command?

I am not sure that error is actually caused by a problem with that node, it may be due to something else. Please go to your .node-red folder and run
npm list node-usb
and
npm list -g node-usb
and show us what you get.
Also please post the file package.json

Also are you able to install any other nodes, or do you get the same error there?

package.json

{
  "name": "node-red-project",
  "description": "A Node-RED Project",
  "version": "0.0.1",
  "private": true,
  "dependencies": {
    "node-red-dashboard": "*",
    "node-red-node-serialport": "*",
    "node-red-contrib-boolean-logic": "*",
    "node-red-contrib-iiot-opcua": "*",
    "node-red-contrib-modbus": "*",
    "@mindconnect/node-red-contrib-mindconnect": "*"
  }
}

i don't get any output on npm list node-usb & npm list -g node-usb

Yes, i am able to install other nodes.

i am going to try and build the image with git, and install the node again

thank you for your reply

That's odd, I can't work out why it is trying to access github.com/gfcittolin/node-usb.

1 Like

node-red-contrib-mpi-s7 Package.json

{
    "name": "node-red-contrib-mpi-s7",
    "version": "1.0.0-beta.1",
    "description": "Node-RED nodes to communicate with Siemens MPI/PPI/DP adapters",
    "main": "index.js",
    "dependencies": {
        "mpi-s7": "^0.3.1"
    },
    "repository": {
        "type": "git",
        "url": "https://github.com/st-one-io/node-red-contrib-mpi-s7.git"
    },
    "bugs": {
        "url": "https://github.com/st-one-io/node-red-contrib-mpi-s7/issues"
    },
    "keywords": [
        "hardware",
        "s7",
        "siemens",
        "plc",
        "mpi",
        "ppi",
        "dp",
        "profibus",
        "node-red"
    ],
    "node-red": {
        "nodes": {
            "mpi-s7": "red/mpi-s7.js"
        }
    },
    "author": "ST-One",
    "license": "GPL-3.0-or-later"
}

this is the json for the mpi-s7 library

and i saw that why it is going for github.com/gfcittolin/node-usb

the above contrib-mpi-s7 is dependent on mpi-s7 following is the package.json for it:

{
  "name": "mpi-s7",
  "version": "0.3.1",
  "description": "Node.JS library to communicate with MPI-USB adapters",
  "main": "src/index.js",
  "scripts": {
    "test": "nyc --reporter=html --reporter=text --reporter=text-summary mocha --timeout=3000 test/**/**.spec.js",
    "doc": "jsdoc -d doc/jsdoc/ -r -R README.md src/"
  },
  "author": "Guilherme Francescon Cittolin <guilherme@st-one.io>",
  "license": "GPL-3.0-or-later",
  "devDependencies": {
    "chai": "^4.2.0",
    "jsdoc": "^3.6.5",
    "mocha": "^8.1.3",
    "nyc": "^15.1.0"
  },
  "dependencies": {
    "usb": "github:gfcittolin/node-usb"
  }
}

here you can see they the dependencies are usb:github:gfcittolin/node-usb

Yes, you are right, I missed that. I wonder whether this is an oversight as I see that the published version of usb is the same as in that repository. I have submitted an issue to ask that question. Pulls in github:gfcittolin/node-usb when installing. · Issue #1 · st-one-io/node-red-contrib-mpi-s7 · GitHub

1 Like

thank you i will try build the IoT2040 image with git installed and try this node and update the output

@parthsarthi94 I have seen others with this device struggle install and/or use a few recent nodes (including some of the S7 nodes) due to it only having nodejs V8

As you are building an image, if at all possible, take node to V14 or 12.

Please let us all know how you get on.

1 Like

I have same problem.