752 Commits

Author SHA1 Message Date
Lloyd e17d1137ab Merge pull request #259 from pyMC-dev/dev
pyMC_Repeater 1.0.10 updates
2026-05-22 16:09:38 +01:00
Lloyd 85f282357c feat: expand allowed sections for configuration imports to include additional radio types 1.0.10 2026-05-22 15:19:06 +01:00
Lloyd a48b29837a feat: pre-restart config validation and site identification
- Add pre-restart config preflight to RestartModal with pass/warning/fail result panel and "Restart Anyway" confirmation for warnings
- Add Site Identification (site_name) config field shown as browser title and login page caption
- Add GET /api/validate_config and GET /api/site_info backend endpoints
- Sync document.title with site_name via system store watchEffect
- Fix authRegression.test.ts TS2367 type narrowing error
- add new radio hardware and radio settings tabs
2026-05-22 14:44:15 +01:00
Lloyd 78648f2af9 feat: add site_info endpoint to return site identification name without authentication 2026-05-22 14:35:49 +01:00
Lloyd 2a031b790f feat: add validate_config endpoint to check config.yaml syntax and required settings 2026-05-22 13:59:48 +01:00
Lloyd 3244f7b9bc feat: add validation for TX power settings and update API endpoint for serial ports 2026-05-22 12:47:02 +01:00
Lloyd 5c687076f1 feat: add endpoint to discover available serial/USB modem device paths 2026-05-22 10:21:07 +01:00
Lloyd 4cf04f87d1 test: sensor tests with mock implementations and additional assertions 2026-05-21 14:23:02 +01:00
Lloyd 22b39e5715 fix: update maintainer information in changelog, control, and build scripts 2026-05-21 12:47:54 +01:00
Lloyd b464fa8593 docs: update example configuration for Waveshare UPS D and E Hats 2026-05-21 12:42:22 +01:00
Lloyd 5b93d1023d fix: update loop detection thresholds and improve path hash handling in API endpoints 2026-05-21 12:29:21 +01:00
Lloyd d25e97af3c feat: implement setup status check and reject subsequent setups after completion 2026-05-21 11:32:08 +01:00
Lloyd 8f3477ddd6 Merge pull request #256 from CarlsonCustoms/add-waveshare-ups-hat-e
Add Waveshare UPS HAT (E) sensor plug-in
2026-05-20 21:35:45 +01:00
Zack Carlson 6e89272bce Add Waveshare UPS HAT (E) sensor plug-in
The HAT (E) uses a dedicated BMS MCU (not an INA219) at I2C address 0x2D.
It exposes charge state, pack voltage/current, per-cell voltages, remaining
capacity in mAh, and time-to-empty/full estimates directly via I2C registers.

Tested on Raspberry Pi 4B with pyMC_Repeater running pymc-battery-writer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 09:25:38 -07:00
Lloyd 22adbd1a84 feat: add setup usb/tcp details on setup 2026-05-19 14:45:26 +01:00
Lloyd 6aab7ec676 fix:update-restart-functions 2026-05-19 11:23:46 +01:00
Lloyd 7d54859348 Add example configurations for SHTC3 and Waveshare UPS Hat sensors 2026-05-19 11:17:12 +01:00
Lloyd cbfcb69c07 Merge pull request #255 from CarlsonCustoms/add-shtc3-waveshare-sensors
Add SHTC3 and Waveshare UPS HAT (D) sensor plug-ins
2026-05-19 11:12:04 +01:00
Zack Carlson f88d3c52be Revert "Add NMEA GPS sensor plug-in"
This reverts commit 8b0607aa1c.
2026-05-18 22:55:05 -07:00
Zack Carlson 8b0607aa1c Add NMEA GPS sensor plug-in
nmea_gps.py reads NMEA 0183 sentences directly from a serial GPS receiver
(/dev/serial0 by default) and exposes fix status, position, motion, accuracy,
and satellite fields as sensor readings.

Parses GGA, RMC, and GSA sentence types using stdlib only (no pynmea2
dependency) — pyserial is already required by the repeater.

Designed for use when the repeater's built-in GPS service is disabled
(gps.enabled: false). Both cannot share the serial port simultaneously.
With gps.api_fallback_to_config_location: true the repeater continues
advertising the manually-configured location while the sensor plugin handles
raw GPS data.

Returns: fix_valid, fix_quality, fix_type, latitude, longitude, altitude_m,
speed_kmh, course_degrees, hdop, pdop, vdop, satellites_used, utc_datetime.
Position and motion fields are null when fix_valid is false to avoid
reporting config-fallback coordinates as real GPS data.

