Commit Graph

690 Commits

Author SHA1 Message Date
Lloyd eb5d971c72 fix: filter neighbors to include only zero-hop repeaters in response 2026-05-11 16:26:15 +01:00
Lloyd 43648da939 fix:add Pagination to contacts table 2026-05-11 14:27:28 +01:00
Lloyd f04f581163 fix:Neighbors get function 2026-05-11 13:59:12 +01:00
Lloyd 941c355deb feat: add pagination support and count retrieval for adverts by contact type 2026-05-11 13:54:55 +01:00
Lloyd f3946685c2 bug/further fixes to ui initla loading 2026-05-11 13:39:48 +01:00
Lloyd 4d710a0210 fix/ui-tidy-dev 2026-05-08 17:08:01 +01:00
Lloyd 68656fccdd Merge pull request #231 from pyMC-dev/pr-227
Pr 227
2026-05-06 16:13:30 +01:00
Lloyd d250828197 feat: enhance MQTT connection handling with JWT refresh and error logging improvements 2026-05-06 13:53:12 +01:00
Lloyd bd7a305d7b feat: improve MQTT connection handling with enhanced reconnect logic and logging 2026-05-06 10:05:11 +01:00
Lloyd 5b20f5580a feat: enhance MQTT logging and error handling with payload summaries and improved disconnect messages 2026-05-06 09:53:44 +01:00
Lloyd e4efc8045d feat: implement resolve_storage_dir for consistent storage paths 2026-05-05 17:17:12 +01:00
Lloyd ebfc629218 Merge pull request #229 from dmduran12/fix/mqtt-packet-duration
fix(mqtt): publish Semtech-derived packet duration instead of hard-coded "0"
2026-05-05 09:18:36 +01:00
Daniel Duran 0251304407 fix(mqtt): publish Semtech-derived packet duration instead of hard-coded "0"
Every MQTT-published packet has shipped with duration="0" since the
PacketRecord factory was introduced. The repeater already computes LoRa
time-on-air via AirtimeManager.calculate_airtime() (the canonical
Semtech reference formula) for duty-cycle gating and TX delay, but the
result was thrown away after each packet - never stored on the
packet_record dict that flows to MQTT/SQLite/Glass/websocket.

What changes
- engine.py: RepeaterHandler._build_packet_record() now computes
  airtime_ms once per packet (Semtech formula via AirtimeManager) and
  stores it as packet_record['airtime_ms']. Single source of truth for
  every downstream consumer.
- storage_utils.py: PacketRecord.from_packet_record() reads the new
  airtime_ms field and serializes it as a rounded integer in the
  'duration' field of the published JSON. Falls back to 0 if the field
  is missing (backward compatibility for any older code path).
- storage_collector.py: _publish_packet_to_mqtt() simplified - no
  recomputation, no helper. The publish path is now a passthrough.

Why
MQTT consumers (firmware-compatible analyzers, dashboards, the upstream
meshcoretomqtt project) expect the same time-on-air value the firmware
emits. Hard-coded "0" makes airtime/utilization charts derived from the
mqtt stream useless and silently diverges from firmware behavior.

Plumbing the value through packet_record (instead of recomputing in the
publish path) means any future consumer - SQLite schema, web UI charts,
Glass telemetry - reads the same number without separate calculations.

Tests
tests/test_packet_duration.py - 5 tests covering:
- backward compat (legacy packet_record without airtime_ms => '0')
- airtime_ms field flows through to duration as rounded integer string
- explicit zero stays '0'
- AirtimeManager output matches an independently-implemented Semtech
  reference for typical MeshCore EU settings (SF8/62.5kHz/CR4-8)
- low-data-rate optimization branch (SF12/125kHz triggers DE=1)

