docs updated
This commit is contained in:
53
CHANGELOG.md
53
CHANGELOG.md
@@ -10,27 +10,68 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## [1.0.0] – 2025-09-02
|
## [1.2.0] - 2025-12-04
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Removed roster CSV dependency and all Dropbox refresh/hot-reload logic; heartbeat now only enumerates `.MLG` files.
|
||||||
|
- Added `MAX_EVENT_AGE_DAYS` filter to ignore stale events and log when no recent activity exists.
|
||||||
|
- Simplified heartbeat output/logging to show detected units only; logging hardened to never crash the emitter.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## [1.1.1] - 2025-12-02
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Example `config.ini` now ships with API heartbeat settings enabled (`API_ENABLED`, `API_URL`, `API_INTERVAL_SECONDS`, `SOURCE_ID`, `SOURCE_TYPE`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## [1.1.0] - 2025-12-01
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Standardized SFM telemetry payload builder and periodic HTTP heartbeat POST via `urllib`.
|
||||||
|
- Config support for API heartbeat (`API_ENABLED`, `API_URL`, `API_INTERVAL_SECONDS`, `SOURCE_ID`, `SOURCE_TYPE`); payload includes file path/size metadata.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Refactored scanner to retain file paths and header sniff cache; reformatted logging/ANSI handling.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## [1.0.1] - 2025-11-20
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- `API_URL` config key and `report_to_server` per-unit POST hook (adds `requests` dependency).
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Example `config.ini` roster URL updated; merged into `main`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## [1.0.0] - 2025-11-17
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- **Automatic roster refresh** from Dropbox at a configurable interval (`ROSTER_REFRESH_MIN_SECONDS`).
|
- **Automatic roster refresh** from Dropbox at a configurable interval (`ROSTER_REFRESH_MIN_SECONDS`).
|
||||||
- **Hot-reload** of roster file without restarting the script.
|
- **Hot-reload** of roster file without restarting the script.
|
||||||
- **Failsafe reload:** if the new roster is missing or invalid, the previous good roster is retained.
|
- **Failsafe reload:** if the new roster is missing or invalid, the previous good roster is retained.
|
||||||
- **Atomic roster downloads** (temp file → replace) to avoid partial/corrupted CSVs.
|
- **Atomic roster downloads** (temp file in-place replace) to avoid partial/corrupted CSVs.
|
||||||
- **Startup config echo** printing WATCH_PATH, ROSTER_FILE, and ROSTER_URL visibility.
|
- **Startup config echo** printing WATCH_PATH, ROSTER_FILE, and ROSTER_URL visibility.
|
||||||
- **Active / Bench / Ignored** unit categories for clearer fleet status mapping.
|
- **Active / Bench / Ignored** unit categories for clearer fleet status mapping.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Removed stray `note=note_suffix` bug in the “Unexpected Units” section.
|
- Removed stray `note=note_suffix` bug in the Unexpected Units section.
|
||||||
- Removed duplicate `import time`.
|
- Removed duplicate `import time`.
|
||||||
- Removed duplicate roster load during startup (roster now loads once).
|
- Removed duplicate roster load during startup (roster now loads once).
|
||||||
- Cleaned indentation for Python 3.8 compatibility.
|
- Cleaned indentation for Python 3.8 compatibility.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Reset versioning from legacy `v5.9 beta` → **v1.0.0** (clean semver baseline).
|
- Reset versioning from legacy `v5.9 beta` to **v1.0.0** (clean semver baseline).
|
||||||
- Main script normalized as `series3_emitter.py`.
|
- Main script normalized as `series3_emitter.py`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
[Unreleased]: https://example.com/compare/v1.0.0...HEAD
|
[Unreleased]: https://example.com/compare/v1.2.0...HEAD
|
||||||
[1.0.0]: https://example.com/releases/v1.0.0
|
[1.2.0]: https://example.com/releases/v1.2.0
|
||||||
|
[1.1.1]: https://example.com/releases/v1.1.1
|
||||||
|
[1.1.0]: https://example.com/releases/v1.1.0
|
||||||
|
[1.0.1]: https://example.com/releases/v1.0.1
|
||||||
|
[1.0.0]: https://example.com/releases/v1.0.0
|
||||||
|
|||||||
37
README.md
37
README.md
@@ -5,9 +5,8 @@ It scans the event folder, reads `.MLG` headers to identify unit IDs, and prints
|
|||||||
- Last event received
|
- Last event received
|
||||||
- Age since last call-in
|
- Age since last call-in
|
||||||
- OK / Pending / Missing states
|
- OK / Pending / Missing states
|
||||||
- Bench and ignored units
|
- Detected units (no roster required)
|
||||||
- Unexpected units
|
- Optional API heartbeat to Seismograph Fleet Manager backend
|
||||||
- Notes from the roster file
|
|
||||||
|
|
||||||
This script is part of the larger **Seismograph Fleet Manager** project.
|
This script is part of the larger **Seismograph Fleet Manager** project.
|
||||||
|
|
||||||
@@ -17,7 +16,6 @@ This script is part of the larger **Seismograph Fleet Manager** project.
|
|||||||
|
|
||||||
- Python 3.8 (Windows 7 compatible)
|
- Python 3.8 (Windows 7 compatible)
|
||||||
- Blastware 10 event folder available locally
|
- Blastware 10 event folder available locally
|
||||||
- `series3_roster.csv` in the configured path
|
|
||||||
- `config.ini` in the same directory as the script
|
- `config.ini` in the same directory as the script
|
||||||
|
|
||||||
Install dependencies with:
|
Install dependencies with:
|
||||||
@@ -34,12 +32,11 @@ Run the emitter from the folder containing the script:
|
|||||||
|
|
||||||
The script will:
|
The script will:
|
||||||
|
|
||||||
1. Load the roster file
|
1. Scan the Blastware event folder for `.MLG` files (within a max age window).
|
||||||
2. Scan the Blastware event folder for `.MLG` files
|
2. Sniff each file header for the unit ID.
|
||||||
3. Sniff each file header for the unit ID
|
3. Print a status line for each detected unit (OK / Pending / Missing).
|
||||||
4. Print a status line for each active unit
|
4. Optionally POST a heartbeat payload on an interval when `API_ENABLED=true`.
|
||||||
5. Refresh the roster automatically if `ROSTER_URL` is set
|
5. Write logs into the `emitter_logs/` folder and auto-clean old logs.
|
||||||
6. Write logs into the `emitter_logs/` folder
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -49,11 +46,18 @@ All settings are stored in `config.ini`.
|
|||||||
|
|
||||||
Key fields:
|
Key fields:
|
||||||
|
|
||||||
- `SERIES3_PATH` – folder containing `.MLG` files
|
- `SERIES3_PATH` — folder containing `.MLG` files
|
||||||
- `ROSTER_FILE` – path to the local roster CSV
|
- `SCAN_INTERVAL_SECONDS` — how often to scan
|
||||||
- `ROSTER_URL` – optional URL for automatic roster downloads
|
- `OK_HOURS` / `MISSING_HOURS` — thresholds for status
|
||||||
- `SCAN_INTERVAL_SECONDS` – how often to scan
|
- `MLG_HEADER_BYTES` — how many bytes to sniff from each `.MLG` header
|
||||||
- `OK_HOURS` / `MISSING_HOURS` – thresholds for status
|
- `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)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -68,7 +72,7 @@ Git ignores all log files but keeps the folder itself.
|
|||||||
|
|
||||||
This repo follows **Semantic Versioning (SemVer)**.
|
This repo follows **Semantic Versioning (SemVer)**.
|
||||||
|
|
||||||
Current release: **v1.0.0** – stable baseline emitter.
|
Current release: **v1.2.0** — rosterless scanning with API heartbeat option.
|
||||||
See `CHANGELOG.md` for details.
|
See `CHANGELOG.md` for details.
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -76,4 +80,3 @@ See `CHANGELOG.md` for details.
|
|||||||
## License
|
## License
|
||||||
|
|
||||||
Private / internal project.
|
Private / internal project.
|
||||||
```
|
|
||||||
@@ -9,9 +9,7 @@ SOURCE_TYPE = series3_emitter
|
|||||||
|
|
||||||
# Paths
|
# Paths
|
||||||
SERIES3_PATH = C:\Blastware 10\Event\autocall home
|
SERIES3_PATH = C:\Blastware 10\Event\autocall home
|
||||||
ROSTER_FILE = C:\SeismoEmitter\series3_roster.csv
|
MAX_EVENT_AGE_DAYS = 365
|
||||||
ROSTER_URL = https://www.dropbox.com/URL
|
|
||||||
ROSTER_REFRESH_MIN_SECONDS = 0
|
|
||||||
|
|
||||||
|
|
||||||
# Scanning
|
# Scanning
|
||||||
|
|||||||
Reference in New Issue
Block a user