signalk-chiplog 2.14.0 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,42 @@ All notable changes to Chiplog are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [2.16.0] - 2026-11-02
10
+
11
+ ### Added
12
+
13
+ - **An API for companion apps**, such as Chiplog Skipper, described in [docs/API.md](docs/API.md):
14
+ - **Versioned**: the public routes are also served under `/plugins/signalk-chiplog/api/v1`, described by an OpenAPI
15
+ document (`GET /api/v1/openapi.json`, also listed by the Signal K server). `GET /state` now says `apiVersions`,
16
+ `pluginVersion`, `features` and the `logbookId`.
17
+ - **Planned passages** (`/plans`): departure, arrival, Signal K route and fallback points, criteria, crew and watches;
18
+ linking a plan to the passage that opens puts the planned crew aboard.
19
+ - **Defects** (`/defects`), with severity, status and links to the passage, plan or journal line they came from.
20
+ - **Tanks at arrival** (`endTanks`): noted as a passage closes, by detection or by the crew, beside those noted at
21
+ departure; both can be set by hand with `PATCH /entries/:id`, and imported with `POST /entries`.
22
+ - **A changes feed** (`GET /changes?since=`), listing the passages, events, crew, plans and defects changed since a
23
+ cursor, deletions included.
24
+ - Every new route is open to read/write users; none needs admin.
25
+ - **Plans and defects in the online backup**, sent whole like the places to a service that keeps them, and brought back
26
+ by a restore.
27
+
28
+ ### Changed
29
+
30
+ - The first backup run after the update sends every passage's content again, without its track: a passage now carries
31
+ its tanks at arrival.
32
+
33
+ ## [2.15.0] - 2026-10-30
34
+
35
+ ### Added
36
+
37
+ - **Delete an instrument reading.** An administrator can delete any reading from a passage's journal (trash icon on its
38
+ row), including those taken at departure and arrival. Any log line, automatic ones included, can now be deleted from
39
+ the journal too.
40
+ - **Link to the passage in the summary emails.** A new **Server address for the summary link** setting; each summary
41
+ then ends with a link that opens the passage in the webapp. Without it, no link.
42
+ - **Icon buttons in the journal**: edit and delete are a pencil and a bin instead of words.
43
+ - **Hour scale on the tide graph**: the passage page's curve is graduated every three hours, in the logbook's time zone.
44
+
9
45
  ## [2.14.0] - 2026-10-25
10
46
 
11
47
  ### Added
@@ -523,7 +559,9 @@ First release.
523
559
  - REST API under `/plugins/signalk-chiplog/api`, documented in [docs/API.md](docs/API.md).
524
560
  - Single SQLite database through Node's built-in `node:sqlite`: no native module to build.
525
561
 
526
- [Unreleased]: https://github.com/ricard33/signalk-chiplog/compare/v2.14.0...HEAD
562
+ [Unreleased]: https://github.com/ricard33/signalk-chiplog/compare/v2.16.0...HEAD
563
+ [2.16.0]: https://github.com/ricard33/signalk-chiplog/compare/v2.15.0...v2.16.0
564
+ [2.15.0]: https://github.com/ricard33/signalk-chiplog/compare/v2.14.0...v2.15.0
527
565
  [2.14.0]: https://github.com/ricard33/signalk-chiplog/compare/v2.13.0...v2.14.0
528
566
  [2.13.0]: https://github.com/ricard33/signalk-chiplog/compare/v2.12.0...v2.13.0
529
567
  [2.12.0]: https://github.com/ricard33/signalk-chiplog/compare/v2.11.0...v2.12.0
