signalk-chiplog 1.0.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 (76) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/LICENSE +21 -0
  3. package/README.md +290 -0
  4. package/index.js +327 -0
  5. package/lib/api.js +427 -0
  6. package/lib/database.js +264 -0
  7. package/lib/detection.js +407 -0
  8. package/lib/entries.js +345 -0
  9. package/lib/errors.js +22 -0
  10. package/lib/event-watcher.js +332 -0
  11. package/lib/events.js +287 -0
  12. package/lib/export.js +220 -0
  13. package/lib/formats.js +215 -0
  14. package/lib/manoeuvre-types.js +84 -0
  15. package/lib/observation-recorder.js +152 -0
  16. package/lib/place-names.js +208 -0
  17. package/lib/places.js +128 -0
  18. package/lib/propulsion-detector.js +156 -0
  19. package/lib/propulsion.js +75 -0
  20. package/lib/rows.js +15 -0
  21. package/lib/track-recorder.js +149 -0
  22. package/lib/track.js +58 -0
  23. package/lib/usb-scheduler.js +131 -0
  24. package/lib/validation.js +105 -0
  25. package/package.json +67 -0
  26. package/public/app.css +603 -0
  27. package/public/entry/entry.css +528 -0
  28. package/public/entry/icons/apple-touch-icon.png +0 -0
  29. package/public/entry/icons/icon-192.png +0 -0
  30. package/public/entry/icons/icon-512.png +0 -0
  31. package/public/entry/index.html +22 -0
  32. package/public/entry/js/access.mjs +116 -0
  33. package/public/entry/js/clock.mjs +29 -0
  34. package/public/entry/js/components/AccessGate.mjs +70 -0
  35. package/public/entry/js/components/Dialogs.mjs +64 -0
  36. package/public/entry/js/components/ManoeuvrePad.mjs +106 -0
  37. package/public/entry/js/components/NotePanel.mjs +34 -0
  38. package/public/entry/js/components/RecentList.mjs +113 -0
  39. package/public/entry/js/components/SketchPanel.mjs +181 -0
  40. package/public/entry/js/components/StatusHeader.mjs +69 -0
  41. package/public/entry/js/journal.mjs +139 -0
  42. package/public/entry/js/main.mjs +360 -0
  43. package/public/entry/js/outbox.mjs +124 -0
  44. package/public/entry/js/strokes.mjs +81 -0
  45. package/public/entry/manifest.webmanifest +26 -0
  46. package/public/entry/sw.js +75 -0
  47. package/public/icon.svg +7 -0
  48. package/public/index.html +18 -0
  49. package/public/js/api.mjs +85 -0
  50. package/public/js/auth.mjs +41 -0
  51. package/public/js/components/ExportView.mjs +182 -0
  52. package/public/js/components/LogView.mjs +132 -0
  53. package/public/js/components/PassageView.mjs +343 -0
  54. package/public/js/components/PropulsionStrip.mjs +60 -0
  55. package/public/js/components/StatusBar.mjs +55 -0
  56. package/public/js/components/Timeline.mjs +226 -0
  57. package/public/js/components/TrackMap.mjs +85 -0
  58. package/public/js/components/common.mjs +70 -0
  59. package/public/js/context.mjs +56 -0
  60. package/public/js/days.mjs +56 -0
  61. package/public/js/format.mjs +84 -0
  62. package/public/js/i18n.mjs +480 -0
  63. package/public/js/ids.mjs +10 -0
  64. package/public/js/main.mjs +48 -0
  65. package/public/js/status.mjs +21 -0
  66. package/public/vendor/htm-LICENSE +202 -0
  67. package/public/vendor/leaflet/LICENSE +26 -0
  68. package/public/vendor/leaflet/images/layers-2x.png +0 -0
  69. package/public/vendor/leaflet/images/layers.png +0 -0
  70. package/public/vendor/leaflet/images/marker-icon-2x.png +0 -0
  71. package/public/vendor/leaflet/images/marker-icon.png +0 -0
  72. package/public/vendor/leaflet/images/marker-shadow.png +0 -0
  73. package/public/vendor/leaflet/leaflet.css +661 -0
  74. package/public/vendor/leaflet/leaflet.js +6 -0
  75. package/public/vendor/preact-LICENSE +21 -0
  76. package/public/vendor/preact-htm.mjs +1 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,52 @@
