signalk-chiplog 2.7.0 → 2.9.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +74 -1
  2. package/README.md +152 -45
  3. package/docs/screenshots/05-stats.png +0 -0
  4. package/docs/screenshots/06-3d-animation.png +0 -0
  5. package/index.js +241 -4
  6. package/lib/api.js +123 -2
  7. package/lib/cloud-pairing.js +172 -0
  8. package/lib/cloud-restore.js +416 -0
  9. package/lib/cloud-sync.js +455 -0
  10. package/lib/database.js +50 -1
  11. package/lib/detection.js +4 -0
  12. package/lib/events.js +84 -20
  13. package/lib/export.js +1 -1
  14. package/lib/mail.js +162 -0
  15. package/lib/passage-map.js +342 -0
  16. package/lib/passage-summary.js +169 -0
  17. package/lib/places.js +6 -0
  18. package/lib/png.js +295 -0
  19. package/lib/qr.js +266 -0
  20. package/lib/smtp.js +242 -0
  21. package/lib/summary-mailer.js +286 -0
  22. package/package.json +2 -1
  23. package/public/app.css +94 -0
  24. package/public/entry/entry.css +94 -1
  25. package/public/entry/icons/apple-touch-icon.png +0 -0
  26. package/public/entry/icons/icon-192.png +0 -0
  27. package/public/entry/icons/icon-512.png +0 -0
  28. package/public/entry/index.html +2 -2
  29. package/public/entry/js/components/Dialogs.mjs +82 -16
  30. package/public/entry/js/components/Icons.mjs +33 -0
  31. package/public/entry/js/components/NotePanel.mjs +21 -3
  32. package/public/entry/js/components/RecentList.mjs +2 -3
  33. package/public/entry/js/journal.mjs +24 -7
  34. package/public/entry/js/main.mjs +27 -18
  35. package/public/entry/manifest.webmanifest +1 -1
  36. package/public/entry/sw.js +2 -0
  37. package/public/icon-small.svg +37 -0
  38. package/public/icon.svg +82 -6
  39. package/public/index.html +1 -1
  40. package/public/js/components/CloudBackup.mjs +298 -0
  41. package/public/js/components/ExportView.mjs +3 -0
  42. package/public/js/components/LogView.mjs +63 -6
  43. package/public/js/components/PassageView.mjs +4 -3
  44. package/public/js/components/Timeline.mjs +40 -14
  45. package/public/js/context.mjs +22 -3
  46. package/public/js/format.mjs +34 -0
  47. package/public/js/i18n.mjs +107 -2
  48. package/public/js/log-lines.mjs +5 -0
  49. package/public/js/main.mjs +1 -1
  50. package/public/js/view-memory.mjs +39 -0
