129 Commits

Author SHA1 Message Date
Jorijn Schrijvershof
5545ce5b28 Merge pull request #23 from jorijn/release-please--branches--main--components--meshcore-stats
chore(main): release 0.2.6
v0.2.6
2026-01-05 10:50:13 +01:00
Jorijn Schrijvershof
666ed4215f chore(main): release 0.2.6 2026-01-05 10:49:22 +01:00
Jorijn Schrijvershof
3d0d90304c fix: add tmpfs mount for fontconfig cache to fix read-only filesystem errors
The container runs with read_only: true for security hardening, but
fontconfig needs a writable cache directory. Added tmpfs mount at
/var/cache/fontconfig to allow fontconfig to write its cache without
compromising the read-only filesystem security.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 10:49:02 +01:00
Jorijn Schrijvershof
6afc14e007 Merge pull request #21 from jorijn/release-please--branches--main--components--meshcore-stats
chore(main): release 0.2.5
v0.2.5
2026-01-05 10:03:26 +01:00
Jorijn Schrijvershof
4c5a408604 chore(main): release 0.2.5 2026-01-05 10:00:46 +01:00
Jorijn Schrijvershof
3c5eace220 feat: add automatic serial port locking to prevent concurrent access
Implements fcntl.flock() based locking for serial transport to prevent
USB serial conflicts when collect_companion and collect_repeater run
simultaneously. This addresses Ofelia's limitation where no-overlap
only prevents a job from overlapping with itself, not other jobs.

