Releases: blue-notes-robot/cosmiq5-web
Release list
v72: Settings fixes
Settings fixes
A cross-check of every setting against the original Deepblu app found these problems.
- Screen timeout fixed. Choosing 30 s, 1 min or 2 min actually set 1, 2 or 3 seconds. The device takes plain seconds, and the page now sends them.
- Salinity and altitude are now separate switches. Both can be on at the same time, as in the app. Before, a device with both on showed neither.
- Scuba time alarm accepts only steps of 10 minutes, like the app.
- Diagnostics: corrected the labels for the
$5Dand$60blocks.
Device info and model check
- After connecting, the page shows the model, firmware version and the number of dives in the logbook.
- Settings stay locked until the page has identified the model.
- Settings the app hides for a model or firmware are greyed out. Freedive alarms are only written on the Cosmiq 5: older COSMIQ and COSMIQ+ units store them differently.
If the page still shows the old version, reload it once. The offline cache updates in the background.
v71 – Offline support
Offline support
- PC / Mac / Android (Chrome or Edge): open the page once while online. The log shows "Offline ready", and after that the page opens without internet (keep the trailing
/in the address). You can also Install it as an app. Updates are picked up automatically when you're online again. - iPhone (Bluefy): iOS only allows offline caching in apps that can be the default browser, and Bluefy can't be. Open the page before you lose internet and keep the tab open. Once it's loaded, everything works offline, including Bluetooth and the logbook download.
- Local copy:
index.html+logbook.jsin one folder also works offline in Chrome or Edge. Its saved logbook is separate from the hosted page's. - The README has a new Offline use section (#2).
Clear message when Bluetooth isn't supported
Browsers without Web Bluetooth used to fail on Connect with a TypeError; on iPhone, that's Chrome, Safari and all others except Bluefy and WebBLE. The page now shows a notice with a tip for your platform and disables Connect. View saved logbook still works. If Bluetooth is off or no adapter is found, there's a hint to turn it on.
v70 – Dive profile viewer
Dive profile viewer
- Profile chart. Tap any dive in the Logbook table to see its depth profile, with water temperature as a dashed line.
- Hover or drag across the chart to read time, depth and temperature.
- Newer / Older step through the dives.
- Dives without a readable profile show why, e.g. "overwritten by a newer dive".
- Saved logbook. The last downloaded logbook is stored in your browser (IndexedDB, on this device only). View saved logbook opens it without connecting the dive computer. Viewing and export (Subsurface XML, CSV, JSON) work offline; settings stay disabled until you connect.
- Faster re-downloads. Headers are always re-read. Profiles already verified in the saved logbook are reused, and a profile is only downloaded again if a newer dive may have been written into its flash slot. A repeat download of a full logbook with no new dives reads no profiles at all.
The idea and UI concept come from PR #1 (Dive History) by @rudkodm, reimplemented on top of the v69 decoding. Thank you!
All logbook commands remain read-only.
v69 – Logbook export
Logbook export
A new Logbook tab downloads every dive stored on the Cosmiq and exports it as Subsurface XML (File → Open in Subsurface), CSV or raw JSON.
-
It only uses read commands. Nothing is written to the dive computer while the logbook downloads, and settings are locked until it finishes.
-
Each profile is read twice and only accepted when both copies match. Split or garbled Bluetooth packets are detected and re-read.
-
It works around a firmware bug behind the "645 m / 6553 °C" profiles in Subsurface (subsurface#3548). The Cosmiq writes each profile to flash sector
start_sector % 256but reads it back from the fullstart_sector. So once a logbook passes sector 256:- newer dives read back as empty memory;
- the oldest profiles get overwritten.
The Logbook tab reads each newer dive through the slot of the old dive it overwrote. Dives whose profile can't be reached are still exported with date, duration, max depth and temperature. The table shows the status of every dive.
Fixes to settings writes
- Freedive max time reset depth alarm 3 to 25 m. Command
0x26also carries depth alarm 3, which was hard-coded to0x14. Alarm 3 is now read from the device and sent back unchanged. - Freedive depth alarms could overwrite their partner. Alarms are written in pairs, and an unread partner alarm was sent as 5 m. The partner is now read from the device first, and nothing is written if that read fails.
- Input validation. Empty or out-of-range fields used to send malformed packets (
NaN, negative hex). Values are now checked against the Deepblu app's ranges:- scuba depth alarm 5–50 m;
- scuba time alarm 10–120 min;
- freedive depth alarms 5–80 m;
- freedive time 30–600 s.
- Reply handling. Bluetooth notifications are reassembled into full replies and checksum-verified before use. "COMMAND REJECTED" only appears for a real rejection.
- All writes go through one queue. This fixes "GATT operation already in progress" errors when clicking quickly.
- Other:
- characteristics are selected by UUID;
- device data is logged as text, not HTML;
- the tab bar wraps on phones.
Notes
- The protocol and export code are in
logbook.js, which must be published next toindex.html. node test/logbook.test.js <dump dir>tests it against a simulated device.- Tested against a simulated device and captured data from a COSMIQ 5 (firmware 2.2). Please verify settings on the device screen as always.