Co-Authored-By: Oz <oz-agent@warp.dev>
2026-05-03 12:48:02 -07:00
Daniel Duran dfacfeade8 feat: bundled MC2MQTT broker presets (waev, letsmesh) + format family
Introduces a 'set format and forget' workflow for MQTT brokers. Users
reference a bundled preset by name inside the existing brokers: list,
and the package supplies the endpoints, audiences, and TLS settings.
Endpoint changes ship via 'pip install -U' instead of manual edits.

What changes
- New repeater/presets/ package with a tiny lazy YAML loader and two
  bundled presets: waev (mqtt-{a,b}.waev.app) and letsmesh (EU + US).
- New format-family constant MC2MQTT_FORMATS = ('meshcoretomqtt',
  'letsmesh', 'waev') replaces the inline tuple in topic resolution.
  The legacy 'mqtt' format keeps its custom-topic semantics unchanged.
- Two-pass broker assembly in mqtt_handler.py: pass 1 expands every
  {preset: <name>} entry inline; pass 2 collapses duplicates by name
  with later-wins semantics. Place override entries AFTER preset
  entries.
- Hard-coded LETSMESH_BROKERS constant deleted; its data now lives in
  repeater/presets/letsmesh.yaml.
- convert_letsmesh_to_broker_config() collapsed from ~70 to ~25 lines
  by emitting {preset: letsmesh} plus disable overrides for unwanted
  brokers. Honors broker_index in (-1, 0, 1), additional_brokers, and
  enabled flag exactly as before.
- update_mqtt_config API endpoint accepts {preset: <name>} entries and
  passes them through unchanged so the web UI can author them when the
  frontend is updated.
- config.yaml.example documents the preset entry shape, the override
  rule, and the format family hierarchy.