package/CHANGELOG.md CHANGED
@@ -6,6 +6,77 @@ All notable changes to Chiplog are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [2.9.0] - 2026-10-20
10
+
11
+ ### Added
12
+
13
+ - **Online backup.** Turn **Back the logbook up online** on, paste the service address and the device token it gave your
14
+ boat, and Chiplog sends each passage — track, events, handwriting, readings, crew and forecasts — to the Ti Bord
15
+ service whenever there is a connection: every 15 minutes, at each departure and arrival, newest passage first. Only
16
+ what changed goes out, compressed, and a track that grew only sends its new points. Passages deleted or merged on
17
+ board are removed from the service too, and the places go with their position and country, which is how the service
18
+ tells the countries visited. Each run also says how many passages are on board, so that the service can show how far a
19
+ first backup is. Off by default; nothing leaves the boat while it is.
20
+ - **Costly link.** A tick box for satellite or roaming: the online backup then sends only a summary of each passage and
21
+ a thinned-out track, a few kilobytes, at departures and arrivals and every six hours. Full tracks, readings, forecasts
22
+ and places wait until it is unticked, or until **Back up now** is chosen.
23
+ - **A QR code beside the pairing code.** Scan it with a phone and the service opens with the code already filled in:
24
+ nothing to type from the chart table's screen.
25
+ - **Restoring the logbook from the online service.** After a lost SD card or on a new computer, pair the new
26
+ installation with the same boat and the Export page offers the logbook the service kept: one button brings every
27
+ passage back — track, events, handwriting, readings, crew, forecasts and places — and the backup carries on where it
28
+ stopped, without sending anything again. Only an empty logbook can take one back; a restore cut short picks up by
29
+ itself.
30
+ - **Pairing with the online service by a short code.** On the Export page, ask the service for a code, enter it on the
31
+ service signed in to your account, and the backup turns on by itself: no token to copy. The same card shows the last
32
+ backup and a **Back up now** button.
33
+ - **A summary of each passage, by email.** Turn it on, give it your SMTP relay and a few addresses, and Chiplog mails
34
+ the day's run once the passage is over for good — once it has stayed closed past the delay within which leaving again
35
+ would have carried it on, so a lock or a lunch anchorage never sets one off. The mail opens on the map of the track,
36
+ drawn on the server over OpenStreetMap tiles (or your own tile server, or a plain background) and carried inside the
37
+ message rather than attached, and goes on with the departure and arrival places and times, the distance, the duration,
38
+ the time under way, under engine and under sail, the average and maximum speed and the maximum wind, in the logbook's
39
+ language and the ship's time zone. At sea the relay is usually out of reach: a passage stays on the list and is tried
40
+ again, less and less often, then the backlog goes out oldest first on the next connection, with anything older than a
41
+ week dropped. Switching the option on sends nothing retroactively, and `POST /entries/:id/summary-mail` sends one
42
+ passage's summary straight away to try the settings out.
43
+
44
+ ### Changed
45
+
46
+ - **A new app icon:** a chartplotter at the chart table, its screen showing a route plotted across a chart, in place of
47
+ the open book. It is what the Signal K admin shows and what the tablet app installs on a home screen. The browser tab
48
+ and the logbook's own header get a simplified version of it — the chart, a stretch of coast and the route — because at
49
+ that size the plotter's case, grid and compass turn to mush. The tablet app's colour in the phone's task switcher
50
+ follows the icon's case rather than the old blue.
51
+ - **Coming back from a passage lands where you left the logbook.** Going back — with the browser's back button, with
52
+ "Back to the logbook" or from the nav bar — reopened the logbook at the top of the page, with only the first page of
53
+ passages: whatever had been loaded with "Load older passages" was gone, and so was the place you had scrolled to. The
54
+ logbook is now put back as it was, the older pages included, and rendered from what it was showing rather than from an
55
+ empty page, so it comes back at its old height and the scroll goes straight back where it was instead of jumping once
56
+ the passages arrive. Every other page still opens at the top.
57
+ - **A button takes you back to the top of the logbook.** Once you have scrolled a way down — further still with the
58
+ older pages loaded — a round button in the corner brings you back up, rather than scrolling back through a season.
59
+
60
+ ## [2.8.0] - 2026-10-01
61
+
62
+ ### Added
63
+
64
+ - **A manual entry's time can be typed in or corrected.** A note can be written up after the fact with the time it
65
+ happened, and any manoeuvre, note or sketch the crew logged can be redated later from the logbook's timeline or from
66
+ the tablet — an entry still waiting for the connection included. Since such an entry was not made where it happened,
67
+ its position is read back from the track at that time and left empty when the track has nothing within 2 minutes of
68
+ it, along with the instrument readings taken when the button was pressed. A time outside the passage or in the future
69
+ is refused, and the departure manoeuvre that opened a passage is still moved through that passage's departure time.
70
+
71
+ ### Changed
72
+
73
+ - **The tablet's confirmation banner no longer reads as a question.** Logging an entry put up two buttons the size of
74
+ the app's primary actions, "Add a comment" and "Undo", which looked like a dialog waiting for an answer — it was not
75
+ clear the entry was already in, nor that "Undo" deleted it rather than dismissing the banner. The banner now confirms
76
+ first (a check mark, or a clock for an entry held on the tablet), carries a close button and a bar draining over the
77
+ ten seconds it stays, and puts the two follow-ups below the message at a smaller size, the undo in red and labelled
78
+ with what it undoes.
79
+
9
80
  ## [2.7.0] - 2026-09-22