Key changes:
- Add connect_with_lock() async context manager to meshcore_client.py
- Use non-blocking LOCK_NB with async polling to avoid freezing event loop
- Only lock for serial transport (TCP/BLE don't need it)
- 60s timeout with clear error message if lock cannot be acquired
- Update collector scripts to use new context manager
- Remove external flock from cron examples (now handled in Python)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 10:00:25 +01:00
Jorijn Schrijvershof
7eee23ec40 docs: fix formatting in architecture diagram 2026-01-05 09:57:54 +01:00
Jorijn Schrijvershof
30de7c20f3 Merge pull request #20 from jorijn/release-please--branches--main--components--meshcore-stats
chore(main): release 0.2.4
v0.2.4
2026-01-05 09:32:23 +01:00
Jorijn Schrijvershof
19fa04c202 chore(main): release 0.2.4 2026-01-05 09:24:32 +01:00
Jorijn Schrijvershof
6ac52629d3 docs: rewrite README with Docker-first installation guide
Completely restructured README.md to prioritize Docker installation:
- Added Quick Start section with copy-pasteable commands
- Reorganized with Docker as recommended, manual as alternative
- Added Platform Notes (Linux/macOS/Windows) with collapsible sections
- Streamlined configuration reference table
- Added troubleshooting table with common issues
- Included resource requirements and backup instructions
- Moved metrics reference to CLAUDE.md (linked from docs section)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 09:24:07 +01:00
Jorijn Schrijvershof
5b43f9ed12 Merge pull request #19 from jorijn/release-please--branches--main--components--meshcore-stats
chore(main): release 0.2.3
v0.2.3
2026-01-05 08:58:53 +01:00
Jorijn Schrijvershof
0fe6c66ed8 chore(main): release 0.2.3 2026-01-05 08:57:16 +01:00
Jorijn Schrijvershof
2730a9d906 ci: use fine-grained PAT for release-please to trigger Docker builds
GITHUB_TOKEN cannot trigger other workflows by design. Using a
fine-grained PAT (RELEASE_PLEASE_TOKEN) scoped to this repo only
allows releases to properly trigger the docker-publish workflow.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 08:57:01 +01:00
Jorijn Schrijvershof
5e5d63fca3 Merge pull request #18 from jorijn/release-please--branches--main--components--meshcore-stats
chore(main): release 0.2.2
v0.2.2
2026-01-05 08:48:14 +01:00
github-actions[bot]
92b2286e18 chore(main): release 0.2.2 2026-01-05 07:47:54 +00:00
Jorijn Schrijvershof
6776c2c429 fix: move serial device config to override file
Docker Compose merges arrays instead of replacing them, so having
a default device in docker-compose.yml caused conflicts with override
files. Serial device configuration now requires docker-compose.override.yml,
which is cleaner since:
- Device paths vary per system
- TCP transport users don't need devices at all

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 08:47:34 +01:00
Jorijn Schrijvershof
e3a1df4aa6 fix(ci): skip smoke test when manual push is disabled 2026-01-05 08:41:58 +01:00
Jorijn Schrijvershof
f7f3889e41 Merge pull request #16 from jorijn/release-please--branches--main--components--meshcore-stats
chore(main): release 0.2.1
v0.2.1
2026-01-05 08:24:24 +01:00
github-actions[bot]
be86404d8b chore(main): release 0.2.1 2026-01-05 07:23:46 +00:00
Jorijn Schrijvershof
7ba5ed37d4 Merge pull request #17 from jorijn/feat/docker-containerization
feat: add Docker containerization with GitHub Actions CI/CD
2026-01-05 08:23:34 +01:00
Jorijn Schrijvershof
046d7ead70 refactor: rename docker-compose.development.yml to docker-compose.dev.yml
- Rename to shorter docker-compose.dev.yml
- Add docker-compose.override.yml to .gitignore for local customizations
- Document override file pattern for device path customization
- Update README and CLAUDE.md with new naming convention

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 08:16:26 +01:00
Jorijn Schrijvershof
ee959d95a1 fix: improve Docker configuration and documentation
- Change Python path defaults to Docker paths (/data/state, /out)
- Remove STATE_DIR/OUT_DIR from Dockerfile ENV (Python defaults now correct)
- Remove REPEATER_FETCH_ACL feature (unsupported)
- Fix nginx tmpfs permissions with uid=101,gid=101
- Remove Ofelia [global] save=true (caused config parse error)
- Switch to bind mounts for ./out instead of named volume
- Comment out devices section (not available on macOS Docker)
- Add TCP and BLE transport options to meshcore.conf.example
- Document correct macOS socat command for serial-over-TCP
- Update README with macOS Docker workaround instructions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 07:56:58 +01:00
Jorijn Schrijvershof
7a181e4b1a feat: add Docker containerization with GitHub Actions CI/CD
- Multi-stage Dockerfile with Python 3.12 + Ofelia scheduler
- docker-compose.yml for production (ghcr.io image)
- docker-compose.development.yml for local builds
- GitHub Actions workflow for multi-arch builds (amd64/arm64)
- Security hardening: non-root user, cap_drop, read_only filesystem
- Trivy vulnerability scanning and SBOM generation
- Nightly rebuilds for OS security patches

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 07:12:59 +01:00
Jorijn Schrijvershof
2bf04ce3f7 Merge branch 'main' of github.com:jorijn/meshcore-stats
* 'main' of github.com:jorijn/meshcore-stats:
  chore(main): release 0.2.0
2026-01-04 20:15:33 +01:00
Jorijn Schrijvershof
f47916cf82 chore: clean up permissions in settings.local.json 2026-01-04 20:14:49 +01:00
Jorijn Schrijvershof
ccc3774523 Merge pull request #15 from jorijn/release-please--branches--main--components--meshcore-stats
chore(main): release 0.2.0
v0.2.0
2026-01-04 20:13:13 +01:00
github-actions[bot]
dcdcd3ff34 chore(main): release 0.2.0 2026-01-04 19:10:37 +00:00
Jorijn Schrijvershof
8ca5a1e6d0 feat: auto-load config from meshcore.conf
Simplify setup by having Python automatically load configuration from
meshcore.conf at module import time. This eliminates the need to source
config files in cron jobs or use direnv.

- Add _load_config_file() to env.py that parses shell-style config
- Environment variables always take precedence (Docker-friendly)
- Rename .envrc.example to meshcore.conf.example (no direnv dependency)
- Update cron examples to use flock for USB serial locking
- Simplify documentation to use traditional .venv/ virtualenv

BREAKING CHANGE: Configuration file renamed from .envrc to meshcore.conf.
Users must copy meshcore.conf.example to meshcore.conf and migrate their
settings. The new file format is the same (shell-style exports) but
without the direnv-specific "layout python3" command.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 20:10:20 +01:00
Jorijn Schrijvershof
0f8b0a3492 Initial release: MeshCore Stats monitoring system
A Python-based monitoring system for MeshCore LoRa mesh networks.
Collects metrics from companion and repeater nodes, stores them in
a SQLite database, and generates a static website with interactive
SVG charts and statistics.

Features:
- Data collection from local companion and remote repeater nodes
- SQLite database with EAV schema for flexible metric storage
- Interactive SVG chart generation with matplotlib
- Static HTML site with day/week/month/year views
- Monthly and yearly statistics reports (HTML, TXT, JSON)
- Light and dark theme support
- Circuit breaker for unreliable LoRa connections
- Battery percentage calculation from 18650 discharge curves
- Automated releases via release-please

Live demo: https://meshcore.jorijn.com
2026-01-04 19:37:57 +01:00