- pyproject.toml ships presets/*.yaml as package data.

How to use
  mqtt_brokers:
    iata_code: "LAX"
    brokers:
      - preset: waev

  # Override a single preset broker:
  brokers:
    - preset: waev
    - name: waev-b
      enabled: false

Tests
- tests/test_presets.py: 9 tests covering loader, expand/merge,
  MC2MQTT topic-family parity, and parametrized legacy migration.

Co-Authored-By: Oz <oz-agent@warp.dev>
2026-05-02 15:32:22 -07:00
Lloyd 11572f80c2 Merge pull request #222 from zindello/bugfix/restart-issues
Fix up the CapabilityBoundingSet to allow changing the GID and UID as…
2026-05-01 11:01:12 +01:00
Lloyd 86e5f783eb Merge pull request #221 from zindello/feat/add-ultrapeaterzero
Adding in UltraPeaterZero defintions
2026-05-01 11:00:12 +01:00
Joshua Mesilane f1933dd2b0 Fix up the CapabilityBoundingSet to allow changing the GID and UID as part of a polkit or sudo restart, also ensure dbus is running as on some minimised systems it might not be (hi dietpi!) 2026-05-01 19:49:15 +10:00
Joshua Mesilane 55ed40c79c Adding in UltraPeaterZero defintions 2026-05-01 16:38:58 +10:00
Lloyd 8bbef50e37 Merge pull request #219 from rightup/feat-gps
Feat gps
2026-04-30 20:52:57 +01:00
Rightup 2dd79614ef add map toggle and discord icon 2026-04-30 20:52:01 +01:00
Rightup 9d3d5e6ef0 refactor: update GPS configuration parameters and improve documentation 2026-04-30 20:28:50 +01:00
Rightup 972aefca16 bug:fixes to gps page 2026-04-29 20:40:53 +01:00
Lloyd f7a212f2ea Merge pull request #213 from yellowcooln/dev
Fix Buildroot OTA updates to use the repo upgrade path
2026-04-29 19:41:56 +01:00
Yellowcooln acb796199d Prefer repo Buildroot updater on embedded images 2026-04-29 14:14:40 -04:00
Yellowcooln 52cce9d51b Merge branch 'rightup:dev' into dev 2026-04-29 13:53:34 -04:00
Yellowcooln fe0d3d30af Fix Buildroot OTA upgrade path 2026-04-29 13:43:13 -04:00
Yellowcooln 56814bfc38 Support local embedded Buildroot installs 2026-04-29 13:27:04 -04:00
Lloyd bbaf8bd3f3 fix:gps-fixes 2026-04-29 17:31:10 +01:00
Lloyd 6720f6bdfe Merge pull request #212 from yellowcooln/dev
Improve Buildroot repeater config flow and Pico Pi radio timing wiring
2026-04-29 17:29:56 +01:00
Lloyd 187d033e18 Merge pull request #211 from mitchellmoss/feat-gps-location-update
Update repeater location from GPS fix
2026-04-29 16:10:27 +01:00
Mitchell Moss d83cb61fe7 Make GPS location persistence opt-in and fuzzed 2026-04-29 10:45:53 -04:00
Mitchell Moss da8f83964a Fix GPS location updates and status reporting 2026-04-29 09:58:13 -04:00
Mitchell Moss bf44efbfd9 feat: update repeater location from GPS fix 2026-04-29 09:36:05 -04:00
Yellowcooln 8856268ef2 Expose Buildroot image version 2026-04-29 09:27:56 -04:00
Yellowcooln 465372587b Fix Buildroot yq comment merge 2026-04-29 09:20:22 -04:00
Yellowcooln b0b0be18c5 Preserve config comments on Buildroot 2026-04-29 09:17:39 -04:00
Yellowcooln 97fde6e0dd Set Pico Pi radio timing override in Buildroot profiles 2026-04-29 09:09:57 -04:00
Yellowcooln 83de21005e Fix backspace handling in Buildroot prompts 2026-04-29 09:05:31 -04:00
Yellowcooln 1f88b73b06 Pass configurable SX1262 timing delay 2026-04-29 09:01:05 -04:00
Rightup 22d0e310d9 gps front end static files 2026-04-28 23:23:48 +01:00
Rightup 76a9785218 Add GPS location configuration and diagnostics stream
- Introduced options for using GPS coordinates for repeater location fields in config.
- Implemented precision control for GPS coordinates.
- Added a new API endpoint for a Server-Sent Events stream of GPS diagnostics.
- Updated GPSService to handle new configuration options and fallback logic.
- Enhanced unit tests for GPS location handling.
2026-04-28 23:22:52 +01:00
Lloyd 42b4bbd9e9 Merge PR #199: [codex] Add GPS diagnostics API 2026-04-28 17:24:34 +01:00
Lloyd a36d991c78 Fix event loop handling in TextHelper for room server synchronization 2026-04-28 09:24:42 +01:00
Lloyd 79541aaf41 Implement live radio configuration updates and add unit tests for radio handling 2026-04-27 16:07:09 +01:00
Lloyd 1ed85c4751 Merge pull request #207 from yellowcooln/dev 2026-04-26 22:56:30 +01:00
Rightup d780afa56a Add support for RAK6421 with RAK13300x radios and enhance configuration options
- Introduced `en_pin` and `en_pins` parameters in radio configuration.
- Updated `get_radio_for_board` to handle new configuration options.
- Added unit tests to verify correct handling of `en_pins`.
2026-04-26 15:52:27 +01:00
Lloyd 8ab7bad173 Merge pull request #209 from rightup/revert-208-rak6421-13300x
Revert "rak6421 + rak13300x support"
2026-04-26 15:37:03 +01:00
Lloyd 2ba16cd120 Revert "rak6421 + rak13300x support" 2026-04-26 15:35:31 +01:00
Lloyd a36cb6af44 Merge pull request #208 from recrof/rak6421-13300x
rak6421 + rak13300x support
2026-04-26 15:33:29 +01:00
Rastislav Vysoky c8c9a555ff added support for rak6421 with rak13300x radios 2026-04-26 15:10:50 +02:00