Registry / devops / rest-provider-signalk

rest-provider-signalk

JSON →
library0.7.5jsnpmunverified

A SignalK Node Server plugin (v0.7.5) that injects SignalK delta values into a server via REST PUT requests. Allows configuration of up to 9 paths with optional timeout metadata and unit definitions. Provides a way for external systems to push data into SignalK programmatically. Active development with occasional releases. Differentiates from other SignalK data sources by enabling HTTP-driven input with authorization support.

npm install rest-provider-signalk
INSTALL
IMPORT
SIG · REST-PROVIDER-SIGN
R
rest-provider-signalk
devopsjavascriptv0.7.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

restProviderPlugin
import { restProviderPlugin } from 'rest-provider-signalk'
const restProviderPlugin = require('rest-provider-signalk')
ESM-only; CommonJS require will fail.
default
import restProviderPlugin from 'rest-provider-signalk'
import { default as restProviderPlugin } from 'rest-provider-signalk'
Package exports default export; named imports may not work.
PluginConfigType
import { PluginConfigType } from 'rest-provider-signalk'
import PluginConfigType from 'rest-provider-signalk'
TypeScript users must use named import for types.

Registers the REST provider plugin with a SignalK server and demonstrates the PUT request format to inject data.

import restProviderPlugin from 'rest-provider-signalk'; import { Server } from '@signalk/server-api'; const server = new Server(); server.plugins.register(restProviderPlugin); server.start().then(() => { console.log('SignalK server with REST connector started'); }); // Then send PUT requests like: // PUT /signalk/v1/api/plugins/rest-provider-signalk/0 // Authorization: JWT <token> // Body: {"source": "path.config", "values": [{"path": "navigation.gnss.antennaAltitude", "value": 123.4}]}
Debug
Known issues
breakingIn v0.5, the authorization mechanism changed from API key to JWT tokens. Existing PUT requests with API keys will fail with 401.
fix
Generate a JWT via SignalK's authentication endpoint and include it as a Bearer token in the Authorization header.
affects: <0.5
gotchaThe PUT request must include a 'source' property in the body that matches exactly the path name configured in the plugin (e.g., 'path.config'). Mismatched sources are silently ignored.
fix
Ensure the 'source' field exactly matches the path identifier set in the plugin configuration.
affects: *
deprecatedThe 'timeout' configuration parameter (set to 0 for no timeout) is deprecated and will be removed in a future version. Meta data for timeout is now ignored.
fix
Remove timeout configuration; instead handle timeout logic externally.
affects: >=0.6
gotchaAt most 9 paths can be configured. If you try to add more than 9 paths via the UI, the 10th will be silently ignored.
fix
Limit your path configurations to 9 or modify the plugin source to increase the limit.
affects: *
gotchaSending a PUT request without a valid JWT token (or with an expired one) results in a 401 Unauthorized error with no detailed message.
fix
Ensure you obtain a fresh JWT token by authenticating with the SignalK server first.
affects: >=0.5
Errors
Common errors & fixes
Error: Cannot find module 'rest-provider-signalk'
Package not installed or imported incorrectly in a CommonJS environment.
fix
npm install rest-provider-signalk --save and use import syntax (ESM). If using CommonJS, use dynamic import: const mod = await import('rest-provider-signalk');
401 Unauthorized
Missing, invalid, or expired JWT token in Authorization header for PUT request.
fix
Obtain a JWT token from SignalK's authentication endpoint (POST /signalk/v1/auth/login) and include it as 'Authorization: Bearer <token>'.
TypeError: restProviderPlugin is not a function
Using CommonJS require() on an ESM-only package.
fix
Switch to import syntax or use dynamic import().
Upgrade
Version history
0.7.5latest on npm
Audit
Dependencies
@signalk/server-apirequiredProvides plugin registration and SignalK server API types
Agent activity
27 hits · last 30 days
node
26
OpenAI (training)
1
Resources
rest-provider-signalk — npm install rest-provider-signalk · libregistry