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:
  • 3 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
@mxtommy KIP instrument display webapp for Signalk
(2022-02-17, 08:47 AM)RKV Wrote: , I don't really want to deal with note red

Yes you do  Wink
Not that difficult to do some very useful tasks.

This strips out just the time from the gps datatime & adds it to signalk as "navigation.datetimestring"
In node-red, either menu import or ctrl-i , paste the code below & deploy... then navigation.datetimestring will be available as a text value in KIP

Code:
[
   {
       "id": "5135979d8b2792cb",
       "type": "signalk-subscribe",
       "z": "d6c01db7.8f1c",
       "name": "navigation.datetime",
       "mode": "sendAll",
       "flatten": true,
       "context": "vessels.self",
       "path": "navigation.datetime",
       "source": "",
       "period": 1000,
       "x": 210,
       "y": 620,
       "wires": [
           [
               "fc0fa0c71e18a827"
           ]
       ]
   },
   {
       "id": "2bad0b37dcba4e8f",
       "type": "signalk-send-pathvalue",
       "z": "d6c01db7.8f1c",
       "name": "navigation.datetimestring",
       "source": "",
       "meta": "",
       "x": 710,
       "y": 620,
       "wires": []
   },
   {
       "id": "fc0fa0c71e18a827",
       "type": "function",
       "z": "d6c01db7.8f1c",
       "name": "Convert datetime to time",
       "func": "//\"2022-02-17T09:30:01.000Z\"\n\nvar temptime = msg.payload;\ntemptime = temptime.slice(11, 19);\nmsg.topic = \"navigation.datetimestring\";\nmsg.payload = temptime;\nreturn msg;",
       "outputs": 1,
       "noerr": 0,
       "initialize": "",
       "finalize": "",
       "libs": [],
       "x": 440,
       "y": 620,
       "wires": [
           [
               "fba25f82fe68abd7",
               "2bad0b37dcba4e8f"
           ]
       ]
   },
   {
       "id": "fba25f82fe68abd7",
       "type": "debug",
       "z": "d6c01db7.8f1c",
       "name": "",
       "active": false,
       "tosidebar": true,
       "console": false,
       "tostatus": false,
       "complete": "payload",
       "targetType": "msg",
       "statusVal": "",
       "statusType": "auto",
       "x": 590,
       "y": 680,
       "wires": []
   }
]



------


[Image: C6B4HQr.png]
Reply


Messages In This Thread
RE: @mxtommy KIP instrument display webapp for Signalk - by PaddyB - 2022-02-17, 11:05 AM

Forum Jump:


Users browsing this thread: 9 Guest(s)