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
Display Signal K data on Kobo Simple browser ?
#3
(2019-05-11, 03:47 PM)jim321 Wrote: you might be able to use node red dashboard
heading magnetic-vvv-

Code:
[{"id":"1ff3411c.7004df","type":"function","z":"395c257e.b7fe5a","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":426,"y":297,"wires":[["58879edf.9a3e8","857b6596.1bfd78","3577d5aa.6b9e3a"]]},{"id":"b92fabc3.ddb048","type":"jsonpath","z":"395c257e.b7fe5a","expression":"$.updates..values[*]","split":false,"name":"Signal K delta values","x":232,"y":297,"wires":[["1ff3411c.7004df"]]},{"id":"3577d5aa.6b9e3a","type":"function","z":"395c257e.b7fe5a","name":"compass","func":"var signalk_key=\"navigation.headingMagnetic\";\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":96,"y":358,"wires":[["8f27e020.e1f22"]]},{"id":"8f27e020.e1f22","type":"function","z":"395c257e.b7fe5a","name":"Rad to Deg","func":"var rad = msg.payload;\nvar deg = rad * 180/3.14;\nmsg.payload=deg;\nreturn msg ;","outputs":1,"noerr":0,"x":246.9998779296875,"y":359.9999694824219,"wires":[["11268278.20dc9e"]]},{"id":"b8ca3205.7bead","type":"function","z":"395c257e.b7fe5a","name":"","func":"\nmsg.value=msg.payload;\n\nreturn msg;","outputs":1,"noerr":0,"x":527,"y":358,"wires":[["bf4529ea.43f618","e8389935.e48eb8"]]},{"id":"bf4529ea.43f618","type":"ui_text","z":"395c257e.b7fe5a","group":"4e89a769.12fb98","order":1,"width":0,"height":0,"name":"hm","label":"heading magnetic","format":"{{msg.payload}}","layout":"col-center","x":650,"y":332,"wires":[]},{"id":"e8389935.e48eb8","type":"debug","z":"395c257e.b7fe5a","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":665,"y":370,"wires":[]},{"id":"11268278.20dc9e","type":"delay","z":"395c257e.b7fe5a","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":397,"y":359,"wires":[["b8ca3205.7bead"]]},{"id":"ff080a0c.710778","type":"websocket in","z":"395c257e.b7fe5a","name":"ws","server":"a3a39a72.edf138","client":"","x":58,"y":297,"wires":[["b92fabc3.ddb048"]]},{"id":"4e89a769.12fb98","type":"ui_group","z":"","name":"test","tab":"c5c13c3.d0f0ac","disp":true,"width":"6","collapse":false},{"id":"a3a39a72.edf138","type":"websocket-listener","z":"","path":"ws://localhost:3000/signalk/v1/stream","wholemsg":"false"},{"id":"c5c13c3.d0f0ac","type":"ui_tab","z":"","name":"test","icon":"dashboard","disabled":false,"hidden":false}]
[*]

I know nothing about Node Red.

Pasted this into node red, see the flow, how do I get magnetic heading on my browser ?
Reply


Messages In This Thread
RE: Display Signal K data on Kobo Simple browser ? - by NahanniV - 2019-05-11, 05:56 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)