Posts: 66
Threads: 13
Joined: Apr 2016
Reputation:
0
Hi all, is it possible to install Serial port nodes on openplotter's version (0.17.5) of node red?
if yes, how?
I can't join the "serial in" and "serial out" palettes
tanks
Posts: 799
Threads: 46
Joined: Jun 2017
Reputation:
25
2018-05-07, 10:38 AM
(This post was last modified: 2018-05-07, 11:15 AM by jim321.)
what are you trying to do?
i have used arduino. gpio and serial nodes all use serial connections..
sailoog has rebuilt the serial "usb" tab in next release.. it even has a enable/disable UART to free that one up."bluetooth"
hopefully it will be released soon.
https://github.com/sailoog/openplotter/c...ntegration
Posts: 66
Threads: 13
Joined: Apr 2016
Reputation:
0
tanks a lot for the answer...
I'm trying to send coordinate, heading, speed, meteo info, battery level to the adafruit thermal printer
....
Posts: 799
Threads: 46
Joined: Jun 2017
Reputation:
25
2018-05-07, 01:06 PM
(This post was last modified: 2018-05-07, 03:59 PM by jim321.)
you could pull data from web-socket send to serial.. example below, you can only have one WS so use the one already there or use link node, select your config for serial node "printer".i dont know anything about that printer but other ones use cups drivers ect for setup.this flow will continually send data you will need to setup a switch somehow to send once maybe a button on dashboard.
you could get all the data directly from the web socket "ws://localhost:3000/signalk/v1/stream" it might be more than you need or you could parse out what you want.as in example for lat.
Code: [{"id":"9b02acf9.c5cea","type":"websocket in","z":"c0812b05.2e9308","name":"ws","server":"ae07cdf2.445f1","client":"","x":50,"y":100,"wires":[["fbd5273f.9a1e28"]]},{"id":"fbd5273f.9a1e28","type":"jsonpath","z":"c0812b05.2e9308","expression":"$.updates..values[*]","split":false,"name":"Signal K delta values","x":220,"y":100,"wires":[["18af8a77.9fec86"]]},{"id":"18af8a77.9fec86","type":"function","z":"c0812b05.2e9308","name":"merge values","func":"var paths={};\nvar arrayLength = msg.payload.length;\nfor (var i = 0; i < arrayLength; i++) {\n paths[msg.payload[i].path]=msg.payload[i].value;\n}\nmsg.payload = paths;\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":100,"wires":[["16f4fff3.e963e"]]},{"id":"16f4fff3.e963e","type":"function","z":"c0812b05.2e9308","name":"navigation.position.latitude","func":"var signalk_key=\"navigation.position\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n msg.payload=msg.payload[signalk_key][\"latitude\"];\n return msg;\n}","outputs":1,"noerr":0,"x":640,"y":100,"wires":[["f0dbe5bf.c3e018"]]},{"id":"f0dbe5bf.c3e018","type":"serial out","z":"c0812b05.2e9308","x":830,"y":100,"wires":[]},{"id":"ae07cdf2.445f1","type":"websocket-listener","z":"","path":"ws://localhost:3000/signalk/v1/stream","wholemsg":"false"}]
Posts: 39
Threads: 5
Joined: Apr 2017
Reputation:
0
(2018-05-07, 01:06 PM)jim321 Wrote: you could pull data from web-socket send to serial.. example below, you can only have one WS so use the one already there or use link node, select your config for serial node "printer".i dont know anything about that printer but other ones use cups drivers ect for setup.this flow will continually send data you will need to setup a switch somehow to send once maybe a button on dashboard.
you could get all the data directly from the web socket "ws://localhost:3000/signalk/v1/stream" it might be more than you need or you could parse out what you want.as in example for lat.
Code: [{"id":"9b02acf9.c5cea","type":"websocket in","z":"c0812b05.2e9308","name":"ws","server":"ae07cdf2.445f1","client":"","x":50,"y":100,"wires":[["fbd5273f.9a1e28"]]},{"id":"fbd5273f.9a1e28","type":"jsonpath","z":"c0812b05.2e9308","expression":"$.updates..values[*]","split":false,"name":"Signal K delta values","x":220,"y":100,"wires":[["18af8a77.9fec86"]]},{"id":"18af8a77.9fec86","type":"function","z":"c0812b05.2e9308","name":"merge values","func":"var paths={};\nvar arrayLength = msg.payload.length;\nfor (var i = 0; i < arrayLength; i++) {\n paths[msg.payload[i].path]=msg.payload[i].value;\n}\nmsg.payload = paths;\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":100,"wires":[["16f4fff3.e963e"]]},{"id":"16f4fff3.e963e","type":"function","z":"c0812b05.2e9308","name":"navigation.position.latitude","func":"var signalk_key=\"navigation.position\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n msg.payload=msg.payload[signalk_key][\"latitude\"];\n return msg;\n}","outputs":1,"noerr":0,"x":640,"y":100,"wires":[["f0dbe5bf.c3e018"]]},{"id":"f0dbe5bf.c3e018","type":"serial out","z":"c0812b05.2e9308","x":830,"y":100,"wires":[]},{"id":"ae07cdf2.445f1","type":"websocket-listener","z":"","path":"ws://localhost:3000/signalk/v1/stream","wholemsg":"false"}]
Copied the flow, serial node is in grey, is missing and I don't know how to install it
Inviato dal mio iPad utilizzando Tapatalk
Posts: 799
Threads: 46
Joined: Jun 2017
Reputation:
25
2018-05-08, 12:54 AM
(This post was last modified: 2018-05-08, 01:12 AM by jim321.)
it should have been already installed
type in a terminal
cd .node-red
npm install node-red-node-serialport
or
npm i node-red-node-serialport
sudo reboot
https://flows.nodered.org/node/node-red-node-serialport
or on nodered page http://10.10.10.1:1880 top right options button manage palette install tab search serial .. install
Posts: 39
Threads: 5
Joined: Apr 2017
Reputation:
0
2018-05-08, 01:40 AM
(This post was last modified: 2018-05-08, 02:16 AM by callmecalanca.)
(2018-05-08, 12:54 AM)jim321 Wrote: it should have been already installed
type in a terminal
cd .node-red
npm install node-red-node-serialport
or
npm i node-red-node-serialport
sudo reboot
https://flows.nodered.org/node/node-red-node-serialport
or on nodered page http://10.10.10.1:1880 top right options button manage palette install tab search serial .. install
This is the terminal output:
Code: ~/.node-red $ npm install node-red-node-serialport
npm WARN deprecated parser-byte-length@1.0.2: renamed to @serialport/parser-byte-length
npm WARN deprecated parser-cctalk@1.0.2: reanmed to @serialport/parser-cctalk
npm WARN deprecated parser-readline@1.0.2: reanmed to @serialport/parser-readline
npm WARN deprecated parser-regex@1.0.2: reanmed to @serialport/parser-regex
npm WARN deprecated parser-delimiter@1.0.2: reanmed to @serialport/parser-delimiter
npm WARN deprecated parser-ready@1.0.2: reanmed to @serialport/parser-ready
npm ERR! Linux 4.9.35-v7+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "node-red-node-serialport"
npm ERR! node v6.13.1
npm ERR! npm v3.10.10
npm ERR! path /home/pi/.node-red/node_modules/node-red-contrib-freeboard
npm ERR! code EISGIT
npm ERR! git /home/pi/.node-red/node_modules/node-red-contrib-freeboard: Appears to be a git repo or submodule.
npm ERR! git /home/pi/.node-red/node_modules/node-red-contrib-freeboard
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/.node-red/npm-debug.log
no new nodes
No nods in the palette install tab
Inviato dal mio iPad utilizzando Tapatalk
(2018-05-08, 01:40 AM)callmecalanca Wrote: (2018-05-08, 12:54 AM)jim321 Wrote: it should have been already installed
type in a terminal
cd .node-red
npm install node-red-node-serialport
or
npm i node-red-node-serialport
sudo reboot
https://flows.nodered.org/node/node-red-node-serialport
or on nodered page http://10.10.10.1:1880 top right options button manage palette install tab search serial .. install
This is the terminal output:
Code: ~/.node-red $ npm install node-red-node-serialport
npm WARN deprecated parser-byte-length@1.0.2: renamed to @serialport/parser-byte-length
npm WARN deprecated parser-cctalk@1.0.2: reanmed to @serialport/parser-cctalk
npm WARN deprecated parser-readline@1.0.2: reanmed to @serialport/parser-readline
npm WARN deprecated parser-regex@1.0.2: reanmed to @serialport/parser-regex
npm WARN deprecated parser-delimiter@1.0.2: reanmed to @serialport/parser-delimiter
npm WARN deprecated parser-ready@1.0.2: reanmed to @serialport/parser-ready
npm ERR! Linux 4.9.35-v7+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "node-red-node-serialport"
npm ERR! node v6.13.1
npm ERR! npm v3.10.10
npm ERR! path /home/pi/.node-red/node_modules/node-red-contrib-freeboard
npm ERR! code EISGIT
npm ERR! git /home/pi/.node-red/node_modules/node-red-contrib-freeboard: Appears to be a git repo or submodule.
npm ERR! git /home/pi/.node-red/node_modules/node-red-contrib-freeboard
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/.node-red/npm-debug.log
no new nodes
No nods in the palette install tab
Inviato dal mio iPad utilizzando Tapatalk
Second chance....
Code: $ npm install node-red-node-serialport
npm WARN deprecated parser-readline@1.0.2: reanmed to @serialport/parser-readline
npm WARN deprecated parser-delimiter@1.0.2: reanmed to @serialport/parser-delimiter
npm WARN deprecated parser-byte-length@1.0.2: renamed to @serialport/parser-byte-length
npm WARN deprecated parser-cctalk@1.0.2: reanmed to @serialport/parser-cctalk
npm WARN deprecated parser-ready@1.0.2: reanmed to @serialport/parser-ready
npm WARN deprecated parser-regex@1.0.2: reanmed to @serialport/parser-regex
/home/pi
`-- node-red-node-serialport@0.6.5
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
pi@openplotter:~ $ npm install node-red-node-serialport@0.6.5
npm WARN deprecated parser-byte-length@1.0.2: renamed to @serialport/parser-byte-length
npm WARN deprecated parser-cctalk@1.0.2: reanmed to @serialport/parser-cctalk
npm WARN deprecated parser-delimiter@1.0.2: reanmed to @serialport/parser-delimiter
npm WARN deprecated parser-readline@1.0.2: reanmed to @serialport/parser-readline
npm WARN deprecated parser-ready@1.0.2: reanmed to @serialport/parser-ready
npm WARN deprecated parser-regex@1.0.2: reanmed to @serialport/parser-regex
/home/pi
`-- node-red-node-serialport@0.6.5
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
pi@openplotter:~ $
Tanks a lot
Inviato dal mio iPad utilizzando Tapatalk
Posts: 799
Threads: 46
Joined: Jun 2017
Reputation:
25
2018-05-08, 10:49 AM
(This post was last modified: 2018-05-08, 11:07 AM by jim321.)
npm ERR! path /home/pi/.node-red/node_modules/node-red-contrib-freeboard
npm ERR! git /home/pi/.node-red/node_modules/node-red-contrib-freeboard: Appears to be a git repo or submodule.
npm ERR! git /home/pi/.node-red/node_modules/node-red-contrib-freeboard
npm ERR! git Refusing to remove it. Update manually,
i thought freeboard was removed in the release v0.17.0 ??
https://github.com/sailoog/openplotter/b...ANGELOG.md
Posts: 39
Threads: 5
Joined: Apr 2017
Reputation:
0
(2018-05-08, 10:49 AM)jim321 Wrote: i thought freeboard was removed in the last release ??
I really don't understand the output and your question!!!
Op 11.11
Rpi3
Gps bt amtec
Imu MPU 9250
Pressure BMP180
Temperature HTU21D
Humidity HTU21D
dAISy
Posts: 799
Threads: 46
Joined: Jun 2017
Reputation:
25
2018-05-08, 11:32 AM
(This post was last modified: 2018-05-08, 11:35 AM by jim321.)
if your on V0.11.11 then you need to update to V0.17.1 or wait for V1.0
|