Add fresh-Pi deploy guide and uplink consistency fixes

- add deploy/readme.md with full fresh install + quick bootstrap block
- update README with deploy guide link and hardware photo
- fix app_network interface detection for wlan1-first setup
- make dispatcher hook handle wlan0 and wlan1
- update PLAN.md with Phase 24.8 completion notes

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
Mathieu Moran
2026-08-10 15:54:36 -04:00
co-authored by Copilot
parent 0cd798ee19
commit ae0bcc7ea8
6 changed files with 214 additions and 4 deletions
+17 -2
View File
@@ -9,7 +9,8 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
INSTALLED_HELPER = "/usr/local/bin/yaris-uplink"
REPO_HELPER = os.path.join(BASE_DIR, "deploy", "yaris_uplink.py")
PHONE_CONNECTION = "phone-hotspot"
INTERFACE = "wlan0"
PRIMARY_INTERFACE = "wlan1"
FALLBACK_INTERFACE = "wlan0"
STATUS_PATH = "/var/lib/yaris-obd/uplink-status.json"
@@ -17,6 +18,18 @@ class NetworkConfigurationError(RuntimeError):
pass
def _interface_exists(iface):
return os.path.exists(f"/sys/class/net/{iface}")
def _resolve_interface():
if _interface_exists(PRIMARY_INTERFACE):
return PRIMARY_INTERFACE
if _interface_exists(FALLBACK_INTERFACE):
return FALLBACK_INTERFACE
return PRIMARY_INTERFACE
def _helper_command(action):
if os.path.isfile(INSTALLED_HELPER):
return ["sudo", "-n", INSTALLED_HELPER, action]
@@ -99,12 +112,13 @@ def _phone_ssid():
def get_status():
interface = _resolve_interface()
values = _nmcli(
"-g",
"GENERAL.CONNECTION,GENERAL.STATE,GENERAL.IP4-CONNECTIVITY,IP4.ADDRESS",
"device",
"show",
INTERFACE,
interface,
).splitlines()
values += [""] * (4 - len(values))
last_transition = {}
@@ -134,6 +148,7 @@ def get_status():
"state": values[1],
"internet_reachable": internet_reachable,
"connectivity": connectivity,
"interface": interface,
"ip_address": values[3].split("/", 1)[0],
"phone_configured": bool(phone_ssid),
"phone_ssid": phone_ssid,