feat(espnow): Pi bridge client, binary wire, and espnow-sender firmware

Replace serial/Wi-Fi driver transport paths with WebSocket bridge client,
binary espnow_wire delivery, device announce registry, and restructured
espnow-sender (AP + broadcast passthrough). Includes docs and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-23 22:44:44 +12:00
parent f4ef85c182
commit 4fc3f46866
42 changed files with 4167 additions and 848 deletions

View File

@@ -150,6 +150,27 @@ def test_device_duplicate_names_allowed():
assert devices.read(a1)["name"] == devices.read(a2)["name"] == "alpha"
def test_upsert_espnow_announced():
devices = _fresh_device()
m = "e8f60a16dad0"
i1, p1 = devices.upsert_espnow_announced(
m,
"led-test",
num_leds=120,
color_order="grb",
startup_mode="last",
brightness=70,
)
assert i1 == m and p1 is True
d = devices.read(m)
assert d["transport"] == "espnow"
assert d["address"] == m
assert d["name"] == "led-test"
assert d["num_leds"] == 120
i2, p2 = devices.upsert_espnow_announced(m, "led-test")
assert i2 == m and p2 is False
def test_device_duplicate_mac_rejected():
devices = _fresh_device()
devices.create("one", address="aa:bb:cc:dd:ee:ff")
@@ -163,6 +184,7 @@ def test_device_duplicate_mac_rejected():
if __name__ == "__main__":
test_device()
test_upsert_wifi_tcp_client()
test_upsert_espnow_announced()
test_device_can_change_address()
test_device_duplicate_names_allowed()
test_device_duplicate_mac_rejected()