10
81
 
11
82
  ### Added
@@ -383,7 +454,9 @@ First release.
383
454
  - REST API under `/plugins/signalk-chiplog/api`, documented in [docs/API.md](docs/API.md).
384
455
  - Single SQLite database through Node's built-in `node:sqlite`: no native module to build.
385
456
 
386
- [Unreleased]: https://github.com/ricard33/signalk-chiplog/compare/v2.7.0...HEAD
457
+ [Unreleased]: https://github.com/ricard33/signalk-chiplog/compare/v2.9.0...HEAD
458
+ [2.9.0]: https://github.com/ricard33/signalk-chiplog/compare/v2.8.0...v2.9.0
459
+ [2.8.0]: https://github.com/ricard33/signalk-chiplog/compare/v2.7.0...v2.8.0
387
460
  [2.7.0]: https://github.com/ricard33/signalk-chiplog/compare/v2.6.0...v2.7.0
388
461
  [2.6.0]: https://github.com/ricard33/signalk-chiplog/compare/v2.5.1...v2.6.0
389
462
  [2.5.1]: https://github.com/ricard33/signalk-chiplog/compare/v2.5.0...v2.5.1
package/README.md CHANGED
@@ -29,6 +29,8 @@ English and French, chosen from the browser's language.
29
29
  - [Configuration](#configuration-)
30
30
  - [Signal K data used](#signal-k-data-used-)
31
31
  - [Backups and abandon ship](#backups-and-abandon-ship-)
32
+ - [Online backup](#online-backup-)
33
+ - [Passage summary emails](#passage-summary-emails-)
32
34
  - [Retrospective analysis](#retrospective-analysis-)
33
35
  - [Importing from PostgSail](#importing-from-postgsail-)
34
36
  - [Privacy and online services](#privacy-and-online-services-)
@@ -214,8 +216,12 @@ Open **Chiplog** from the Signal K webapps, or `/signalk-chiplog/`. Reading need
214
216
  counter at departure and arrival and the hours run, and the tank levels and battery charge, voltage and current noted
215
217
  at departure), and the log: every reading and event in order, including handwritten notes. A passage in progress
216
218
  refreshes every minute. Each line's comment can be edited (read/write access); a manoeuvre or note the crew logged
217
- themselves can also be deleted — automatic lines (alarms, autopilot, weather, corrections) can only be annotated.
218
- Under each position, in grey, its bearing and distance from the nearest landmark.
219
+ themselves can also be **redated** and deleted — automatic lines (alarms, autopilot, weather, corrections) can only be
220
+ annotated. Correcting a time reads the position back from the track at that time, and leaves it empty when the track
221
+ has nothing within 2 minutes of it, since the entry was not made where it happened. A time outside the passage, or in
222
+ the future, is refused, and the departure manoeuvre that opened a passage is moved by changing that passage's
223
+ departure time in **Corrections** below. Under each position, in grey, its bearing and distance from the nearest
224
+ landmark.
219
225
  - **Corrections** (read/write access):
220
226
  - rename the departure, or the arrival once the passage is closed — a passage in progress has none yet to rename;
221
227
  - switch an engine period to sail or back;
@@ -355,9 +361,11 @@ change. One tap logs it with the time, the position and an instrument reading.
355
361
 
356
362
  - **Sail change** asks which sail went up: mainsail, genoa, jib, staysail, spinnaker, gennaker, code 0, storm jib, or
357
363
  any name you type.
358
- - A banner then confirms it for 10 seconds, with two big buttons:
359
- - **Undo**, for a mistaken tap;
360
- - **Add a comment**, e.g. "25 kn, second reef".
364
+ - A banner then confirms it: a check mark, what was logged and at what time, and a bar along the bottom draining over
365
+ the 10 seconds it stays. Nothing is waiting on you — it goes on its own, or at once with the **×**. Under the message
366
+ sit two optional follow-ups:
367
+ - **Add a comment**, e.g. "25 kn, second reef";
368
+ - **Undo this entry**, in red, for a mistaken tap — it deletes the entry just logged.
361
369
 
362
370
  ### Departures open the passage
363
371
 
@@ -372,7 +380,8 @@ note once moored belongs to the passage that brought you there. Anywhere else, t
372
380
 
373
381
  ### Notes and handwriting
374
382
 
375
- - **Note** — type and tap **Log it**.
383
+ - **Note** — type and tap **Log it**. Leave **Time** empty for now, or fill it in to write up something that happened
384
+ earlier; a note dated by hand takes its position from the track rather than from where you are standing.
376
385
  - **Handwriting** — takes over the whole screen, with a toolbar above the pad: fine pen, thick pen, highlighter, eraser,
377
386
  undo, and a choice of colour (kept to the theme's colour in night mode, to spare night vision). Pen pressure also sets
378
387
  the line width. The eraser removes only what it actually touches, splitting a stroke rather than deleting all of it;
@@ -385,7 +394,8 @@ export, not just on the tablet.
385
394
  ### Latest entries
386
395
 
387
396
  Below, the latest entries of the current passage (or of the last one) are listed with their time. Each can take a
388
- comment, and your own entries can be deleted; a note's text can be edited.
397
+ comment, and your own entries can be redated and deleted; a note's text can be edited. An entry still waiting for the
398
+ connection can be corrected too — the change travels with it.
389
399
 
390
400
  ### Night mode
391
401
 
@@ -420,43 +430,51 @@ a regular Signal K user account.
420
430
 
421
431
  In the Signal K admin, **Apps & Plugins → Configuration → Chiplog**.
422
432
 
423
- | Setting | Default | What it does |
424
- | ---------------------------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
425
- | Stop duration within which a new departure continues the passage | 30 min | A passage closes when the boat stops; leaving again sooner reopens it, the stop kept as a stopover. |
426
- | Under-way speed without navigation.state | 1 kn | Used only without signalk-autostate: under way above it, stopped below half of it. |
427
- | Propulsion assumed without engine data | sail | When nothing says whether the engine is running. Set to engine on a motorboat. |
428
- | Instrument snapshot interval | 60 min | Readings on this clock boundary during a passage. |
429
- | Track point interval | 15 s | A track point at least this often while moving. |
430
- | Place matching radius | 200 m | A departure or arrival this close to a known place takes its name. |
431
- | Name departures and arrivals with online geocoding | on | Turn off to never send positions online; places are then named after their coordinates until corrected. |
432
- | Geocoding service | `https://nominatim.openstreetmap.org` | Any Nominatim-compatible service, e.g. a self-hosted one. |
433
- | Read each journal line against the nearest landmark | on | Fetches the landmarks of the areas sailed through from OpenStreetMap, so each position is also given as a bearing and distance from one. Turn off to keep the coordinates alone. |
434
- | Landmark service (Overpass API) | `https://overpass-api.de/api/interpreter` | Any Overpass-compatible service, e.g. a self-hosted one. |
435
- | Fetch the tide forecast at departure | on | Turn off to never send the departure position online; the passage page then shows no tide. |
436
- | Marine service | `https://marine-api.open-meteo.com/v1/marine` | Any Open-Meteo Marine-compatible service, e.g. a self-hosted one. Serves the tide, and the sea state and current of the weather forecast. |
437
- | Fetch the marine weather forecast at departure | on | Turn off to never send the departure position to the weather services; the passage page and the PDF then show no forecast. |
438
- | Weather service | `https://api.open-meteo.com/v1/forecast` | Any Open-Meteo-compatible forecast service, e.g. a self-hosted one. |
439
- | USB export directory | — | Where the abandon-ship copy is written, e.g. `/media/usb`. Empty turns the USB copy off. |
440
- | Automatic USB copy interval | 15 min | How often the USB copy is brought up to date. 0 turns the periodic copy off. |
441
- | Copy to the USB drive at each arrival | on | Brings the USB copy up to date as soon as a passage ends. |
442
- | Logbook language (PDF) | en | Language of the PDF logbooks on the USB drive (English or French). |
443
- | Ship's time zone (PDF) | the server's | Time zone of the PDF logbooks on the USB drive, e.g. `Europe/Paris`. |
444
- | Wind speed thresholds | 20, 30 kn | Logged when the 2-minute average true wind crosses them. |
445
- | Barometric drop warning | 4 hPa / 3 h | 0 turns it off. |
446
- | Log heading changes | on | Turn off to leave heading changes out of the log. |
447
- | Heading change threshold | 30° | A change must be at least this large to be logged. |
448
- | Heading change tolerance | 10° | How much the new heading may wander while holding and still count as steady. |
449
- | Heading change hold time | 60 s | How long the new heading must hold before it is logged. |
450
- | Heading change minimum speed | 2 kn | Below this speed over ground, the course is too noisy to log a change. |
451
- | Heading change cooldown | 5 min | A new change is logged only once the last one is at least this old. |
452
- | History source (retrospective analysis) | InfluxDB 1.x | Select Signal K History API to read the server's own history provider, such as signalk-to-influxdb2 — no database connection needed. InfluxDB 1.x stays the default so existing installations are untouched. |
453
- | InfluxDB host (retrospective analysis) | — | Shown only for the InfluxDB 1.x legacy source. Local or remote host of the database signalk-to-influxdb writes to. Empty turns the retrospective analysis page off. |
454
- | InfluxDB port | 8086 | |
455
- | InfluxDB database | — | |
456
- | InfluxDB username / password | — | Leave empty if the database needs none. |
457
- | InfluxDB protocol | http | `http` or `https`. |
458
- | Retrospective query timeout | 30 s | Each retrospective query gives up and reports an error past this, instead of hanging against an unreachable or overloaded history. Applies to either source. |
459
- | Vessel context (retrospective analysis) | this server's own | Only needed running the replay from a different Signal K server than the one that wrote the history, e.g. development pointed at a production database. Applies to either source. |
433
+ | Setting | Default | What it does |
434
+ | ---------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
435
+ | Stop duration within which a new departure continues the passage | 30 min | A passage closes when the boat stops; leaving again sooner reopens it, the stop kept as a stopover. |
436
+ | Under-way speed without navigation.state | 1 kn | Used only without signalk-autostate: under way above it, stopped below half of it. |
437
+ | Propulsion assumed without engine data | sail | When nothing says whether the engine is running. Set to engine on a motorboat. |
438
+ | Instrument snapshot interval | 60 min | Readings on this clock boundary during a passage. |
439
+ | Track point interval | 15 s | A track point at least this often while moving. |
440
+ | Place matching radius | 200 m | A departure or arrival this close to a known place takes its name. |
441
+ | Name departures and arrivals with online geocoding | on | Turn off to never send positions online; places are then named after their coordinates until corrected. |
442
+ | Geocoding service | `https://nominatim.openstreetmap.org` | Any Nominatim-compatible service, e.g. a self-hosted one. |
443
+ | Read each journal line against the nearest landmark | on | Fetches the landmarks of the areas sailed through from OpenStreetMap, so each position is also given as a bearing and distance from one. Turn off to keep the coordinates alone. |
444
+ | Landmark service (Overpass API) | `https://overpass-api.de/api/interpreter` | Any Overpass-compatible service, e.g. a self-hosted one. |
445
+ | Fetch the tide forecast at departure | on | Turn off to never send the departure position online; the passage page then shows no tide. |
446
+ | Marine service | `https://marine-api.open-meteo.com/v1/marine` | Any Open-Meteo Marine-compatible service, e.g. a self-hosted one. Serves the tide, and the sea state and current of the weather forecast. |
447
+ | Fetch the marine weather forecast at departure | on | Turn off to never send the departure position to the weather services; the passage page and the PDF then show no forecast. |
448
+ | Weather service | `https://api.open-meteo.com/v1/forecast` | Any Open-Meteo-compatible forecast service, e.g. a self-hosted one. |
449
+ | USB export directory | — | Where the abandon-ship copy is written, e.g. `/media/usb`. Empty turns the USB copy off. |
450
+ | Automatic USB copy interval | 15 min | How often the USB copy is brought up to date. 0 turns the periodic copy off. |
451
+ | Copy to the USB drive at each arrival | on | Brings the USB copy up to date as soon as a passage ends. |
452
+ | Email a summary of each passage | off | Mails the map and figures of each passage once it is definitively closed. |
453
+ | Summary recipients | — | One or more email addresses, separated by commas. |
454
+ | Summary sender | — | The address the summaries come from. Most relays insist it be one they are allowed to send for. |
455
+ | SMTP server | — | The mail relay the summaries are handed to. Empty turns the summaries off. |
456
+ | SMTP port | 587 | 587 for submission with STARTTLS, 465 for implicit TLS, 25 for a local relay. |
457
+ | SMTP security | STARTTLS | STARTTLS, TLS, or none for a relay on the boat itself. |
458
+ | SMTP user name / password | — | Leave empty if the relay needs no authentication. |
459
+ | 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. |
460
+ | Logbook language (PDF and summary emails) | en | Language of the PDF logbooks on the USB drive and of the summary emails (English or French). |
461
+ | 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`. |
462
+ | Wind speed thresholds | 20, 30 kn | Logged when the 2-minute average true wind crosses them. |
463
+ | Barometric drop warning | 4 hPa / 3 h | 0 turns it off. |
464
+ | Log heading changes | on | Turn off to leave heading changes out of the log. |
465
+ | Heading change threshold | 30° | A change must be at least this large to be logged. |
466
+ | Heading change tolerance | 10° | How much the new heading may wander while holding and still count as steady. |
467
+ | Heading change hold time | 60 s | How long the new heading must hold before it is logged. |
468
+ | Heading change minimum speed | 2 kn | Below this speed over ground, the course is too noisy to log a change. |
469
+ | Heading change cooldown | 5 min | A new change is logged only once the last one is at least this old. |
470
+ | History source (retrospective analysis) | InfluxDB 1.x | Select Signal K History API to read the server's own history provider, such as signalk-to-influxdb2 — no database connection needed. InfluxDB 1.x stays the default so existing installations are untouched. |
471
+ | InfluxDB host (retrospective analysis) | — | Shown only for the InfluxDB 1.x legacy source. Local or remote host of the database signalk-to-influxdb writes to. Empty turns the retrospective analysis page off. |
472
+ | InfluxDB port | 8086 | |
473
+ | InfluxDB database | — | |
474
+ | InfluxDB username / password | — | Leave empty if the database needs none. |
475
+ | InfluxDB protocol | http | `http` or `https`. |
476
+ | Retrospective query timeout | 30 s | Each retrospective query gives up and reports an error past this, instead of hanging against an unreachable or overloaded history. Applies to either source. |
477
+ | Vessel context (retrospective analysis) | this server's own | Only needed running the replay from a different Signal K server than the one that wrote the history, e.g. development pointed at a production database. Applies to either source. |
460
478
 
461
479
  ## Signal K data used 🔌
462
480
 
@@ -486,6 +504,89 @@ None of these is required except position and speed over ground; each feature us
486
504
  - Each file is flushed to the drive before it appears, so pulling the drive out never leaves a half-written file.
487
505
  - The Export page shows the schedule, the last copy, the next one, and the last failure if any.
488
506
  - **The database** — `chiplog.sqlite` in the plugin's data folder can be copied while the plugin is stopped.
507
+ - **Online** — see [Online backup](#online-backup-) below.
508
+
509
+ ## Online backup 🌐
510
+
511
+ Keep a copy of the logbook off the boat, on the Ti Bord online service.
512
+
513
+ 1. On the **Export** page, under **Online backup**, enter the service address and choose **Get a pairing code**.
514
+ 2. On the service, signed in to your account, enter the code shown (e.g. `K7QF-3MXB`) and choose your boat — or scan the
515
+ QR code beside it with your phone, which opens the service with the code filled in. The code is valid for 15 minutes.
516
+ 3. The page soon says the boat is paired: Chiplog has saved the service address and its own token in the plugin
517
+ configuration and turned the backup on.
518
+
519
+ You can also paste a token by hand: turn **Back the logbook up online** on in the plugin configuration, fill in the
520
+ **Online service address** and the **Device token**.
521
+
522
+ From then on, whenever the boat has a connection, Chiplog sends:
523
+
524
+ - every passage with its track, events, handwritten notes, instrument readings, crew and forecasts — the newest first,
525
+ so the latest passages are safe first after a long time offline;
526
+ - only what changed since the service last heard of it, compressed: a passage under way sends the points added since,
527
+ not its whole track again;
528
+ - the removal of passages deleted or merged on board;
529
+ - the places — names, positions and countries — whenever one is added, renamed or gets its country.
530
+
531
+ It checks every 15 minutes (**Online backup interval**), straight away at each departure and arrival, and when you
532
+ choose **Back up now** on the Export page, which also shows the last backup and the last failure. Out of reach of a
533
+ network, it simply tries again later. The logbook on board stays the record: nothing ever comes back from the service to
534
+ change it.
535
+
536
+ ### On a satellite link
537
+
538
+ Tick **Costly link** on the Export page (or in the plugin configuration) when every kilobyte is paid for. Chiplog then
539
+ sends only a summary of each passage and a thinned-out track — a few kilobytes — at departures and arrivals and every
540
+ six hours: enough for the service to know where you went, and for those ashore to follow. Full tracks, instrument
541
+ readings, forecasts and places wait on board. Untick it back in harbour and everything follows; or choose **Back up
542
+ now** to send it all at once anyway.
543
+
544
+ ### Getting the logbook back
545
+
546
+ Lost the SD card, or moved to a new computer? Install Chiplog, pair it with the same boat on the service, and the
547
+ **Export** page offers the logbook the service kept: choose **Restore this logbook**. Every passage comes back with its
548
+ track, events, notes, readings, crew and forecasts, and the backup carries on where it had stopped. A restore cut short
549
+ by a lost connection picks up by itself. Restore **before** sailing with the new installation: only an empty logbook can
550
+ take one back.
551
+
552
+ ## Passage summary emails 📧
553
+
554
+ Get the day's run in your inbox — and let whoever follows the boat from ashore get it too — without opening the webapp.
555
+ Turn **Email a summary of each passage** on, fill in the recipients, the sender and your SMTP relay, and Chiplog mails a
556
+ summary of every passage once it is over for good.
557
+
558
+ - **When.** A passage closes the moment the boat stops, but leaving again within the stop tolerance (30 min by default)
559
+ carries it on. The summary waits out that window, so it arrives once the arrival is final — not at every lock or lunch
560
+ anchorage. One mail per passage, never two.
561
+ - **What it says.** The map of the track first, then the departure and the arrival with their place and local time, the
562
+ distance, the duration, the time under way, the time under engine and under sail, the average and maximum speed, and
563
+ the maximum wind — the same figures and wording as the passage page, in the **logbook language** and **ship's time
564
+ zone** set below.
565
+ - **The map** is drawn on the server and travels inside the message, so it shows up in the mail rather than as an
566
+ attachment to open. Tiles come from OpenStreetMap by default; set your own tile server, or clear the setting to get
567
+ the track drawn on a plain background and send nothing to a tile server.
568
+ - **Offline is fine.** At sea the relay is usually out of reach: Chiplog keeps the passage on its list and tries again,
569
+ less and less often, then sends the backlog oldest first as soon as there is a connection. A passage closed more than
570
+ a week ago is dropped — a summary that late is no longer news.
571
+ - **Nothing retroactive.** Turning the option on does not mail your existing logbook; only passages ending afterwards
572
+ are summarised.
573
+ - **Trying your settings.** The relay only gets used at the next arrival, so to check the configuration straight away,
574
+ ask for one passage's summary to be sent now:
575
+
576
+ ```bash
577
+ TOKEN=$(curl -s -X POST http://localhost:3000/signalk/v1/auth/login \
578
+ -H 'content-type: application/json' \
579
+ -d '{"username":"admin","password":"…"}' | sed 's/.*"token":"\([^"]*\)".*/\1/')
580
+ curl -X POST -H "Authorization: Bearer $TOKEN" \
581
+ http://localhost:3000/plugins/signalk-chiplog/api/entries/1/summary-mail
582
+ ```
583
+
584
+ With Signal K security switched off, the `Authorization` header is not needed. The passage does not have to be the last
585
+ one, and a summary already sent is sent again — this works whether or not the option itself is on, so the relay can be
586
+ tried before turning the automatic summaries on.
587
+
588
+ A refusal the relay would only repeat — a recipient it will not take, a password it will not accept — is written to the
589
+ Signal K log and that passage is not retried; fix the settings and resend it with the command above.
489
590
 
490
591
  ## Retrospective analysis 🕓
491
592
 
@@ -555,11 +656,17 @@ node scripts/import-postgsail.js PostgSail_Trip.geojson --url http://boat.local:
555
656
  Open-Meteo by default — once, at departure. Nothing at all when it is off.
556
657
  - **Weather forecast.** With it on, the departure position of each passage is sent to the weather service and to the
557
658
  marine service — both the public Open-Meteo by default — once, at departure. Nothing at all when it is off.
659
+ - **Passage summaries.** With them on, each summary is sent to the SMTP relay you configure — yours, not a service of
660
+ ours — and the map it carries is drawn from tiles fetched from the tile server you configure, OpenStreetMap's public
661
+ one by default. Nothing at all when they are off, and nothing goes to a tile server when the tile setting is empty.
558
662
  - **Maps.** The logbook webapp loads map tiles from OpenStreetMap and OpenSeaMap while the device viewing it is online.
559
663
  Offline, the track is still drawn, on a blank background.
560
664
  - **Retrospective analysis.** Running one queries the InfluxDB database set in the plugin configuration — the boat's
561
665
  own, local or remote, never a third party — for the Signal K history in the requested range.
562
- - **Nothing else** leaves the boat. There is no account, analytics or cloud service.
666
+ - **Online backup.** With it on, every passage — track, events, handwritten notes, readings, crew and forecasts — and
667
+ every place, with its name, position and country, is sent to the online service at the address you configure, with the
668
+ device token it gave your boat. Nothing at all when it is off.
669
+ - **Nothing else** leaves the boat. There is no analytics, and no account unless you choose the online backup.
563
670
 
564
671
  Map data and place names © OpenStreetMap contributors (ODbL); seamarks © OpenSeaMap; tide and weather data ©
565
672
  [Open-Meteo.com](https://open-meteo.com/) (CC BY 4.0).
Binary file