package/README.md CHANGED
@@ -33,6 +33,7 @@ English and French, chosen from the browser's language.
33
33
  - [Passage summary emails](#passage-summary-emails-)
34
34
  - [Retrospective analysis](#retrospective-analysis-)
35
35
  - [Importing from PostgSail](#importing-from-postgsail-)
36
+ - [Companion apps](#companion-apps-)
36
37
  - [Privacy and online services](#privacy-and-online-services-)
37
38
  - [Troubleshooting](#troubleshooting-)
38
39
  - [Limitations](#limitations-)
@@ -217,12 +218,13 @@ Open **Chiplog** from the Signal K webapps, or `/signalk-chiplog/`. Reading need
217
218
  counter at departure and arrival and the hours run, and the tank levels and battery charge, voltage and current noted
218
219
  at departure), and the log: every reading and event in order, including handwritten notes. A passage in progress
219
220
  refreshes every minute. Each line's comment can be edited (read/write access); a manoeuvre or note the crew logged
220
- themselves can also be **redated** and deleted (with the instrument reading taken when it was logged) — automatic
221
- lines (alarms, autopilot, weather, corrections) can only be annotated. Correcting a time reads the position back from
222
- the track at that time, and leaves it empty when the track has nothing within 2 minutes of it, since the entry was not
223
- made where it happened. A time outside the passage, or in the future, is refused, and the departure manoeuvre that
224
- opened a passage is moved by changing that passage's departure time in **Corrections** below. Under each position, in
225
- grey, its bearing and distance from the nearest landmark.
221
+ themselves can also be **redated** — automatic lines (alarms, autopilot, weather, corrections) can only be annotated.
222
+ Any line can be deleted (with the instrument reading taken when it was logged), and so can a reading on its own, which
223
+ needs an administrator. Correcting a time reads the position back from the track at that time, and leaves it empty
224
+ when the track has nothing within 2 minutes of it, since the entry was not made where it happened. A time outside the
225
+ passage, or in the future, is refused, and the departure manoeuvre that opened a passage is moved by changing that
226
+ passage's departure time in **Corrections** below. Under each position, in grey, its bearing and distance from the
227
+ nearest landmark.
226
228
  - **Corrections** (read/write access):
227
229
  - rename the departure, or the arrival once the passage is closed — a passage in progress has none yet to rename;
228
230
  - switch an engine period to sail or back;
@@ -482,6 +484,7 @@ In the Signal K admin, **Apps & Plugins → Configuration → Chiplog**.
482
484
  | SMTP port | 587 | 587 for submission with STARTTLS, 465 for implicit TLS, 25 for a local relay. |
483
485
  | SMTP security | STARTTLS | STARTTLS, TLS, or none for a relay on the boat itself. |
484
486
  | SMTP user name / password | — | Leave empty if the relay needs no authentication. |
487
+ | Server address for the summary link | — | The address the server is reached at by whoever reads the summary, e.g. `https://boat.example.org`. Each summary then links to its passage in the webapp. Empty leaves the link out. |
485
488
  | Map tiles for the summary | `https://tile.openstreetmap.org/{z}/{x}/{y}.png` | The tiles the summary map is drawn over, e.g. a self-hosted server. Empty draws the track on a plain background. |
486
489
  | Logbook language (PDF and summary emails) | en | Language of the PDF logbooks on the USB drive and of the summary emails (English or French). |
487
490
  | Ship's time zone (PDF and summary emails) | the server's | Time zone of the PDF logbooks on the USB drive and of the summary emails, e.g. `Europe/Paris`. |
@@ -595,6 +598,10 @@ summary of every passage once it is over for good.
595
598
  distance, the duration, the time under way, the time under engine and under sail, the average and maximum speed, and
596
599
  the maximum wind — the same figures and wording as the passage page, in the **logbook language** and **ship's time
597
600
  zone** set below.
601
+ - **A link to the passage.** Set **Server address for the summary link** to the address the server is reached at
602
+ (`https://boat.example.org`, or a LAN address if the readers are aboard) and each summary ends with a link that opens
603
+ the passage in the webapp. Without it the summary carries no link, as the plugin cannot know its own address from
604
+ outside.
598
605
  - **The map** is drawn on the server and travels inside the message, so it shows up in the mail rather than as an
599
606
  attachment to open. Tiles come from OpenStreetMap by default; set your own tile server, or clear the setting to get
600
607
  the track drawn on a plain background and send nothing to a tile server.
@@ -676,6 +683,23 @@ node scripts/import-postgsail.js PostgSail_Trip.geojson --url http://boat.local:
676
683
  and landmarks are then looked up in the background, like for any passage. Tide and weather forecasts are not fetched
677
684
  for passages this old.
678
685
 
686
+ ## Companion apps 🧭
687
+
688
+ Chiplog keeps what happened. A companion app, such as Chiplog Skipper on a tablet, can add what was planned and decided
689
+ around it, through the plugin's REST API — nothing to set up in the plugin:
690
+
691
+ - **Planned passages**: departure, arrival, the Signal K route and fallback points, the crew and the watches. Once the
692
+ passage opens, the planned crew is the one recorded aboard.
693
+ - **Defects** noticed under way or after, with their severity and whether they are fixed.
694
+ - **Tanks at arrival**, noted as a passage ends next to those noted at departure, so that what a passage used can be
695
+ worked out. A boat without tank sensors can have them typed in.
696
+ - **Decisions, check-lists, briefings and signatures** appear in the passage's journal as notes.
697
+
698
+ The app connects with a Signal K device access request, like the tablet entry app, and needs read/write access, never
699
+ admin. Plans and defects go to the [online backup](#online-backup-) with the rest of the logbook, when the service keeps
700
+ them. For developers: the API is versioned (`/plugins/signalk-chiplog/api/v1`) and described by an OpenAPI document,
701
+ listed in the Signal K admin under **Documentation**, and in [docs/API.md](docs/API.md).
702
+
679
703
  ## Privacy and online services 🔒
680
704
 
681
705
  - **Place names.** With geocoding on, the position of each departure and arrival that matches no known place is sent to
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  const { registerRoutes } = require('./lib/api');
2
+ const { getOpenApi } = require('./lib/openapi');
2
3
  const { openDatabase } = require('./lib/database');
3
4
  const { createPassageDetector, DETECTION_DEFAULTS, TICK_INTERVAL_MS } = require('./lib/detection');
4
5
  const { ApiError } = require('./lib/errors');
@@ -261,6 +262,12 @@ module.exports = function (app) {
261
262
  title: 'SMTP password',
262
263
  format: 'password'
263
264
  },
265
+ summaryMailServerUrl: {
266
+ type: 'string',
267
+ title: 'Server address for the summary link',
268
+ description:
269
+ 'The address the server is reached at from the recipients’ side, e.g. https://boat.example.org or http://192.168.1.10:3000. Each summary then links to its passage in the logbook; empty leaves the link out'
270
+ },
264
271
  summaryMailTileUrl: {
265
272
  type: 'string',
266
273
  title: 'Map tiles for the summary',
@@ -673,6 +680,7 @@ module.exports = function (app) {
673
680
  : SUMMARY_MAIL_DEFAULTS.smtpSecurity,
674
681
  smtpUsername: config.smtpUsername || null,
675
682
  smtpPassword: config.smtpPassword || null,
683
+ summaryMailServerUrl: config.summaryMailServerUrl || null,
676
684
  summaryMailTileUrl:
677
685
  config.summaryMailTileUrl === undefined
678
686
  ? SUMMARY_MAIL_DEFAULTS.summaryMailTileUrl
@@ -887,6 +895,10 @@ module.exports = function (app) {
887
895
  }
888
896
  };
889
897
 
898
+ // The versioned API's description, which the server lists with its own (Signal K admin,
899
+ // Documentation > OpenAPI).
900
+ plugin.getOpenApi = () => getOpenApi();
901
+
890
902
  // The server registers routes once, before start() and even while the plugin
891
903
  // is disabled, and never removes them: every request must check the database.
892
904
  plugin.registerWithRouter = function (router) {
@@ -906,6 +918,7 @@ module.exports = function (app) {
906
918
  vesselPosition: () => readVesselPosition(app),
907
919
  observeEvent: (entryId, time) => detector.observeEvent(entryId, time),
908
920
  noteDeparture: (entryId) => detector.noteDeparture(entryId),
921
+ noteArrival: (entryId) => detector.noteArrival(entryId),
909
922
  usbExport,
910
923
  summaryMailer,
911
924
  cloudSync,