-
-
Notifications
You must be signed in to change notification settings - Fork 177
docs: Port some documentation from the website, organize install docs #2089
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| --- | ||
| title: Linux udev Rules | ||
| --- | ||
|
|
||
| # Linux udev Rules | ||
|
|
||
| When you connect a USB device to a Linux computer, the kernel will automatically detect it and create a device file in | ||
|
|
||
| Linux assigns device names sequentially to hotplug hardware. Usually, your device will get the same name each time you | ||
| connect it or boot your computer, but sometimes the name may change. For this reason, disks and partitions are | ||
| typically referenced by UUID and not by device path any more. For our purposes dealing with USB serial adapters, the | ||
| assigned device name is typically `/dev/ttyUSB0`. However, if you have more than adapter the device names may not | ||
| always be consistent. Therefore, it is a good idea to create a udev rule to provide an alias for your device. | ||
|
|
||
| The example below assumes Debian or Ubuntu as the distribution, but it should be similar for others. | ||
|
|
||
| First, we need to collect some identifiers for the device we want to alias. In a shell, run the `usb-devices` command. | ||
|
|
||
| ```sh | ||
| $ usb-devices | ||
| ``` | ||
|
|
||
| This will enumerate all of the USB devices connected to your computer (including internal USB hubs). In our example, | ||
| we're looking for Actisense devices. Write down the `Vendor`, `ProdId` and `SerialNumber` values for each of your | ||
| devices. | ||
|
|
||
| Then, in your favorite text editor, create a file in `/etc/udev/rules.d/` called `90-actisense.rules`. The 90 ensures | ||
| that it processed after other udev rules. | ||
|
|
||
| The contents of the file should be: | ||
|
|
||
| ``` | ||
| SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="d9aa", ATTRS{serial}=="1B091", SYMLINK+="actisense" | ||
| ``` | ||
|
|
||
| Replace `0403` with the value you wrote down for `Vendor` (if you are working with and Actisense device, it will likely | ||
| be the same). Replace `d9aa` with the value you wrote down for `ProdId` and replace `1B091` with the value you wrote | ||
| down for `SerialNumber`. The last change is to give your symlink a name. In the example above it is `actisense`, but | ||
| you can call it whatever you want (without spaces or filesystems-reserved characters like `/`). Let's say you have two | ||
| USG-1 devices, one for the autopilot and one for your VHF radio. You might want to name these devices `autopilot` and | ||
| `vhf`. Then they would be available at `/dev/autopilot` and `/dev/vhf` respectively. | ||
|
|
||
| You can specify multiple rules in one file, one rule per line: | ||
|
|
||
| ``` | ||
| SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="d9aa", ATTRS{serial}=="1B091", SYMLINK+="autopilot" | ||
| SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="d9aa", ATTRS{serial}=="1B094", SYMLINK+="vhf" | ||
| ``` | ||
|
|
||
| After creating this file, disconnect your devices and plug them back in. You should see the new entries under `/dev`. | ||
| If not, reboot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| --- | ||
| title: Docker | ||
| --- | ||
|
|
||
| # Installing from Docker | ||
|
|
||
| Signal K Server is available as a Docker image on _Docker Hub_ and _cr.signalk.io/signalk/signalk-server_. | ||
|
|
||
| To simply run a Signal K Server with some sample data on a device with docker installed, enter the following into a terminal: | ||
|
|
||
| ```shell | ||
| docker run -it --rm --publish 3000:3000 signalk/signalk-server | ||
| ``` | ||
|
|
||
| This will start an instance of Signal K Server on port 3000 which you can then access via the web based Admin UI by pointing your web browser at `http://localhost:3000`. | ||
|
|
||
| If you are wanting to use docker to deploy Signal K Server on your vessel you will need to: | ||
|
|
||
| 1. Specify a location to persist the server's configuration so it is not lost between restarts | ||
| 1. Run the instance as a background process | ||
|
|
||
| _Example: Run as background process and store server configuration in the current folder:_ | ||
|
|
||
| ```shell | ||
| docker run -d --init --name signalk-server -p 3000:3000 -v $(pwd):/home/node/.signalk signalk/signalk-server | ||
| ``` | ||
|
|
||
| You are ready to now **[configure](../setup/configuration.md)** your installation and connect data from devices on your boat. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| --- | ||
| title: NPM | ||
| --- | ||
|
|
||
| # Installing from NPM | ||
|
|
||
| Signal K Server can be installed directly using NPM. | ||
|
|
||
| ## Linux / macOS | ||
|
|
||
| ```shell | ||
| sudo npm install -g signalk-server | ||
| ``` | ||
|
|
||
| Once installation is complete, enter the following in a terminal window, to generate a settings file and configure the server to start automatically: | ||
|
|
||
| ```shell | ||
| sudo signalk-server-setup | ||
| ``` | ||
|
|
||
| If you choose not to use `signalk-server-setup` you can start the server by entering the following in a terminal window: | ||
|
|
||
| ```shell | ||
| signalk-server | ||
| ``` | ||
|
|
||
| You are ready to now **[configure](../setup/configuration.md)** your installation and connect data from devices on your boat. | ||
|
|
||
| ## Windows | ||
|
|
||
| See [Installing on Windows](https://github.com/SignalK/signalk-server-windows). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| --- | ||
| title: From Source | ||
| --- | ||
|
|
||
| # Installing from source | ||
|
|
||
| Installation from the GitHub repository is useful when developing plugins and components. | ||
|
|
||
| To do this enter the following commands in a terminal window: | ||
|
|
||
| ```shell | ||
| # Copy the files to your device | ||
| git clone https://github.com/SignalK/signalk-server.git | ||
|
|
||
| # change to the folder containing the downloaded files | ||
| cd signalk-server | ||
|
|
||
| # install the dependencies | ||
| npm install | ||
|
|
||
| # build all packages in the repository | ||
| npm run build:all | ||
| ``` | ||
|
|
||
| To start Signal K Server with a sample configuration file and some sample data, enter the following into a terminal: | ||
| _To use NMEA0183 sample data:_ | ||
|
|
||
| ```shell | ||
| bin/nmea-from-file | ||
| ``` | ||
|
|
||
| _To use NMEA2000 sample data:_ | ||
|
|
||
| ```shell | ||
| bin/n2k-from-file | ||
| ``` | ||
|
|
||
| The server will start playing back data from the specified sample file that can be viewed using the _Data Browser_ in the Admin UI _(`http://localhost:3000`)_ or via REST API / websocket connection. | ||
|
|
||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| title: Configuration | ||
| children: | ||
| - seatalk/README.md | ||
| - nmea.md | ||
| --- | ||
|
|
||
| # Configuring Signal K Server | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| --- | ||
| title: NMEA Connections | ||
| --- | ||
|
|
||
| # NMEA Connections | ||
|
|
||
| Most equipment on boats use NMEA 0183, NMEA 2000, or other proprietary interfaces to communicate with each other. A lot of work has been done within the Signal K community to convert these different data formats in to Signal K. | ||
|
|
||
| ## NMEA 0183 | ||
|
|
||
| There are a number of NMEA to USB adaptors around from | ||
| [Actisense](http://www.actisense.com/product/usg-2/), | ||
| [Digital Yacht](http://digitalyacht.co.uk/product/usb-nmea-adaptor/) and | ||
| [Shipmodule](http://www.shipmodul.com/en/miniplex-lite.html), which allow | ||
| bi-directional transfer of the NMEA 0183 Serial data (electrically similar to RS-422) and convert it in to a USB | ||
| virtual COM Port when plugged in to the Signal K server. | ||
|
|
||
| In Linux the virtual COM Port will be seen as a device called `/dev/ttyUSB0` (the number could be different if there | ||
| are multiple USB-to-serial adapters connected). Linux assigns these device names automatically when the device is | ||
| connected, so it could change. If you want to ensure that the device always has the same name, you will need to write a | ||
| UDEV rule to specify an alias. See [creating UDEV rules](../guides/udev.md) for details. | ||
|
|
||
| To verify that you have a working connection, you can use picocom or another terminal emulator to see if you are | ||
| receiving data. The default baud rate for standard NMEA 0183 is 4800, whilst AIS and multiplexers use NMEA 0183(HS) at the "High Speed" 38400 baud rate. | ||
|
|
||
| ``` | ||
| $ picocom -b 4800 /dev/ttyUSB0 | ||
| ``` | ||
|
|
||
| You should see NMEA 0183 sentences scrolling off the screen. To exit picocom press `Ctrl-a` followed by `Ctrl-x`. | ||
|
|
||
| Once your NMEA 0183 connection is working, you can [set up data connections the Signal K server](./configuration.md#set-up-data-connections) to read the data. | ||
|
|
||
| ## NMEA 2000 | ||
|
|
||
| NMEA 2000 support in Signal K is provided by [canboatjs](https://github.com/canboat/canboatjs), which is a library that can read and write NMEA 2000 data. See the [list of supported devices from canboatjs](https://github.com/canboat/canboatjs#supported-devices) for details of hardware that can be used to connect to NMEA 2000 networks. | ||
|
|
||
| Directions for configuring your hardware will vary by device, so consult the documentation for your hardware for details. Once you have your hardware connected and configured, you can use the `candump` utility from the `can-utils` package to verify that you are receiving NMEA 2000 data. | ||
|
|
||
| ```sh | ||
| candump can0 | ||
| ``` | ||
|
|
||
| You should see NMEA 2000 data scrolling off the screen. Press `Ctrl-c` to exit candump. | ||
|
|
||
| After confirming you have NMEA data, you can [set up data connections the Signal K server](./configuration.md#set-up-data-connections) to read the data. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.