Commit Graph
886 Commits
Author SHA1 Message Date
pablorevilla-meshtastic b87e9b9917 mode changes 2026-10-26 21:55:56 -07:00
pablorevilla-meshtastic 0352ac5802 more cosmetic changes 2026-10-26 16:37:17 -07:00
pablorevilla-meshtastic daeed58042 latest updates 2026-10-26 15:17:14 -07:00
pablorevilla-meshtastic f936b32a1c add node list to map 2026-10-26 10:03:14 -07:00
pablorevilla-meshtastic 92f5b16073 more updates 2026-10-26 09:51:41 -07:00
pablorevilla-meshtastic 03ca33143b move visual changes 2026-10-26 09:45:28 -07:00
pablorevilla-meshtastic de81155e9b more cosmetic changes 2026-10-26 09:27:03 -07:00
pablorevilla-meshtastic ec67254472 quick map fixes 2026-10-26 09:21:10 -07:00
pablorevilla-meshtastic ef926798fe chat colors changes 2026-10-25 22:25:15 -07:00
pablorevilla-meshtastic 278d3b7e94 First push lots of changes 2026-10-25 22:24:48 -07:00
pablorevilla-meshtastic aabb099468 update protobufs 2026-10-24 11:15:56 -07:00
pablorevilla-meshtastic 92900362dc change readme 2026-10-23 22:27:35 -07:00
pablorevilla-meshtastic df7766e783 change reporing on Snapshot 2026-10-19 17:37:30 -07:00
pablorevilla-meshtastic fb3a0154dd some updates 2026-10-15 22:49:55 -07:00
pablorevilla-meshtastic 012150cba9 update big 2026-10-14 10:12:11 -07:00
pablorevilla-meshtastic ef37a910b9 change packet reach activity 2026-10-14 10:00:17 -07:00
pablorevilla-meshtastic f4fbf16e4f uncheck packets reach 2026-10-14 08:46:00 -07:00
pablorevilla-meshtastic f9b684ee44 fix template 2026-10-14 07:36:27 -07:00
cd78c392e9 Bound /api/coverage parameters and run the ITM model off the event loop (#172)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Bound /api/coverage parameters and run the ITM model off the event loop

The coverage endpoint took radius_km, step_km and the other model inputs
straight from the query string with only a float() conversion. The ITM
loop advances by step_km until it passes radius_km, so step_km=0 (or a
negative value) never ends and radius_km=inf never ends either; a very
small step with a large radius means millions of model calls. All of this
ran synchronously inside the request handler, so one such request stalls
every other request the server is handling.

- Reject non-finite values and anything outside a sane range for each
  parameter (400 with a message saying the allowed range).
- Cap radius_km / step_km at 4000 steps.
- Run compute_perimeter / compute_coverage in a worker thread so the event
  loop keeps serving other requests while the model runs.
- Make the loops themselves refuse a non-positive step or non-finite radius,
  so a future caller cannot reintroduce the hang, and shrink the result
  cache (64 entries) since bounded inputs make large results possible.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Pablo Revilla <pablorevilla@gmail.com>
Co-authored-by: Nathan <nathan@stonekitty.net>
Co-authored-by: Claude Mythos 5.1 <noreply@anthropic.com>
2026-10-14 07:26:18 -07:00
96b49bb893 Keep the MQTT writer running when a message is malformed (#171)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Keep the MQTT writer running when a message is malformed

startdb.py stores every message it receives with mqtt_store.process_envelope,
and nothing caught an exception from it. The gateway id in a ServiceEnvelope
was converted with int(gateway_id[1:], 16) without checks, so a gateway id
of "x", "!zz" or a very long hex string raised ValueError/OverflowError,
the ingest task died and startdb.py exited. A NODEINFO whose id spelled an
existing node differently ("!00abcd" vs "!abcd") hit the UNIQUE constraint
on node.node_id at commit time with the same result. Anyone who can publish
to the broker can trigger these, and repeating them keeps the writer in a
restart loop so the site stops receiving packets.

- Parse gateway and user ids with one helper that returns None for anything
  that is not "!" + hex (or does not fit a 64-bit column) and skip the
  PacketSeen/Traceroute/Node update instead of raising.
- When a NODEINFO id is new but its node_id already exists, update that row
  instead of inserting a duplicate.
- Wrap the per-message store call in startdb.py so an unexpected error is
  logged and the loop moves on to the next message.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Pablo Revilla <pablorevilla@gmail.com>
Co-authored-by: Nathan <nathan@stonekitty.net>
Co-authored-by: Claude Mythos 5.1 <noreply@anthropic.com>
2026-10-14 07:26:03 -07:00
5900c41cf4 Escape mesh-provided strings before inserting them into the page (#170)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Escape mesh-provided strings before inserting them into the page

Node names, firmware strings, channel ids and message text all come from
the radio network, so anyone with a Meshtastic node (or publish access to
the MQTT broker) chooses their contents. Several pages dropped those
values straight into innerHTML / insertAdjacentHTML / Leaflet popups,
which lets a crafted node name run JavaScript in every visitor's browser.

Add a small shared helper (static/html-escape.js, loaded by base.html and
kiosk.html) and route every mesh-controlled value on the node list, top
nodes, firehose, node, packet and kiosk pages through it. Pages that
already had a local escapeHtml (chat, net, map, reliability) are unchanged.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Pablo Revilla <pablorevilla@gmail.com>
Co-authored-by: Nathan <nathan@stonekitty.net>
Co-authored-by: Claude Mythos 5.1 <noreply@anthropic.com>
2026-10-14 07:25:01 -07:00
5214b233c1 Keep /api/lang and the static page route inside their directories (#173)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Keep /api/lang and the static page route inside their directories

Two routes built a filename from request input without checking where it
ended up:

- /api/lang?lang=... joined the value onto the lang directory and added
  ".json". os.path.join discards the directory when the value is an
  absolute path, so ?lang=/some/where/file returned /some/where/file.json.
  Any .json file the server process can read was served.
- /{page} appended ".html" and read static/<page>. aiohttp passes an
  encoded slash (%2F) through a single path segment and unquotes it, so
  /..%2F..%2F..%2Fx read ../../../x.html relative to the static directory.

The lang route now only accepts a plain language code (en, es, pt-BR, ...)
and falls back to English otherwise, exactly as it already did for unknown
languages. The page route resolves the final path and requires it to be a
file inside meshview/static, the same check /docs/{doc} already does.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Pablo Revilla <pablorevilla@gmail.com>
Co-authored-by: Nathan <nathan@stonekitty.net>
Co-authored-by: Claude Mythos 5.1 <noreply@anthropic.com>
2026-10-14 07:22:37 -07:00
0109d68c1b Do not let payload search match redacted direct messages (#174)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Do not let payload search match redacted direct messages

/api/packets shows the text of a direct message (TEXT_MESSAGE_APP to a
specific node) as "<redacted>". The contains= filter, however, is a LIKE
over the stored packet bytes, which include the decrypted text for
messages on a known channel key. With portnum left out of the request,
contains=<guess> returned the packet when the guess appeared in a redacted
message, so the text could be recovered one substring at a time.

Direct text messages are now excluded from the substring match. Broadcast
messages and all other packet types search exactly as before.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Pablo Revilla <pablorevilla@gmail.com>
Co-authored-by: Nathan <nathan@stonekitty.net>
Co-authored-by: Claude Mythos 5.1 <noreply@anthropic.com>
2026-10-14 07:21:05 -07:00
81612128a5 fix: limit the neighbor SNR chart to the last 7 days (#165)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* fix: limit the neighbor SNR chart to the last 7 days

The chart asked for the last 500 neighbor-info packets and put no
limit on how old they could be. On a busy node that is several weeks
of history, and every neighbor heard in that span gets its own line.
On one node it was 119 packets covering 21.8 days and 339 lines.

The chart now asks for the last 7 days, using the `since` parameter
that /api/packets already supports, and draws only the 15 neighbors
with the most data points in that window. A subtitle says how many
neighbors are shown and how many there were, so a missing line is not
a mystery.

Three smaller fixes in the same function:

- Neighbor names are looked up only for the lines that are drawn.
  fetchNodeFromApi() does not cache a node it cannot find, so every
  unknown neighbor was fetched again on every packet it appeared in.
- Each point is read from a Map instead of calling indexOf() on the
  timestamp list, which was quadratic in the number of points.
- Two neighbors sharing a short name are told apart. ECharts
  identifies a series by its name, so they were drawn as one line.

The "Export CSV" button for this chart wrote an empty file, because
neighborData was declared but never filled in. It is now filled in
from the neighbors on screen.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Pablo Revilla <pablorevilla@gmail.com>
Co-authored-by: Nathan <nathan@stonekitty.net>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 10:37:37 -07:00
pablorevilla-meshtastic bb8da4cc13 update 2026-09-10 15:39:55 -07:00
pablorevilla-meshtastic 325e685209 update 2026-09-09 20:41:24 -07:00
pablorevilla-meshtastic 0850c433f2 update 2026-09-09 20:36:02 -07:00
pablorevilla-meshtastic 28651cad7b update 2026-09-09 20:33:42 -07:00
pablorevilla-meshtastic 4df2072a72 update 2026-09-09 20:20:32 -07:00
pablorevilla-meshtastic 3c66597b65 updte 2026-09-09 20:13:15 -07:00
pablorevilla-meshtastic 64486dabc8 update 2026-09-09 20:10:19 -07:00
pablorevilla-meshtastic 9d3bd891b7 update 2026-09-09 19:58:19 -07:00
pablorevilla-meshtastic 03943c463e update 2026-09-09 19:41:42 -07:00
pablorevilla-meshtastic 849ab69566 update 2026-09-09 18:48:51 -07:00
pablorevilla-meshtastic c1d21d1ce1 update 2026-09-09 18:41:17 -07:00
pablorevilla-meshtastic 4329ccc0f3 update 2026-09-09 18:35:15 -07:00
pablorevilla-meshtastic 116a1c30b3 update 2026-09-09 18:32:23 -07:00
pablorevilla-meshtastic 295f0f086e update 2026-09-09 18:09:33 -07:00
pablorevilla-meshtastic 4988b887c7 update 2026-09-09 17:40:19 -07:00
pablorevilla-meshtastic 40ed330523 update 2026-09-09 17:26:13 -07:00
pablorevilla-meshtastic 728072dfac update 2026-09-09 17:23:37 -07:00
pablorevilla-meshtastic 4d036299f0 update 2026-09-09 16:40:22 -07:00
pablorevilla-meshtastic 0657899a6f create heard by packet trace 2026-09-09 16:33:46 -07:00
Pablo Revilla ad1f404f4a Update CONTRIBUTING.md 2026-09-09 13:41:43 -07:00
pablorevilla-meshtastic 88fe764e7b updates 2026-09-09 13:19:26 -07:00
pablorevilla-meshtastic 87344d4902 Merge branch 'develop' of github.com:pablorevilla-meshtastic/meshview into develop 2026-09-09 13:19:11 -07:00
pablorevilla-meshtastic dc7ddb5bf3 updates 2026-09-09 13:19:08 -07:00
pablorevilla-meshtastic d1e1e1a91f update 2026-09-09 12:42:37 -07:00
pablorevilla-meshtastic 81535c08b1 update 2026-09-09 12:41:27 -07:00
pablorevilla-meshtastic 41dbd12ed2 update changes 3.0.8 2026-09-09 12:32:55 -07:00