sunsetdk / node-red-contrib-wmbus-client

A node-red node to receive data from a USB vm-bus dongle and output data for Kamstrup21 water meter.
MIT License
6 stars 3 forks source link

serialport 6.2.2 only in devDependencies #1

Closed tobang closed 5 years ago

tobang commented 5 years ago

Hi, Just to let you know that the serialport 6.2.2 is only in the devDependencies in package.json, which makes the select box fail when looking for serial ports. I manually moved the dependency to dependencies, and reinstalled. Then it works and correctly shows the serial ports on my Rasberry PI.

ElwayDenmark commented 5 years ago

Hi, Just to let you know that the serialport 6.2.2 is only in the devDependencies in package.json, which makes the select box fail when looking for serial ports. I manually moved the dependency to dependencies, and reinstalled. Then it works and correctly shows the serial ports on my Rasberry PI.

@tobang - I am a bit new on Linux (and not a developer/coder)- how do you re-install?

I can download the software and change the dependencies as described by you. But how do I install the package then. Normally, I'd go to the node-red folder and enter "sudo npm install node-red-contrib-wmbus-client" - but that will just pull the repository files right? How do I install the (modified) local files?

Also - not sure I have moved the "6.2.2" dependency correctly and still have a well-formed package.json - will you share your package.json, please??

Background info: I have installed node-red-contrib-serialport, and got my Imst-871A dongle "connected" and now I want to call this in the wmbus-client Kamstrup21 node. But nothing is selectable. I am running node-red in docker (in a Home Assistant setup) - the node-red container can see the dongle fine (since I can get "connected" on the serialport node) - so far, so good. I got my Kamstrup 21 serial and key - just need to pull in the port....

Greetings from Aalborg, Denmark

tobang commented 5 years ago

@ElwayDenmark I am also from Denmark :-) But I will write the answer in English, so others with the same problem can find the answer :-) First go to the node-red home directory using this: cd .node-red/node_modules/node-red-contrib-wmbus-client Edit the package.json file by typing: sudo nano package.json Move the line: "serialport": "^6.2.2" from dev_dependencies to dependencies so it looks like mine below: "dependencies": { "bitwise-xor": "0.0.0", "wmbus-client": "https://github.com/sunsetdk/wmbus-client/tarball/master", "serialport": "^6.2.2" }, "dependencies_develop": { "bitwise-xor": "^0.0.0", "wmbus-client": "file:../../wmbus-client/wmbus-client" } Press ctrl + x to exit nano and press y to confirm that you want to save changes. Type two times cd .. to get to the .node-red folder Type npm install And the dependencies should install. Restart node-red Hope this helps you :-)

sunsetdk commented 5 years ago

I have fixed this now.

René