16 Commits
Author SHA1 Message Date
MrAlders0n a2b81b8c09 fix(polling): accept claims and readings signed in the v2 formats
Poll firmware from 2026-12-03 signs corescope-reading/v2 and corescope-claim/v2, which add poll_key, access and key, and sends requested as false for an own target. Those were all dropped. v1 still verifies, for a message with none of the new fields. reply_hops may now be left out.
2026-12-03 20:37:56 -05:00
MrAlders0n a62c652e05 feat(polling): store what a signed reading says of requested
The poller view returns it as latestReadingRequested, null when the reading does not say.
2026-12-02 14:07:38 -05:00
MrAlders0n a7c36e8e76 feat(polling): decode sensor channels from LPP and serve them with node telemetry
Humidity, pressure, gas and power monitor channels are decoded when a reading is stored. Positions and altitude are never decoded. Fixes the humidity size, which is one byte on the wire.
2026-11-29 21:09:23 -05:00
MrAlders0n 6bc7877a05 feat(polling): check signed readings and store the reply rssi
A reading that carries a signature is dropped when it does not verify. Unsigned readings are handled as before. Signed claims and readings with a repeated key are refused.
2026-11-28 23:13:28 -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 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 54ea8bdfdf feat(polling): store a claim's max_slots and poll_interval
The slot limit now follows the claim instead of a fixed 8 (default 8, ceiling 32), in the poller view and in the seat math. The poller view also reports pollIntervalMinutes.
2026-11-28 11:08:50 -05:00
MrAlders0n ca236b528c fix(polling): keep a reading that rounds to the largest stored float 2026-11-19 09:49:03 -05:00
n30nex f36cc85834 fix(polling): drop readings that do not fit the stored float (#322) 2026-11-19 09:29:35 -05:00
n30nex a3a175e345 fix(polling): clear an optional integer when a repeated field is null or out of range (#313) 2026-11-19 09:29:33 -05:00
MrAlders0n 96f29f407e Make polling rate limits atomic, budget readings per observer and lock cleanup per target 2026-11-14 14:54:44 -05:00
MrAlders0n 4bec5669ee Rate limit polling claims and readings and cap message sizes 2026-11-14 14:16:00 -05:00
MrAlders0n 5bd97d2261 Accept unknown claim states and key modes 2026-11-14 10:28:46 -05:00
MrAlders0n 291e23b30a Add polling claim and reading parsers 2026-11-14 10:28:02 -05:00