chore(release): v0.35.0 — 80 of 88 report fields from the file, and monitor logs (.MLG)
CHANGELOG: Unreleased -> v0.35.0 (2026-11-16), with the release's theme and its Migration. pyproject, README, CLAUDE.md -> 0.35.0. TOOL_VERSION -> 0.35.0: the codec changed (groups D2, E, F, over range, the mic's range), which gates the backfill's regeneration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ALX2R9LdWawLzUxwewZGA1
This commit is contained in:
1 parent
ed4f3d2213
commit
c2b8e76774
5 files changed
+109
-13
No files matched your search
+76
-1
@@ -4,7 +4,42 @@ All notable changes to seismo-relay are documented here.
|
||||
|
||||
---
|
||||
|
||||
## Unreleased
|
||||
## v0.35.0 — 2026-11-16
|
||||
|
||||
**The file-only decode reaches 80 of Blastware's 88 report fields, and SFM
|
||||
reads monitor logs (.MLG).**
|
||||
|
||||
Three lines of work ship together.
|
||||
|
||||
**The file-only decode, groups D (part 2), E and F.** 80 of Blastware's 88
|
||||
report fields now match on every DL2 event, 47 at v0.34.0. The last 16 values,
|
||||
in two causes, are left as they are by decision (Brian, 2026-11-11).
|
||||
- **New, from the unit's own records in the file:**
|
||||
- ZC frequency, peak displacement and times of peak
|
||||
- the sensor check results
|
||||
- the Monitor Log line
|
||||
- over range (Blastware's `OORANGE`)
|
||||
- **Fixed:**
|
||||
- a range-1 mic read 8× high (7 DL2 events)
|
||||
- the mic dB offset
|
||||
- a unit without a mic lost its sensor-check traces
|
||||
|
||||
**Monitor logs (.MLG).** SFM reads Blastware's monitor logs and keeps each
|
||||
unit's monitoring timeline: sessions, gaps and what each means, and call-ins,
|
||||
including calls that left no file. It answers "was unit X monitoring at T",
|
||||
which is what a shot report needs for a unit that did not trigger. Nothing flows
|
||||
in until the watcher forwards `.MLG`s or they are bulk-imported.
|
||||
|
||||
**An escaped checksum is the checksum, not data (#58).** SFM's live reads no
|
||||
longer carry a stray byte, which had corrupted the battery and memory status and
|
||||
the call-home read.
|
||||
|
||||
Prod still overlays a paired ASCII report onto the decode. Retiring that overlay
|
||||
is the plan's step 3 and is not part of this release.
|
||||
|
||||
⚠ **This release owes a backfill, about 8 hours on the NAS, and creates two
|
||||
empty tables on first start.** There is no migration, and no stored event time
|
||||
moves. See *Migration*.
|
||||
|
||||
### Added
|
||||
- **ZC frequency, peak displacement and times of peak come from the unit's own
|
||||
@@ -306,6 +341,46 @@ All notable changes to seismo-relay are documented here.
|
||||
- The old D.4.1–D.4.3 (a 308-byte header, a CRC at each record's start) are
|
||||
kept, marked retracted.
|
||||
|
||||
### Migration
|
||||
|
||||
⚠ **A backfill, no schema migration.** Not rehearsed on a prod snapshot.
|
||||
|
||||
**Before you start:**
|
||||
- `TOOL_VERSION` is bumped to **0.35.0**, which gates the regeneration, so no
|
||||
`--force` is needed.
|
||||
- **Back up `seismo_relay.db` first.**
|
||||
|
||||
**Then:**
|
||||
1. **Deploy.** On first start SFM creates `mlg_files` and `mlg_records`, both
|
||||
empty. No other table changes, and no event row or id moves.
|
||||
2. **In the `sfm` container, run `python scripts/backfill_sidecars.py`.** It
|
||||
re-decodes every event file. ⚠ **Plan about 8 hours**: v0.34.0's run took
|
||||
13:13 → 21:16 on 2026-11-05.
|
||||
- **Report-less events gain a ZC frequency** in the existing `*_zc_freq` /
|
||||
`*_zc_above_range` columns. Terra-View shows a frequency where it showed
|
||||
"—".
|
||||
- **The range-1 mic events' `mic_ppv` and `.h5` mic samples drop 8×** (7
|
||||
in DL2; e.g. K557J1XQ.GF0W reads 79.4 dB(L), not 97.5). Report-paired
|
||||
events keep the report's value.
|
||||
- **A unit without a mic gets its geophone sensor-check traces** in its
|
||||
`.h5` (BE16352's 8 DL2 events).
|
||||
- **On the decoded event only, not stored in the DB or `.h5` yet:** the
|
||||
sensor-check results, the Monitor Log line, over range, displacement and
|
||||
times of peak.
|
||||
- No stored event time moves.
|
||||
3. **Run `python scripts/backfill_event_shape.py --db-path
|
||||
bridges/captures/seismo_relay.db --store-root bridges/captures/waveforms`.**
|
||||
It recomputes the shape and offset metrics.
|
||||
4. **Optional, any time after: load DL2's `.MLG`s.**
|
||||
- Copy `C:\Blastware 10\Event\autocall home` with robocopy, not a zip: a
|
||||
Windows zip shifts summer file dates by an hour.
|
||||
- Run `python scripts/import_mlg_dir.py <dir> --db-path ... --store-root
|
||||
...`, with `--dry-run` first.
|
||||
- On the dev box, a 1,273-file sample loaded in 13 s with 0 errors.
|
||||
|
||||
**Terra-View** needs no change: it reads rows by id. ZC frequencies appear,
|
||||
and the range-1 mic values drop.
|
||||
|
||||
## v0.34.0 — 2026-11-04
|
||||
|
||||
**SFM reaches Series-4 parity, and reads most of Blastware's report from the
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Ground-up Python replacement for **Blastware**, Instantel's Windows-only software for
|
||||
managing MiniMate Plus seismographs. Connects over direct RS-232 or cellular modem
|
||||
(Sierra Wireless RV50 / RV55). Current version: **v0.34.0**.
|
||||
(Sierra Wireless RV50 / RV55). Current version: **v0.35.0**.
|
||||
|
||||
Stack-level context — which repo owns what, and how the three project versions
|
||||
pair — lives in `../terra-view/docs/tmi-stack.md`, which is also loaded as
|
||||
@@ -10,7 +10,7 @@ pair — lives in `../terra-view/docs/tmi-stack.md`, which is also loaded as
|
||||
|
||||
---
|
||||
|
||||
## Where things stand (updated 2026-11-05)
|
||||
## Where things stand (updated 2026-11-16)
|
||||
|
||||
Read this first when picking the project back up.
|
||||
|
||||
@@ -31,7 +31,7 @@ Read this first when picking the project back up.
|
||||
3. switch ingest so reports are kept only for checking (retire the overlay)
|
||||
4. stop the watchers forwarding reports
|
||||
- Until step 3, prod keeps the report as truth wherever one exists.
|
||||
- **🔑 Monitor logs (.MLG) and each unit's timeline (merged to `dev` 2026-11-16; next release).**
|
||||
- **🔑 Monitor logs (.MLG) and each unit's timeline (v0.35.0, 2026-11-16).**
|
||||
- **What:** every unit sends an `.MLG` at every call-in, in every mode. SFM reads it
|
||||
(`minimateplus/mlg_file.py`, reference D.4) and keeps each unit's monitoring timeline:
|
||||
sessions, gaps and what they mean, clock steps, and the call-ins, including calls that
|
||||
@@ -56,14 +56,14 @@ Read this first when picking the project back up.
|
||||
- **Byte layouts** of every field read from the file:
|
||||
`docs/instantel_protocol_reference.md` Appendix **D.6**.
|
||||
|
||||
**Where the decoder stands on `dev`** (2026-11-09, run `20261109-144544`):
|
||||
**Where the decoder stands** (v0.35.0; run `20261109-144544`):
|
||||
**80 of 88 fields match on every event**, up from about 6 before v0.33.0,
|
||||
47 before group D and 59 after it. Every other field matches or is accepted
|
||||
under a carve-out with its evidence.
|
||||
- Groups A, B, C and D part 1 shipped in v0.34.0 (#50, #51).
|
||||
- D part 2 (the unit's own summary), E (the sensor check), F (the monitor
|
||||
log), over range and the mic fixes are on `dev` and owe the next release
|
||||
a backfill.
|
||||
log), over range and the mic fixes shipped in v0.35.0, with its backfill
|
||||
(`TOOL_VERSION` 0.35.0).
|
||||
- Left: 16 values in two causes -- the vector sum's last digit on 4
|
||||
waveform/histogram twins, and 4 accelerations (reference D.6.11). Brian
|
||||
decided 2026-11-11 to leave both as they are, documented.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# seismo-relay `v0.34.0`
|
||||
# seismo-relay `v0.35.0`
|
||||
|
||||
A ground-up replacement for **Blastware** — Instantel's aging Windows-only
|
||||
software for managing seismographs. Supports both the **MiniMate Plus
|
||||
@@ -114,6 +114,19 @@ over direct RS-232 or cellular modem (Sierra Wireless RV50 / RV55).
|
||||
> ⚠ The deploy migrates the events table and owes an overnight backfill that
|
||||
> moves every Series-3 histogram time by one second. See the changelog's
|
||||
> *Migration*.
|
||||
>
|
||||
> **v0.35.0 (2026-11-16)** reaches 80 of Blastware's 88 report fields from the
|
||||
> event file alone, and reads monitor logs.
|
||||
> - **The file-only decode, groups D–F:** ZC frequency, displacement, times of
|
||||
> peak, the sensor check, the Monitor Log line and over range, all from the
|
||||
> unit's own records. A range-1 mic no longer reads 8× high.
|
||||
> - **Monitor logs (.MLG):** SFM reads Blastware's `.MLG` files and keeps each
|
||||
> unit's monitoring timeline, so it can answer "was unit X monitoring at T"
|
||||
> for a shot report. See the `.MLG` endpoints below.
|
||||
> - **An escaped checksum is the checksum, not data (#58).**
|
||||
>
|
||||
> ⚠ The deploy owes a backfill (about 8 hours on the NAS) and creates two
|
||||
> empty tables. See the changelog's *Migration*.
|
||||
> See [CHANGELOG.md](CHANGELOG.md) for full version history.
|
||||
|
||||
---
|
||||
@@ -272,6 +285,10 @@ Query the SQLite database written by `ach_server.py`. All read-only except
|
||||
| `GET` | `/db/monitor_log` | Monitoring intervals |
|
||||
| `GET` | `/db/sessions` | ACH call-home session history |
|
||||
| `PATCH` | `/db/events/{id}/false_trigger?value=true` | Flag / unflag false triggers |
|
||||
| `GET` | `/db/units/{serial}/timeline?from_dt=&to_dt=` | A unit's monitoring timeline from its `.MLG`s: sessions (how each ended, events, trigger level), gaps and what each means, clock steps, call-ins (delivered / no_file / nothing_new). Times are the unit's own clock. |
|
||||
| `GET` | `/db/units/{serial}/monitoring_at?at=` | Was the unit monitoring at `at`: `monitoring` / `not_monitoring` / `unknown`, with the session or gap that says so and the records and file behind it. |
|
||||
| `GET` | `/db/mlg_records?serial=&from_dt=&to_dt=` | A unit's raw `.MLG` records, oldest first |
|
||||
| `GET` | `/db/mlg_files/{id}` | The original `.MLG`, byte for byte (for printing or opening in Blastware) |
|
||||
|
||||
### File ingest endpoints
|
||||
|
||||
@@ -286,6 +303,7 @@ its Blastware filename and moved in place (see *Database* below).
|
||||
|--------|-----|-------------|
|
||||
| `POST` | `/db/import/blastware_file` | Series III: `.AB0*` / `.N00` binaries + paired `_ASCII.TXT`. Source: `series3-watcher`. |
|
||||
| `POST` | `/db/import/idf_file` | Series IV: `.IDFH` / `.IDFW` binaries + paired `.IDFW.txt` / `.IDFH.txt`. Source: `thor-watcher`. |
|
||||
| `POST` | `/db/import/mlg_file` | Series III monitor logs (`.MLG`), with each file's modified time as a JSON form field `mtimes`. Each file stored once; a damaged file stores nothing. Source: `scripts/import_mlg_dir.py` today; `series3-watcher` does not forward `.MLG`s yet. |
|
||||
|
||||
### DB snapshot / restore endpoints
|
||||
|
||||
@@ -402,13 +420,15 @@ reverse-engineering plan. The `micromate/idf_file.py` stub is where
|
||||
|
||||
`ach_server.py` and the file-ingest endpoints write to
|
||||
`bridges/captures/seismo_relay.db` (SQLite, WAL mode) via the `SeismoDb`
|
||||
persistence layer. Three tables, all unit-keyed by serial number:
|
||||
persistence layer. The main tables, all unit-keyed by serial number:
|
||||
|
||||
| Table | Key | Contents |
|
||||
|-------|-----|----------|
|
||||
| `ach_sessions` | UUID | Per-call-home audit record: serial, timestamp, peer IP, events_downloaded, monitor_entries, duration_seconds |
|
||||
| `events` | UUID, UNIQUE(serial, timestamp) | Triggered events: timestamp, Tran/Vert/Long/VectorSum/Mic PPV, project/client/operator/sensor_location strings, sample_rate, record_type, false_trigger flag, **`device_family`** ("series3" / "series4"), `blastware_filename` (binary at-rest in `waveforms/`), sidecar references |
|
||||
| `monitor_log` | UUID, UNIQUE(serial, start_time) | Monitoring intervals: serial, waveform_key, start_time, stop_time, duration_seconds, geo_threshold_ips |
|
||||
| `monitor_log` | UUID, UNIQUE(serial, start_time) | Monitoring intervals from live 0x0A reads (`ach_server.py` only): serial, waveform_key, start_time, stop_time, duration_seconds, geo_threshold_ips |
|
||||
| `mlg_files` | UUID, UNIQUE(file_name, sha256) | One row per Blastware `.MLG` received (v0.35.0): serial, size, record count, empty flag, call-in flag, the file's modified time, where the original is kept, and the call it came from (`last_stop`, `no_file_stops`) |
|
||||
| `mlg_records` | UUID, UNIQUE(serial, start, stop, flag word, trigger source) | One row per `.MLG` log record, stored once: start, stop (NULL = monitoring started), flag word, trigger source, Blastware's text and trigger level |
|
||||
|
||||
**Deduplication is by `(serial, timestamp)`** — the device clock is the
|
||||
stable natural key. Repeat call-homes or re-runs UPSERT the row in place,
|
||||
@@ -533,6 +553,7 @@ Use **com0com** or **VSPD** to create the virtual COM pair on Windows.
|
||||
- [x] Monitor control (start/stop, status polling, battery/memory)
|
||||
- [x] Monitor log entries (continuous monitoring intervals without full waveform download)
|
||||
- [x] Blastware file ingest at `/db/import/blastware_file` (paired with `series3-watcher`)
|
||||
- [x] Blastware monitor logs (`.MLG`) at `/db/import/mlg_file`, and each unit's monitoring timeline (`/db/units/{serial}/timeline`, `/monitoring_at`) (v0.35.0)
|
||||
|
||||
**Series IV (Micromate / Thor) device support:**
|
||||
- [x] Thor IDF file ingest at `/db/import/idf_file` (paired with `thor-watcher`, v0.18.0+)
|
||||
@@ -542,7 +563,7 @@ Use **com0com** or **VSPD** to create the virtual COM pair on Windows.
|
||||
- [ ] Live-device protocol — pending codec
|
||||
|
||||
**Data persistence:**
|
||||
- [x] SQLite database (`seismo_relay.db`) with `events`, `monitor_log`, `ach_sessions` tables
|
||||
- [x] SQLite database (`seismo_relay.db`) with `events`, `monitor_log`, `ach_sessions`, `device_commands`, `mlg_files` and `mlg_records` tables
|
||||
- [x] Per-row `device_family` column ("series3" / "series4") for clean UI / unit-of-measurement dispatch (v0.19.0+)
|
||||
- [x] Deduplication by `(serial, timestamp)` — natural key handles post-erase counter resets
|
||||
- [x] UPSERT on re-import refreshes every device-authoritative field (peaks, project, sample_rate); preserves operator review state (`false_trigger`)
|
||||
|
||||
@@ -54,7 +54,7 @@ SIDECAR_KIND = "sfm.event"
|
||||
# bumped without a `pip install` re-run — leading to confusing stale
|
||||
# version stamps in sidecars. Bump this constant and CHANGELOG.md
|
||||
# together at release time.
|
||||
TOOL_VERSION = "0.34.0" # file-only decode groups A-D, histogram times (#51); gates the backfill regen
|
||||
TOOL_VERSION = "0.35.0" # file-only decode groups D2, E, F, over range, mic range; gates the backfill regen
|
||||
|
||||
try:
|
||||
# Best-effort: prefer the installed metadata when it's NEWER than the
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "seismo-relay"
|
||||
version = "0.34.0"
|
||||
version = "0.35.0"
|
||||
description = "Python client and REST server for MiniMate Plus seismographs"
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
|
||||
Reference in new issue
Block a user