OpenMarine
Node Red Integration - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: Node Red (https://forum.openmarine.net/forumdisplay.php?fid=15)
+--- Thread: Node Red Integration (/showthread.php?tid=1633)

Pages: 1 2


Node Red Integration - skipper@sy-barranas - 2019-01-10

In Node Red called via
http://localhost:1880
the node "sensor-ds18b20" has an entry in the dropdown list "Sensor ID"


 In Node Red called via
http://localhost:3000/plugins/signalk-node-red/redAdmin
the sam node has no such entries.

How can I connect a sensor to Openplotter/SignalK?

Any ideas?

Peter


RE: Node Red Integration - jim321 - 2019-01-10

is the sensor on 1wire connected to the pi and have you given it an sk key in openplotter 1w tab?
you wont need that node if you do it that way, just pull the temp data from the websocket stream in node red.


RE: Node Red Integration - jim321 - 2019-01-10

right click images and open in newtab..
wireless mqtt

mqtt window getting 1w data from esp8266
[Image: Screenshot%202019-01-10%2005.38.55.png?dl=0]

displayed in the diag. window
[Image: Screenshot%202019-01-10%2005.40.29.png?dl=0]

taken from stream in NODE RED 

Code:
[{"id":"e2e6bef8.13db7","type":"websocket in","z":"9fe33246.6f772","name":"ws","server":"45e5d0ed.aaea7","client":"","x":63,"y":73,"wires":[["39ef81bc.b5e92e"]]},{"id":"39ef81bc.b5e92e","type":"jsonpath","z":"9fe33246.6f772","expression":"$.updates..values[*]","split":false,"name":"Signal K delta values","x":236,"y":73.99999523162842,"wires":[["d9be9e05.95dae"]]},{"id":"d9be9e05.95dae","type":"function","z":"9fe33246.6f772","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":433,"y":73,"wires":[["94e7b4e9.d8ced8"]]},{"id":"94e7b4e9.d8ced8","type":"function","z":"9fe33246.6f772","name":"Water Temp","func":"var signalk_key=\"environment.water.temperature\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n    \n\n}","outputs":1,"noerr":0,"x":614,"y":73,"wires":[["43e7f41e.3a08fc"]]},{"id":"43e7f41e.3a08fc","type":"function","z":"9fe33246.6f772","name":"K to F","func":"var temp = msg.payload;\n\nvalue = (temp * 9.0) / 5.0 - 459.67; \nmsg.payload=value;\nreturn msg; ","outputs":1,"noerr":0,"x":754,"y":73,"wires":[[]]},{"id":"45e5d0ed.aaea7","type":"websocket-listener","z":"","path":"ws://localhost:3000/signalk/v1/stream","wholemsg":"false"}]



RE: Node Red Integration - PaddyB - 2019-01-10

(2019-01-10, 12:33 AM)skipper@sy-barranas Wrote: How can I connect a sensor to Openplotter/SignalK?

Connect the ds18b20 sensor to the Pi, lots tutorials online about how to. Then set up in the 1W tab in openplotter. That's it, temperature data will be output as signalk or mapped to nmea0183 as well with a signalk plugin.

Old manual, but looks the same >
https://sailoog.gitbooks.io/openplotter-documentation/content/en/DS18B20.md


RE: Node Red Integration - dione - 2019-01-15

Hi, your can view this link. I could serve you

It is in spanish.

https://mega.nz/#!8cQGUICS!Zmhk-qxmievH272GyP9DfRGAV9ArHcZCJVufX0qj7J4

Saludos


RE: Node Red Integration - jim321 - 2019-01-15

you have openplotter 0.17  or earlier "no longer supported".
[Image: USBmanager1.jpg]
we are on 1.2.0

[Image: assets%2F-L9g5MoJ9GSCaNGq_yjb%2F-LH9C4ZN...3fd5c6e1b0]

https://github.com/sailoog/openplotter/blob/beta/CHANGELOG.md
http://sailoog.com/blog-categories/openplotter-rpi
i don't suggest you use the out dated versions there are many issues fixed
looks good beside that.

Smile


RE: Node Red Integration - skipper@sy-barranas - 2019-01-15

Thanks a lot to everybody. It helped a lot. I'm successfull now.

(2019-01-15, 12:01 PM)jim321 Wrote: you have openplotter 0.17  or earlier "no longer supported".
[Image: USBmanager1.jpg]
we are on 1.2.0

[Image: assets%2F-L9g5MoJ9GSCaNGq_yjb%2F-LH9C4ZN...3fd5c6e1b0]

https://github.com/sailoog/openplotter/blob/beta/CHANGELOG.md
http://sailoog.com/blog-categories/openplotter-rpi
i don't suggest you use the out dated versions there are many issues fixed
looks good beside that.

Smile

My problem was to find the right documentation. It's a bit confusing.


RE: Node Red Integration - jim321 - 2019-01-15

"My problem was to find the right documentation. It's a bit confusing."

i agree..


RE: Node Red Integration - dione - 2019-01-15

is version 0.17, but red node works in the same way.
The same flow used with openplotter 0.17, serves me for 1.2.
The 1w sensors are treated in the same way in both versions

Saludos


RE: Node Red Integration - svtgd - 2019-02-01

Can someone point me documentation for node-red and mqtt that will work with 1.2.0? I have some notes from the forum back in July 2017 - but before I get started again I thought I'd ask if there is a current reference or doc etc for Openplotter 1.2.0 ish.

Thx.