-
-
Notifications
You must be signed in to change notification settings - Fork 154
FAQ: Frequently Asked Questions
Please, feel free to add new entries, if you can include the answer. Questions without answers in Signal K Slack (join) or as Github Issues.
PUT is for making changes that have some real world consequences, like turning on the anchor light.
Sensor data / new values for something are sent as delta messages over the WebSocket connection. The simplest delta is {"updates":[{"values": [{"path":"a.b", "value":3.14}]}]}
.
See Events and Outputting data.
On Raspberry Pi the log is at /var/log/syslog and under Server => Server Log in the admin webapp.
Remove this section from your settings.json (that is usually located at $HOME/.signalk/settings.json)
"security": {
"strategy": "./tokensecurity"
},
If your server is started with --securityenabled
argument you need to remove that to disable security.
WebSocket connections are being dropped and syslog shows "Send buffer overflow, terminating connection"
Some WebSocket client connects with a url that causes the server to send it data continuously, but the client never reads the data. The outgoing buffer on the server grows and eventually the server cuts the connection to safeguard its wellbeing. The client should connect with subscribe=none
query parameter, if it does not care for the data stream.
Receiving NMEA2000 data requires a CAN bus transceiver to be connected to your system. There is a multitude of chips, devices, HATs, adapters and other solutions out there that roughly be divided into two categories: NMEA 2000 Gateways and Socketcan-compatible hardware. The Node.js Signal K server supports all socketcan-compatible hardware (some are well tested by other community members, others less so) and a few NMEA 2000 gateways.
Supported NMEA 2000 gateways
Node.js Signal K server gateway support is determined by the devices supported by canboat(js). At the time of writing, the following gateways are supported:
- Actisense NGT-1
- Digital Yacht iKonvert
- Digital Yacht NavLink 2
- SH-ESP32 with NMEA 2000 USB gateway software
- Yacht Devices YDEN-02
- Yacht Devices YDWG-02
Socketcan-compatible CAN transceivers
Socketcan is a Linux kernel extension that publishes a compatible CAN transceiver as a network interface, allowing programs to open sockets to the CAN bus. Unlike the NMEA2000 Gateways, some configuration may be necessary (such as setting up the network interface to be set up at boot, with the right bitrate). The amount of configuration and correct settings depend on the transceiver and firmware used. These solutions are usually cheaper than an NMEA2000 Gateway, but require more DIY to get up and running, and carry no NMEA certification.
To set-up a socketcan device for NMEA 2000, you run the command: sudo ip link set up can0 type can bitrate 250000
. However, that only persists until the next reboot. Consult the internet for instructions for your Linux distro and CAN transceiver on how to configure your system to enable the CAN interface at boot time.
-
Canable - with
candlelight
firmware - PEAK CANbus products - I tested the PCI-e and USB products, but it stands to reason that others would work too*
- PiCAN 2 & PiCAN 2 Duo - for RPi 2/3
- PiCAN 3 - For RPi 4
- PiCAN-M - for RPi 3/4
-
UDOO Neo and UDOO Dual/Quad (using
flexcan
) with a transceiver such as a SN65HVD230 - requires a recompileddtoverlay
** - Waveshare RS485 CAN HAT
-
RUSOKU TouCAN Marine isolated USB to CAN NMEA2000 converter using
SocketCAN
driver - MCS (Marine Control Server): base board for Raspberry Pi with CAN, NMEA0183, 1-wire and I2C connectivity and 8-28V power
*Note: PEAK provides SLCAN drivers, but they should not be necessary on Linux. When using SLCAN the CAN adapters shows up as a serial device instead of a socketcan device.
**Note: UDOO is a full-fledged SBC, which can run Node.js Signal K server
Keep in mind that this list is incomplete. Most other socketcan-compatible boards and chips will work, but have not been tested yet. Just keep in mind that you, preferably, want a opto-isolated solution.
Are you using a CAN transceiver not on this list? Please add!
Go to the "NMEA Server" page on the YDWG and add a new server. Use Network Protocol TCP
, Data Protocol RAW
, Port 1457
and Direction BOTH
.
Now you can configure an NMEA 2000 connection as "Yacht Devices RAW TCP".
The metadata are provided by the Signal K schema on the server. If they do not appear in the original schema, server's Data Browser, webapps like InstrumentPanel and mobile apps like WilhelmSK can not retrieve the unit for display and conversions.
You can add the missing units to your defaults.json
file. The known units are defined in the schema files.
- If it's a static value, add to the updates section
- If it's meta, add to the meta section
[
{
"context": "vessels.self",
"updates": [
{
"values": [
{
"path": "navigation.magneticVariation",
"value": -0.191986
},
{
"path": "",
"value": {
"name": "MyBoat",
"mmsi": "1234556",
"communication": {
"callsignVhf": "Test"
}
}
}
]
}
]
},
{
"context": "vessels.self",
"updates": [
{
"meta": [
{
"path": "environment.cpu.temperature",
"value": {
"units": "K",
"timeout": 30
}
}
]
}
]
}
]
For example, to add the missing unit for the Raspberry PI Temperature
plugin:
- Locate your
defaults.json
file - Locate
self
key in the json structure - Add content below inside the
self
key
"environment": {
"cpu": {
"temperature": {
"meta": {
"description": "Raspberry Pi cpu temperature",
"units": "K",
"displayName": "CPU temp",
"timeout": 30
}
}
}
}
You can also add missing static data, like environment.depth.transducerToKeel.value
used by the Derived Data plugin, in the same file. Note that static data added in defaults.json is not visible in the Data Browser but you can use the /signalk/v1/api/vessels/self/
http endpoint to verify that the data is where it should.
- Double check your json file with a json validator (if something wrong in your json file, your server will not start)
- Loading changes requires a server restart
- Verify if unit is present in Signal K Data Browser (Wait at least 30 seconds for the plugin to send data)
- As InstrumentPanel caches the retrieved units on the server, you must reset the Instrumentpanel's cache: In settings, select
Reset settings
then checkLayouts cache
and clickReset
button
- Signal K Cloud - your data will be public
The following solutions provide direct access to your server.
Use npm link to link the module you are developing to the server and run the server from a git clone, not as a real install.
$ mkdir work && cd work
$ git clone [email protected]:SignalK/set-system-time.git && pushd set-system-time && npm link && popd
$ git clone [email protected]:SignalK/signalk-server.git && pushd signalk-server && npm install && npm link @signalk/set-system-time
$ bin/n2k-from-file