25 Commits
Author SHA1 Message Date
tthandClaude Opus 5.5 9da2c2529f ci: pin the runner image by digest (Renovate keeps it current)
image / build (arm64) (push) Successful in 1m15s
image / build (amd64) (push) Successful in 1m25s
image / release (push) Skipped
ci / test (push) Successful in 1m48s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 02:36:22 +01:00
tthandClaude Opus 5.5 f7e594d10f ci: run in the Ubuntu 24.04 runner image -- swarm-runner's CPU cannot run setup-python's 26.04 build
image / build (amd64) (push) Successful in 2m26s
ci / test (push) Successful in 2m26s
image / build (arm64) (push) Successful in 6m24s
image / release (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 02:30:39 +01:00
tth 3135db3aa9 Merge remote-tracking branch 'origin/main'
image / build (arm64) (push) Successful in 5m1s
image / build (amd64) (push) Successful in 1m16s
image / release (push) Skipped
ci / test (push) Successful in 1m26s
2026-11-13 11:51:52 +01:00
tthandClaude Opus 5.5 b3ff2870b0 README: airtime warning at the top
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 11:51:19 +01:00
tthandClaude Opus 5.5 e2d3c72ba2 1.1.0: default interval 8 h, minimum 1 h
A repeater's battery, temperature and noise do not change by the hour, and
every reading is airtime on a channel everyone shares. The dashboard window
follows: 24 h by default (2-3x the interval), staleness thresholds too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 11:41:54 +01:00
renovate-bot 44da986315 Merge pull request 'Update https://git.rfa.cz/tth-pub/ci-actions action to v15' (#14) from renovate/major-ci-actions into main
image / build (amd64) (push) Successful in 1m5s
image / build (arm64) (push) Successful in 1m26s
image / release (push) Skipped
ci / test (push) Successful in 6m2s
2026-11-12 00:00:48 +01:00
renovate-bot e896244524 Update https://git.rfa.cz/tth-pub/ci-actions action to v15
pr-check / dependencies (pull_request) Successful in 6s
pr-check / build (pull_request) Successful in 30s
ci / test (push) Successful in 1m49s
ci / test (pull_request) Successful in 1m53s
2026-11-11 22:58:18 +00:00
renovate-bot 4c51188ee5 Merge pull request 'Update dependency meshcore to v2.3.19' (#13) from renovate/all-minor-patch into main
image / build (amd64) (push) Successful in 1m25s
ci / test (push) Successful in 1m42s
image / build (arm64) (push) Successful in 5m18s
image / release (push) Skipped
2026-11-11 19:59:55 +01:00
renovate-bot 89a35a6dff Update dependency meshcore to v2.3.19
pr-check / dependencies (pull_request) Successful in 5s
pr-check / build (pull_request) Successful in 51s
ci / test (pull_request) Successful in 1m39s
ci / test (push) Successful in 1m42s
2026-11-11 18:58:10 +00:00
renovate-bot b452c60434 Merge pull request 'Update grafana/grafana Docker tag to v13.3.1' (#12) from renovate/grafana-monorepo into main
image / build (amd64) (push) Successful in 1m28s
ci / test (push) Successful in 1m53s
image / build (arm64) (push) Successful in 4m58s
image / release (push) Skipped
2026-11-10 20:01:37 +01:00
renovate-bot 11eab55198 Update grafana/grafana Docker tag to v13.3.1
pr-check / dependencies (pull_request) Successful in 13s
pr-check / build (pull_request) Successful in 48s
ci / test (push) Successful in 1m30s
ci / test (pull_request) Successful in 2m4s
2026-11-10 18:59:10 +00:00
renovate-bot 7fb9bf0806 Merge pull request 'Update python:3.15-slim Docker digest to 65a65fc' (#11) from renovate/all-minor-patch into main
image / build (amd64) (push) Successful in 1m10s
ci / test (push) Successful in 1m15s
image / build (arm64) (push) Successful in 4m43s
image / release (push) Skipped
2026-11-08 01:55:54 +01:00
renovate-bot d31edee091 Update python:3.15-slim Docker digest to 65a65fc
pr-check / dependencies (pull_request) Successful in 5s
pr-check / build (pull_request) Successful in 44s
ci / test (pull_request) Successful in 1m35s
ci / test (push) Successful in 1m36s
2026-11-08 00:54:16 +00:00
renovate-bot 6e5b19eb25 Merge pull request 'Update prom/prometheus Docker tag to v3.16.0' (#10) from renovate/all-minor-patch into main
image / build (arm64) (push) Successful in 54s
image / build (amd64) (push) Successful in 1m6s
image / release (push) Skipped
ci / test (push) Successful in 1m28s
2026-11-05 18:00:40 +01:00
renovate-bot ff733ccdee Update prom/prometheus Docker tag to v3.16.0
pr-check / dependencies (pull_request) Successful in 16s
pr-check / build (pull_request) Successful in 42s
ci / test (push) Successful in 1m40s
ci / test (pull_request) Successful in 1m38s
2026-11-05 16:58:47 +00:00
renovate-bot 1306db07ab Merge pull request 'Update https://git.rfa.cz/tth-pub/ci-actions action to v14' (#9) from renovate/major-ci-actions into main
image / build (amd64) (push) Successful in 47s
ci / test (push) Successful in 1m45s
image / build (arm64) (push) Successful in 4m6s
image / release (push) Skipped
2026-11-05 16:05:02 +01:00
renovate-bot 49ad809016 Merge pull request 'Update python:3.15-slim Docker digest to e97b88e' (#8) from renovate/all-minor-patch into main
image / build (amd64) (push) Successful in 1m23s
ci / test (push) Successful in 2m13s
image / build (arm64) (push) Successful in 5m4s
image / release (push) Skipped
2026-11-05 16:03:46 +01:00
renovate-bot 21e22caa61 Update https://git.rfa.cz/tth-pub/ci-actions action to v14
pr-check / build (pull_request) Successful in 28s
pr-check / dependencies (pull_request) Successful in 5s
ci / test (push) Successful in 1m51s
ci / test (pull_request) Successful in 1m55s
2026-11-05 15:00:22 +00:00
renovate-bot 0ec1c208d8 Update python:3.15-slim Docker digest to e97b88e
pr-check / dependencies (pull_request) Successful in 6s
ci / test (push) Successful in 1m57s
pr-check / build (pull_request) Successful in 52s
ci / test (pull_request) Successful in 1m58s
2026-11-05 15:00:16 +00:00
renovate-bot cc02dc28e4 Merge pull request 'Update python:3.15-slim Docker digest to f0aecb3' (#7) from renovate/all-minor-patch into main
ci / test (push) Successful in 1m10s
image / build (amd64) (push) Successful in 1m58s
image / build (arm64) (push) Successful in 5m44s
image / release (push) Skipped
2026-11-05 14:01:14 +01:00
renovate-bot faa947f3b7 Update python:3.15-slim Docker digest to f0aecb3
pr-check / dependencies (pull_request) Successful in 6s
pr-check / build (pull_request) Successful in 48s
ci / test (pull_request) Successful in 1m13s
ci / test (push) Successful in 1m54s
2026-11-05 12:56:17 +00:00
renovate-bot a038ccf78a Merge pull request 'Update https://git.rfa.cz/tth-pub/ci-actions action to v12' (#6) from renovate/major-ci-actions into main
image / build (amd64) (push) Successful in 1m16s
ci / test (push) Successful in 1m40s
image / build (arm64) (push) Successful in 5m11s
image / release (push) Skipped
2026-11-03 01:57:52 +01:00
renovate-bot d80a7aa71a Update https://git.rfa.cz/tth-pub/ci-actions action to v12
pr-check / dependencies (pull_request) Successful in 13s
pr-check / build (pull_request) Successful in 59s
ci / test (push) Successful in 1m47s
ci / test (pull_request) Successful in 2m4s
2026-11-03 00:55:44 +00:00
tthandClaude Opus 5.5 726a618483 AGENTS.md: offer coresplitter for a companion shared with a phone
ci / test (push) Successful in 1m12s
image / build (arm64) (push) Successful in 1m17s
image / build (amd64) (push) Successful in 1m22s
image / release (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:07:00 +01:00
tthandClaude Opus 5.5 31ec0825fa README: section 4, sharing one companion through coresplitter
image / build (arm64) (push) Successful in 1m1s
image / build (amd64) (push) Successful in 1m5s
image / release (push) Skipped
ci / test (push) Successful in 1m48s
For a single USB/BLE companion also used from a phone, without openHop.
Tested over a TCP backend (exporter read a repeater while a second client
polled the same proxy for 90 s without an error); not with a USB radio yet.
Not for openHop companions: the proxy reconnects aggressively and evicts the
other client there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:06:48 +01:00
15 changed files with 117 additions and 47 deletions

No files matched your search

+6 -1
View File
@@ -14,11 +14,16 @@ env:
jobs:
test:
runs-on: ubuntu-latest
# The 26.04 image (act-latest) makes setup-python fetch a Python built for
# a newer CPU than swarm-runner has ("CPU ISA level is lower than
# required"); on 24.04 it fetches one that runs there.
container:
image: catthehacker/ubuntu:act-24.04@sha256:f68a2abac9c927421fd5a38e23d3610c7804916ffdb2491d7e669fe0ebbe1979
steps:
- uses: actions/checkout@v7
- name: gitleaks
uses: https://git.rfa.cz/tth-pub/ci-actions/gitleaks@v11
uses: https://git.rfa.cz/tth-pub/ci-actions/gitleaks@v15
with:
mode: block
+2 -2
View File
@@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v7
- name: Trivy config
uses: https://git.rfa.cz/tth-pub/ci-actions/trivy-gate@v11
uses: https://git.rfa.cz/tth-pub/ci-actions/trivy-gate@v15
with:
scan-type: fs
scanners: misconfig
@@ -87,7 +87,7 @@ jobs:
docker run --rm --platform "linux/${{ matrix.arch }}" "$img" --help | grep -q -- --repeaters
- name: Trivy gate
uses: https://git.rfa.cz/tth-pub/ci-actions/trivy-gate@v11
uses: https://git.rfa.cz/tth-pub/ci-actions/trivy-gate@v15
with:
image: ${{ env.IMAGE }}:${{ github.sha }}-${{ matrix.arch }}
username: ${{ gitea.actor }}
+1 -1
View File
@@ -55,7 +55,7 @@ jobs:
steps:
- uses: actions/checkout@v7
- name: Dependencies in the tree
uses: https://git.rfa.cz/tth-pub/ci-actions/trivy-gate@v11
uses: https://git.rfa.cz/tth-pub/ci-actions/trivy-gate@v15
with:
scan-type: fs
mode: warn
+5 -2
View File
@@ -11,9 +11,9 @@ README.md has the full reference. This file is the procedure and the rules.
`set radio`, `advert`, `reboot`, `erase` or any other CLI command to a
node, with meshcli or anything else. A repeater is part of a community
network; a wrong setting breaks routing for other people.
2. **Keep the default interval (3600 s).** Shorter only if the user explicitly
2. **Keep the default interval (28800 s, 8 h).** Shorter only if the user explicitly
asks for it and understands it costs shared airtime (point them to
https://meshcore.repeater.cz/nastaveni/telemetrie/). Never below 900 (the
https://meshcore.repeater.cz/nastaveni/telemetrie/). Never below 3600 (the
program refuses).
3. **Passwords** go into `stack/.env` or `repeaters.toml` only (both are
git-ignored), never into a command you print, a commit, a log or an
@@ -35,6 +35,9 @@ README.md has the full reference. This file is the procedure and the rules.
README section 3 (a dedicated companion identity over TCP). Changing their
openHop config.yaml is a change to their node: show the block, let them
apply it.
One companion they also use from a phone app, no openHop: README section 4
(coresplitter shares it). It must be built from source; offer it, do not
install a Rust toolchain without asking.
**Find out the operating system first.** Docker Desktop on macOS and
Windows cannot pass a USB device into a container: there, use section 2
(pipx) for the exporter, never the Docker stack with a USB board.
+1 -1
View File
@@ -1,4 +1,4 @@
FROM python:3.15-slim@sha256:8c13a3f37a6a5b71498228e902c4b9f51c1f7900d49fabf71f9a650c6120e0d0
FROM python:3.15-slim@sha256:65a65fc7b30b06cb6df4930fd4650697cb23f4c2698ab81fc87e4b031bc36928
# Re-runs the security-update layer once a day despite the layer cache (CI
# passes the date).
+58 -8
View File
@@ -11,18 +11,28 @@ repeater ))) mesh ((( companion rádio ── USB ── meshcore-exporter ─
![Dashboard za 7 dní: baterie, teplota, provoz, signál, airtime a duty cycle (vysílání nad nulou, příjem pod ní, okno 3 h); 1. 11. nová anténa a filtr](docs/dashboard.png)
Companion rádio (libovolná MeshCore deska s companion firmwarem, připojená
k počítači) se jednou za hodinu přihlásí na repeater, vyžádá si stav
k počítači) se jednou za 8 hodin přihlásí na repeater, vyžádá si stav
a telemetrii přímými pakety a exportér to vystaví na `:9200/metrics`.
> [!WARNING]
> **Každé čtení vysílá do sdíleného éteru.** Jedno čtení repeateru zabere
> zhruba 0,8 s kanálu, o který se dělí všichni v okolí, a v tu chvíli
> nikdo jiný nevysílá. Proto exportér čte jednou za 8 hodin a pod hodinu
> nejde. Interval nezkracujte bez opravdového důvodu: baterie, teplota ani
> šum se za pár minut nezmění. Víc v sekci [Kolik to stojí éteru](#kolik-to-stojí-éteru).
*English: a Prometheus exporter that logs in to MeshCore repeaters over the
mesh from a companion radio (USB, TCP or BLE) and exports status and
telemetry. Docs below are Czech; `meshcore-exporter --help` is English.*
telemetry. Every reading costs ~0.8 s of a shared channel, hence one reading
per 8 hours by default and never more often than hourly. Docs below are
Czech; `meshcore-exporter --help` is English.*
| Mám… | Čtěte |
|---|---|
| nic, chci hotovou Grafanu | [1. Kompletní stack (Docker)](#1-kompletní-stack-docker) |
| vlastní Prometheus a Grafanu | [2. Jen exportér](#2-jen-exportér) |
| openHop (repeater nebo observer) a nechci kvůli tomu obětovat desku | [3. Bez vyhrazené desky: openHop](#3-bez-vyhrazené-desky-openhop) |
| jeden companion a chci ho dál používat i z telefonu | [4. Sdílený companion: coresplitter](#4-sdílený-companion-coresplitter) |
| AI agenta, který to rozjede za mě | dejte mu tohle repo; pravidla pro něj jsou v [AGENTS.md](AGENTS.md) |
## Co je potřeba
@@ -77,7 +87,7 @@ desku do kontejneru nepředá, tam použijte [2.](#2-jen-exportér).
Grafana poběží na `http://<počítač>:3000` (uživatel `admin`, heslo
z `.env`), dashboard **MeshCore — repeater** je domovská stránka. První
čísla jsou tam do minuty, grafy rychlostí (duty cycle, trend baterie) se
naplní za pár hodin (počítají se z okna 3 h, proměnná dashboardu **Okno**).
naplní až za den (počítají se z okna 24 h, proměnná dashboardu **Okno**).
Data drží Prometheus 400 dní (`PROMETHEUS_RETENTION` v `.env`).
Aktualizace: `docker compose pull && docker compose up -d`. Stack jede na
@@ -146,7 +156,7 @@ jedna z nich, rádio sdílí s tím, co na openHopu už běží.
node_name: "muj-exporter"
tcp_port: 5002
bind_address: 127.0.0.1 # companion protokol nemá heslo: jen lokálně
tcp_timeout: 0 # exportér drží spojení i hodinu mezi čteními
tcp_timeout: 0 # exportér drží spojení i hodiny mezi čteními
```
`tcp_timeout: 0` je nutný: výchozích 120 s by spojení mezi dvěma čteními
@@ -161,6 +171,46 @@ jedna z nich, rádio sdílí s tím, co na openHopu už běží.
`127.0.0.1`, Grafana na `GRAFANA_PORT` jako jindy. Bez Dockeru stačí
exportér podle [2.](#2-jen-exportér) s `--tcp 127.0.0.1:5002`.
## 4. Sdílený companion: coresplitter
Companion obslouží jen jednoho klienta, takže bez openHopu je potřeba
buď vyhrazená deska, nebo proxy, která jedno rádio rozdělí mezi víc klientů.
To umí [coresplitter](https://github.com/ogarcia/coresplitter) (Rust, GPL-3.0):
připojí se k rádiu (USB, BLE nebo TCP) a na TCP ho nabídne více klientům
najednou. Příkazy řadí do fronty a odpovědi vrací tomu, kdo se ptal; adverty
a zprávy posílá všem; kontakty a stav drží v cache.
```
companion ── USB ── coresplitter ──┬── TCP ── meshcore-exporter
└── TCP ── aplikace v telefonu (Wi-Fi/TCP připojení)
```
1. coresplitter zatím nevydává hotové binárky ani obrazy, je potřeba si ho
přeložit (Rust ≥ 1.85):
```bash
git clone https://github.com/ogarcia/coresplitter.git && cd coresplitter
cargo build --release
./target/release/coresplitter --serial /dev/serial/by-id/usb-… --tcp-frontend-port 5000
```
Frontend poslouchá výchozí na `0.0.0.0`. Companion protokol nemá heslo,
takže kdo se k portu dostane, může přes rádio posílat zprávy: na telefon
v domácí síti ho nechte jen tam (firewall), jinak `--tcp-frontend-host 127.0.0.1`.
2. Exportér na něj jako na TCP companion:
`meshcore-exporter --tcp 127.0.0.1:5000 --repeaters … --password … --check`
(ve stacku `MC_TCP=127.0.0.1:5000` a `docker-compose.host.yml` jako u openHopu).
Ověřeno 2. 11. 2026 přes TCP backend: exportér přečetl repeater, zatímco
druhý klient na stejné proxy 90 s bez chyby četl kontakty a stav. S rádiem
na USB zatím ne. Dvě věci k vědomí:
- Když proxy ztratí spojení s rádiem, odpojí všechny klienty a po návratu
rádia se připojí znovu. Exportér si to přežije (připojí se znovu za 30 s).
- **Na openHop companion coresplitter nedávejte.** openHop pustí jen jednoho
klienta na companion a proxy se při znovupřipojení s ostatními přetahuje.
Tam stačí přidat další companion identitu ([3.](#3-bez-vyhrazené-desky-openhop)).
## Nastavení
Každá volba má tři podoby: přepínač, proměnnou prostředí, klíč v TOML
@@ -175,7 +225,7 @@ Přepínač má přednost před proměnnou a ta před souborem.
| `--repeaters` | `MC_REPEATERS` | — | `jméno[=pubkey][@cesta]`, víc přes čárku |
| `--password` | `MC_PASSWORD` | — | heslo pro `--repeaters` |
| `--config` | `MC_CONFIG` | — | TOML s bloky `[[repeater]]` (heslo pro každý zvlášť) |
| `--interval` | `MC_INTERVAL` | 3600 | sekundy mezi čteními, minimum 900 |
| `--interval` | `MC_INTERVAL` | 28800 | sekundy mezi čteními (8 h), minimum 3600 |
| `--path-hash-bytes` | `MC_PATH_HASH_BYTES` | neměnit | šířka hashů cesty companionu; CZ mesh: 2 |
| `--rf-timeout` | `MC_RF_TIMEOUT` | 30 | čekání na jednu odpověď |
| `--listen`, `--port` | `MC_LISTEN`, `MC_METRICS_PORT` | 0.0.0.0, 9200 | kde vystavit metriky |
@@ -206,9 +256,9 @@ Všechny mají label `node` (jméno repeateru).
Jedno čtení repeateru (status + telemetrie, tam i zpět) zabere na českém
nastavení (SF7/62,5 kHz) zhruba 0,8 s kanálu, který sdílí všichni. Výchozí
interval je hodina, tedy necelá sekunda za hodinu na repeater. Kratší interval
interval je 8 hodin, tedy necelá sekunda za 8 hodin na repeater. Kratší interval
přidá provoz všem okolo a nic užitečného nepřinese: baterie, teplota ani šum
se za pár minut nezmění. Exportér pod 15 minut nejde.
se za pár minut nezmění. Exportér pod hodinu nejde.
Než interval zkrátíte, zamyslete se, jak často ta data opravdu potřebujete.
Dobře to rozebírá návod [Telemetrie, senzory, GPS](https://meshcore.repeater.cz/nastaveni/telemetrie/)
@@ -224,7 +274,7 @@ na meshcore.repeater.cz.
| `login failed` | špatné heslo — **MeshCore bere jen prvních 15 znaků**, delší heslo se tiše usekne —, nebo odpověď nedoletěla |
| jednou `login failed` / `no status reply`, pak `retrying … in 180 s` | ztracená odpověď v éteru, nebo repeater krátce po předchozím přihlášení (např. `--check`) nový login zahodil; exportér to sám zkusí znovu za 3 minuty, nic nedělejte |
| `no status reply` | spojení jen jedním směrem: zkuste trasu přes jiný repeater (`@cesta`) |
| prázdné nebo zubaté grafy rychlostí | počítají se z okna **Okno** (výchozí 3 h): po startu počkejte pár hodin; při jiném intervalu nastavte okno aspoň na 2–3× interval |
| prázdné nebo zubaté grafy rychlostí | počítají se z okna **Okno** (výchozí 24 h): po startu počkejte den; při jiném intervalu nastavte okno aspoň na 2–3× interval |
Podrobný log: `--log-level DEBUG`.
+8 -6
View File
@@ -164,8 +164,8 @@ panels = [
0,
"time() - meshcore_last_scrape_success_timestamp{SEL}",
"s",
steps((None, "green"), (4000, "yellow"), (7500, "red")),
"Kdy naposledy uzel odpověděl. Při výchozím intervalu 1 h je normál do ~3600 s.",
steps((None, "green"), (30000, "yellow"), (58000, "red")),
"Kdy naposledy uzel odpověděl. Při výchozím intervalu 8 h je normál do ~28800 s.",
),
stat(
5, "Fronta TX", 16, 0, "meshcore_queue_length{SEL}", "none", steps((None, "green"), (3, "yellow"), (8, "red"))
@@ -346,12 +346,14 @@ dashboard = {
"name": "window",
"label": "Okno",
"type": "custom",
"query": "1h,3h,6h,12h",
"current": {"text": "3h", "value": "3h"},
"options": [{"text": w, "value": w, "selected": w == "3h"} for w in ("1h", "3h", "6h", "12h")],
"query": "1h,3h,6h,12h,24h,48h",
"current": {"text": "24h", "value": "24h"},
"options": [
{"text": w, "value": w, "selected": w == "24h"} for w in ("1h", "3h", "6h", "12h", "24h", "48h")
],
"hide": 0,
"description": "Okno pro rychlosti a duty cycle. Data se mění jen při čtení repeateru, "
"takže okno má být aspoň 2–3× interval čtení (výchozí 1 h → 3h).",
"takže okno má být aspoň 2–3× interval čtení (výchozí 8 h → 24h).",
},
{
"name": "node",
+18 -8
View File
@@ -41,10 +41,10 @@
"name": "window",
"label": "Okno",
"type": "custom",
"query": "1h,3h,6h,12h",
"query": "1h,3h,6h,12h,24h,48h",
"current": {
"text": "3h",
"value": "3h"
"text": "24h",
"value": "24h"
},
"options": [
{
@@ -55,7 +55,7 @@
{
"text": "3h",
"value": "3h",
"selected": true
"selected": false
},
{
"text": "6h",
@@ -66,10 +66,20 @@
"text": "12h",
"value": "12h",
"selected": false
},
{
"text": "24h",
"value": "24h",
"selected": true
},
{
"text": "48h",
"value": "48h",
"selected": false
}
],
"hide": 0,
"description": "Okno pro rychlosti a duty cycle. Data se mění jen při čtení repeateru, takže okno má být aspoň 2–3× interval čtení (výchozí 1 h → 3h)."
"description": "Okno pro rychlosti a duty cycle. Data se mění jen při čtení repeateru, takže okno má být aspoň 2–3× interval čtení (výchozí 8 h → 24h)."
},
{
"name": "node",
@@ -304,11 +314,11 @@
},
{
"color": "yellow",
"value": 4000
"value": 30000
},
{
"color": "red",
"value": 7500
"value": 58000
}
]
}
@@ -338,7 +348,7 @@
"refId": "A"
}
],
"description": "Kdy naposledy uzel odpověděl. Při výchozím intervalu 1 h je normál do ~3600 s."
"description": "Kdy naposledy uzel odpověděl. Při výchozím intervalu 8 h je normál do ~28800 s."
},
{
"id": 5,
+4 -4
View File
@@ -7,7 +7,7 @@ on http://<listen>:9200/metrics: battery, temperature, noise floor, RSSI/SNR,
packet counters, airtime, uptime, TX queue.
Every reading costs airtime on a shared channel (~0.8 s per repeater on the
Czech preset), so the interval defaults to an hour and cannot go below 15 minutes.
Czech preset), so the interval defaults to 8 hours and cannot go below an hour.
How often do you really need the numbers? See
https://meshcore.repeater.cz/nastaveni/telemetrie/
@@ -33,10 +33,10 @@ import time
from dataclasses import dataclass
from typing import Any
__version__ = "1.0.1"
__version__ = "1.1.0"
MIN_INTERVAL = 900
DEFAULT_INTERVAL = 3600
MIN_INTERVAL = 3600
DEFAULT_INTERVAL = 28800
# A failed repeater is retried once after this, not after the full interval:
# a lost reply on air is common, and a repeater also drops a login whose
# timestamp is not newer than the last one from the same client (replay
+1 -1
View File
@@ -7,7 +7,7 @@ serial = "/dev/serial/by-id/usb-REPLACE_ME-if00" # `ls /dev/serial/by-id/`
# ble = "AA:BB:CC:DD:EE:FF" # BLE companion
# ble_pin = "123456"
interval = 3600 # seconds between rounds (min 900)
interval = 28800 # seconds between rounds (min 3600)
# path_hash_bytes = 2 # Czech mesh: 2
# Default password for the blocks below that have none. Admin or guest:
+1 -1
View File
@@ -1,3 +1,3 @@
# Exact versions for the container image; pyproject.toml has the ranges.
meshcore==2.3.17
meshcore==2.3.19
prometheus_client==0.26.0
+3 -3
View File
@@ -23,10 +23,10 @@ MC_VERSION=latest
MC_REPEATERS=REPLACE_ME
# Admin or guest password of the repeater(s). Guest: all but external sensors.
MC_PASSWORD=REPLACE_ME
# Seconds between readings (min 900). Each reading takes ~1 s of a channel
# everyone shares. A battery does not change in minutes: an hour is plenty;
# Seconds between readings (min 3600). Each reading takes ~1 s of a channel
# everyone shares. A battery does not change in minutes: 8 hours is plenty;
# https://meshcore.repeater.cz/nastaveni/telemetrie/
MC_INTERVAL=3600
MC_INTERVAL=28800
# Czech mesh: 2 (width of route hashes in packets this radio sends)
MC_PATH_HASH_BYTES=2
+2 -2
View File
@@ -29,7 +29,7 @@ services:
# - ./repeaters.toml:/config/repeaters.toml:ro
prometheus:
image: prom/prometheus:v3.15.1@sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2
image: prom/prometheus:v3.16.0@sha256:e04987641b57704f408e31f6373ba4138ecf27cb4a165d24aabb6c38fddd0f06
restart: unless-stopped
command:
- --config.file=/etc/prometheus/prometheus.yml
@@ -40,7 +40,7 @@ services:
- prometheus:/prometheus
grafana:
image: grafana/grafana:13.3.0@sha256:488984b716c0862639f91a698adbe2862677a5a07bad42da5f03f3030883b205
image: grafana/grafana:13.3.1@sha256:0615ec4fbd4072004b7d86b46ded63013a74b7d6eb1119273dd89e8fa25c13cf
restart: unless-stopped
ports:
- "${GRAFANA_PORT:-3000}:3000"
+1 -1
View File
@@ -1,5 +1,5 @@
global:
# The exporter reads the mesh every 15 min; scraping its page more often
# The exporter reads the mesh every few hours; scraping its page more often
# costs nothing on air and just repeats the last values.
scrape_interval: 60s
+6 -6
View File
@@ -38,9 +38,9 @@ def test_cli_minimal(monkeypatch):
def test_env_twins(monkeypatch):
s = settings(
[], monkeypatch, {"MC_TCP": "h:5000", "MC_REPEATERS": "rpt", "MC_INTERVAL": "1800", "MC_PATH_HASH_BYTES": "2"}
[], monkeypatch, {"MC_TCP": "h:5000", "MC_REPEATERS": "rpt", "MC_INTERVAL": "7200", "MC_PATH_HASH_BYTES": "2"}
)
assert s.tcp == "h:5000" and s.interval == 1800 and s.path_hash_bytes == 2
assert s.tcp == "h:5000" and s.interval == 7200 and s.path_hash_bytes == 2
def test_interval_floor(monkeypatch):
@@ -64,16 +64,16 @@ def test_bad_setup(argv, monkeypatch):
def test_toml(tmp_path, monkeypatch):
f = tmp_path / "r.toml"
f.write_text(
'serial = "/dev/y"\ninterval = 1800\npassword = "common"\n'
'serial = "/dev/y"\ninterval = 7200\npassword = "common"\n'
'[[repeater]]\nname = "one"\n'
'[[repeater]]\nname = "two"\npassword = "own"\npath = "5361"\n'
)
s = settings(["--config", str(f)], monkeypatch)
assert s.serial == "/dev/y" and s.interval == 1800
assert s.serial == "/dev/y" and s.interval == 7200
assert [(t.name, t.password, t.path) for t in s.targets] == [("one", "common", ""), ("two", "own", "5361")]
# the command line wins over the file
s = settings(["--config", str(f), "--interval", "2400"], monkeypatch)
assert s.interval == 2400
s = settings(["--config", str(f), "--interval", "10800"], monkeypatch)
assert s.interval == 10800
def test_example_toml_loads(monkeypatch):