Files
series3-watcher/README.md
2025-12-04 17:24:20 -05:00

2.3 KiB

A lightweight Python script that monitors Instantel Series 3 (Minimate) call-in activity on a Blastware server.

It scans the event folder, reads .MLG headers to identify unit IDs, and prints a live status table showing:

  • Last event received
  • Age since last call-in
  • OK / Pending / Missing states
  • Detected units (no roster required)
  • Optional API heartbeat to Seismograph Fleet Manager backend

This script is part of the larger Seismograph Fleet Manager project.


Requirements

  • Python 3.8 (Windows 7 compatible)
  • Blastware 10 event folder available locally
  • config.ini in the same directory as the script

Install dependencies with:

pip install -r requirements.txt


Usage

Run the emitter from the folder containing the script:

python series3_emitter.py

The script will:

  1. Scan the Blastware event folder for .MLG files (within a max age window).
  2. Sniff each file header for the unit ID.
  3. Print a status line for each detected unit (OK / Pending / Missing).
  4. Optionally POST a heartbeat payload on an interval when API_ENABLED=true.
  5. Write logs into the emitter_logs/ folder and auto-clean old logs.

Config

All settings are stored in config.ini.

Key fields:

  • SERIES3_PATH — folder containing .MLG files
  • SCAN_INTERVAL_SECONDS — how often to scan
  • OK_HOURS / MISSING_HOURS — thresholds for status
  • MLG_HEADER_BYTES — how many bytes to sniff from each .MLG header
  • RECENT_WARN_DAYS — log unsniffable files newer than this window
  • MAX_EVENT_AGE_DAYS — ignore events older than this many days
  • API_ENABLED — enable/disable heartbeat POST
  • API_URL — heartbeat endpoint
  • API_INTERVAL_SECONDS — heartbeat frequency
  • SOURCE_ID / SOURCE_TYPE — identifiers included in the API payload
  • LOG_RETENTION_DAYS — auto-delete logs older than this many days
  • COLORIZE — ANSI color output (off by default for Win7)

Logs

Logs are stored under emitter_logs/.
Git ignores all log files but keeps the folder itself.


Versioning

This repo follows Semantic Versioning (SemVer).

Current release: v1.2.0 — rosterless scanning with API heartbeat option.
See CHANGELOG.md for details.


License

Private / internal project.