From 342a92c40e72f19ce022b3e3f197063abfb0680e Mon Sep 17 00:00:00 2001 From: madeofstown Date: Thu, 20 Feb 2025 19:16:59 -0800 Subject: [PATCH 1/3] fix? --- config.ini | 2 +- main.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config.ini b/config.ini index 693429b..b1fce3a 100644 --- a/config.ini +++ b/config.ini @@ -6,7 +6,7 @@ acme_challenge = [mqtt] server = mqtt.bayme.sh -topics = ['msh/US/bayarea/#', 'msh/US/CA/mrymesh/#'] +topics = ["msh/US/bayarea/#", "msh/US/CA/mrymesh/#"] port = 1883 username = meshdev password = large4cats diff --git a/main.py b/main.py index 7accc67..1d4ab56 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,7 @@ import asyncio import argparse import configparser +import json from meshview import mqtt_reader from meshview import database from meshview import store @@ -8,7 +9,7 @@ from meshview import web from meshview import http -async def load_database_from_mqtt(mqtt_server: str , mqtt_port: int, topic: str, mqtt_user: str | None = None, mqtt_passwd: str | None = None): +async def load_database_from_mqtt(mqtt_server: str , mqtt_port: int, topic: list, mqtt_user: list | None = None, mqtt_passwd: str | None = None): async for topic, env in mqtt_reader.get_topic_envelopes(mqtt_server, mqtt_port, topic, mqtt_user, mqtt_passwd): await store.process_envelope(topic, env) @@ -23,10 +24,11 @@ async def main(config): mqtt_user: str = config["mqtt"]["username"] if config["mqtt"]["password"] != "": mqtt_passwd: str = config["mqtt"]["password"] + mqtt_topics = json.loads(config["mqtt"]["topics"]) async with asyncio.TaskGroup() as tg: tg.create_task( - load_database_from_mqtt(config["mqtt"]["server"], int(config["mqtt"]["port"]), config["mqtt"]["topics"], mqtt_user, mqtt_passwd) + load_database_from_mqtt(config["mqtt"]["server"], int(config["mqtt"]["port"]), mqtt_topics, mqtt_user, mqtt_passwd) ) tg.create_task( web.run_server( From 4799a97f59130fcde65bbd9e25a0451823937f99 Mon Sep 17 00:00:00 2001 From: madeofstown Date: Thu, 20 Feb 2025 19:22:23 -0800 Subject: [PATCH 2/3] user is string not list --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 1d4ab56..13d9f80 100644 --- a/main.py +++ b/main.py @@ -9,7 +9,7 @@ from meshview import web from meshview import http -async def load_database_from_mqtt(mqtt_server: str , mqtt_port: int, topic: list, mqtt_user: list | None = None, mqtt_passwd: str | None = None): +async def load_database_from_mqtt(mqtt_server: str , mqtt_port: int, topic: list, mqtt_user: str | None = None, mqtt_passwd: str | None = None): async for topic, env in mqtt_reader.get_topic_envelopes(mqtt_server, mqtt_port, topic, mqtt_user, mqtt_passwd): await store.process_envelope(topic, env) From bcb04bcec57d818c2feebc5bb4788306f353f6e4 Mon Sep 17 00:00:00 2001 From: Pablo Revilla Date: Fri, 21 Feb 2025 11:56:07 -0800 Subject: [PATCH 3/3] Create map.html --- meshview/templates/map.html | 154 ++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 meshview/templates/map.html diff --git a/meshview/templates/map.html b/meshview/templates/map.html new file mode 100644 index 0000000..cd1d003 --- /dev/null +++ b/meshview/templates/map.html @@ -0,0 +1,154 @@ +{% extends "base.html" %} +{% block css %} + + +{% endblock %} + +{% block body %} +
+ +
+ LongFast + MediumSlow + LongFast Routers + MediumSlow Routers +
+ + + + +{% endblock %}