* web: reference meshcore nodes in chat
* data: add adv_name to messages
* web: address review comments
* derive actual companion from name string
* derive actual companion from name string
* derive actual companion from name string
* web: address review comments
* web: address review comments
* chore: bump version to 0.6.0 and remove deprecated env var aliases
BREAKING CHANGES:
- POTATOMESH_INSTANCE removed — use INSTANCE_DOMAIN
- PROVIDER removed — use PROTOCOL
- MESH_SERIAL removed — use CONNECTION
- PORT config alias removed — use CONNECTION
The _ConfigModule proxy class (which kept PROTOCOL/PROVIDER and
CONNECTION/PORT in sync) is deleted. docker-compose.yml now defaults
INSTANCE_DOMAIN to http://web:41447 so deployments without an explicit
value continue to work.
* tests: run black
* address review comments
Replace the hardcoded max_idx=8 parameter on _ensure_channel_names with
a DEVICE_INFO query (send_device_query → max_channels) so the full range
of configured channels is always probed regardless of firmware variant.
Falls back to _CHANNEL_PROBE_FALLBACK_MAX (32) when the query fails or
the device returns an older firmware that omits max_channels.
Also removes always=True from the warning-severity channel failure log
(redundant — only debug-severity is gated behind the DEBUG flag) and adds
a deferred-import comment in _ensure_channel_names.
* data: register meshcore channel mappings
* fix: use mc.commands.get_channel for MeshCore channel name probing
MeshCore exposes device commands via the commands sub-object
(CommandHandler), not directly on MeshCore instances.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: probe all channel indices regardless of ERROR responses
Removed the consecutive-error early-stop heuristic from
_ensure_channel_names so sparse channel configurations (e.g. slots 0
and 5 configured with slots 1–4 empty) are fully probed. Only a hard
exception aborts the loop early.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* data: provide frequency and modem preset for meshcore
* data: provide frequency and modem preset for meshcore
* ingestor: address review comments
* fix: remove duplicate _mark_packet_seen entry from handlers __all__
* ci: install meshcore in Python workflow
protocols/meshcore.py now imports meshcore at module level (required to
fix a self-referential import failure after the providers/ → protocols/
rename). test_provider_unit.py imports that module unconditionally, so
meshcore must be present in the test environment.
* data: run black
* fix: address review comments from PRs #676 and #681
- Introduce ClosedBeforeConnectedError(ConnectionError) subclass so
callers can distinguish a user-initiated shutdown from a hardware
failure without string-matching the exception message (#676)
- Add test covering the close-before-connected path: asserts
isConnected stays False and error_holder contains the typed error
- Add protocolIconPrefixHtml unit tests covering null, meshtastic,
meshcore, and unknown protocol strings (#681)
- Add buildDisplayContext tests for protocol extraction from trace,
node, and absent candidate sources (#681)
- Expose buildDisplayContext via _testUtils to make it directly testable
- Add meshcore icon presence assertions to createAnnouncementEntry and
createMessageChatEntry tests (previously only checked absence of
meshtastic icon)
* fix: address #689 review comments
- Move createMessageChatEntry meshcore icon test into its own section,
after the createMessageChatEntry divider where it belongs
- Export ClosedBeforeConnectedError from providers/__init__.py via the
existing lazy-load __getattr__ so callers outside the providers/
subpackage can catch it without importing the full meshcore module
* refactor: eliminate test boilerplate to fix SonarCloud duplication gate
Introduce withApp() and innerHtml() helpers in main-protocol.test.js to
replace the 18-repeated setupApp/try/finally/cleanup pattern and the
inconsistent innerHTML extraction expression. No test logic changed.
* refactor: extract stalled-run helpers to fix SonarCloud duplication gate
The two stall-based _run_meshcore tests shared ~20 lines of identical
setup and spin-loop boilerplate. Extract _setup_stalled_run() and
_start_stalled_run() so each test contains only its distinct assertions.
* enh: surface meshcore role types (#680)
Map MeshCore ADV_TYPE_* integers to user.role strings so COMPANION,
REPEATER, ROOM_SERVER, and SENSOR roles are surfaced to the dashboard.
Role is omitted when ADV_TYPE_NONE (0) or unknown.
Co-authored-by: Ben Allfree <ben@benallfree.com>
* data: run black
---------
Co-authored-by: Ben Allfree <ben@benallfree.com>
* chore: refactor codebase before meshcore release
* data: run black
* fix: resolve SonarCloud S1244/S5796 reliability issues in test files
Replace floating-point equality comparisons with pytest.approx() to
satisfy S1244, and replace the `is` identity operator with id()-based
comparison to satisfy S5796.
* fix: remove duplicate encrypted_flag assignment in store_packet_dict
The encrypted_flag was computed identically on lines 307 and 345 with no
mutation of `encrypted` between them. Remove the dead second assignment.
* web: prepare release
* fix: address pre-release review concerns
- Emit invalid telemetry_type warning at severity=warning/always=True so
it surfaces in production logs, not just under DEBUG=1
- Hoist VALID_TELEMETRY_TYPES to a module-level constant in DataProcessing
to avoid per-call allocation inside insert_telemetry
- Add Python test covering the invalid-type drop path in store_telemetry_packet
- Add Ruby spec asserting that an invalid telemetry_type in a POST payload
is discarded and metric-based inference takes over
* feat: split device and power-sensor telemetry charts (#643)
Add telemetry_type TEXT discriminator column across the full stack so
device_metrics rows no longer mix with power_metrics in the same chart.
Python and Ruby ingestors detect the protobuf subtype at write time;
classifySnapshot() provides field-presence fallback for legacy rows.
'Power metrics' chart split into 'Device health' and 'Power sensor'.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: skip typeFilter for aggregated telemetry; add air_quality coverage
- renderTelemetryChart now skips spec.typeFilter when chartOptions.isAggregated
is true, preventing mixed-bucket aggregated snapshots from losing series data
- renderTelemetryCharts detects the aggregated vs per-packet path and sets
isAggregated accordingly; typeFilter still applies for per-packet history
- JS tests: extract makeAggregatedNode/makeHistoryNode helpers to eliminate
fixture duplication; add aggregated-mixed-bucket regression test; move
type-separation tests onto the history path where filtering actually applies
- Ruby + Python: add air_quality_metrics telemetry_type tests for coverage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: reduce test duplication flagged by Sonar
Hoist CHART_NOW_MS/CHART_NOW_SECONDS constants to eliminate 14 repeated
setup lines across renderTelemetryCharts tests. Extract
expect_stored_telemetry_type helper in app_spec to replace the four
identical with_db/SELECT/expect blocks in telemetry_type inference tests.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* web: address review comments
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* web: implement a 'protocol' field across systems
* web: address review feedback on multi-protocol support
- Rebase on main (pick up coordinate-clearing bugfix from #654)
- P1: prevent cross-protocol message merges on shared packet IDs
- P2: exclude "ingestor" key when enforcing /api/nodes batch limit
- Extract append_protocol_filter helper + PROTOCOL_CLAUSE constant to
reduce cognitive complexity and deduplicate SQL fragment in queries.rb
- Extract coerce_bool helper to reduce upsert_node cognitive complexity
- Merge nested if in insert_message protocol update path (Sonar)
- Add explicit UPDATE backfill in ensure_schema_upgrades so any pre-existing
NULL/empty protocol rows are set to meshtastic on upgrade
- Rename migration file to 20260328_ (correct year)
- Expand protocol_spec.rb: filter tests for all 7 endpoints,
cross-protocol non-merge test, batch limit test, Sonar constant fixes,
ENV.fetch, P1 regression test
* web: address review comments
* web: decrypt PSK-1 unencrypted messages on arrival
* web: address review comments
* web: use proper psk to decrypt instead of alias
* cover missing unit test vectors
* tests: run black formatter
* web: fix tests
* web: refine decryption data processing logic
* web: address review comments
* web: cover missing unit test vectors
* web: cover missing unit test vectors
* web: cover missing unit test vectors
* web: cover missing unit test vectors
* Floor override frequencies to MHz integers
* Handle stub protobuf nodeinfo dictionaries
* Handle zero override frequency defaults
* Add defensive serialization coverage
* Stabilize nodeinfo user role normalization test
* Prevent message ids from being treated as nodes (#)
* Cover node id candidate edge cases
* Revert "address missing id field ingestor bug (#469)"
This reverts commit 546e009867.