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
How do I add water and diesel sensor?
#11
(2017-03-04, 04:27 PM)PaddyB Wrote:
(2017-03-02, 01:54 PM)affinite Wrote: OK answered my own question ...
A bit of experimenting and I have my MCP3208 working in SPI/OP and can see the output in the SignalK diagnostic window.
Now to get my head around SignalK/NodeRed to display the result Smile

If you haven't figured it out already this might help a little, its part of a node red flow I use to display engine temperatures. It uses to dashboard nodes to display - https://flows.nodered.org/node/node-red-dashboard
I put a delay node in as well otherwise there was too much data for the graph. 

Hope this might be of use. 

PS Ctrl-i opens the nodes import dialog box.


Code:
[{"id":"12d9eb57.4dee05","type":"websocket in","z":"a1ba0b6c.b93d98","name":"SignalK input","server":"58d1334a.a72ecc","client":"","x":75,"y":98,"wires":[["11b86291.f8905d"]]},{"id":"11b86291.f8905d","type":"json","z":"a1ba0b6c.b93d98","name":"","x":96,"y":208,"wires":[["7517c8ee.de2b48","dbc2f1fc.c6e78","bc5087ef.c78118"]]},{"id":"7517c8ee.de2b48","type":"jsonpath","z":"a1ba0b6c.b93d98","expression":"$.updates..values[?(@.path==\"propulsion.Eng.temperature\")]..value","split":true,"name":"EngTemp","x":264,"y":100,"wires":[["29d547b8.f04588"]]},{"id":"29d547b8.f04588","type":"delay","z":"a1ba0b6c.b93d98","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":408,"y":52,"wires":[["7e631a32.8bc014"]]},{"id":"7e631a32.8bc014","type":"function","z":"a1ba0b6c.b93d98","name":"Convert to deg C","func":"var numInput = Number(msg.payload);\nmsg.topic = \"Eng\";\nvar T =  numInput-273.15;\nmsg.payload = T.toFixed(0);\nreturn msg;","outputs":1,"noerr":0,"x":592,"y":88,"wires":[["66a37c6d.494d34","d864e825.200108"]]},{"id":"d864e825.200108","type":"ui_chart","z":"a1ba0b6c.b93d98","name":"EngineGraph","group":"67dca234.faad9c","order":0,"width":"23","height":"7","label":"Engine temperature history","chartType":"line","legend":"false","xformat":"%H:%M:%S","interpolate":"linear","nodata":"","ymin":"","ymax":"","removeOlder":"4","removeOlderUnit":"3600","x":829,"y":73,"wires":[[],[]]},{"id":"66a37c6d.494d34","type":"ui_gauge","z":"a1ba0b6c.b93d98","name":"EngTempGauge","group":"8861c889.240108","order":1,"width":"3","height":"3","gtype":"gage","title":"Engine temperature","label":"Deg C","format":"{{value}}","min":0,"max":"120","colors":["#00b500","#e6e600","#ca3838"],"x":911,"y":203,"wires":[]},{"id":"58d1334a.a72ecc","type":"websocket-listener","z":"","path":"ws://localhost:3000/signalk/v1/stream","wholemsg":"false"},{"id":"67dca234.faad9c","type":"ui_group","z":"","name":"Engine/Alt/Exhaust temporature history","tab":"1d99b92f.cedb87","disp":true,"width":"23"},{"id":"8861c889.240108","type":"ui_group","z":"","name":"Temperature gauges","tab":"aeffa403.23f5f8","disp":true,"width":"19"},{"id":"1d99b92f.cedb87","type":"ui_tab","z":"","name":"Graphs","icon":"dashboard","order":2},{"id":"aeffa403.23f5f8","type":"ui_tab","z":"","name":"Gauges","icon":"dashboard","order":1}]

Thanks
Look Sunday is now OP/NodeRed day !!
Reply


Messages In This Thread
How do I add water and diesel sensor? - by dreuf - 2016-12-28, 11:47 AM
RE: How do I add water and diesel sensor? - by affinite - 2017-03-04, 07:47 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)