1
+ # Changelog
2
+
3
+ All notable changes to Chiplog are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses [Semantic Versioning](https://semver.org/).
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [1.0.0] - 2026-09-13
8
+
9
+ First release.
10
+
11
+ ### Added
12
+
13
+ #### Logbook
14
+
15
+ - One logbook entry per passage, opened when the boat gets under way and closed when it arrives, with a configurable tolerance for short stops (30 minutes by default).
16
+ - Under way or stopped decided from `navigation.state` published by [signalk-autostate](https://github.com/meri-imperiumi/signalk-autostate), or from speed over ground averaged over 3 minutes when it is absent. Departures and arrivals are dated from raw speed, so the passage starts where the boat actually left.
17
+ - signalk-autostate's value is preferred when another source, such as the boat's own AIS transponder, also publishes `navigation.state`. When detection works from speed alone, the apps say why.
18
+ - Passages closed at their last movement after a power cut; passages split by a long stop can be merged back.
19
+ - GPS track at a configurable interval (15 s by default), with extra points on turns and speed changes; distance from the track.
20
+ - Engine and sail periods from engine revolutions, engine state, `navigation.state` or a configurable default, with manual correction.
21
+ - Instrument readings at departure, every hour on the hour (configurable), at arrival and with each live manoeuvre.
22
+ - Automatic events: Signal K alarms and emergencies, autopilot changes, true wind crossing configurable thresholds, barometer falling over 3 hours.
23
+ - Departure and arrival names from known places, then online geocoding (any Nominatim-compatible service, can be turned off); a renamed place is remembered for later passages.
24
+
25
+ #### Logbook webapp
26
+
27
+ - Status bar, passages grouped by day, passage page with map (OpenStreetMap and OpenSeaMap), engine and sail periods, and the log of readings and events, handwritten notes included.
28
+ - Corrections: rename departure or arrival, switch an engine or sail period, close, merge and delete passages.
29
+ - Export of the whole logbook or a date range as JSON, CSV (nautical units) or GPX.
30
+ - English and French.
31
+
32
+ #### Tablet entry app
33
+
34
+ - Installable app at `/signalk-chiplog/entry/`, designed for gloves and wet fingers, with a red night mode.
35
+ - Manoeuvre shortcuts, with the sail picked on a sail change; casting off or weighing anchor opens the passage before the boat moves.
36
+ - Keyboard notes and stylus handwriting with pressure and palm rejection.
37
+ - Undo and comment right after each entry; latest entries with edit and delete.
38
+ - Entries kept on the tablet while the Wi-Fi is down and sent in order when it is back, never twice.
39
+ - Signal K device access requests when security is enabled; offline start-up over HTTPS.
40
+
41
+ #### Abandon-ship copy
42
+
43
+ - One JSON, CSV and GPX file per passage on a USB drive, named to sort by date, written only when new or changed, with obsolete files removed.
44
+ - Copied automatically every 15 minutes and at each arrival (both configurable), or on demand; a missing drive is reported in the plugin status and on the export page.
45
+
46
+ #### API and data
47
+
48
+ - REST API under `/plugins/signalk-chiplog/api`, documented in [docs/API.md](docs/API.md).
49
+ - Single SQLite database through Node's built-in `node:sqlite`: no native module to build.
50
+
51
+ [Unreleased]: https://github.com/ricard33/signalk-chiplog/compare/v1.0.0...HEAD
52
+ [1.0.0]: https://github.com/ricard33/signalk-chiplog/releases/tag/v1.0.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Cedric RICARD
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,290 @@
1
+ # Chiplog
2
+
3
+ An automated logbook for [Signal K](https://signalk.org). Chiplog writes the logbook from the data already on your boat's Signal K server — passages, track, engine and sail, instrument readings, alarms — and lets the crew add what sensors cannot know from a tablet at the helm: manoeuvres, notes and handwriting.
4
+
5
+ - **One entry per passage**, opened when the boat leaves and closed when it arrives, tolerating short stops such as a lock or a lunch anchorage.
6
+ - **GPS track**, distance, time under engine and under sail.
7
+ - **Hourly instrument readings**, as on a paper log, plus readings at departure, arrival and each manoeuvre.
8
+ - **Automatic events**: alarms, autopilot changes, strong wind, falling barometer.
9
+ - **Departure and arrival names**, looked up online and corrected once for good.
10
+ - **Consultation webapp**: logbook by day, map, timeline, corrections, export.
11
+ - **Tablet entry app**: big buttons for gloves and wet fingers, stylus handwriting, night mode, works through Wi-Fi dropouts.
12
+ - **Abandon-ship copy**: JSON, CSV and GPX, downloadable or written to a USB drive.
13
+
14
+ English and French, chosen from the browser's language.
15
+
16
+ ## Contents
17
+
18
+ - [Requirements](#requirements)
19
+ - [Installation](#installation)
20
+ - [How the logbook is written](#how-the-logbook-is-written)
21
+ - [The logbook webapp](#the-logbook-webapp)
22
+ - [The tablet entry app](#the-tablet-entry-app)
23
+ - [Configuration](#configuration)
24
+ - [Signal K data used](#signal-k-data-used)
25
+ - [Backups and abandon ship](#backups-and-abandon-ship)
26
+ - [Privacy and online services](#privacy-and-online-services)
27
+ - [Troubleshooting](#troubleshooting)
28
+ - [Limitations](#limitations)
29
+ - [Development](#development)
30
+ - [License](#license)
31
+
32
+ ## Requirements
33
+
34
+ - **Signal K server 2.x** running on **Node.js 22.13 or later**. Chiplog uses Node's built-in SQLite module, so there is nothing to compile — it installs the same way on a Raspberry Pi.
35
+ - **A position and speed over ground** on the Signal K bus (GPS). Everything else is optional and used when present.
36
+ - **Recommended:** [signalk-autostate](https://github.com/meri-imperiumi/signalk-autostate), which publishes `navigation.state` (moored, anchored, sailing, motoring). Without it, Chiplog decides from speed alone and says so in the apps.
37
+ - **Recommended:** a correct system clock, e.g. with `signalk-set-system-time`. The logbook is dated from the server's clock.
38
+ - **Optional:** a USB drive left plugged into the server, for the abandon-ship copy.
39
+ - **Optional:** an internet connection, for map tiles and place names. The logbook itself never needs one.
40
+
41
+ ## Installation
42
+
43
+ Install **Chiplog** from the Signal K App Store (**Apps & Plugins → Store**), or from the command line:
44
+
45
+ ```bash
46
+ cd ~/.signalk
47
+ npm install signalk-chiplog
48
+ ```
49
+
50
+ Then restart the Signal K server, and in the Signal K admin:
51
+
52
+ 1. Go to **Apps & Plugins → Configuration**, open **Chiplog**, tick **Enabled** and save. The defaults suit most boats; see [Configuration](#configuration).
53
+ 2. Open **Webapps**: **Chiplog** is listed there. Its two pages are also reachable directly:
54
+ - the logbook: `http://<your-server>:3000/signalk-chiplog/`
55
+ - the tablet entry app: `http://<your-server>:3000/signalk-chiplog/entry/`
56
+
57
+ The logbook is stored in a single SQLite file, `~/.signalk/plugin-config-data/signalk-chiplog/chiplog.sqlite`.
58
+
59
+ ## How the logbook is written
60
+
61
+ ### Passages
62
+
63
+ A **passage** is one logbook entry: from leaving a berth or anchorage to arriving at the next one.
64
+
65
+ - **Departure.** A passage opens when the boat gets under way. It is dated from the moment the boat actually left — not the few minutes later when the decision was confirmed — and placed where it was last still.
66
+ - **Short stops** do not end a passage. Stopping marks it as stopped; moving again within the tolerance (30 minutes by default) carries on with the same passage. Staying stopped longer closes it, with the arrival time set to when the boat stopped.
67
+ - **Casting off** from the tablet opens the passage right away, before the boat moves (see [Departures](#departures-open-the-passage)).
68
+ - **Power cuts and restarts.** If the server comes back after the boat has been still for longer than the tolerance, the passage is closed at its last movement. A short restart carries on with the same passage.
69
+ - **Under way or stopped** comes from `navigation.state` when signalk-autostate provides it. Otherwise Chiplog averages speed over ground over 3 minutes: under way above 1 knot, stopped below half a knot. This keeps a boat swinging at anchor from starting passages.
70
+
71
+ A passage that was split in two — a stop just longer than the tolerance, for instance — can be merged back from the logbook webapp.
72
+
73
+ ### Track and distance
74
+
75
+ While under way, a track point is recorded every 15 seconds, plus extra points on a turn of 15° or more or a speed change of 1 knot, so tacks show on the map without bloating straight lines. The distance is the length of the track.
76
+
77
+ ### Engine or sail
78
+
79
+ Each passage is split into engine and sail periods covering the time under way. Chiplog decides from, in order:
80
+
81
+ 1. `propulsion.*.revolutions` — any engine turning means engine;
82
+ 2. `propulsion.*.state` (`started` / `stopped`);
83
+ 3. `navigation.state` (`motoring` / `sailing`);
84
+ 4. the configured default, **sail**.
85
+
86
+ A wrong period can be corrected in the webapp. A correction to the period in progress holds until the engine data actually changes.
87
+
88
+ ### Instrument readings
89
+
90
+ Readings are taken at departure, **every hour on the hour** during the passage (configurable), at arrival, and with each manoeuvre logged live, so a reef appears with the wind that called for it. Each reading holds whatever is available among position, speed and course over ground, heading, speed through water, true and apparent wind, depth, barometer, air and water temperature, trip log and engine hours. A sensor that has gone silent is left blank rather than repeating an old value.
91
+
92
+ ### Automatic events
93
+
94
+ Added to the timeline without anyone touching anything:
95
+
96
+ - **Alarms** — any Signal K notification reaching `alarm` or `emergency` (man overboard, engine alarm, anchor watch…), and when it clears.
97
+ - **Autopilot** — engaged, disengaged, mode changes.
98
+ - **Wind** — true wind, averaged over 2 minutes, rising above 20 and 30 knots and falling back below them (configurable).
99
+ - **Barometer** — a fall of 4 hPa or more over 3 hours (configurable).
100
+
101
+ An alarm at anchor between two passages goes to the passage that ended there, as long as the boat is within 1 nautical mile of that arrival.
102
+
103
+ ### Place names
104
+
105
+ Departures and arrivals are named automatically:
106
+
107
+ 1. **Known places first.** Within 200 m (configurable) of a place already named, that name is used.
108
+ 2. **Otherwise online**, from OpenStreetMap's Nominatim service. Until it answers — at sea, out of reach of a network — the place shows its coordinates (e.g. `46.1466N 1.1686W`) as a provisional name, and the lookup is retried later.
109
+ 3. **Corrections are remembered.** Renaming a departure or arrival in the webapp also renames that place for every later passage starting or ending nearby. Past passages keep the name they recorded.
110
+
111
+ ## The logbook webapp
112
+
113
+ Open **Chiplog** from the Signal K webapps, or `/signalk-chiplog/`. Reading needs no more than read-only access.
114
+
115
+ - **Status bar** — under way under sail or engine, stopped, or waiting for data, with a link to the passage in progress. A warning shows when detection works from speed alone because signalk-autostate is missing.
116
+ - **Logbook** — passages grouped by day, newest first, with times, departure and arrival, distance, duration and an engine/sail bar. A passage across midnight appears on both days. Provisional place names are shown as such.
117
+ - **Passage page** — summary, map of the track (OpenStreetMap with OpenSeaMap seamarks, which can be hidden), the engine and sail periods, and the log: every reading and event in order, including handwritten notes. A passage in progress refreshes every minute.
118
+ - **Corrections** (read/write access):
119
+ - rename the departure or arrival;
120
+ - switch an engine period to sail or back;
121
+ - close a passage in progress, e.g. to confirm an arrival;
122
+ - merge with the previous or next passage;
123
+ - delete a passage (admin).
124
+ - **Export** — download the whole logbook or a date range as JSON, CSV or GPX, and write the abandon-ship copy to the USB drive now (admin).
125
+
126
+ **Helm entry** in the top bar opens the tablet entry app.
127
+
128
+ ## The tablet entry app
129
+
130
+ Open `/signalk-chiplog/entry/` on the tablet, or follow **Helm entry** from the logbook. For an app-like, full-screen launcher, use the browser's **Add to Home Screen** (Safari: Share → Add to Home Screen; Chrome: menu → Add to Home screen / Install app).
131
+
132
+ ### Logging a manoeuvre
133
+
134
+ Tap the manoeuvre: tack, gybe, reef in, shake out reef, sail change, anchor down, anchor up, moor, cast off, watch change. One tap logs it with the time, the position and an instrument reading.
135
+
136
+ - **Sail change** asks which sail went up: mainsail, genoa, jib, staysail, spinnaker, gennaker, code 0, storm jib, or any name you type.
137
+ - A banner then confirms it for 10 seconds, with two big buttons:
138
+ - **Undo**, for a mistaken tap;
139
+ - **Add a comment**, e.g. "25 kn, second reef".
140
+
141
+ ### Departures open the passage
142
+
143
+ With no passage open, **Cast off** and **Anchor up** are highlighted. Tapping one opens the passage at that moment, and the header shows "Ready to leave since…" until the boat moves. Chiplog then carries on with that same passage. If the boat never leaves, it closes like any long stop; **Undo** right after the tap removes it altogether.
144
+
145
+ Other entries made with no passage open go to the last passage if the boat is still within 1 nm of where it ended — a note once moored belongs to the passage that brought you there. Anywhere else, the app asks you to cast off first.
146
+
147
+ ### Notes and handwriting
148
+
149
+ - **Note** — type and tap **Log it**.
150
+ - **Handwriting** — write or draw on the pad with a stylus or a finger, optionally add a comment, and tap **Log it**. Pen pressure sets the line width. **Undo stroke** and **Clear** fix mistakes. Once a stylus has touched the pad, fingers are ignored, so a palm resting on the screen does not draw.
151
+
152
+ Handwritten notes appear as drawn in the logbook's timeline.
153
+
154
+ ### Latest entries
155
+
156
+ Below, the latest entries of the current passage (or of the last one) are listed with their time. Each can take a comment, and your own entries can be deleted; a note's text can be edited.
157
+
158
+ ### Night mode
159
+
160
+ **Night** switches to red on black, to keep night vision. The choice is remembered on the tablet.
161
+
162
+ ### When the Wi-Fi drops
163
+
164
+ Keep logging. The header shows **Not connected** and how many entries are waiting. Each entry is kept on the tablet with the time it was made, and sent in order as soon as the server answers again, with the position the track recorded at that time. An entry sent just before the connection dropped is never logged twice.
165
+
166
+ If the server refuses a waiting entry when it comes back — typically nothing to attach it to — it is shown in red in the latest entries, to discard.
167
+
168
+ **Starting the app with no connection** needs HTTPS (see [Troubleshooting](#the-tablet-app-does-not-start-without-a-connection)). Over plain HTTP the app still keeps entries through a dropout, as long as it was loaded beforehand.
169
+
170
+ ### With Signal K security enabled
171
+
172
+ Logging needs read/write access. The first time, the app shows **This tablet needs access**:
173
+
174
+ 1. Tap **Request access for this tablet**.
175
+ 2. In the Signal K admin, open **Security → Access Requests**, and approve **Chiplog tablet** with **read/write** permission. Choose a token expiry of **NEVER** so the tablet is not locked out at sea.
176
+ 3. Within a few seconds, the tablet is in. It keeps its token.
177
+
178
+ To revoke it, delete the device under **Security → Devices**: the tablet asks for access again. **Sign in instead** uses a regular Signal K user account.
179
+
180
+ ## Configuration
181
+
182
+ In the Signal K admin, **Apps & Plugins → Configuration → Chiplog**.
183
+
184
+ | Setting | Default | What it does |
185
+ | -------------------------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------- |
186
+ | Stop duration that ends a passage | 30 min | Shorter stops stay within the same passage. |
187
+ | Under-way speed without navigation.state | 1 kn | Used only without signalk-autostate: under way above it, stopped below half of it. |
188
+ | Propulsion assumed without engine data | sail | When nothing says whether the engine is running. Set to engine on a motorboat. |
189
+ | Instrument snapshot interval | 60 min | Readings on this clock boundary during a passage. |
190
+ | Track point interval | 15 s | A track point at least this often while moving. |
191
+ | Place matching radius | 200 m | A departure or arrival this close to a known place takes its name. |
192
+ | Name departures and arrivals with online geocoding | on | Turn off to never send positions online; places are then named after their coordinates until corrected. |
193
+ | Geocoding service | `https://nominatim.openstreetmap.org` | Any Nominatim-compatible service, e.g. a self-hosted one. |
194
+ | USB export directory | — | Where the abandon-ship copy is written, e.g. `/media/usb`. Empty turns the USB copy off. |
195
+ | Automatic USB copy interval | 15 min | How often the USB copy is brought up to date. 0 turns the periodic copy off. |
196
+ | Copy to the USB drive at each arrival | on | Brings the USB copy up to date as soon as a passage ends. |
197
+ | Wind speed thresholds | 20, 30 kn | Logged when the 2-minute average true wind crosses them. |
198
+ | Barometric drop warning | 4 hPa / 3 h | 0 turns it off. |
199
+
200
+ ## Signal K data used
201
+
202
+ None of these is required except position and speed over ground; each feature uses what the boat has.
203
+
204
+ | Purpose | Signal K paths |
205
+ | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
206
+ | Passages, track, distance | `navigation.position`, `navigation.speedOverGround`, `navigation.courseOverGroundTrue`, `navigation.state` |
207
+ | Engine or sail | `propulsion.*.revolutions`, `propulsion.*.state`, `navigation.state` |
208
+ | Readings | `navigation.headingTrue` (or `headingMagnetic` + `magneticVariation`), `navigation.speedThroughWater`, `environment.wind.*`, `environment.depth.belowSurface` (or `belowTransducer`), `environment.outside.pressure`, `environment.outside.temperature`, `environment.water.temperature`, `navigation.trip.log`, `propulsion.*.runTime` |
209
+ | Events | `notifications.*`, `steering.autopilot.state`, `.mode`, `.engaged`, `.target`, `environment.wind.speedTrue`, `environment.outside.pressure` |
210
+
211
+ ## Backups and abandon ship
212
+
213
+ - **Download** — Export page → JSON (the complete record, including tracks and handwriting), CSV (logbook lines in nautical units, for a spreadsheet) or GPX (tracks).
214
+ - **USB drive** — leave a USB drive plugged into the server and set the USB export directory. Chiplog then keeps a copy on it by itself: every 15 minutes and as soon as a passage ends (both configurable). **Write to the USB drive now** on the Export page makes a copy immediately. The copy fills a `chiplog/` folder on the drive with one JSON, CSV and GPX file per passage, named so that sorting by name sorts by date — e.g. `2026-09-13_0612Z_La-Rochelle_Les-Sables-d-Olonne.csv` (times in UTC; a passage in progress ends in `underway`).
215
+ - Each export writes only passages that are new or changed since the last one, and removes the files of passages deleted, merged or renamed. Other files in the folder are left alone.
216
+ - Each file is flushed to the drive before it appears, so pulling the drive out never leaves a half-written file.
217
+ - The Export page shows the schedule, the last copy, the next one, and the last failure if any.
218
+ - **The database** — `chiplog.sqlite` in the plugin's data folder can be copied while the plugin is stopped.
219
+
220
+ ## Privacy and online services
221
+
222
+ - **Place names.** With geocoding on, the position of each departure and arrival that matches no known place is sent to the geocoding service — OpenStreetMap's public Nominatim by default. Nothing else is sent, and nothing at all when it is off.
223
+ - **Maps.** The logbook webapp loads map tiles from OpenStreetMap and OpenSeaMap while the device viewing it is online. Offline, the track is still drawn, on a blank background.
224
+ - **Nothing else** leaves the boat. There is no account, analytics or cloud service.
225
+
226
+ Map data and place names © OpenStreetMap contributors (ODbL); seamarks © OpenSeaMap.
227
+
228
+ ## Troubleshooting
229
+
230
+ ### "Chiplog is not running"
231
+
232
+ The plugin is disabled or failed to start. Enable it under **Apps & Plugins → Configuration**, and check **Server → Server Logs** if it does not start.
233
+
234
+ ### "Detected from speed alone"
235
+
236
+ Chiplog works, but departures and arrivals are decided from speed only. The message says why:
237
+
238
+ - **"install signalk-autostate"** — nothing publishes `navigation.state`. Install and enable signalk-autostate.
239
+ - **"until signalk-autostate makes its first decision"** — normal for a minute or two after the server starts.
240
+ - **"has not been updated since…"** — the source named stopped publishing. signalk-autostate republishes every 10 minutes while it receives position and speed: check that the GPS data reaches the server, and that the plugin is enabled.
241
+ - **"is “default” (from nmea0183.AI)"** — another device publishes a navigational status Chiplog does not use, typically the boat's own AIS transponder, and signalk-autostate's value is not there to take over. Check that signalk-autostate is enabled; Chiplog prefers its value over any other source.
242
+
243
+ ### Passages are not opening
244
+
245
+ Check that `navigation.position` and `navigation.speedOverGround` are updating under **Data → Browser** in the Signal K admin. Without current data, Chiplog neither opens nor closes passages, and the status shows **Waiting for data**.
246
+
247
+ ### "Your Signal K account is not allowed to do this"
248
+
249
+ Security is on and you are not signed in, or your account is read-only. Corrections need read/write access; deleting passages and writing to the USB drive need an admin.
250
+
251
+ ### The tablet says the server does not accept device access requests
252
+
253
+ Turn on **Allow New Device Registration** under **Security → Settings** in the Signal K admin, or use **Sign in instead**.
254
+
255
+ ### "No passage to log this in"
256
+
257
+ No passage is open and the boat is not near the last arrival. Tap **Cast off** or **Anchor up** first.
258
+
259
+ ### The tablet app does not start without a connection
260
+
261
+ Browsers only allow an app to start offline and to be installed over HTTPS. Turn on SSL under **Server → Settings** in the Signal K admin, restart, and open the app with `https://` on the SSL port. Over plain HTTP, the app still keeps entries through Wi-Fi dropouts once it is loaded.
262
+
263
+ ### "The last copy failed" on the Export page
264
+
265
+ The USB drive is not mounted at the configured directory, or cannot be written. The failure is also written once to the Signal K server log and shown in the plugin status. Plug the drive back in — and check it is mounted at the same place — and the next automatic copy catches up with everything that changed meanwhile.
266
+
267
+ ### Wrong dates in the logbook
268
+
269
+ The server's clock is wrong — common on a Raspberry Pi without a real-time clock. Set it from GPS with `signalk-set-system-time`.
270
+
271
+ ## Limitations
272
+
273
+ - **Not yet:** the PDF logbook facsimile (planned for V1.1), a places page, and editing manoeuvre shortcuts from the webapps.
274
+ - **Offline charts** are not provided.
275
+ - **One vessel per Signal K server**, and no per-crew-member authorship.
276
+
277
+ ## Development
278
+
279
+ ```bash
280
+ npm install # also copies the browser libraries into public/vendor/
281
+ npm test
282
+ npm run lint
283
+ npm run demo:seed -- /tmp/chiplog-demo # a demo logbook to try the webapps with
284
+ ```
285
+
286
+ The functional specification is in [docs/SPEC.md](docs/SPEC.md), the data model in [docs/DATA_MODEL.md](docs/DATA_MODEL.md), and the REST API in [docs/API.md](docs/API.md). [CLAUDE.md](CLAUDE.md) describes the code layout and conventions.
287
+
288
+ ## License
289
+
290
+ MIT — see [LICENSE](LICENSE). Changes are listed in [CHANGELOG.md](CHANGELOG.md).