diff --git a/meshview/static/api-config.html b/meshview/static/api-config.html deleted file mode 100644 index 48175b8..0000000 --- a/meshview/static/api-config.html +++ /dev/null @@ -1,100 +0,0 @@ - - -
- -This page describes all REST endpoints provided by Meshview.
-View chat messages.
-Retrieve node information.
-Access raw packet data.
-View system and traffic statistics.
-Get edges details.
-Get and update configuration details.
-Returns a list of mesh nodes.
+ +| Parameter | Description |
|---|---|
| role | Filter by node role |
| channel | Filter by channel |
| hw_model | Hardware model filter |
| days_active | Only nodes seen within X days |
/api/nodes?days_active=3
+ Fetch packets with many filters. Returns decoded packet data.
+ +| Parameter | Description |
|---|---|
| packet_id | Return exactly one packet |
| limit | Max number of results (1–100) |
| since | Only packets newer than import_time_us |
| from_node_id | Filter by sender node |
| to_node_id | Filter by destination node |
| node_id | Legacy: match either from or to |
| portnum | Filter by port number |
| contains | Substring filter for payload |
/api/packets?from_node_id=123&limit=100
+ Returns list of gateways that heard the packet (RSSI/SNR/hops).
+ +/api/packets_seen/3314808102
+ Returns aggregated packet statistics for a node or globally.
+ +| Parameter | Description |
|---|---|
| period_type | "hour" or "day" |
| length | How many hours/days |
| node | Node ID for combined sent+seen stats |
| from_node | Filter by sender |
| to_node | Filter by receiver |
| portnum | Filter by port |
| channel | Filter by channel |
/api/stats?node=1128180332&period_type=day&length=1
+ + Returns total packets and total packet_seen entries. + When no filters are provided, it returns global totals. + When filters are specified, they narrow the time, channel, + direction, or specific packet. +
+ +| Parameter | Description |
|---|---|
| period_type | "hour" or "day" |
| length | Number of hours or days (depends on period_type) |
| channel | Filter by channel |
| from_node | Only packets sent by this node |
| to_node | Only packets received by this node |
| packet_id | Filter seen counts for specific packet_id |
/api/stats/count?from_node=1128180332&period_type=day&length=1
+ Returns traceroute and/or neighbor edges for graph rendering.
+ +| Parameter | Description |
|---|---|
| type | "traceroute", "neighbor", or omitted for both |
/api/edges?type=neighbor
+ Returns Meshview configuration (site, MQTT, cleanup, etc.).
+ +/api/config
+ Returns translated text for the UI.
+ +| lang | Language code (e.g. "en") |
|---|---|
| section | Optional UI section (firehose, map, top...) |
/api/lang?lang=en§ion=firehose
+ Returns API + database status.
+Returns Meshview version and Git revision.
+Meshview API — generated documentation
+ diff --git a/meshview/static/kiosk.html b/meshview/static/kiosk.html index 0c2bfa0..002d0f3 100644 --- a/meshview/static/kiosk.html +++ b/meshview/static/kiosk.html @@ -190,32 +190,51 @@ body { margin: 0; font-family: monospace; background: #121212; color: #eee; } activeBlinks.set(marker,interval); } - let lastImportTime=null; + let lastImportTimeUs = null; + async function fetchLatestPacket(){ try{ - const res=await fetch(`/api/packets?limit=1`); - const data=await res.json(); - lastImportTime=data.packets?.[0]?.import_time || new Date().toISOString(); - }catch(err){ console.error(err); } + const res = await fetch(`/api/packets?limit=1`); + const data = await res.json(); + lastImportTimeUs = data.packets?.[0]?.import_time_us || 0; + }catch(err){ + console.error(err); + } } async function fetchNewPackets(){ - if(!lastImportTime) return; + if (!lastImportTimeUs) return; + try{ - const res=await fetch(`/api/packets?since=${lastImportTime}`); - const data=await res.json(); + const res = await fetch(`/api/packets?since=${lastImportTimeUs}`); + const data = await res.json(); if(!data.packets || !data.packets.length) return; - let latest=lastImportTime; - data.packets.forEach(packet=>{ - if(packet.import_time && packet.import_time>latest) latest=packet.import_time; - const marker=markerById[packet.from_node_id]; - const nodeData=nodeMap.get(packet.from_node_id); - if(marker && nodeData) blinkNode(marker,nodeData.long_name,packet.portnum); + + let latest = lastImportTimeUs; + + data.packets.forEach(packet => { + + // Track newest microsecond timestamp + if (packet.import_time_us && packet.import_time_us > latest) { + latest = packet.import_time_us; + } + + // Look up marker and blink it + const marker = markerById[packet.from_node_id]; + const nodeData = nodeMap.get(packet.from_node_id); + if (marker && nodeData) { + blinkNode(marker, nodeData.long_name, packet.portnum); + } }); - lastImportTime=latest; - }catch(err){ console.error(err); } + + lastImportTimeUs = latest; + + }catch(err){ + console.error(err); + } } + if(mapInterval>0){ fetchLatestPacket(); setInterval(fetchNewPackets,mapInterval*1000); } })(); diff --git a/meshview/static/live-map.html b/meshview/static/live-map.html deleted file mode 100644 index 0e6e2b8..0000000 --- a/meshview/static/live-map.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - -