This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Node Red Integration
#1
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
Reply
#2
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.
Reply
#3
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"}]
Reply
#4
(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-...DS18B20.md
Reply
#5
Hi, your can view this link. I could serve you

It is in spanish.

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

Saludos
Reply
#6
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/b...ANGELOG.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
Reply
#7
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/b...ANGELOG.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.
Reply
#8
"My problem was to find the right documentation. It's a bit confusing."

i agree..
Reply
#9
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
Reply
#10
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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)