133 Commits
Author SHA1 Message Date
MrAlders0n 23fcdadf2e feat(routes): crossings between two groups of areas and repeater reach, as endpoints and MCP tools 2026-12-04 14:19:57 -05:00
MrAlders0n d00322d7ad fix(ingest): fill missing rssi/snr from a later broker copy
Some brokers strip SNR and RSSI from the packet envelope. When their copy
of a hearing was stored first, the row kept no signal. A duplicate with the
same path now fills the fields the stored row lacks; stored values and the
rest of the row are left as they are.
2026-12-03 16:30:44 -05:00
MrAlders0n ec1984dda3 feat(routes): relays that carry traffic between two areas, as an endpoint and an MCP tool 2026-12-03 06:23:49 -05:00
MrAlders0n 2e88323a9a feat(api): tag an observer that sends readings and no claim a local poller
isLocalPoller on nodes, and its poller view lists the repeaters it sent
readings for in the last day.
2026-11-29 14:48:00 -05:00
MrAlders0n f9a204e35e fix(polling): close the gaps review found in foreign claims
Whether a claim may replace what an observer has stored, own or
foreign, is now decided in one place under the observer's seat lock: an
older claim never undoes a newer one, the claim spacing holds across
both kinds, and an unsigned claim is refused while a signed one is
live. An observer that turns foreign loses every assignment in the same
transaction, requested ones its claim does not name included.

A server that starts checking drops the claims that were not placed
under its current host and broker list. A foreign reading never counts
as a repeater's newest; one from an observer this server assigned the
target stays its own; with authority approved it needs approval to be
trusted. A null sig or poll_url is refused. A packet's broker set only
grows. The foreign reading lookups get a partial index (093), the
MQTT 5 connected flag follows the current connection only, and queued
messages are charged for their source.
2026-11-28 20:49:32 -05:00
MrAlders0n ff8637b4ab feat(polling): tell this server's observers from foreign ones
polling.foreign_claims: check takes a claim as this server's own only
when its signed poll_url names DOMAIN, or, for firmware that sends
none, when a rebroadcaster says it arrived on one of polling.mqtt_hosts.
Any other claim is foreign, and one that can be placed neither way is
dropped. The default, off, treats every claim as its own, as before.

A foreign observer is kept out of polling_claims, so it is never a
poller or standby, gets no owners answer and takes no request. Its
readings are stored, marked foreign and trusted on the same advert
evidence. A reading with no claim behind it is kept as foreign too.

Claims that carry a signature are verified with the observer's key in
every mode; a wrong one is dropped. Asking for telemetry on a repeater
a foreign observer already checks needs acknowledgeForeign.
2026-11-28 20:32:20 -05:00
MrAlders0n f360fbe8db feat(ingest): read source brokers from a rebroadcaster over MQTT 5
MQTT_BROKER_n_REBROADCAST=true marks a broker that forwards from other
brokers and names each message's source in the source-broker and
source-host user properties. The worker then connects with MQTT 5 and
records packets, observations and observer brokers under the source
name. Without it the connection is 3.1.1 as before.

Each packet keeps the set of brokers it arrived through (brokers on
packet detail). Observer broker lists and the broker filter cover the
last 30 days, and GET /brokers/sources lists the names for the filter.
2026-11-28 20:15:44 -05:00
MrAlders0n 2ae10ca1a5 revert: foreign polling claims, until the design is settled 2026-11-28 16:54:58 -05:00
MrAlders0n 306128a4bd feat(polling): rank observers that follow another server behind our own
A claim can reach a server its observer does not ask for policy. Tell
them apart by the claim's poll_url, or by whether the observer asked
this server lately, and keep such observers out of requests.
2026-11-28 16:26:43 -05:00
MrAlders0n 24da3c187d fix(api): count a poller's free seats honestly and read it in one statement
slots.free is 0 when the claim is expired or takes no requests, and no longer
counts seats already handed to the observer that its claim does not name yet.

