Community
OpenEnergyMonitor

Community

Nodered modbus

Tags: #<Tag:0x00007f6e0facd0a8>

Hi All,

I am trying to install Node-red-contrib-modbus from the web interface, but it just shows the progress bar and then disapears. if i try and install from a SSH window i get an error

[email protected](rw):node-red$ npm install node-red-contrib-modbussudo 
-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-npm WARN engine [email protected]: wanted: {"node":"6.x || 8.x"} (current: {"node":"0.10.29","npm":"1.4.21"})
-\|/-\|/-\|/-\|/-\npm ERR! cb() never called!
npm ERR! not ok code 0
[email protected](rw):node-red$ 

can anyone help?

By the error message I would guess you’re on an older version of node.js and maybe an old version of npm. And node-red-contrib-modbus wants newer versions.

I am on these versions:
Node-RED version: v0.17.5
Node.js version: v6.11.4
npm version: v3.10.10

If you’re running an emonPi or a Raspberry Pi there is upgrade info here:
https://nodered.org/docs/hardware/raspberrypi

You may want to post a question on the Node-RED forum.

EDIT: Make sure you make a good backup of your system before running any big update (such as this one).

EDIT2: Take a look at this thread:

Many Thanks that sorted it. took about 20 minuites to update with the script

I now have the modbus installed and i am wondering if someone can help with some nodered code.
The information it pull is grid Watts

I have a function element with the code

msg.payload = msg.payload[70]
return msg;

This give the output 64412 but needs to be changed to -1123. (watts)

From what i have read 65535 is 0 and a postive number shows correctly.

can anyone help?

Thanks

Paul