@signalk/server-api 1.39.0 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/index.html DELETED
@@ -1,348 +0,0 @@
1
- <!doctype html>
2
- <html class="default no-js">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <title>@signalk/server-api</title>
7
- <meta name="description" content="Documentation for @signalk/server-api">
8
- <meta name="viewport" content="width=device-width, initial-scale=1">
9
- <link rel="stylesheet" href="assets/css/main.css">
10
- <script async src="assets/js/search.js" id="search-script"></script>
11
- </head>
12
- <body>
13
- <header>
14
- <div class="tsd-page-toolbar">
15
- <div class="container">
16
- <div class="table-wrap">
17
- <div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base=".">
18
- <div class="field">
19
- <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
20
- <input id="tsd-search-field" type="text" />
21
- </div>
22
- <ul class="results">
23
- <li class="state loading">Preparing search index...</li>
24
- <li class="state failure">The search index is not available</li>
25
- </ul>
26
- <a href="index.html" class="title">@signalk/server-api</a>
27
- </div>
28
- <div class="table-cell" id="tsd-widgets">
29
- <div id="tsd-filter">
30
- <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
31
- <div class="tsd-filter-group">
32
- <div class="tsd-select" id="tsd-filter-visibility">
33
- <span class="tsd-select-label">All</span>
34
- <ul class="tsd-select-list">
35
- <li data-value="public">Public</li>
36
- <li data-value="protected">Public/Protected</li>
37
- <li data-value="private" class="selected">All</li>
38
- </ul>
39
- </div>
40
- <input type="checkbox" id="tsd-filter-inherited" checked />
41
- <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
42
- <input type="checkbox" id="tsd-filter-externals" checked />
43
- <label class="tsd-widget" for="tsd-filter-externals">Externals</label>
44
- </div>
45
- </div>
46
- <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
47
- </div>
48
- </div>
49
- </div>
50
- </div>
51
- <div class="tsd-page-title">
52
- <div class="container">
53
- <h1>@signalk/server-api</h1>
54
- </div>
55
- </div>
56
- </header>
57
- <div class="container container-main">
58
- <div class="row">
59
- <div class="col-8 col-content">
60
- <div class="tsd-panel tsd-typography">
61
- <p><img src="https://user-images.githubusercontent.com/1049678/34687576-d3e9af3e-f4b7-11e7-875e-80fce5a6e62b.png" alt="signal-k-logo-tagline"></p>
62
- <p><a href="https://badge.fury.io/js/signalk-server"><img src="https://badge.fury.io/js/signalk-server.svg" alt="npm version"></a>
63
- <a href="https://www.npmjs.com/package/signalk-server"><img src="https://img.shields.io/npm/l/signalk-server.svg" alt="npm license"></a>
64
- <a href="http://makeapullrequest.com"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="PRs Welcome"></a></p>
65
- <p>An implementation of a <a href="http://signalk.org">Signal K</a> server in Node.js. Intended to run on embedded devices (e.g. Raspberry Pi, Beaglebone or UDOO).</p>
66
- <p>The server multiplexes data from NMEA0183, NMEA 2000, Signal K and sensor inputs (eg. I2C connected sensors) and provides the data in Signal K format over HTTP, WebSocket and TCP. It also functions as a NMEA0183 server over TCP.</p>
67
- <p>The server&#39;s capabilities can be expanded with the help of plugins that provide additional features such as</p>
68
- <ul>
69
- <li>conversion to NMEA2000</li>
70
- <li>conversion to NMEA0183</li>
71
- <li>read and write interfacing with cloud services such as MarineTraffic</li>
72
- <li>logging to database such as InfluxDb</li>
73
- </ul>
74
- <a href="#installation" id="installation" style="color: inherit; text-decoration: none;">
75
- <h1>Installation</h1>
76
- </a>
77
- <p>Detailed instructions for <a href="https://github.com/SignalK/signalk-server-node/blob/master/raspberry_pi_installation.md">installation on Raspberry Pi</a></p>
78
- <p>Prerequisites</p>
79
- <ul>
80
- <li>Node.js version 10 or higher with npm installed</li>
81
- </ul>
82
- <a href="#use-install-from-npm" id="use-install-from-npm" style="color: inherit; text-decoration: none;">
83
- <h2>Use: Install from npm</h2>
84
- </a>
85
- <pre><code><span style="color: #001080">$</span><span style="color: #000000"> </span><span style="color: #001080">sudo</span><span style="color: #000000"> </span><span style="color: #001080">npm</span><span style="color: #000000"> </span><span style="color: #001080">install</span><span style="color: #000000"> -</span><span style="color: #001080">g</span><span style="color: #000000"> --</span><span style="color: #001080">unsafe</span><span style="color: #000000">-</span><span style="color: #001080">perm</span><span style="color: #000000"> </span><span style="color: #001080">signalk</span><span style="color: #000000">-</span><span style="color: #001080">server</span>
86
- </code></pre>
87
- <p>Now you can start the server with sample data:</p>
88
- <ul>
89
- <li>NMEA0183 sample data: <code>signalk-server --sample-nmea0183-data</code></li>
90
- <li>NMEA2000 sample data: <code>signalk-server --sample-n2k-data</code></li>
91
- </ul>
92
- <p>To generate your own vessel settings file and configure your Pi to start the server automatically run</p>
93
- <pre><code><span style="color: #001080">$</span><span style="color: #000000"> </span><span style="color: #001080">sudo</span><span style="color: #000000"> </span><span style="color: #001080">signalk</span><span style="color: #000000">-</span><span style="color: #001080">server</span><span style="color: #000000">-</span><span style="color: #001080">setup</span>
94
- </code></pre>
95
- <a href="#develop-install-from-git" id="develop-install-from-git" style="color: inherit; text-decoration: none;">
96
- <h2>Develop: Install from git</h2>
97
- </a>
98
- <pre><code><span style="color: #001080">git</span><span style="color: #000000"> </span><span style="color: #001080">clone</span><span style="color: #000000"> https:</span><span style="color: #008000">//github.com/SignalK/signalk-server-node.git</span>
99
- <span style="color: #001080">cd</span><span style="color: #000000"> </span><span style="color: #001080">signalk</span><span style="color: #000000">-</span><span style="color: #001080">server</span><span style="color: #000000">-</span><span style="color: #001080">node</span>
100
- <span style="color: #001080">npm</span><span style="color: #000000"> </span><span style="color: #001080">install</span>
101
- <span style="color: #001080">npm</span><span style="color: #000000"> </span><span style="color: #001080">run</span><span style="color: #000000"> </span><span style="color: #001080">build</span>
102
- </code></pre>
103
- <p>Start the server with sample data:</p>
104
- <ul>
105
- <li>NMEA0183 sample data: <code>bin/nmea-from-file</code></li>
106
- <li>NMEA2000 sample data: <code>bin/n2k-from-file-js</code></li>
107
- </ul>
108
- <p>This will start the server with a sample configuration file and the server will start playing back data from a sample file under <code>samples/</code>. The data is available immediately via the REST interface at <a href="https://localhost:3000/signalk/v1/api/">https://localhost:3000/signalk/v1/api/</a>.</p>
109
- <p>A simple way to connect to the WebSocket interface from the command line is to install wscat2 and use that:</p>
110
- <pre><code><span style="color: #001080">npm</span><span style="color: #000000"> </span><span style="color: #001080">install</span><span style="color: #000000"> -</span><span style="color: #001080">g</span><span style="color: #000000"> </span><span style="color: #001080">wscat2</span>
111
- <span style="color: #001080">wscat</span><span style="color: #000000"> </span><span style="color: #A31515">&#039;ws://localhost:3000/signalk/v1/stream?subscribe=all&#039;</span>
112
- </code></pre>
113
- <a href="#provision-ansible-on-a-raspberry-pi" id="provision-ansible-on-a-raspberry-pi" style="color: inherit; text-decoration: none;">
114
- <h2>Provision: Ansible on a Raspberry Pi</h2>
115
- </a>
116
- <p><a href="https://github.com/tkurki/marinepi-provisioning">Marinepi-provisioning</a> has useful roles and examples for provisioning Signal K and auxiliary services on a headless Raspberry Pi.</p>
117
- <a href="#docker" id="docker" style="color: inherit; text-decoration: none;">
118
- <h2>Docker</h2>
119
- </a>
120
- <p>You can start a local server on port 3000 with demo data with</p>
121
- <pre><code><span style="color: #001080">docker</span><span style="color: #000000"> </span><span style="color: #001080">run</span><span style="color: #000000"> --</span><span style="color: #001080">init</span><span style="color: #000000"> -</span><span style="color: #001080">it</span><span style="color: #000000"> --</span><span style="color: #001080">rm</span><span style="color: #000000"> --</span><span style="color: #001080">name</span><span style="color: #000000"> </span><span style="color: #001080">signalk</span><span style="color: #000000">-</span><span style="color: #001080">server</span><span style="color: #000000"> --</span><span style="color: #001080">publish</span><span style="color: #000000"> </span><span style="color: #098658">3000</span><span style="color: #000000">:</span><span style="color: #098658">3000</span><span style="color: #000000"> --</span><span style="color: #001080">entrypoint</span><span style="color: #000000"> /</span><span style="color: #001080">home</span><span style="color: #000000">/</span><span style="color: #001080">node</span><span style="color: #000000">/</span><span style="color: #001080">signalk</span><span style="color: #000000">/</span><span style="color: #001080">bin</span><span style="color: #000000">/</span><span style="color: #001080">signalk</span><span style="color: #000000">-</span><span style="color: #001080">server</span><span style="color: #000000"> </span><span style="color: #001080">signalk</span><span style="color: #000000">/</span><span style="color: #001080">signalk</span><span style="color: #000000">-</span><span style="color: #001080">server</span><span style="color: #000000"> --</span><span style="color: #001080">sample</span><span style="color: #000000">-</span><span style="color: #001080">nmea0183</span><span style="color: #000000">-</span><span style="color: #001080">data</span>
122
- </code></pre>
123
- <a href="#now-what" id="now-what" style="color: inherit; text-decoration: none;">
124
- <h2>Now what?</h2>
125
- </a>
126
- <p>Once you have the data streams in place you probably want to use the data or at least see it in a nice format. Some sample plugins and apps are installed during the installation process.</p>
127
- <ul>
128
- <li>Apps or Webapps are mainly web pages for accessing the Signal K output such as dashboards, configurable gauges or web maps. See <a href="https://github.com/SignalK/signalk-server-node/blob/master/WEBAPPS.md">Webapps doc</a> for more information.</li>
129
- <li>If you have internet connectivity for your server App Store in the admin user interfaces shows all the Signal K Plugins and Apps that have been published via npm with the right keywords. It also shows their current status on your server and allows you to install and update these.</li>
130
- <li>Plugins are web forms to tailor your server to your needs, change parameters or get information from various sources. See <a href="SERVERPLUGINS.md">Server Plugins</a></li>
131
- </ul>
132
- <a href="#configuration" id="configuration" style="color: inherit; text-decoration: none;">
133
- <h1>Configuration</h1>
134
- </a>
135
- <p>Please take a look at the different settings files in the <code>settings</code> directory and read the <a href="http://blog.emilecantin.com/web/sysadmin/iot/javascript/sailing/2016/03/19/arduino-signalk-part-2.html">brief intro</a>.</p>
136
- <p>You can specify the settings file via command line with <code>bin/signalk-server -s &lt;path-to-your-settings-file&gt;</code>.</p>
137
- <p>You can also configure the path to the settings file with environment variable <code>SIGNALK_NODE_SETTINGS</code>.</p>
138
- <p>The http port can be configured separately with environment variable <code>PORT</code>. You can also <a href="https://github.com/tkurki/marinepi-provisioning/blob/d3d624629799a3b96234a90fc42bc22dae4fd3a2/roles/node-app/templates/node_app_systemd_socket.j2">run on port 80 with systemd</a>. Environment variable NMEA0183PORT sets the NMEA 0183 tcp port.</p>
139
- <a href="#storing-configuration-outside-the-server-install-directory" id="storing-configuration-outside-the-server-install-directory" style="color: inherit; text-decoration: none;">
140
- <h1>Storing Configuration Outside The Server Install Directory</h1>
141
- </a>
142
- <p>You can store configuration like the settings file, plugin cofiguration and defaults.js in a directory outside of the server install using the <code>-c</code> option (or the <code>SIGNALK_NODE_CONFIG_DIR</code> env variable).</p>
143
- <p>By default, the server will look for a <code>settings.json</code> and a <code>defaults.json</code> file in the given directory.</p>
144
- <p>For example, <code>./bin/signalk-server -c /usr/local/etc/node_server_config</code></p>
145
- <p>In this case, the server would look for the settings file at <code>/usr/local/etc/node_server_config/settings.json</code></p>
146
- <p>You can overwrite the default settings file name by specifying the -s argument.</p>
147
- <p>For example, ./bin/signalk-server -c /usr/local/etc/node_server_config -s test_settings.json`</p>
148
- <p>In this case, the server would look for the settings file at <code>/usr/local/etc/node_server_config/test_settings.json</code></p>
149
- <a href="#environment-variables" id="environment-variables" style="color: inherit; text-decoration: none;">
150
- <h2>Environment variables</h2>
151
- </a>
152
- <ul>
153
- <li><code>SIGNALK_NODE_SETTINGS</code> override the path to the settings file.</li>
154
- <li><code>SIGNALK_NODE_CONFIG_DIR</code> override the path to find server configuration files.</li>
155
- <li><code>PORT</code> override the port for http/ws service (default is 3000).</li>
156
- <li><code>SSLPORT</code> override the port for https/wss service. If defined activates ssl as forced, default protocol (default is 3443).</li>
157
- <li><code>EXTERNALPORT</code> the port used in /signalk response and Bonjour advertisement. Has precedence over configuration file.</li>
158
- <li><code>EXTERNALHOST</code> the host used in /signalk response and Bonjour advertisement. Has precedence over configuration file.</li>
159
- <li><code>FILEUPLOADSIZELIMIT</code> override the file upload size limit (default is &#39;10mb&#39;).</li>
160
- <li><code>NMEA0183PORT</code> override the port for the NMEA 0183 over tcp service (default is 10110).</li>
161
- <li><code>TCPSTREAMPORT</code> override the port for the Signal K Streaming (deltas) over TCP.</li>
162
- <li><code>TCPSTREAMADDRESS</code> override the address the Signal K Stream (deltas) over TCP is listening on.</li>
163
- <li><code>DISABLEPLUGINS</code> disable all plugins so that they can not be enabled (default is false).</li>
164
- <li><code>DEFAULTENABLEDPLUGINS</code> a comma separated list of plugin ids that are overridden to be enabled by default if no setttings exist. lower preference than <code>DISABLEPLUGINS</code>.</li>
165
- <li><code>PLUGINS_WITH_UPDATE_DISABLED</code> a comma separated list of plugin that will not be updated.</li>
166
- <li><code>SECURITYSTRATEGY</code> override the security strategy module name.</li>
167
- <li><code>WSCOMPRESSION</code> compress websocket messages (default is false).</li>
168
- <li><code>MAXSENDBUFFERSIZE</code> the maximum number of bytes allowed in the server&#39;s send buffer of a WebSocket connection. The connection will be terminated if this is exceeded. Guards against slow or dysfunctional clients that can not cope with the message volume (default is 512 * 1024 bytes).</li>
169
- <li><code>SIGNALK_SERVER_IS_UPDATABLE</code> allows the server to be updated through the GUI even if it is not installed in the standard paths (default is false). if set to true, the server must have been installed with <code>npm install -g signalk-server</code>.</li>
170
- <li><code>SIGNALK_DISABLE_SERVER_UPDATES</code> disables server updates in the GUI (default is false).</li>
171
- <li><code>DEBUG</code> a comma-separated list of tags for debugging the specified module (For example: signalk-server*,signalk-provider-tcp). Can now be defined directly in the graphical interface.
172
- More help on how to use the debug here: <a href="https://www.npmjs.com/package/debug#wildcards">https://www.npmjs.com/package/debug#wildcards</a></li>
173
- <li><code>IS_IN_DOCKER</code> used to tell the server it is in Docker and not normally updateable (default is false).</li>
174
- <li><code>NPMREGISTRYTIMEOUT</code> how long to wait for the registry when retrieving the App Store listing (default is 20s).</li>
175
- <li><code>SECRETKEY</code> a secret string used to generate an authentication token (the internal default autogenerated is a string of 512 hex chars like &#39;ef8307a4c7a4bd7...309d947bca3&#39;)</li>
176
- <li><code>ALLOW_DEVICE_ACCESS_REQUESTS</code> used when a device needs to gain access to a secured Signal K server (default is true) (<a href="https://signalk.org/specification/1.4.0/doc/access_requests.html">https://signalk.org/specification/1.4.0/doc/access_requests.html</a>).</li>
177
- <li><code>ALLOW_NEW_USER_REGISTRATION</code> (default is true).</li>
178
- <li><code>ADMINUSER</code> force a account for admin user (username:password format).</li>
179
- <li><code>PRESERIALCOMMAND</code> command to run before opening a serial port.</li>
180
- </ul>
181
- <a href="#real-inputs" id="real-inputs" style="color: inherit; text-decoration: none;">
182
- <h2>Real Inputs</h2>
183
- </a>
184
- <p>To hook the server up to your real inputs you need to create a configuration file that connects to your input source and applies the relevant parsers / converters in the provider pipeline.</p>
185
- <p>Inputs are configured as an array of pipedProviders, each with an id and an array of pipeElements. You need to create a pipedProviders entry for each of your inputs. The pipedProvider must include &#39;id&#39; (name of the interface, e.g. NMEA0183 from AIS could be called &quot;AIS&quot;). The first pipeElement is the source of the data (&quot;providers/serialport&quot; for a serial interface such as USB, &quot;providers/filestream&quot; if the data comes from a file, &quot;providers/tcp&quot; if the source is a TCP port etc.). You will see in the example settings that the second pipeElement is often &quot;providers/liner&quot;. This is a pipeElement that splits the input into separate lines and passes one line at a time to the next pipeElement. The final pipeElement or group of pipeElements is where the translation or passing to the server occurs. For NMEA0183, this is &quot;providers/nmea0183-signalk&quot;, for N2K (NMEA2000) it is &quot;providers/n2kAnalyzer&quot; and then &quot;providers/n2k-signalk&quot;.</p>
186
- <p>There are also special pipeElements such as &quot;providers/log&quot; (see below), and &quot;providers/throttle&quot; which changes the playback from files to the bytes per second rate set in the options. The &quot;providers/execute&quot; pipeElement lets you pass a command to the server, as set in the options.</p>
187
- <p>Each PipeElement is configured with <code>options</code>. Different PipeElements use different configuration parameters, like for serialport you can configure baud rate and for udp connection the port.</p>
188
- <p>A PipeElement may require some options entry that is available already in the configuration file (<code>nmea0183-signalk</code> needs the self id). This can be accomplished with <a href="https://github.com/SignalK/signalk-server-node/blob/5134ce5f48f25b2b270176f39d3e8e530dedb825/settings/volare-udp-settings.json#L34-L43">optionMappings property</a>.</p>
189
- <p>You can also use optionMappings property to optionally override <code>options</code> entries with command line parameters. For example you can specify the data file for file playback from the command line as <code>bin/signalk-server -s settings/volare-file-settings.json --nmeafilename=samples/nais400-merrimac.log</code> with <a href="https://github.com/SignalK/signalk-server-node/blob/5134ce5f48f25b2b270176f39d3e8e530dedb825/settings/volare-file-settings.json#L28-L33">this configuration</a>.</p>
190
- <p>Look through the examples in the settings folder and copy pipedProviders that suit your setup. You can combine as many as you want. See <a href="https://github.com/SignalK/signalk-server-node/blob/master/settings/multiple-sources.json">multiple sources</a> example</p>
191
- <p>Make sure that the settings file you are using is valid JSON. This can be done in an online validator like <a href="https://jsonlint.com/">JSONLint</a></p>
192
- <a href="#nmea0183" id="nmea0183" style="color: inherit; text-decoration: none;">
193
- <h3>NMEA0183</h3>
194
- </a>
195
- <p>There is an example settings file for using NMEA 0183 input from a serial device that you can use to start up the server: <code>bin/signalk-settings -s settings/volare-serial-settings.json</code>. You can change the <code>port</code> and <code>baudrate</code> in the <a href="https://github.com/SignalK/signalk-server-node/blob/master/settings/volare-serial-settings.json#L23-L27">settings file</a>.</p>
196
- <a href="#nmea-2000-via-ngt-1-amp-canboat" id="nmea-2000-via-ngt-1-amp-canboat" style="color: inherit; text-decoration: none;">
197
- <h3>NMEA 2000 (via NGT-1 &amp; Canboat)</h3>
198
- </a>
199
- <p>There is an example settings file for N2K from N2K/CANBus. Make sure to change the command option to match the NGT-1 port like in this <a href="https://github.com/SignalK/signalk-server-node/blob/master/settings/actisense-serial-settings.json#L12">example</a></p>
200
- <a href="#signal-k" id="signal-k" style="color: inherit; text-decoration: none;">
201
- <h3>Signal K</h3>
202
- </a>
203
- <p>A provider that handles Signal K deltas can be set up with the following elements:</p>
204
- <ul>
205
- <li>a source pipeElement (<code>providers/filestream</code>, <code>providers/serialport</code>, <code>providers/tcp</code>, <code>providers/udp</code>)</li>
206
- <li><code>providers/liner</code></li>
207
- <li><code>providers/from_json</code></li>
208
- </ul>
209
- <p>Furthermore you can use data from a Signal K server with the <code>providers/mdns-ws</code> source. Without any configuration it will use the Signal K discovery process to discover any Signal K servers in the local network, such as iKommunicate, and connect to it. No other pipeElements are needed. See the <a href="https://github.com/SignalK/signalk-server-node/blob/master/settings/signalk-ws-settings.json">example configuration file</a>. You can also configure <code>mdns-ws</code> with <code>host</code> and <code>port</code>, which will disable the discovery process and make it connect directly to the specified server.</p>
210
- <a href="#file" id="file" style="color: inherit; text-decoration: none;">
211
- <h3>File</h3>
212
- </a>
213
- <p>An input from a file uses the <code>providers/filestream</code>. The options to change are <code>filename</code> and <code>fromAppProperty</code> ,see <a href="https://github.com/SignalK/signalk-server-node/blob/master/settings/volare-file-settings.json#L23-L34">NMEA0183</a> and <a href="https://github.com/SignalK/signalk-server-node/blob/master/settings/multiple-sources.json#L81-L82">N2K</a> examples.</p>
214
- <a href="#serial" id="serial" style="color: inherit; text-decoration: none;">
215
- <h3>Serial</h3>
216
- </a>
217
- <p>An input from a serial port uses the <code>providers/serialport</code> pipeElement. It takes the options <code>device</code> and <code>baudrate</code> and optionally &quot;toStdout&quot;(see <a href="https://github.com/SignalK/signalk-server-node/blob/master/settings/volare-serial-settings.json#L25-L26">example</a>). <code>serialport</code> has an internal line splitter, so a <strong>pipedProvider with serialport as the source does not need <code>liner</code> and will not work with one</strong>.</p>
218
- <a href="#tcp" id="tcp" style="color: inherit; text-decoration: none;">
219
- <h3>TCP</h3>
220
- </a>
221
- <p><code>providers/tcp</code> is a TCP client that can connect to a server and receive input from a TCP socket. It takes the options <code>host</code> and <code>port</code> (see <a href="https://github.com/SignalK/signalk-server-node/blob/master/settings/volare-tcp-settings.json#L29-L30">example</a>).</p>
222
- <a href="#udp" id="udp" style="color: inherit; text-decoration: none;">
223
- <h3>UDP</h3>
224
- </a>
225
- <p>settings/volare-udp-settings provides an example of NMEA0183 input over UDP port 7777. If you have trouble getting this to work try setting up DEBUG environment variable with <code>export DEBUG=signalk-server:udp-provider</code> and sending manually input with netcat <code>echo &#39;$IIDBT,034.25,f,010.44,M,005.64,F*27&#39; | nc -4u -w1 localhost 7777</code>. This should result in the server logging the NMEA sentence it receives. UDP source takes <code>port</code> option.</p>
226
- <a href="#gpsd" id="gpsd" style="color: inherit; text-decoration: none;">
227
- <h3>GPSD</h3>
228
- </a>
229
- <p>Please see <a href="https://github.com/SignalK/signalk-server-node/blob/master/settings/volare-gpsd-settings.json">example settings files</a>.</p>
230
- <a href="#bonjour-support" id="bonjour-support" style="color: inherit; text-decoration: none;">
231
- <h2>Bonjour support</h2>
232
- </a>
233
- <p>Bonjour support will be enabled by default if your system supports it and has the required software installed. See also <a href="https://github.com/agnat/node_mdns#installation">https://github.com/agnat/node_mdns#installation</a> for more information.</p>
234
- <p>When Bonjour is enabled the server advertises itself via Bonjour. This means that Bonjour-aware software running in the same network can discover the Signal K server and access it. For example the server shows up in Safari at Bookmarks =&gt; Bonjour =&gt; Webpages.</p>
235
- <p>You can disable Bonjour/mDNS by adding the entry <code>&quot;mdns&quot;: false</code> to the config file. See <code>settings/volare-gpsd-settings.json</code> for example.</p>
236
- <p>The server can also automatically discover other Signal K devices and connect to them. See <code>settings/signalk-ws-settings.json</code> for an example. If the incoming data should be treated as data about <code>self</code> the identity in the settings file and in the incoming data need to match or the incoming data should not include context, as the default is <code>self</code>.</p>
237
- <a href="#https" id="https" style="color: inherit; text-decoration: none;">
238
- <h2>HTTPS</h2>
239
- </a>
240
- <p>Https is not enabled by default. To enable it, set <code>&quot;ssl&quot;:true</code> in the <a href="https://github.com/SignalK/signalk-server-node/blob/master/settings/aava-non-ssl-file-settings.json#L9">settings file</a>. If no <code>ssl-key.pem</code> &amp; <code>ssl-cert.pem</code> files are found under settings they will be created. If you need to configure a certificate chain add it in <code>ssl-chain.pem</code> under settings.</p>
241
- <p>By default the server listens to both http and https in the same port.</p>
242
- <a href="#logging" id="logging" style="color: inherit; text-decoration: none;">
243
- <h2>Logging</h2>
244
- </a>
245
- <p>You can log all the input data in pre-Signal K format by adding the <code>log</code> element to your pipeElement pipeline. It creates hourly files with the data from all the configured providers, interleaved/multiplexed with one message per line. The multiplexed log files can be played back with <code>multiplexedlog</code> pipeElement element. Please beware the standard discriminators in <a href="https://github.com/SignalK/signalk-server-node/blob/master/providers/multiplexedlog.js">multiplexedlog</a>. For extensive use of logging, please see <a href="https://github.com/tkurki/cassiopeia-settings/blob/master/signalk-server-settings.json">Cassiopeia</a></p>
246
- <a href="#server-plugins" id="server-plugins" style="color: inherit; text-decoration: none;">
247
- <h2>Server Plugins</h2>
248
- </a>
249
- <p>Plugin configuration interface is at <a href="http://localhost:3000/plugins/configure/">/plugins/configure</a>. See <a href="SERVERPLUGINS.md">Server Plugins</a> for more information.</p>
250
- <a href="#charts" id="charts" style="color: inherit; text-decoration: none;">
251
- <h1>Charts</h1>
252
- </a>
253
- <p>Signal K chart support is provided by the <a href="https://www.npmjs.com/package/@signalk/charts-plugin">@signalk/charts-plugin</a> plugin.</p>
254
- <p>After installing and configuring the plugin from the admin console, use a client app such as <a href="https://www.npmjs.com/package/@signalk/freeboard-sk">Freeboard SK</a> or <a href="https://www.npmjs.com/package/tuktuk-chart-plotter">Tuktuk Plotter</a> to retrieve a list of charts and present them.</p>
255
- <a href="#custom-logo" id="custom-logo" style="color: inherit; text-decoration: none;">
256
- <h1>Custom logo</h1>
257
- </a>
258
- <p>You can change the admin application&#39;s top left logo by placing a SVG file named <code>logo.svg</code> in the settings directory (default: $HOME/.signalk/).</p>
259
- <a href="#source-priority" id="source-priority" style="color: inherit; text-decoration: none;">
260
- <h1>Source Priority</h1>
261
- </a>
262
- <p>You can specify relative precedence between sources for a single Signal K path.</p>
263
- <p>The idea is that for a specific path you list sources in decreasing precedence with source specific timeouts.</p>
264
- <p>Incoming data from a source is dropped (not handled at all) by the server if the previous value for the path is <em>from a source with higher precedence</em> and it is <em>not older than the timeout</em>.</p>
265
- <p>The <em>source priority</em> algorithm compares the <em>latest value</em> that was passed through against a new value:</p>
266
- <ul>
267
- <li>is the latest value from a source that has a lower or equal priority than the incoming value&#39;s source? if true pass the value</li>
268
- <li>else: is the latest value older than the timeout for incoming source&#39;s timeout? if yes pass the value</li>
269
- <li>else: ignore the value</li>
270
- </ul>
271
- <p>Note that the filtering takes place on <em>path level, not on delta level</em>: if a delta contains multiple path-value pairs some may be filtered out and others handled.</p>
272
- <p>There is no timeout for the highest priority source, it is handled always.</p>
273
- <p>Timeout for data from unlisted sources is 10 seconds.</p>
274
- <a href="#faq" id="faq" style="color: inherit; text-decoration: none;">
275
- <h2><a href="https://github.com/SignalK/signalk-server-node/wiki/FAQ:-Frequently-Asked-Questions">FAQ</a></h2>
276
- </a>
277
- <a href="#further-reading" id="further-reading" style="color: inherit; text-decoration: none;">
278
- <h2>Further Reading</h2>
279
- </a>
280
- <ul>
281
- <li><a href="http://signalk.org/index.html">http://signalk.org/index.html</a></li>
282
- <li><a href="http://signalk.org/dev/messageFormat.html">http://signalk.org/dev/messageFormat.html</a></li>
283
- <li>NMEA0183 support: <a href="https://github.com/SignalK/signalk-parser-nmea0183">nmea0183-signalk</a></li>
284
- <li>NMEA 2000 support: <a href="https://github.com/SignalK/n2k-signalk">n2k-signalk</a> via <a href="https://github.com/canboat/canboat">canboat</a></li>
285
- </ul>
286
- <a href="#license" id="license" style="color: inherit; text-decoration: none;">
287
- <h2>License</h2>
288
- </a>
289
- <p>Copyright [2015] [Fabian Tollenaar, Teppo Kurki and Signal K committers]</p>
290
- <p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
291
- you may not use this file except in compliance with the License.
292
- You may obtain a copy of the License at</p>
293
- <pre><code><span style="color: #000000">http:</span><span style="color: #008000">//www.apache.org/licenses/LICENSE-2.0</span>
294
- </code></pre>
295
- <p>Unless required by applicable law or agreed to in writing, software
296
- distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
297
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
298
- See the License for the specific language governing permissions and
299
- limitations under the License.</p>
300
- </div>
301
- </div>
302
- <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
303
- <nav class="tsd-navigation primary">
304
- <ul>
305
- <li class=" ">
306
- <a href="modules.html">Exports</a>
307
- </li>
308
- <li class=" tsd-kind-module">
309
- <a href="modules/index.html">index</a>
310
- </li>
311
- <li class=" tsd-kind-module">
312
- <a href="modules/propertyvalues.html">propertyvalues</a>
313
- </li>
314
- <li class=" tsd-kind-module">
315
- <a href="modules/types.html">types</a>
316
- </li>
317
- </ul>
318
- </nav>
319
- <nav class="tsd-navigation secondary menu-sticky">
320
- <ul class="before-current">
321
- </ul>
322
- </nav>
323
- </div>
324
- </div>
325
- </div>
326
- <footer class="with-border-bottom">
327
- <div class="container">
328
- <h2>Legend</h2>
329
- <div class="tsd-legend-group">
330
- <ul class="tsd-legend">
331
- <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
332
- </ul>
333
- <ul class="tsd-legend">
334
- <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
335
- </ul>
336
- <ul class="tsd-legend">
337
- <li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
338
- </ul>
339
- </div>
340
- </div>
341
- </footer>
342
- <div class="container tsd-generator">
343
- <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
344
- </div>
345
- <div class="overlay"></div>
346
- <script src="assets/js/main.js"></script>
347
- </body>
348
- </html>