The claim and its targets were three statements, so a claim replaced between
them gave one claim's slots with the other's targets. They are one statement
now, as the Atlas read is.
2026-11-27 20:05:21 -05:00
MrAlders0n 5295b59440 feat(api): add the poller read for a node 2026-11-27 06:49:07 -05:00
MrAlders0n 564e904c3d feat(api): flag pollers on nodes and filter by them 2026-11-24 23:02:03 -05:00
MrAlders0n 098a86f59d fix: only count observers with recent status 2026-11-22 22:12:16 -05:00
MrAlders0n 50850f5314 feat: refuse telemetry requests on observers 2026-11-22 21:48:23 -05:00
MrAlders0n ee4ee046c5 fix(alerts): hold rate-limited pushes without counting an attempt
A rate_limited item or a whole-call 429 now holds only the push until the
relay's wait (the item's, else Retry-After, else a minute), and never
counts toward MaxAttempts or shrinks the batch. Batches go back to 100
with a 30s call limit, matching the relay.
2026-11-18 06:09:12 -05:00
MrAlders0n 275c532e23 fix(alerts): retry email and push apart, and fit push batches to the relay
Each channel now has its own attempts, delay and done mark, so a failing
or rate-limited push no longer holds back or drops unsent mail. Push
batches drop to 20 with a 50s call limit, a batch shrinks after each
failure, and a call that times out leaves the rest for the next pass.
2026-11-18 06:00:59 -05:00
MrAlders0n 90c2ece473 feat(alerts): email and push channels through the push server
Alerts go out by email, by push or both, as each user chooses. Push is
sent through the push server with the operator's Push ID and secret and
sealed per device, so this server no longer holds a Firebase key. The
outbox tracks each channel, so a retry of one never repeats the other.
2026-11-17 20:22:51 -05:00
MrAlders0n eb913d6cce Add a route for the latest reading of every polled node 2026-11-15 20:15:58 -05:00
MrAlders0n cf9b690e03 Report the poller's own state on a telemetry request 2026-11-15 17:21:44 -05:00
MrAlders0n a39c947668 Trust a working poll over a stale login failure 2026-11-15 11:07:10 -05:00
MrAlders0n 941eae24f1 Build the owners answer from one snapshot 2026-11-15 10:58:58 -05:00
MrAlders0n 9a61f689a0 Renumber and update requests when cleanup drops assignments 2026-11-15 09:27:13 -05:00
MrAlders0n 2e87fb7a51 Send alert mail for finished passes only 2026-11-15 08:10:17 -05:00
MrAlders0n 39c10bb406 Stop repeater telemetry alerts when polling is off 2026-11-15 08:09:29 -05:00
MrAlders0n 1483860727 Keep recent advert clock drift for alerts 2026-11-15 08:08:12 -05:00
MrAlders0n 5ed8a387bb Read every reading since the last alert pass 2026-11-15 08:01:10 -05:00
MrAlders0n 3ad9fb734a Lock observers and targets in one order for requested elections 2026-11-15 07:58:03 -05:00
MrAlders0n e666b9c896 Stop telemetry alerts when polling stops 2026-11-15 03:34:41 -05:00
MrAlders0n 53a5a81ce9 Track push delivery per device 2026-11-15 03:11:00 -05:00
MrAlders0n 5e8376581d Mark alert mail delivered after it is sent 2026-11-15 03:07:23 -05:00
MrAlders0n 7d243ea26a Recheck a request before disabling it as offline 2026-11-15 03:02:43 -05:00
MrAlders0n f67f7ed456 Tie an admin stop to the password it was given 2026-11-15 02:59:15 -05:00
MrAlders0n 94d7cf410a Reserve observer seats for requests in order 2026-11-15 02:54:23 -05:00
MrAlders0n d0529fbdd6 Read an Atlas in one snapshot 2026-11-15 02:49:44 -05:00
MrAlders0n 63ab6ed8c1 Give a push token one owner 2026-11-15 02:45:57 -05:00
MrAlders0n 22b10d18d5 Deliver alerts by email or push 2026-11-15 02:02:21 -05:00
MrAlders0n 6fa5e2c13e Evaluate alert rules 2026-11-15 01:56:20 -05:00
MrAlders0n 26ccf6d4db Add alert rules and device registration 2026-11-15 01:48:15 -05:00
MrAlders0n 35468cc7cc Add sign-in through the MeshMapper portal 2026-11-15 01:40:24 -05:00
MrAlders0n 4708513cdd Close remaining credential races 2026-11-15 01:19:31 -05:00
MrAlders0n 87a2de2b87 Fix reset, resend and session lookup edge cases 2026-11-15 01:14:20 -05:00
MrAlders0n 24e3588e65 Serialise sign-in against credential changes 2026-11-15 01:08:02 -05:00
MrAlders0n 77cde9f66d Tighten who can take and stop a telemetry request 2026-11-15 01:04:42 -05:00
MrAlders0n c34a20f2a5 Assign requested repeaters to observers 2026-11-15 00:56:28 -05:00
MrAlders0n 1c51a6b77d Add telemetry request storage and routes 2026-11-15 00:41:16 -05:00
MrAlders0n 49ea5e04e8 Add account Atlas storage and routes 2026-11-14 23:52:28 -05:00
MrAlders0n 81e7950705 Wire accounts into startup and add operator user management 2026-11-14 23:41:56 -05:00
MrAlders0n fd1d7de5f9 Tighten resend, username checks and throttle eviction 2026-11-14 23:33:26 -05:00
MrAlders0n 79386e9851 Close throttle and pending sign-up gaps 2026-11-14 23:28:10 -05:00
MrAlders0n 7fa0f4e8b1 Harden registration and account mail 2026-11-14 23:20:43 -05:00