December 01, 2023

Signal K quick install

Updated 2023-12-01 !

I have got some questions installing, just, Signal K(SK) so will do a summary, on a Raspberry Pi, with links.

Signal K is the hub to receive data, from different devices in different data formats, and send it on to different equipment, or databases, in different formats. Most common for standard marine equipment are the old NMEA 0183 and the newer NMEA 2000 protocol which is also handled. 

Besides the SK "hub" function developers have created plugins for different purposes. This is due to that SK is open-source ! Sharing is caring !

In this post you can check the devices I'm using connected to the SK server and also my setup.

Intro and OpenPlotter
If you want an advanced open-Source navigation application please check OpenCPN(OC).

So why mention OC when this post concerns SK ?

It could be that the best solution for you is to use both SK and OC. Check this post where another software package, OpenPlotter, is doing the total installation of both.

SK install
There is a good SK installation instruction but will do a compact one here, where ju start with a RPi update

sudo apt update && sudo apt full-upgrade -y && sudo apt clean

Via ssh/terminal install Node.js(V18) and NPM 

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash
sudo apt install nodejs && sudo npm install -g npm@lates

and check the install with

node -v && npm -v

Install Bonjour (mDNS)

sudo apt install libnss-mdns avahi-utils libavahi-compat-libdnssd-dev

Install the SK server with 

sudo npm install -g signalk-server


(There could be some warnings but it's OK)

Testing
Test the server with a sample logfile


signalk-server --sample-nmea0183-data

In a WEB browser check with, (If You are using another Hostname, change)


http://raspberrypi:3000/

and the SK dashboard will show. In the upper left corner click on "Webapps => @signalk/freeboard-sk", (FSK) and a world map will open with a boat symbol in the south of Finland. Zoom in and watch the boat approaching Österby.

Configuration
Terminate the SK server with "Ctrl + C" and run the SK server configuration

sudo signalk-server-setup

and set up the app following the instructions. (Don't use SSL to keep it simple.)

Admin account and connections
In this link you can learn more.

Offline charts
The charts that are displayed are online charts and if you use the application offline you can download offline charts.

Migrate a Signal K server
This method was used to migrate a SK server, Raspberry pi, from Bullseye, Node 16 to Bookworm Node 20.  On the source SK server update the server and all plugins. The following objects are needed on the target SK server

  • $HOME/.signalk/package.json, file
  • $HOME/.signalk/settings.json, file
  • $HOME/.signalk/plugin-config-data, directory

Create a target server installing Signal K, logon and then remove/rename

  • $HOME/.signalk/node_modules (Will disable the installed plugins)
  • $HOME/.signalk/settings.json (SK server settings)
  • $HOME/.signalk/package.json (Node.js metadata)

Restore the files settings.json and package.json, from the source server, to target server in folder $HOME/.signalk/

In $HOME/.signalk/ run npm install which will install all the plugins listed in package.json

Remove/rename $HOME/.signalk/plugin-config-data (Plugin settings)

Restore the plugin-config-data folder, from the source server, to target server in folder $HOME/.signalk/

Restart the SK target server and check the result.

A nice way to copy data from one server to another is using command scp which demands that ssh is activated on both SK servers. So for example use below command copying the folder plugin-config-data.

pi@source:~/.signalk $ scp -r plugin-config-data pi@target.local:

Remark
And don't forget to check out the embedded NodeRed(NR) plugin that will handle "any" input to be used with SK and forwarded to your NMEA devices (With appropriate hardware). NR should be installed via SK app store.

Enjoy !

No comments:

Post a Comment

Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !