Feature request / possible bug: DM fallback to flood for stale paths
Maintainers usually reply within 11 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 22/100
Research direction
The issue names no source files, so start from the Home Assistant service that sends direct messages and the existing change_contact_path(...) and path discovery commands it mentions. Confirm how the companion reports ACK status for a sent DM, then check whether a retry and flood-resend path can be triggered from there. Done means a DM that fails on a stale saved path is retried, its path is cleared, and it is resent with flood routing, with the learned path stored on success. Expect protocol-level design questions before writing code.
Written by the indexing model from the issue text.
Description
When sending a direct/private message through the Home Assistant integration using a USB Serial Companion,
the message appears to keep using the previously saved DM path / contact out_path.
If that path is no longer valid because one of the companions has moved to another repeater area, the
message may fail instead of automatically falling back to flood routing.
From the MeshCore FAQ, the official app behavior appears to be:
- Try the known saved path.
- Retry when the message is not ACKed.
- After multiple failed retries, reset/clear the saved path.
- Send again using flood as a fallback.
It would be very useful if meshcore-ha could implement the same behavior for direct/private messages sent
through Home Assistant.
Why this matters
A companion is often mobile by design. When a companion moves to another location or another repeater area,
the previously learned route may become stale.
In the official MeshCore app, this appears to be handled by retrying and eventually falling back to flood.
However, messages sent from Home Assistant via USB Serial Companion do not appear to do this automatically.
This makes direct/private messages from Home Assistant less reliable for mobile companions, especially for
bots and automations.
Observed behavior
In my setup, public/channel messages can be received through the mesh, but direct/private messages sent from
Home Assistant to the same mobile companion may remain Unconfirmed.
The contact is known by the USB Serial Companion, but the saved path appears to stay stale or unusable.
Manual path changes or path discovery commands may be required, which is not practical for automations.
Example observations:
- Public message from mobile companion to the Home Assistant USB companion: received.
- Direct/private message from Home Assistant USB companion to the same mobile companion:
Unconfirmed. - Trace/path discovery to that companion: timeout /
path_discovery_timeout. - Manually testing different repeater paths did not reliably recover the DM delivery.
Expected behavior
When sending a DM/private message through Home Assistant:
- Try the saved contact path first.
- Wait for ACK / delivery confirmation.
- Retry if no ACK is received.
- After failed retries, clear/reset the stale path.
- Re-send using flood routing, similar to the official app behavior.
- If delivery succeeds, store the newly learned path for future messages.
Suggested implementation
Add support for automatic DM fallback behavior in meshcore-ha, for example:
- Track ACK/delivery updates for direct/private messages sent through Home Assistant.
- Use timeout/retry information from the companion protocol if available.
- Add optional fallback behavior for direct/private messages, enabled by default or configurable.
- Optionally expose a service parameter to force flood routing for a DM when needed.
- Optionally expose a service to clear/reset a saved DM path from Home Assistant.
Current workaround
Manually clearing or changing the contact path from Home Assistant can sometimes help, for example by using
path discovery or change_contact_path(...) commands.
However, this is not reliable or practical for automations, bots, or mobile users because the correct path
can change frequently.
Environment
- Integration:
meshcore-ha - Radio type: USB Serial Companion
- Sender: Home Assistant service / automation
- Message type: direct/private message
- Path hash mode:
2/ 3-byte - Radio:
910.525 MHz, bandwidth62.5, SF7, CR5 - Repeater firmware observed in network:
v1.16.0 - Exact USB Serial Companion firmware version: to be confirmed
- Exact
meshcore-haversion: to be confirmed
I can provide logs or run specific tests if needed.
- Dominant language
- Python
- Stars
- 269
- Forks
- 58
- Avg merge
- 10d 17h
- Merged PRs (30d)
- 12
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from meshcore-dev/meshcore-ha
-
Beta Tagging?Openquestion
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
meshcore-dev/meshcore-ha#365 · 1 comment ·
Maintainers usually reply within 11 days
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
meshcore-dev/meshcore-ha#196 · 3 comments ·
Maintainers usually reply within 11 days
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
meshcore-dev/meshcore-ha#432 ·
Maintainers usually reply within 11 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
meshcore-dev/meshcore-ha#426 ·
Maintainers usually reply within 11 days
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
meshcore-dev/meshcore-ha#420 · 1 comment ·
Maintainers usually reply within 11 days
All issues in meshcore-dev/meshcore-ha
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day