Tested on Raspberry Pi 3B+ (DietPi) with a u-blox GPS module on /dev/serial0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 22:50:17 -07:00
Zack Carlson 9c1661f097 Add SHTC3 and Waveshare UPS HAT (D) sensor plug-ins
- shtc3.py: SHTC3 temperature/humidity sensor (RAK1901 WisBlock module,
  I2C 0x70). Uses smbus2 i2c_rdwr for raw I2C reads since SHTC3 requires
  16-bit command words with no register-byte prefix. Returns temperature_c,
  temperature_f, humidity_pct.

- waveshare_ups_d.py: Waveshare UPS HAT (D) battery monitor via INA219 at
  I2C 0x43. Uses the HAT's actual shunt (0.01 Ω, CAL=26868) rather than the
  generic INA219 defaults. Returns bus_voltage_v, shunt_voltage_mv,
  current_ma, power_mw, battery_percent (piecewise-linear SoC for 21700
  cell), and charge_state (charging/discharging/idle). Sign convention
  matches Waveshare sample code: negative current = charging.

Both plug-ins tested on Raspberry Pi 3B+ (DietPi) with RAK1901 WisBlock
sensor and Waveshare UPS HAT (D).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 22:32:20 -07:00
Lloyd 13ea672597 Merge pull request #254 from yellowcooln/dev
docker: improve container restart handling, publishing, and config mounting
2026-05-18 21:10:34 +01:00
Yellowcooln f21aba0ac4 docker: mount config directory in compose 2026-05-18 13:25:23 -04:00
Yellowcooln 11e2b90c18 ci: route docker publish by repository owner 2026-05-18 12:43:19 -04:00
Yellowcooln ab8ae30e7d web: clarify docker restart update messaging 2026-05-18 12:40:43 -04:00
Yellowcooln 7b6babd9f5 service: restart containers by exiting process 2026-05-18 12:12:18 -04:00
Lloyd 193b428cc2 Merge pull request #252 from yellowcooln/patch-2
docker: bootstrap config on startup and include rootless container fixes
2026-05-18 16:19:58 +01:00
Lloyd 8c354db99c Merge pull request #253 from pyMC-dev/wip/null-radio-before-pr250
Wip/null radio before pr250
2026-05-18 16:18:05 +01:00
Lloyd e0dbecd51c feat: update default radio type to null in config example 2026-05-18 15:59:49 +01:00
Yellowcooln c03d4ddc2b docker: merge config from example on boot 2026-05-18 10:48:39 -04:00
Yellowcooln 72a8755399 docker: bootstrap config and run rootless 2026-05-18 10:23:37 -04:00
Yellowcooln a08c4d093c Update repository conditions in docker-publish.yml
Had old repo path, Changing to 

pyMC-dev/pyMC_Repeater
2026-05-18 10:10:32 -04:00
Lloyd 0e1031227e update ui for setup 2026-05-18 14:50:45 +01:00
Lloyd 56113c22ec feat: update radio status handling to show radio errors 2026-05-18 14:34:42 +01:00
Lloyd 052474cf48 feat: add connection type for KISS and pymc modems in radio settings 2026-05-18 14:15:46 +01:00
itk80 d7f2d2cc66 setup wizard: pymc_tcp / pymc_usb hardware tiles
Lets a fresh repeater install pick the pymc_usb (USB-CDC) or pymc_tcp
(Wi-Fi/Ethernet) external modem from the first-run /setup wizard
instead of requiring the user to hand-edit config.yaml after install.

radio-settings.json gets two new hardware entries; setup_wizard()
in api_endpoints.py handles them in dedicated branches that mirror
the existing KISS pattern (placeholders if the SPA doesn't yet send
modem-specific inputs, request body overrides if it does).

