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-ships-bells

v0.1.4

Published

SignalK Server plugin that plays traditional ship's bell audio on the half-hour watch schedule

Readme

signalk-ships-bells

CI

A SignalK Server plugin that plays traditional ship's bell audio on the watch schedule (one strike every half hour, up to eight bells).

Status

Watch-bell scheduling and playback are both implemented: index.js computes the strike schedule and emits a notification delta; the public/ webapp listens for it over the SignalK websocket and plays the matching audio file.

Features

  • Strikes the bell every half hour, 1–8 bells, following the traditional watch schedule - plus one extra 8-bell strike at 23:59:47 on New Year's Eve (31 Dec, ship-local time), 13 seconds before midnight. bell-strikes-8.wav is ~12.78s long, so it finishes right around the stroke of midnight, just ahead of the regular 00:00:00 strike (which always rings 8 bells anyway, on every schedule) - giving the traditional 16 bells for New Year's without needing a dedicated audio file or any change to the normal schedule. Configurable in the SignalK admin UI (Server → Plugin Config → Ship's Bell):
    • Enable bell strikes — on/off.
    • Watch bell schedule — two selectable conventions for the second dog watch (18:00–20:00), the one place historical practice diverges:
      • British Navy — resets to 1 bell at 18:30 instead of continuing 5-6-7, per the post-1797 Royal Navy convention adopted after the Nore mutiny (five bells in the second dog watch had been the mutiny's signal).
      • Standard — ignores the dog-watch split as a concept and just cycles 1–8 every 4 hours all day, including through the second dog watch (18:30=5, 19:00=6, 19:30=7, 20:00=8).
    • Mute bell when at anchor or moored — skips playback while navigation.state is anchored or moored. Requires that path to be populated by something on your system — see below.
    • Mute during a time range — an optional overnight/quiet-hours mute, with a start and end time (HH:MM, 24-hour, ship-local time). The end time can be earlier than the start to span midnight, e.g. 22:0006:00. Independent of, and combinable with, the anchor/moored mute above.
    • Playback methodwebapp, server speaker, or both:
      • Webapp — each strike is sent as a notifications.plugins.signalkShipsBell.strike delta. The bundled webapp (open it from the SignalK admin UI's webapps list, or at /signalk-ships-bells/) subscribes to that delta over the websocket and plays the matching file via <audio> — so it sounds wherever that page is open (e.g. a browser tab on an MFD or tablet at the helm). A "play test bell" button is included for checking that audio works without waiting for the next half hour - it plays locally in the browser immediately, and also asks the plugin to attempt server-speaker playback if that's part of the configured playback method, so it exercises whichever output(s) are actually configured.
      • Server speaker — plays directly on the machine running Signal K, via a speaker wired to it, using play-sound to shell out to a system audio player. No browser needed. This is the same underlying approach as signalk-audio-notifications, which plays spoken alerts the same way. Requires a system player such as mpg123 or aplay to be installed on that machine — play-sound picks whichever it finds. If none is found, an error is logged and playback is silently skipped rather than crashing the plugin.
      • Both — does both of the above.
  • Schedule selection from the webapp — the same watch-bell schedule choice is also available directly in public/, via a dropdown that reads and writes the setting through a small REST API exposed by the plugin (GET/PUT /plugins/signalk-ships-bells/schedule), so it can be changed without going into Server → Plugin Config.

Recommended companion plugins

  • signalk-autostate — automatically sets navigation.state (e.g. anchored, moored, sailing, motoring) from GPS and propulsion data. The "mute at anchor or moored" option here depends on navigation.state being set by something; if you don't already have a source for it, this plugin is a good fit.

Audio assets

public/bells/ bundles one WAV file per strike count, bell-strikes-1.wav through bell-strikes-8.wav, served statically by SignalK server's signalk-webapp hosting at /signalk-ships-bells/bells/. These are sourced from Benboncan's "Bells / Gongs" pack on Freesound (CC BY 4.0) — see public/bells/NOTICE.md for full attribution.

Install

Available on npm as signalk-ships-bells — install it from the SignalK Server admin UI's App Store, or via:

npm install signalk-ships-bells

For local development, clone into your SignalK server's node_modules, or use npm link.

Development

Run the test suite with:

npm test

This runs Node's built-in test runner (node --test) over test/*.test.js, which covers the bell-schedule math for all three watch schemes, the plugin's config schema, its start/stop/restart lifecycle, and the /schedule REST endpoint.

CI runs on every push and pull request via the reusable SignalK plugin-ci workflow (.github/workflows/ci.yml), which additionally validates the plugin's package.json, entry point, schema, and lifecycle across Linux, macOS, Windows, and Raspberry Pi-class Node versions.

License

Source code: MIT. Bundled bell audio (public/bells/): CC BY 4.0, attributed to Benboncan on Freesound. See LICENSE for the full text of both.