npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

signalk-instrument-light-plugin

v0.8.0

Published

Dims and brightens Seatalk1 and FDX (Nexus/Garmin/Silva) instrument backlights automatically, following the sun

Readme

Instrument Lights for Signal K

SignalK Plugin CI npm

A Signal K server plugin that dims and brightens your instrument backlights automatically, following the sun.

Once a day the plugin reads the boat's position and works out when the sun will move from one phase of the day to the next over the coming 24 hours. It stores those times and switches your instruments to the light level you chose for each phase exactly when it begins:

| Phase | Sun elevation | |---|---| | Day | above the horizon | | Civil twilight | 0–6° below the horizon | | Nautical twilight | 6–12° below the horizon | | Astronomical twilight | 12–18° below the horizon | | Night | more than 18° below the horizon |

Each phase can be set to off, dim, on or bright. The level is resent every 30 seconds so instruments that were switched on later pick it up too.

The plugin status shows the current phase and the next change, for example Civil twilight: lights dim, next: Day at 07:12. Near the poles, where the sun may not cross a boundary for days, the lights stay in the current phase until it does. If the server's clock changes, for example when a Raspberry Pi sets its time from GPS after starting, the times are worked out again.

Plugin configuration

Supported instruments

  • Raymarine Seatalk1 – sends the lamp intensity datagram (30 00 0X) as a $STALK sentence, for a Seatalk1 gateway that understands them, such as a Shipmodul MiniPlex.
  • Silva, Nexus and Garmin (FDX) – writes the FDX backlight command to a serial port, for example a Garmin GND10 or a Nexus server connected over USB.

Setup

  1. Install Instrument Lights from the App Store in the Signal K admin UI.
  2. Open Server → Plugin Config → Instrument lights and enable it.
  3. Set a light level for each phase of the day.
  4. Turn on the outputs you need:
    • Seatalk1: enter the output event name, and set the same name as an output event (toStdout) on the serial data connection to your Seatalk1 gateway.
    • FDX: pick the serial port of your FDX interface, or choose [Enter Manually] and type its path.
  5. Optionally enter a default position. It is used when the server has no navigation.position, for example at the dock without GPS.

Light levels

The plugin's status line in the admin UI shows the current phase and light level, for example Civil twilight: lights dim.

Signal K data

The plugin publishes:

| Path | Value | |---|---| | environment.mode | day, Civil twilight, Nautical twilight, Astronomical twilight or night | | navigation.sun.elevation | Sun elevation above the horizon (rad) |

Development

npm install
npm test

The tests use Node's built-in test runner and need Node.js 20 or newer. See the changelog for release notes.

License

Apache-2.0