For pymc_tcp the wizard writes a sentinel host placeholder
('REPLACE_WITH_MODEM_HOST') so the YAML stays valid; on startup
get_radio_for_board() then errors with a clear pointer at
pymc_tcp.host (existing behavior from the PR #240 branch). pymc_usb
defaults to /dev/ttyACM0 at 921600 baud — matches the USB-CDC
device path documented in pymc_usb's README + pymc_driver.

Five new tests in tests/test_setup_wizard_pymc.py verify both
default and overridden code paths plus a KISS regression guard.
2026-05-18 13:00:00 +01:00
Lloyd 13b8004ad5 wip: null-radio defaults and needs_setup updates 2026-05-18 13:00:00 +01:00
Lloyd f4d89484de Merge pull request #251 from yellowcooln/chore/manual-docker-workflow
ci: restrict docker publish workflow for forks
2026-05-18 09:19:53 +01:00
Yellowcooln 5f430858f2 ci: restrict docker publish workflow 2026-05-17 22:29:37 -04:00
Lloyd baec25b7bb Merge pull request #247 from yellowcooln/addon-sync-workflow
Derive Docker image version from git metadata and dispatch HA add-on sync
2026-05-16 13:38:57 +01:00
yellowcooln 2d875ae2fb Derive Docker dev version from git metadata 2026-05-15 11:18:15 -04:00
Lloyd ce1acabd34 fix: parse sync_word as integer in get_radio_for_board function 2026-05-15 14:04:18 +01:00
Lloyd 4f278f121f Merge pull request #243 from dmduran12/patch-1
Add Southern California radio preset
2026-05-15 11:10:24 +01:00
Lloyd a7ae704fd9 Merge pull request #245 from dmduran12/broker_template-UIsync
feat(presets): expose bundled broker presets via GET /api/broker_presets
2026-05-15 10:25:19 +01:00
yellowcooln 3baf1158cc Dispatch add-on sync after Docker publish 2026-05-14 23:06:00 -04:00
dmduran12 7a0aec7b60 feat(presets): expose bundled broker presets via GET /api/broker_presets
Adds a new read-only endpoint that serves the bundled `repeater/presets/*.yaml`
catalogue so the admin UI can render a network picker without bundling its own
copy of the broker dicts. The UI side of this is paired with
pyMC-dev/pyMC-RepeaterUI#TBD which retires src/assets/broker-templates.json
in favour of authClient.get('/api/broker_presets').

Why
The UI previously shipped a separate JSON snapshot of every supported MC2MQTT
network. The JSON and these YAML files drifted: the Waev entry on the UI side
pointed at mqtt-a.waev.app with audience mqtt.waev.app (single primary, no
failover) while the YAML side here listed two brokers (A + B). The result was
that operators picking 'Waev' from the dropdown silently lost the redundancy
this preset is meant to provide.

What changes

repeater/presets/*.yaml
- Add optional top-level `display_name` and `website` fields. The loader
  treats them as advisory metadata for the UI; the runtime connection code
  never reads them. `display_name` falls back to the titlecased filename
  stem if absent so existing third-party presets keep rendering.

repeater/presets/waev.yaml
- Collapse from two broker entries (waev-a, waev-b) to a single broker on
  `mqtt.waev.app`. The Waev edge Worker (see waev/src/router.ts:
  MQTT_PRIMARY_FAILOVER_TIMEOUT_MS) already does server-side A/B failover on
  the alias host with a 1500 ms timeout. Two independent client connections
  would defeat the dedup-on-pubkey-hash contract on the waev ingest side.
  Operators who want to pin to a specific container can edit host/audience
  after import.

repeater/presets/meshmapper.yaml (new)
- Port of the historical MeshMapper entry from the UI's deprecated JSON.
  Single broker on mqtt.meshmapper.cc, format: letsmesh (matches the
  published wire contract; bump to a dedicated value if/when wire-level
  differentiation lands).

repeater/web/api_endpoints.py
- New `broker_presets` CherryPy handler at `GET /api/broker_presets`.
  Unauthenticated to match the existing `mqtt_status` precedent — the
  response carries only public hostnames + TLS hints, no PII. Imports the
  presets module lazily so a broken YAML never blocks process startup.
  Response shape:
    {
      success: true,
      data: [{ id, name, website?, brokers: [ ... raw YAML dicts ... ] }, …]
    }

tests/test_presets.py
- Locks the new metadata fields (display_name, website) on all three presets.
- Locks the Waev single-alias-broker design with an explicit comment tying
  the test to the waev Worker failover code.
- Adds MeshMapper coverage parallel to the other public-network presets.
- Adds a stub-instance test that drives the new `broker_presets` method on
  an APIEndpoints stand-in (bypassing the heavyweight `__init__`) and
  asserts the UI-ready response shape.

Verification
- New endpoint serves the expected three presets (letsmesh: 2 brokers,
  meshmapper: 1, waev: 1) when exercised end-to-end against a local mock
  that imports the real preset loader.
- Existing legacy-config migration tests (broker_index 0/1/-1 → preset +
  overrides) still pass — the override pipeline is untouched.

Co-Authored-By: Oz <oz-agent@warp.dev>
2026-05-14 15:14:10 -07:00
Lloyd 5b95be3db5 refactor: remove sync word configuration from radio settings 2026-05-14 17:20:13 +01:00
Lloyd 2510bed9a4 feat: ui speed enhance 2026-05-14 13:54:59 +01:00
Treehouse⚡️ d5903c372b Add Southern California radio preset 2026-05-13 10:44:20 -07:00
Lloyd af9799d24b Merge pull request #242 from yellowcooln/patch-1
Update Docker image repository in workflow
2026-05-13 17:06:52 +01:00