Hallo,
I try to read data from a serial port of raspberry PI. I have connected two PIs via serial Port. With "node serialtest.js" I get a new line for each character I send to node.js
With node-red this is my testflow. I now my node sends no messages, so debug window stays empty.
[{"id":"cf7998f7.96c67","type":"debug","z":"b451655f.5db818","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":890,"y":100,"wires":[]},{"id":"4339883f.6904c","type":"inject","z":"b451655f.5db818","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":360,"y":100,"wires":[["e7fdda3c.73eee8"]]},{"id":"e7fdda3c.73eee8","type":"testnode","z":"b451655f.5db818","name":"testnode","serialport":"/dev/serial0","x":620,"y":100,"wires":[["cf7998f7.96c67"]]}]
With every click on the inject-node-button it writes "test". I can see that on the terminal receiver. As soon as I type only one character in the terminal, which now should receive node-red I get a "Port closed" log entry in node red. Whats wrong here? Why isn't it running in Node-Red whereas it runs in a demo file?
Please remove the ".txt" from the files, then it has the correct file ending, otherwise I couldn't upload.
serialtest.js.txt (887 Bytes) testnode.html.txt (1.0 KB) testnode.js.txt (1.6 KB) package.json (457 Bytes)