tyrrellsystems / node-red-contrib-serial-modbus

This node is now maintained from @leifnel's fork
https://github.com/leifnel/node-red-contrib-serial-modbus
Apache License 2.0
7 stars 13 forks source link

Node does not send data at all #21

Closed leifnel closed 7 years ago

leifnel commented 7 years ago

I try to poll a power meter at id 0x0a, register 0x011e, 4 byte long. So I set the slave to 10, type to Holding Register, start to 286, count to 4.

I have attached a PC to the bus, and it can see the data if I send it from the "serial output" node. But node-red-contrib-serial-modbus does not send any data at all. The node shows connected at the edit-dashboard, and I have removed the config for the serial output node I used for testing.

The rs485 is on /dev/ttyUSB1 on respberry pi.

leifnel commented 7 years ago

1 Apr 15:41:25 - [info] [modbusSerialConfig:9887ceaf.625] Error: Error: Port Not Open

hardillb commented 7 years ago

Can I suggest you have a look at the other Node-RED modbus node http://flows.nodered.org/node/node-red-contrib-modbus It supports serial as well, and I don't have the time (or the kit) to look after this one any more.

leifnel commented 7 years ago

Okay. It was human error; I tried to open /dev/usbTTY1 instead of /dev/ttyUSB1 Doh.

However, now my problem is that the serial port is transmitting with parity:none. I have traced it as far as to serialport.js, which is called with parity:even in the setup, but something below is appearently not obeying it.