This commit is contained in:
Roslund
2025-03-31 19:43:01 +00:00
parent 020b773007
commit 2aaad1626a
4 changed files with 78 additions and 10 deletions
+2 -1
View File
@@ -16,4 +16,5 @@ Att bygga en solnod Val av LoRa hårdvara Det är en stor skillnad i strömförb
⏰ Tid: 17:00-21:00 Våren närmar sig och det är massvis med trafik i meshen. Det har dessutom tillkommit massvis med nya noder och personer. Vi bjuder därför in till After Work för de som vill träffa likasinnade, snacka LoRa, dela erfarenheter och visa hemmabyggen.</description></item><item><title>Om STHLM-MESH</title><link>https://sthlm-mesh.se/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sthlm-mesh.se/about/</guid><description>Om STHLM-MESH STHLM-MESH är ett community-drivet open-source-projekt som syftar till att bygga och dokumentera ett öppet LoRa Mesh-nätverk i Stockholm. Projektet drivs av entusiaster som vill utforska möjligheterna med decentraliserad kommunikation och verka för ett välfungerande mesh för alla i Stockholm.
Backend Denna webbplats är byggd med de statiska site-generatorn Hugo och använder Docsy som tema.
Collaboration Källkoden för webbplatsen är öppen och tillgänglig på GitHub, och vi uppmuntrar bidrag från communityt!</description></item><item><title>Mesh Status</title><link>https://sthlm-mesh.se/status/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sthlm-mesh.se/status/</guid><description>Text Meddelanden Antalet meddelande per timme senaste 7 dygnen.
Skapade paket per nod Grafen nedan visar vilka noder som har skickat flest paket under det senaste dygnet. Vidarebefordrade meddelanden och krypterade paket är inte medräknade. Datat i grafen är endast en uppskattning och bör inte ses som exakt. Graferna bygger på MQTT-data från ett begränsat antal noder. Eftersom vi har begränsad bandbredd är det viktigt att hålla nere trafiken. En sändningsvolym på max 50100 paket per dygn är önskvärd.</description></item></channel></rss>
Skapade paket per nod Grafen nedan visar vilka noder som har skickat flest paket under det senaste dygnet. Graferna bygger på MQTT-data från ett begränsat antal noder. Eftersom vi har begränsad bandbredd är det viktigt att hålla nere trafiken. En sändningsvolym på max 100 paket per dygn är önskvärd.
Position Precision Grafen visar position precision, eller noggrannhet, på de noder som rapporterat sin position de senaste 7 dagarna.</description></item></channel></rss>
+62
View File
@@ -0,0 +1,62 @@
async function mostActiveNodesGraph() {
const canvas = document.getElementById('mostActiveNodes');
const ctx = canvas.getContext('2d');
// Show "Loading..." message
ctx.font = '16px Arial';
ctx.fillStyle = 'gray';
ctx.textAlign = 'center';
ctx.fillText('Loading data...', canvas.width / 2, canvas.height / 2);
try {
const response = await fetch('https://map.sthlm-mesh.se/api/v1/stats/most-active-nodes');
const data = await response.json();
const labels = data.map(entry => entry.long_name);
const counts = data.map(entry => entry.count);
// Adjust chart height based on number of items
const chartContainer = document.getElementById('mostActiveNodesContainer');
chartContainer.style.height = `${labels.length * 25}px`;
const backgroundColors = counts.map(count => {
if (count < 100) return '#7EB26D'; // Green
if (count < 200) return '#EAB839'; // Yellow
return '#BF1B00'; // Red
});
new Chart(ctx, {
type: 'bar',
data: {
labels: labels,
datasets: [{
label: 'Packages originated',
data: counts,
backgroundColor: backgroundColors,
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
indexAxis: 'y', // horizontal bars
scales: {
y: {
ticks: { autoSkip: false, font: { size: 12 } }
}
},
plugins: {
legend: { display: false },
}
}
});
} catch (error) {
console.error('Error fetching data:', error);
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = 'red';
ctx.fillText('Error loading data', canvas.width / 2, canvas.height / 2);
}
}
mostActiveNodesGraph();
+1 -1
View File
@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://sthlm-mesh.se/docs/settings/</loc><lastmod>2025-02-26T18:39:36+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/device_role/</loc><lastmod>2025-02-26T18:42:15+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/position/</loc><lastmod>2025-02-22T09:11:26+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/mqtt/</loc><lastmod>2025-03-31T19:16:34+02:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/neighbor_info/</loc><lastmod>2025-02-23T20:48:06+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/kartor/</loc><lastmod>2025-03-08T20:11:28+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/solar_nodes/</loc><lastmod>2025-02-25T20:03:55+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/communities/</loc><lastmod>2025-02-23T20:48:06+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/categories/</loc></url><url><loc>https://sthlm-mesh.se/docs/</loc><lastmod>2025-03-03T22:48:04+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/messages/</loc><lastmod>2025-03-28T17:26:53+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/meetups/</loc><lastmod>2025-03-03T22:48:04+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/about/</loc><lastmod>2025-02-23T18:02:23+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/status/</loc><lastmod>2025-03-31T20:54:28+02:00</lastmod></url><url><loc>https://sthlm-mesh.se/</loc><lastmod>2025-03-09T16:16:44+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/tags/</loc></url></urlset>
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://sthlm-mesh.se/docs/settings/</loc><lastmod>2025-02-26T18:39:36+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/device_role/</loc><lastmod>2025-02-26T18:42:15+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/position/</loc><lastmod>2025-02-22T09:11:26+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/mqtt/</loc><lastmod>2025-03-31T19:16:34+02:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/neighbor_info/</loc><lastmod>2025-02-23T20:48:06+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/kartor/</loc><lastmod>2025-03-08T20:11:28+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/solar_nodes/</loc><lastmod>2025-02-25T20:03:55+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/docs/communities/</loc><lastmod>2025-02-23T20:48:06+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/categories/</loc></url><url><loc>https://sthlm-mesh.se/docs/</loc><lastmod>2025-03-03T22:48:04+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/messages/</loc><lastmod>2025-03-28T17:26:53+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/meetups/</loc><lastmod>2025-03-03T22:48:04+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/about/</loc><lastmod>2025-02-23T18:02:23+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/status/</loc><lastmod>2025-03-31T21:42:24+02:00</lastmod></url><url><loc>https://sthlm-mesh.se/</loc><lastmod>2025-03-09T16:16:44+01:00</lastmod></url><url><loc>https://sthlm-mesh.se/tags/</loc></url></urlset>
+13 -8
View File
File diff suppressed because one or more lines are too long